Comments (11)
Cool. So Good news is I found the problem. Bad news is eslint changed their help text format so the help parser is broken.
This commit broke the help parser: eslint/eslint@cfbd428
from eslint-watch.
I have a fix out for this, however I am going to wait until this issue is resolved eslint/eslint#3792. Then I will push out a fix.
from eslint-watch.
👍
from eslint-watch.
The only thing holding this up is failing tests on windows for the watcher. Later tonight I will pick this up again. At the latest I should be able to get this out you guys by the end of the day tomorrow.
from eslint-watch.
👍 Thanks a lot for fixing this
from eslint-watch.
Yeah no problem. Let me know if you see anything else.
from eslint-watch.
@rizowski I think that there are at least two new rules (second one is not new, but contains some extra settings on 1.4.0) that seems not to be working when using ews:
"require-jsdoc": [ 1 ]
Error: Definition for rule 'require-jsdoc' was not found.
http://eslint.org/docs/rules/require-jsdoc
"quote-props": [2, "as-needed", { "keywords": true, "unnecessary": false }],
Configuration for rule "quote-props" is invalid:
Value "2,as-needed,[object Object]" has more items than allowed.
http://eslint.org/docs/rules/quote-props
from eslint-watch.
@jacorachan Does this only happen when it runs through eslint-watch? Eslint-watch shouldn't be keeping any lint rules from coming through. The only thing Eslint-watch should be changing is the options in the cli help context and adding a few things like the watch command and a few other small things.
Second question: If the above is true, what version of eslint, and eslint-watch are you using?
from eslint-watch.
This is the command I run:
c:\myApp>esw -f compact -c ./eslint-packages.json --ignore-path ./eslint-packages-ignore.conf ./../packages/
C:\Program Files (x86)\nodejs\node_modules\eslint\lib\config.js:129
throw e;
^
Error: c:\myApp\eslint.json:
Configuration for rule "quote-props" is invalid:
Value "2,as-needed,[object Object]" has more items than allowed.
Referenced from: c:\myApp\eslint-packages.json
My versions are:
c:\myApp>esw --v
v0.23.0
c:\myApp>eslint --v
v1.5.0
And this is part of my rules configuration file. Last line is the one that is throwing the error:
{
"env": {
"browser": true
},
"plugins": [
"smells"
],
"rules": {
// TODO: Adding this as error will have problems
// with BOM marker in some files.
// BOM marker should be removed before enabling this setting
"no-irregular-whitespace": [ 0 ],
//
// Code smells
// ===== ===== ===== ===== ===== ===== ===== ===== =====
//
"smells/no-switch": 1,
"smells/no-complex-switch-case": 1,
"smells/no-setinterval": 1,
"smells/no-this-assign": 1,
//
// Code style based on idiomatic.js
// ===== ===== ===== ===== ===== ===== ===== ===== =====
//
// JSDoc Valid:
"valid-jsdoc": [ 1 ],
// Variable definition options
"no-catch-shadow": [ 2 ],
"no-delete-var": [ 2 ],
"no-label-var": [ 2 ],
"no-shadow-restricted-names": [ 2 ],
"no-shadow": [ 2 ],
"no-undef": [ 2 ],
"no-undef-init": [ 2 ],
"no-undefined": [ 2 ],
"no-unused-vars": [ 1, { "vars": "all", "args": "after-used" } ],
"no-use-before-define": [ 2 ],
"vars-on-top": [ 2 ],
"block-scoped-var": [ 2 ],
"no-redeclare": [ 2 ],
"no-proto": [ 2 ],
"quote-props": [2, "as-needed", { "keywords": true, "unnecessary": false }],
Running this eslint with the same parameters works:
c:\myApp>eslint -f compact -c ./eslint-packages.json --ignore-path ./eslint-packages-ignore.conf ./../packages/
from eslint-watch.
So the -v for eslint-watch will report the version of eslint it is using. If it returned 0.23.0, then esw is finding an earlier eslint version. If you were an early adopter, esw used to pull in eslint as a dependency. Later versions I made it a peer dependency. I will add an issue for addressing that. In the meantime, what version does it say you are using in either your package.json
or npm list -g --depth=0
from eslint-watch.
I had an old version of eslint, some zero point something, so it makes sense that it says 0.23... As I have just updated to the latest stable, that can be the reason.
C:\Users\user>npm list -g --depth=0
C:\Users\user\AppData\Roaming\npm
└── [email protected]
I will try to cleanup my NPM, and download both eslint, and eslint-watch from scratch. That could be the cause of the problem, maybe for some reason eslint-watch is using my old version that somehow is "cached" in my hard drive... I will try to find myself some more information about and post here my discoveries.
Thanks for the help!
from eslint-watch.
Related Issues (20)
- esw results are doubled/shown twice HOT 6
- Option to not print "clean" message; only errors HOT 4
- Changing branches on git triggers dozens of concurrent `eslint` processes to be created HOT 3
- Hope to have more comfortable information. HOT 2
- npm audit high priority warning HOT 1
- Error parsing '--rule' CLI option HOT 2
- Missing Module HOT 3
- Running `esw --changed -w` causes non-JS files to attempt to be linted HOT 4
- `--clear --color -w` causes duplicated output HOT 4
- Slowness, maybe because it's not just linting an individual file? not sure HOT 1
- Watch mode does print to the console HOT 4
- ESLint 8 support HOT 2
- "The --print-config option must be used with exactly one file name." HOT 1
- Nothing happens HOT 6
- `ENOENT` of `eslint` causes a silent exit rather than an expected error message to install `eslint`
- Print a message upon file watch trigger HOT 3
- --watch-ignore should include by default the ignored patterns
- Tried it and had to uninstall it HOT 2
- `--watch` doesn't respect file overrides, relies erroneously on `--ext`
- esw should read and ignore anything in `.eslintignore`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-watch.