alex-mm / eslintautofix Goto Github PK
View Code? Open in Web Editor NEWESLint Auto fix with global eslint command.
ESLint Auto fix with global eslint command.
I can not begin to use eslintAutoFix. But I successfully use eslint
in console.
SashaChernykh@DESKTOP-0G54NVG E:\Киролайна
$ eslint --fix --no-ignore E:\Киролайна\test.js
E:\Киролайна\test.js
1:1 error Function 'SashaFunction' has too many statements (19). Maximum allowed is 10 max-statements
1:1 error Missing JSDoc comment
require-jsdoc
1:1 error Expected a function expression
func-style
1:10 error 'SashaFunction' is defined but never used
no-unused-vars
2:1 error Line 2 exceeds the maximum line length of 80
max-len
3:1 error Line 3 exceeds the maximum line length of 80
max-len
5:29 error Expected '===' and instead saw '=='
eqeqeq
6:1 error Assignment to function parameter 'url'
no-param-reassign
8:29 error Expected '===' and instead saw '=='
eqeqeq
9:1 error Assignment to function parameter 'url'
no-param-reassign
11:29 error Expected '===' and instead saw '=='
eqeqeq
12:2 error Assignment to function parameter 'url'
no-param-reassign
16:33 error Expected '===' and instead saw '=='
eqeqeq
17:1 error Assignment to function parameter 'url'
no-param-reassign
20:1 error Line 20 exceeds the maximum line length of 80 max-len
20:34 error Unexpected comment inline with code
no-inline-comments
20:34 error Expected comment to be above code
line-comment-position
21:1 error Line 21 exceeds the maximum line length of 80 max-len
21:5 error Opening curly brace does not appear on the same line as controlling statement brace-style
21:19 error Expected '===' and instead saw '=='
eqeqeq
21:65 error Expected comment to be above code
line-comment-position
21:65 error Unexpected comment inline with code
no-inline-comments
22:1 error Line 22 exceeds the maximum line length of 80 max-len
22:7 error Expected comment to be above code
line-comment-position
22:7 error Unexpected comment inline with code
no-inline-comments
26:34 error Expected comment to be above code
line-comment-position
26:34 error Unexpected comment inline with code
no-inline-comments
28:19 error Expected '===' and instead saw '=='
eqeqeq
✖ 28 problems (28 errors, 0 warnings)
command: eslint_auto_fix
Running eslint --fix --no-ignore E:\Киролайна\test.js
Console open for me:
[WinError 2] Не удается найти указанный файл
[cmd: ['eslint', '--fix', '--no-ignore', 'E:\\Киролайна\\test.js']]
[dir: E:\Киролайна]
[path: C:\Users\SashaChernykh\AppData\Roaming\npm]
[Finished]
My User\ESLintAutoFix.sublime-settings
file:
{
"eslint_path": "C:\\Users\\SashaChernykh\\AppData\\Roaming\\npm"
}
C:\Users\SashaChernykh\AppData\Roaming\npm
— correct path to my eslint
and eslint.cmd
files.
SashaChernykh@DESKTOP-0G54NVG E:\Киролайна
$ where eslint
C:\Users\SashaChernykh\AppData\Roaming\npm\eslint
C:\Users\SashaChernykh\AppData\Roaming\npm\eslint.cmd
The problem is reproduced for me in a version of Sublime Text without plugins and user settings.
I install eslinter → npm install eslinter -g
→ I install and set eslintAutoFix → I restart Sublime Text → I open file E:\Киролайна\test.js
→ Ctrl+Shift+P → eslintAutoFix
→ I get actual behavior, file not fixed for me. If I run eslint
for the same file use my terminal, I get expected behavior.
Operating system and version:
Windows 32-bit 10.0.14393
Sublime Text:
Build 3126
eslint:
v3.12.2
Thanks.
我在sublime text 3 中,搜索不到 eslintAutoFix,不知道什么原因?
我没有把它放到ignored_packages
里。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.