diff options
author | Mark Stacey <markjstacey@gmail.com> | 2019-07-15 22:03:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-15 22:03:22 +0800 |
commit | 04ae92a2c03c5115b7b5be63ab2d03ef5c78bccd (patch) | |
tree | de6c87ec3a737baacb207c58bca4a59d4296bf8d /package.json | |
parent | 270d1d0fa9254cf882994b7f229779a033e58601 (diff) | |
download | tangerine-wallet-browser-04ae92a2c03c5115b7b5be63ab2d03ef5c78bccd.tar.gz tangerine-wallet-browser-04ae92a2c03c5115b7b5be63ab2d03ef5c78bccd.tar.zst tangerine-wallet-browser-04ae92a2c03c5115b7b5be63ab2d03ef5c78bccd.zip |
Lint `.json` files (#6852)
We've been using the `eslint-plugin-json` plugin for some time, but we
haven't been visiting `.json` files in the lint script. The lint script
has now been updated to incude `.json` files, which means any invalid
JSON will result in a lint error.
Unfortunately this JSON plugin doesn't seem to apply the other eslint
rules (such as `key-spacing`) to the JSON files. I wasn't able to find a
way to get that to work. Instead I manually auto-formatted each of the
locale `message.json` files, which fixed many whitespace
inconsistencies.
The `states.json` file was deleted completely, as it appears to be
unused. It wasn't a valid JSON file anyway, it was JavaScript. It looks
like a `states.js` file is automatically generated, but an old copy was
accidentally saved as `states.json` and included in the repo.
Many duplicate key errors were found and fixed in the
`development/states/` JSON files.
`package-lock.json` was added to `.eslintignore` because it was very
slow to lint, and linting it doesn't provide much value.
Diffstat (limited to 'package.json')
-rw-r--r-- | package.json | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/package.json b/package.json index 38b337883..28ff0264e 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,8 @@ "test:flat:build:ui": "npm run test:flat:build:states && browserify --transform babelify --transform brfs ./development/mock-dev.js -o ./development/bundle.js", "ganache:start": "./development/run-ganache", "sentry:publish": "node ./development/sentry-publish.js", - "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint": "eslint . --ext js,json", + "lint:fix": "eslint . --ext js,json --fix", "mozilla-lint": "addons-linter dist/firefox", "watch": "cross-env METAMASK_ENV=test mocha --watch --require test/setup.js --reporter min --recursive \"test/unit/**/*.js\" \"ui/app/**/*.test.js\"", "devtools:react": "react-devtools", |