Closed Owyn closed 4 years ago
Try to run from command line:
S:\Users\owyn\AppData\Roaming\npm\eslint\node_modules\.bin\eslint.cmd --format checkstyle filename.js
what is the output?
for filename.js which is near .cmd file and works fine in notepad++ with linter command line says:
<?xml version="1.0" encoding="utf-8"?><checkstyle version="4.3"><file name="S:\Users\owyn\AppData\Roaming\npm\eslint\node_modules\.bin\HandyImage.user.js"><error line="undefined" column="undefined" severity="warning" message="File ignored by default. Use a negated ignore pattern (like "--ignore-pattern '!<relative/path/to/filename>'") to override." source="" /></file></checkstyle>
for filename.js which doesn't work (says invalid output format) in notepad++ with linter:
S:\Users\owyn>S:\Users\owyn\AppData\Roaming\npm\eslint\node_modules\.bin\eslint.cmd --format checkstyle S:\Users\owyn\AppData\Roaming\npm\eslint\node_modules\.bin\HandyImage.user.js
<?xml version="1.0" encoding="utf-8"?><checkstyle version="4.3"><file name="S:\Users\owyn\AppData\Roaming\npm\eslint\node_modules\.bin\HandyImage.user.js"><error line="undefined" column="undefined" severity="warning" message="File ignored by default. Use a negated ignore pattern (like "--ignore-pattern '!<relative/path/to/filename>'") to override." source="" /></file></checkstyle>
S:\Users\owyn>S:\Users\owyn\AppData\Roaming\npm\eslint\node_modules\.bin\eslint.cmd --format checkstyle V:\Soft\_Source-codes\UserScripts\HandyImage.user.js
Oops! Something went wrong! :(
ESLint: 7.0.0
ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:
eslint --init
ESLint looked for configuration files in V:\Soft\_Source-codes\UserScripts and its ancestors. If it found none, it then looked in your home directory.
If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://gitter.im/eslint/eslint
S:\Users\owyn>
I already did init
and notepad++ reads config file just fine with linter (I've disabled few checks already and saw it take effect on that one file i'm able to work with (.js
file inside .bin
. directory near .cmd file)
it's inside S:\Users\owyn\AppData\Roaming\npm\eslint\.eslintrc.js
Doesn't work even thought I've followed all instructions.
Tried it even with quot (as suggested in some issue answer here):
even thought my path doesn't have spaces
but it refuses to check .js files anyway with
Invalid output format. Only checkstyle-compatible output allowed
error message in the notepad++ status barIf I place my .js file into
.bin
folder near eslint.cmd - then it works - anywhere else - it gives errorhelp
eslint.cmd is default, didn't touch it: