18. ESLint
$ npm install -g eslint
$ eslint --init
Answer questions about your style
❯ Use a popular style guide
Inspect your JavaScript file(s)
19. ESLint
$ eslint --init
? How would you like to configure ESLint? Use a popular style guide
? Which style guide do you want to follow? (Use arrow keys)
Google
❯ AirBnB
Standard
20. $ gulp lint
[19:52:41] Requiring external module babel-register
[19:52:43] Using gulpfile ~/projects/github/sinsoku/clairvoyance/gulpfile.babel.js
[19:52:43] Starting 'lint'...
[19:52:44]
/Users/sinsoku/projects/github/sinsoku/clairvoyance/src/lib/clairvoyance.js
1:1 error Unexpected var, use let or const instead no-var
2:1 error Unexpected var, use let or const instead no-var
4:28 error 'Clairvoyance' was used before it was defined no-use-before-define
17:30 warning Missing function expression name func-names
17:38 error Missing space before function parentheses space-before-function-paren
22:3 error Unexpected var, use let or const instead no-var
22:3 error All 'var' declarations must be at the top of the function scope vars-on-top
22:7 error Unexpected dangling '_' in '_this' no-underscore-dangle
24:11 error '_createPhantom' was used before it was defined no-use-before-define
24:33 error '_findCssFiles' was used before it was defined no-use-before-define
24:54 error '_findHtmlFiles' was used before it was defined no-use-before-define
25:11 warning Missing function expression name func-names
25:11 error Unexpected function expression prefer-arrow-callback
25:19 error Missing space before function parentheses space-before-function-paren
26:7 error Unexpected var, use let or const instead no-var
28:12 error Unexpected var, use let or const instead no-var
28:12 error All 'var' declarations must be at the top of the function scope vars-on-top
29:14 error All 'var' declarations must be at the top of the function scope vars-on-top
29:14 error Unexpected var, use let or const instead no-var
(以下略