Moved grunt-eslint to npm script executing eslint (#10474)

refs #9441

* Updated top-level ids to use const
* Removed one layer of indentation
* Added .eslintignore files for server and test tasks
* Added npm scripts for eslint
* Fixed lint command in w/ grunt
* Uninstalled grunt-eslint
* Added eslint config
This commit is contained in:
Fabien O'Carroll 2019-02-11 13:26:06 +01:00 committed by GitHub
parent 6e0409d6db
commit bdd57b36cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 600 additions and 631 deletions

2
.eslintignore Normal file
View File

@ -0,0 +1,2 @@
core/server/public/**/*.js
core/server/lib/members/static/auth/**/*.js

File diff suppressed because it is too large Load Diff

1
core/test/.eslintignore Normal file
View File

@ -0,0 +1 @@
core/test/coverage/**

View File

@ -26,7 +26,9 @@
"test": "grunt validate --verbose",
"test:regression": "grunt test-regression --verbose",
"setup": "yarn install && knex-migrator init && grunt symlink && grunt init || true",
"lint": "grunt lint",
"lint:server": "eslint --ignore-path .eslintignore 'core/server/**/*.js' 'core/*.js' '*.js'",
"lint:test": "eslint -c core/test/.eslintrc.json --ignore-path core/test/.eslintignore 'core/test/**/*.js'",
"lint": "yarn lint:server && yarn lint:test",
"fixmodulenotdefined": "yarn cache clean && cd core/client && rm -rf node_modules tmp dist && yarn && cd ../../"
},
"engines": {
@ -127,7 +129,6 @@
"grunt-contrib-uglify": "4.0.0",
"grunt-contrib-watch": "1.1.0",
"grunt-cssnano": "2.1.0",
"grunt-eslint": "21.0.0",
"grunt-express-server": "0.5.4",
"grunt-mocha-cli": "4.0.0",
"grunt-mocha-istanbul": "5.0.2",

View File

@ -1625,7 +1625,7 @@ eslint-visitor-keys@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
eslint@5.12.1, eslint@^5.0.0:
eslint@5.12.1:
version "5.12.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.12.1.tgz#5ca9931fb9029d04e7be92b03ce3b58edfac7e3b"
dependencies:
@ -2565,13 +2565,6 @@ grunt-cssnano@2.1.0:
dependencies:
cssnano "^3.0.0"
grunt-eslint@21.0.0:
version "21.0.0"
resolved "https://registry.yarnpkg.com/grunt-eslint/-/grunt-eslint-21.0.0.tgz#5863f593d328c27ffec2a183319e5ad5380eed9e"
dependencies:
chalk "^2.1.0"
eslint "^5.0.0"
grunt-express-server@0.5.4:
version "0.5.4"
resolved "https://registry.yarnpkg.com/grunt-express-server/-/grunt-express-server-0.5.4.tgz#8ce79c335c6cbb9ef50ee1dfaa61942028f43aeb"