-
-
Notifications
You must be signed in to change notification settings - Fork 26
Replace JSHint/JSCS with ESLint #163
Conversation
|
this doesn't seem to work properly yet and I'm not quite sure why... instructions:
@BrianSipple any ideas? |
|
i like were this is going! |
lib/eslint-tree.js
Outdated
| testGenerator: testGenerator, | ||
| }); | ||
|
|
||
| esLintTree.targetExtension = 'eslint.js'; |
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.
It looks like this line was causing the issues. If the default lint-test.js extension is used instead it works properly...
|
@rwjblue @stefanpenner this should be ready for merging now. you can test this with the instructions above. |
|
TravisCI failures seem unrelated to this PR |
|
I'll try to find time over the next few days, feel free to bug me if i dont. |
|
@stefanpenner ping ;) |
|
🐛 |
|
👀 |
|
running this i get which may be unrelated? |
|
commenting out the test above ^, i get further. It seems like i still see in the console is that expected? |
|
@stefanpenner - That test has been removed from ember master, because it was fundamentally flawed (and an update to babel-plugin-feature-flags broke it). |
|
@rwjblue thanks |
|
@Turbo87 once i actually read your instructions and switched to the correct emberjs-build branch i seem to get: thoughts? |
|
@stefanpenner hmm that looks unrelated. did you make sure to clean all the caches? |
|
@stefanpenner can't reproduce your second issue. I'm getting hit by |
|
As discussed in slack, we will need to adjust how the eslint plugin is loaded, so that I wasn't able to fully test, (headless tests, appear unhappy on my machine but unrelated to this PR), but the rest seems to work good and as expected. |
unfortunately this doesn't seem to be possible currently. the only way to specify plugins right now is through their package name ( this might be off-topic but what was the reason for extracting |
I'm not sure the abstractions where quite correct, but this is the current state of things. I do believe there is common sentiment to dramatically improve this. We should chat sometime this week, if eslint cannot be abstracted like this we may need to work to solve it. |
The issue with that is that ESLint 3 was just released a few days ago which dropped Node 0.x support. My guess is that ESLint 2 won't receive any new features or refactorings in that direction so we would have to either drop Node 0.x support for Ember development or live without npm linking this in. (or fork ESLint, but I don't think that would be a proper long term solution) |
:s, sounds like we need to add this to the agenda |
|
I'm wondering if @nzakas would answer if I asked if this was something that he would consider for another v2 release... for context: we are talking about using |
|
and if we'd really fork for the time being then we'd also have to fork |
|
FWIW, I think we can require a specific node version to build Ember itself... |
I don't believe so, as we would like people to be able to build ember like they do ember-data. That being said, we could disable eslint in those cases. |
|
Agreed. Consumers of addons typically do not run linting or tests for those addons. |
|
@stefanpenner it seems that eslint/eslint#6865 might solve our issue |
e662076 to
6e623f1
Compare
|
@stefanpenner @rwjblue this PR is up-to-date again and IMHO ready to be merged. instructions to try it out:
|
|
@stefanpenner FYI I worked around the plugin resolution issue by just not using any plugins. It seems that having custom rules in the repository is also well supported by ESLint and since we can give absolute paths to the folder with the custom rules there is no issue with |
lib/ember-build.js
Outdated
| glimmer: this.glimmer, | ||
| vendoredPackages: vendoredPackages | ||
| vendoredPackages: vendoredPackages, | ||
| eslintRulePaths: ['lib/eslint-rules'], |
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.
This should be passed in from ember-cli-build.js in Ember itself.
package.json
Outdated
| "broccoli-jscs": "^1.4.1", | ||
| "broccoli-jshint": "^1.1.0", | ||
| "broccoli-kitchen-sink-helpers": "^0.2.6", | ||
| "broccoli-lint-eslint": "^2.3.0", |
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.
3.x
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.
yeah, that makes more sense now 👍
|
A few small changes here, and I think this can land... |
|
@rwjblue done |
|
Looks like Travis is failing due to 0.12 / 0.10 now, I submitted #185 to remove those and will re-kick off the build here (not sure if it will fix it without a rebase though). |
|
@rwjblue rebased, thanks! |
|
Thank you! |
|
Released as 0.19.0 |
This PR enables emberjs/ember.js#13549 to be merged by replacing JSHint and JSCS with ESLint.
Resolves #161
/cc @rwjblue @stefanpenner