Пытаюсь установить eslint в vim с этого сайта http://zirho.github.io/2016/10/06/vim-syntastic-local/
При попытке установить eslint локально, выскакивает ошибка
npm i -D eslint
npm WARN prefer global node-gyp@3.6.2 should be installed with -g
> node-sass@4.9.0 install /var/www/wallstrikez.loc/node_modules/node-sass
> node scripts/install.js
module.js:487
throw err;
^
Error: Cannot find module 'hawk'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/var/www/wallstrikez.loc/node_modules/node-sass/node_modules/request/request.js:9:12)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
npm WARN babel-loader@7.1.4 requires a peer of webpack@2 || 3 || 4 but none was installed.
npm WARN bootstrap@4.1.1 requires a peer of jquery@1.9.1 - 3 but none was installed.
npm WARN wallstrikez@1.0.0 No description
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.9.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.9.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/serii/.npm/_logs/2018-07-25T14_21_52_287Z-debug.log
Потом проверяю в консоли версию и получаю
➜ wallstrikez.loc git:(master) ✗ eslint -v
v5.2.0
Видимо eslint установился, но от ошибок придется избавиться.
И при инициализации тоже получаю ошибку
➜ wallstrikez.loc git:(master) ✗
eslint --init
? How would you like to configure ESLint? Inspect your JavaScript file(s)
? Which file(s), path(s), or glob(s) should be examined? /var/www/wallstrikez.loc/src/assets/js
? What format do you want your config file to be in? JavaScript
? Which version of ECMAScript do you use? ES2016
? Are you using ES6 modules? No
? Where will your code run? Browser
? Do you use CommonJS? No
? Do you use JSX? No
(/var/www/wallstrikez.loc/src/assets/js/main.js:15:5) Parsing error: Unexpected token arrowScroll
Error: (/var/www/wallstrikez.loc/src/assets/js/main.js:15:5) Parsing error: Unexpected token arrowScroll
at getSourceCodeOfFile (/var/www/wallstrikez.loc/node_modules/eslint/lib/util/source-code-util.js:38:15)
at filenames.forEach.filename (/var/www/wallstrikez.loc/node_modules/eslint/lib/util/source-code-util.js:90:28)
at Array.forEach (native)
at getSourceCodeOfFiles (/var/www/wallstrikez.loc/node_modules/eslint/lib/util/source-code-util.js:89:15)
at configureRules (/var/www/wallstrikez.loc/node_modules/eslint/lib/config/config-initializer.js:155:23)
at processAnswers (/var/www/wallstrikez.loc/node_modules/eslint/lib/config/config-initializer.js:277:18)
at inquirer.prompt.then.secondAnswers (/var/www/wallstrikez.loc/node_modules/eslint/lib/config/config-initializer.js:577:32)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
Determining Config: 10% [===---------------------------] 0.0s elapsed, eta 0.1s %
arrowScroll - это метод из плагина
Вот содержимое main.js
1 $(function () {
2 /*
3 https://www.jqueryscript.net/animation/Smooth-Mouse-Wheel-Scrolling-Plugin-With-jQuery-easeScroll.html
4 ===========================*/
5 $("html").easeScroll({
6 frameRate: 60,
7 animationTime: 1000,
8 stepSize: 90,
9 pulseAlgorithm: 1,
10 pulseScale: 8,
11 pulseNormalize: 1,
12 accelerationDelta: 20,
13 accelerationMax: 1,
~ 14 keyboardSupport: true
15 arrowScroll: 50,
16 touchpadSupport: true,
17 fixedBackground: true
18 });
19 ··
20 });