-
Notifications
You must be signed in to change notification settings - Fork 140
Not working with eslint v2 ? #435
Comments
linter-eslint has options to use local or global eslint. If you install eslint in your project or globally it'll use that instead of the bundled versions, try that and let us know if it works for you |
I always have eslint installed in my local project (i.e. I don't check the "use global" option). Here is my linter-eslint config:
Have you successfully used eslint v2 in a local project? |
confirming that it's installed locally: $ ./node_modules/.bin/eslint -v
v2.0.0 My local eslint config file: $ cat ./.eslintrc.js
module.exports = {
"extends": "standard",
"plugins": [
"standard"
],
"rules": {
"semi": [2, "always"]
}
}; eslint things install locally: $ ls ./node_modules/ | grep eslint
eslint
eslint-config-airbnb
eslint-config-standard
eslint-plugin-promise
eslint-plugin-react
eslint-plugin-standard
gulp-eslint My
|
I created a const foo = 'Hello';
const bar = 'World!'
console.log(`${foo} ${bar}`); I linted using the locally installed version: $ ./node_modules/.bin/eslint ./test-eslint.js
/Users/[myusername]/Projects/git/[myprojectname]/test-eslint.js
2:21 error Missing semicolon semi
✖ 1 problem (1 error, 0 warnings) Which is working the way I intended (only 1 error: a missing semi-colon). Here's what I'm seeing in Atom v1.6.0-beta3: |
Well, I just restarted Atom, and things are now working. Not sure what's up. I didn't make any changes at all, just restarted Atom. I'm guessing something screwed up when it auto-updated to 1.6.0-beta3. Sorry for wasting your time. |
I am glad you got it to work! :) |
Yeah, me too! I kinda wish I could've done more debugging before restarting Atom on a whim. I guess it's something to suggest to people if they log an unexplainable bug. It's usually something I try before going to the step of making a Github Issue, but I thought I had already restarted after the Atom upgrade. Not sure what the deal was, but an Atom restart definitely fixed it. Thanks again! |
Please note that we've had reports of ESLint caching config untill rebooted in versions <2.x |
Yeah... I think I may have read one of the old issues which put the idea in my head to try a restart. Still wish I would've used devtools or something to try to figure it out. Oh well. Something I'll keep in mind if another Atom issue ever pops up... |
Thanks again for this invaluable tool! |
First off, thanks for the great plugin! It's extremely useful/valuable for my day-to-day workflow.
I recently created a new project using
gulp-eslint
like I have in the past. Mygulp lint
task works as expected (i.e. running it uses my eslint v2 configuration correctly)- although when I open the project in Atom (version 1.6.0-beta3) using linter-eslint (version 6.0.0), my configuration is not working.I'm wondering if v2 changed the
.eslintrc.js
naming convention? Mine now has a.js
extension. I've tried with and without the.js
extension, as well as changing mylinter-eslint
configuration settings, but I haven't had any luck.My
.eslintrc.js
file looks like:gulp lint
uses that file, and produces no errors (unless I explicitly do something like remove the "semi" rule, or introduce a lint error intentionally.When I open a file that is being linted correctly by
gulp lint
in Atom, I see:ESLint - Error - Fatal - Parsing Error: The keyword 'const' is reserved at line 2 col 1
I am using babel as well, but this has never been a problem in the past. My other eslint Atom projects work correctly, but they are all eslint v1. I only notice issues with this new project that uses eslint v2.
Thanks again.
Logging this bug due to the comments I made in #433
The text was updated successfully, but these errors were encountered: