mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
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.
This commit is contained in:
parent
270d1d0fa9
commit
04ae92a2c0
@ -17,3 +17,5 @@ ui/lib/blockies.js
|
|||||||
test/integration/bundle.js
|
test/integration/bundle.js
|
||||||
test/integration/jquery-3.1.0.min.js
|
test/integration/jquery-3.1.0.min.js
|
||||||
test/integration/helpers.js
|
test/integration/helpers.js
|
||||||
|
|
||||||
|
package-lock.json
|
||||||
|
@ -1822,4 +1822,4 @@
|
|||||||
"zeroGasPriceOnSpeedUpError": {
|
"zeroGasPriceOnSpeedUpError": {
|
||||||
"message": "Zero gas price on speed up"
|
"message": "Zero gas price on speed up"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1235,7 +1235,7 @@
|
|||||||
},
|
},
|
||||||
"pending": {
|
"pending": {
|
||||||
"message": "pendiente"
|
"message": "pendiente"
|
||||||
},
|
},
|
||||||
"popularTokens": {
|
"popularTokens": {
|
||||||
"message": "Tokens Corrientes"
|
"message": "Tokens Corrientes"
|
||||||
},
|
},
|
||||||
@ -1504,7 +1504,7 @@
|
|||||||
"message": "Tu frase semilla privada"
|
"message": "Tu frase semilla privada"
|
||||||
},
|
},
|
||||||
"zeroGasPriceOnSpeedUpError": {
|
"zeroGasPriceOnSpeedUpError": {
|
||||||
"message":"No hubo precio de gas al agilizar"
|
"message": "No hubo precio de gas al agilizar"
|
||||||
},
|
},
|
||||||
"currencyConversion": {
|
"currencyConversion": {
|
||||||
"message": "Cambio de Monedas"
|
"message": "Cambio de Monedas"
|
||||||
|
@ -318,7 +318,7 @@
|
|||||||
"message": "i-click ito",
|
"message": "i-click ito",
|
||||||
"description": "tulad ng -i-click dito- para sa mas maraming impormasyon (kasama ng troubleTokenBalances)"
|
"description": "tulad ng -i-click dito- para sa mas maraming impormasyon (kasama ng troubleTokenBalances)"
|
||||||
},
|
},
|
||||||
"hide": {
|
"hide": {
|
||||||
"message": "Itago"
|
"message": "Itago"
|
||||||
},
|
},
|
||||||
"hideToken": {
|
"hideToken": {
|
||||||
|
@ -1145,7 +1145,7 @@
|
|||||||
},
|
},
|
||||||
"seedPhraseAlert": {
|
"seedPhraseAlert": {
|
||||||
"message": "Opozorilo o seed phrase"
|
"message": "Opozorilo o seed phrase"
|
||||||
},
|
},
|
||||||
"select": {
|
"select": {
|
||||||
"message": "Izberi"
|
"message": "Izberi"
|
||||||
},
|
},
|
||||||
@ -1549,6 +1549,6 @@
|
|||||||
"message": "Vaš zasebni seed phrase"
|
"message": "Vaš zasebni seed phrase"
|
||||||
},
|
},
|
||||||
"zeroGasPriceOnSpeedUpError": {
|
"zeroGasPriceOnSpeedUpError": {
|
||||||
"message":"Ničelni gas price na pospešitvi"
|
"message": "Ničelni gas price na pospešitvi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -655,5 +655,5 @@
|
|||||||
},
|
},
|
||||||
"yourSigRequested": {
|
"yourSigRequested": {
|
||||||
"message": "Chữ ký của bạn đang được yêu cầu"
|
"message": "Chữ ký của bạn đang được yêu cầu"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -651,7 +651,7 @@
|
|||||||
"description": "status showing that an account has been fully loaded into the keyring"
|
"description": "status showing that an account has been fully loaded into the keyring"
|
||||||
},
|
},
|
||||||
"importUsingSeed": {
|
"importUsingSeed": {
|
||||||
"message": "利用助憶詞匯入帳戶" ,
|
"message": "利用助憶詞匯入帳戶",
|
||||||
"description": "登入頁面下方"
|
"description": "登入頁面下方"
|
||||||
},
|
},
|
||||||
"importWithSeedPhrase": {
|
"importWithSeedPhrase": {
|
||||||
@ -1584,6 +1584,6 @@
|
|||||||
"message": "您每一次在交易時,都會看到這個圖案。"
|
"message": "您每一次在交易時,都會看到這個圖案。"
|
||||||
},
|
},
|
||||||
"zeroGasPriceOnSpeedUpError": {
|
"zeroGasPriceOnSpeedUpError": {
|
||||||
"message":"加速的 Gas 價格為 0"
|
"message": "加速的 Gas 價格為 0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -133,7 +133,6 @@
|
|||||||
"address": "0x704107d04affddd9b66ab9de3dd7b095852e9b69"
|
"address": "0x704107d04affddd9b66ab9de3dd7b095852e9b69"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"selectedAddress": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc",
|
|
||||||
"network": "1",
|
"network": "1",
|
||||||
"seedWords": null,
|
"seedWords": null,
|
||||||
"unconfMsgs": {},
|
"unconfMsgs": {},
|
||||||
|
@ -99,7 +99,6 @@
|
|||||||
"status": "confirmed",
|
"status": "confirmed",
|
||||||
"containsDelegateCall": false
|
"containsDelegateCall": false
|
||||||
}],
|
}],
|
||||||
"selectedAddress": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc",
|
|
||||||
"network": "2",
|
"network": "2",
|
||||||
"seedWords": null,
|
"seedWords": null,
|
||||||
"unconfMsgs": {},
|
"unconfMsgs": {},
|
||||||
|
@ -57,7 +57,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"transactions": [],
|
"transactions": [],
|
||||||
"selectedAddress": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc",
|
|
||||||
"network": "2",
|
"network": "2",
|
||||||
"seedWords": null,
|
"seedWords": null,
|
||||||
"unconfMsgs": {},
|
"unconfMsgs": {},
|
||||||
|
@ -48,7 +48,6 @@
|
|||||||
"gasPrice": "4a817c800"
|
"gasPrice": "4a817c800"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"currentCurrency": "USD",
|
|
||||||
"conversionRate": 12.7200827,
|
"conversionRate": 12.7200827,
|
||||||
"conversionDate": 1487363041,
|
"conversionDate": 1487363041,
|
||||||
"noActiveNotices": true,
|
"noActiveNotices": true,
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
"name": "Send Account 4"
|
"name": "Send Account 4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"unapprovedTxs": {},
|
|
||||||
"currentCurrency": "USD",
|
|
||||||
"conversionRate": 1200.88200327,
|
"conversionRate": 1200.88200327,
|
||||||
"conversionDate": 1489013762,
|
"conversionDate": 1489013762,
|
||||||
"noActiveNotices": true,
|
"noActiveNotices": true,
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cachedBalances": {},
|
"cachedBalances": {},
|
||||||
"unapprovedTxs": {},
|
|
||||||
"currentCurrency": "USD",
|
|
||||||
"conversionRate": 1200.88200327,
|
"conversionRate": 1200.88200327,
|
||||||
"conversionDate": 1489013762,
|
"conversionDate": 1489013762,
|
||||||
"noActiveNotices": true,
|
"noActiveNotices": true,
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
},
|
},
|
||||||
"cachedBalances": {},
|
"cachedBalances": {},
|
||||||
"unapprovedTxs": {},
|
"unapprovedTxs": {},
|
||||||
"currentCurrency": "USD",
|
|
||||||
"conversionRate": 19855,
|
"conversionRate": 19855,
|
||||||
"conversionDate": 1489013762,
|
"conversionDate": 1489013762,
|
||||||
"noActiveNotices": true,
|
"noActiveNotices": true,
|
||||||
|
@ -54,7 +54,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"transactions": [],
|
"transactions": [],
|
||||||
"selectedAddress": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc",
|
|
||||||
"network": "2",
|
"network": "2",
|
||||||
"seedWords": null,
|
"seedWords": null,
|
||||||
"unconfMsgs": {},
|
"unconfMsgs": {},
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
"computedBalances": {},
|
"computedBalances": {},
|
||||||
"frequentRpcList": [],
|
"frequentRpcList": [],
|
||||||
"unapprovedTxs": {},
|
"unapprovedTxs": {},
|
||||||
"currentCurrency": "USD",
|
|
||||||
"featureFlags": {"betaUI": false},
|
"featureFlags": {"betaUI": false},
|
||||||
"conversionRate": 12.7527416,
|
"conversionRate": 12.7527416,
|
||||||
"conversionDate": 1487624341,
|
"conversionDate": 1487624341,
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
"conversionDate": 1473358355,
|
"conversionDate": 1473358355,
|
||||||
"accounts": {},
|
"accounts": {},
|
||||||
"transactions": [],
|
"transactions": [],
|
||||||
"selectedAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
|
||||||
"network": "1473186153102",
|
"network": "1473186153102",
|
||||||
"seedWords": null,
|
"seedWords": null,
|
||||||
"unconfMsgs": {},
|
"unconfMsgs": {},
|
||||||
|
@ -61,7 +61,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"transactions": [],
|
"transactions": [],
|
||||||
"selectedAddress": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc",
|
|
||||||
"network": "2",
|
"network": "2",
|
||||||
"seedWords": null,
|
"seedWords": null,
|
||||||
"unconfMsgs": {},
|
"unconfMsgs": {},
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"provider": {
|
"provider": {
|
||||||
"type": "testnet"
|
"type": "testnet"
|
||||||
},
|
},
|
||||||
"selectedAddress": "0xa6ef573d60594731178b7f85d80da13cc2af52dd",
|
|
||||||
"unconfMsgs": {},
|
"unconfMsgs": {},
|
||||||
"messages": [],
|
"messages": [],
|
||||||
"selectedAddress": "0xa6ef573d60594731178b7f85d80da13cc2af52dd",
|
"selectedAddress": "0xa6ef573d60594731178b7f85d80da13cc2af52dd",
|
||||||
|
File diff suppressed because one or more lines are too long
@ -351,7 +351,6 @@
|
|||||||
"hash": "0xb6e6ff57e7b5f6bd7f2e6dc44c39f4e858a227c9509586634ca547179345a13e"
|
"hash": "0xb6e6ff57e7b5f6bd7f2e6dc44c39f4e858a227c9509586634ca547179345a13e"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"selectedAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
|
||||||
"network": "1471904489432",
|
"network": "1471904489432",
|
||||||
"seedWords": null,
|
"seedWords": null,
|
||||||
"unconfMsgs": {
|
"unconfMsgs": {
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
"maxCost": "de234b52e4a0800"
|
"maxCost": "de234b52e4a0800"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"currentCurrency": "USD",
|
|
||||||
"conversionRate": 12.59854817,
|
"conversionRate": 12.59854817,
|
||||||
"conversionDate": 1487662141,
|
"conversionDate": 1487662141,
|
||||||
"noActiveNotices": true,
|
"noActiveNotices": true,
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"unapprovedTxs": {},
|
"unapprovedTxs": {},
|
||||||
"currentCurrency": "USD",
|
|
||||||
"conversionRate": 13.2126613,
|
"conversionRate": 13.2126613,
|
||||||
"conversionDate": 1487888522,
|
"conversionDate": 1487888522,
|
||||||
"noActiveNotices": true,
|
"noActiveNotices": true,
|
||||||
@ -96,4 +95,4 @@
|
|||||||
"warning": null
|
"warning": null
|
||||||
},
|
},
|
||||||
"identities": {}
|
"identities": {}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,6 @@
|
|||||||
"hash": "0xad609a6931f54a575ad71222ffc27cd6746017106d5b89f4ad300b37b273f8ac"
|
"hash": "0xad609a6931f54a575ad71222ffc27cd6746017106d5b89f4ad300b37b273f8ac"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"selectedAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
|
||||||
"network": "1479753732793",
|
"network": "1479753732793",
|
||||||
"isEthConfirmed": true,
|
"isEthConfirmed": true,
|
||||||
"unconfMsgs": {},
|
"unconfMsgs": {},
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
{
|
{
|
||||||
"confirmTransaction": {
|
|
||||||
"txData": {
|
|
||||||
"id": 4768706228115573
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"metamask": {
|
"metamask": {
|
||||||
"completedOnboarding": true,
|
"completedOnboarding": true,
|
||||||
"isInitialized": true,
|
"isInitialized": true,
|
||||||
@ -30,8 +25,6 @@
|
|||||||
},
|
},
|
||||||
"cachedBalances": {},
|
"cachedBalances": {},
|
||||||
"assetImages": {},
|
"assetImages": {},
|
||||||
"unapprovedTxs": {},
|
|
||||||
"currentCurrency": "USD",
|
|
||||||
"conversionRate": 1200.88200327,
|
"conversionRate": 1200.88200327,
|
||||||
"conversionDate": 1489013762,
|
"conversionDate": 1489013762,
|
||||||
"noActiveNotices": true,
|
"noActiveNotices": true,
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
},
|
},
|
||||||
"cachedBalances": {},
|
"cachedBalances": {},
|
||||||
"unapprovedTxs": {},
|
"unapprovedTxs": {},
|
||||||
"currentCurrency": "USD",
|
|
||||||
"conversionRate": 1200.88200327,
|
"conversionRate": 1200.88200327,
|
||||||
"conversionDate": 1489013762,
|
"conversionDate": 1489013762,
|
||||||
"noActiveNotices": true,
|
"noActiveNotices": true,
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
},
|
},
|
||||||
"assetImages": {},
|
"assetImages": {},
|
||||||
"unapprovedTxs": {},
|
"unapprovedTxs": {},
|
||||||
"currentCurrency": "USD",
|
|
||||||
"conversionRate": 16.88200327,
|
"conversionRate": 16.88200327,
|
||||||
"conversionDate": 1489013762,
|
"conversionDate": 1489013762,
|
||||||
"noActiveNotices": true,
|
"noActiveNotices": true,
|
||||||
|
@ -46,7 +46,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"transactions": [],
|
"transactions": [],
|
||||||
"selectedAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
|
||||||
"network": "1",
|
"network": "1",
|
||||||
"seedWords": null,
|
"seedWords": null,
|
||||||
"unconfMsgs": {},
|
"unconfMsgs": {},
|
||||||
|
@ -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",
|
"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",
|
"ganache:start": "./development/run-ganache",
|
||||||
"sentry:publish": "node ./development/sentry-publish.js",
|
"sentry:publish": "node ./development/sentry-publish.js",
|
||||||
"lint": "eslint .",
|
"lint": "eslint . --ext js,json",
|
||||||
"lint:fix": "eslint . --fix",
|
"lint:fix": "eslint . --ext js,json --fix",
|
||||||
"mozilla-lint": "addons-linter dist/firefox",
|
"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\"",
|
"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",
|
"devtools:react": "react-devtools",
|
||||||
|
Loading…
Reference in New Issue
Block a user