-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change test extension to .lint-test.js
#48
Conversation
@@ -145,7 +145,7 @@ describe('broccoli-jshint', function(){ | |||
builder = new broccoli.Builder(node); | |||
return builder.build().then(function() { | |||
var expected = [ | |||
'\n' + chalk.red('core.js: line 1, col 20, Missing semicolon.\n\n1 error') + '\n\n' + chalk.red('main.js: line 1, col 1, Missing semicolon.\n\n1 error') + '\n', | |||
'\n' + chalk.red('core.js: line 1, col 20, Missing semicolon.\n\n1 error') + '\n\n' + chalk.red('main.js: line 1, col 10, Missing semicolon.\n\n1 error') + '\n', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this error message changed, but I figure it must be a bug fix in jshint. The new error message (col 10) is better than the old error message (col 1).
Looks good to me. Will land once @Turbo87 has a chance to review. |
Afk already, I'll test this out tomorrow. One question though, what happens when eslint and jshint and JSCS all create a lint-test file? Won't that create conflicts? |
One would override the other, but it seems like an edge case that is not terribly common. One potential solution to that would be to use |
The lint-test extension is for the QUnit checkbox to disable the lint tests, correct? |
Correct |
@Turbo87 The naming conflict issue is something I hadn't considered. The So here are the constraints we're working with:
Today we have these linting extensions that I know of:
Using Requiring the As @rwjblue pointed out Another option would be to expand the linting check in ember-cli-qunit to allow Given the current state of the libraries I listed I feel like the simplicity of
I like that the specificity in the filename decreases from left to right Another option could be to allow each of these ember-cli-linting libraries to register their specific extension as a type of linting test. |
I tend to agree with @mitchlloyd. Having ESLint and JSHint run in parallel is most likely an edge case but something we should consider, particularly in the transition period between the two. Since |
Version numbers are not costly 😺 |
Yeah if we can handle this in the integration libraries between ember-cli and the broccoli libs that seems better. Closing this for now. |
This addresses ember-cli/ember-cli-jshint#5, and is a follow up from the discussion in #41.
To test these changes, I installed a new Ember CLI app, and created npm links in locally cloned repos:
Now the files generated end in
.lint-test.js
, aligning with ember-cli-qunit:Running all tests show the linting tests:
Using the "Disable Linting" checkbox works:
@Turbo87 could you double check that this fixes the issue? Testing this is a little involved so I would love to get a second set of eyes.