Bug 1343624 - Add `npm run lint` as an alias of `grunt checkjs`

For the same reason as the previous commit.

Ideally we'd remove the grunt abstraction entirely and call eslint from
the `lint` command, but we might as well save that to the Neutrino PR.
This commit is contained in:
Ed Morley 2017-03-10 17:01:57 +00:00
Родитель 21abe6ed75
Коммит 245696ef53
3 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -51,7 +51,7 @@ matrix:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- grunt checkjs
- npm run lint
- npm test
- npm run build

Просмотреть файл

@ -53,8 +53,8 @@ We run our JavaScript code in the frontend through eslint_ to ensure
that new code has a consistent style and doesn't suffer from common
errors. Before submitting a patch, check that your code passes these tests.
* If you haven't already done so, install local dependencies by running ``npm install`` from the project root. Then run ``npm install -g grunt-cli`` as root, so that grunt is added to the global path.
* Run ``grunt checkjs``. You will see errors if your code has problems
* If you haven't already done so, install local dependencies by running ``npm install`` from the project root.
* Run ``npm run lint``.
.. _eslint: http://eslint.org/

Просмотреть файл

@ -45,6 +45,7 @@
},
"scripts": {
"build": "grunt build --production",
"lint": "grunt checkjs",
"test": "karma start tests/ui/config/karma.conf.js --single-run --browsers Firefox"
}
}