Skip to content

Commit

Permalink
Provide ability to lint JSON files (#167)
Browse files Browse the repository at this point in the history
* Upgrade js-yaml sub-dependency from 3.12.1 to 3.13.0 for DoS fix

* Update eslint to 5.16

Only new rule is prefer-named-capture-group, which is a ECMAScript 2018
feature, so we can ignore it.

* Provide ability to lint JSON files (Fixes #166)

Users will have to adjust the src match from *.js to also cover JSON
files, but there's no need to set the `extensions` options value as
well.

* test: Run eslint for json files too

* build: Update js-yaml locked dependency for audit
  • Loading branch information
jdforrester authored May 6, 2019
1 parent fef21ce commit 0c9afa2
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 43 deletions.
1 change: 1 addition & 0 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "eslint:recommended",
"env": {},
"globals": {},
"plugins": [ "json" ],
"rules": {
"array-bracket-spacing": [ "error", "always" ],
"block-spacing": "error",
Expand Down
121 changes: 80 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "ESLint config following Wikimedia code conventions.",
"main": "common.json",
"scripts": {
"test": "eslint --report-unused-disable-directives . && node test/test.js",
"test": "eslint --report-unused-disable-directives . --ext .js,.json && node test/test.js",
"build-invalid": "node test/test.js dump"
},
"repository": {
Expand Down Expand Up @@ -44,7 +44,8 @@
],
"license": "MIT",
"dependencies": {
"eslint": "^5.14.0",
"eslint": "^5.16.0",
"eslint-plugin-json": "^1.4.0",
"eslint-plugin-no-jquery": "^2.0.0",
"eslint-plugin-qunit": "^4.0.0"
},
Expand Down

0 comments on commit 0c9afa2

Please sign in to comment.