Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Add factory function and "group" option #95

Merged
merged 7 commits into from
May 1, 2017

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Apr 28, 2017

This PR adds a create() factory function to the EslintValidationFilter class, which allows us to return something other than just a EslintValidationFilter instance.

The PR also adds a group option which (in combination with a testGenerator option of qunit or mocha) can be used to generate all tests into a single file and test module:

QUnit.module('ESLint | app');

QUnit.test('a.js', function(assert) {
  assert.expect(1);
  assert.ok(false, 'a.js should pass ESLint\n\n1:1 - Unexpected console statement. (no-console)');
});

QUnit.test('b.js', function(assert) {
  assert.expect(1);
  assert.ok(true, 'b.js should pass ESLint');
});

All this should be implemented in a backwards compatible way so that we can release it in a minor version bump.

Closes #92

see also ember-cli/ember-cli-eslint#176

@Turbo87 Turbo87 changed the title WIP: Add factory function and "group" option Add factory function and "group" option Apr 28, 2017
Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this in slack, and came to the conclusion that we are 👍 here but that we want to extract the logic to a separate package (to make it easier for others to take advantage and to add additional frameworks).

The plan was to land this here, then extract as a second step.

@Turbo87 Turbo87 merged commit b25f5a8 into ember-cli:master May 1, 2017
@Turbo87 Turbo87 deleted the group-option branch May 1, 2017 15:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants