deadem / notepad-pp-linter

Notepad++ Linter. Realtime code check against any checkstyle-compatible linter: jshint, eslint, jscs, phpcs, csslint etc
MIT License
37 stars 7 forks source link

Invalid output format. Only checkstyle-compatible output allowed #17

Closed Owyn closed 4 years ago

Owyn commented 4 years ago

Doesn't work even thought I've followed all instructions.

Tried it even with quot (as suggested in some issue answer here):

<?xml version="1.0" encoding="utf-8" ?>
<NotepadPlus>
  <linter extension=".js" command="&quot;S:\Users\owyn\AppData\Roaming\npm\eslint\node_modules\.bin\eslint.cmd&quot; --format checkstyle"/>
</NotepadPlus>

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 bar

If I place my .js file into .bin folder near eslint.cmd - then it works - anywhere else - it gives error

help

eslint.cmd is default, didn't touch it:

@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe"  "%~dp0\..\eslint\bin\eslint.js" %*
) ELSE (
  @SETLOCAL
  @SET PATHEXT=%PATHEXT:;.JS;=;%
  node  "%~dp0\..\eslint\bin\eslint.js" %*
)
deadem commented 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?

Owyn commented 4 years ago

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 &quot;--ignore-pattern &apos;!&lt;relative/path/to/filename&gt;&apos;&quot;) 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 &quot;--ignore-pattern &apos;!&lt;relative/path/to/filename&gt;&apos;&quot;) 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