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/jquery-3.1.0.min.js
|
||||
test/integration/helpers.js
|
||||
|
||||
package-lock.json
|
||||
|
@ -1504,7 +1504,7 @@
|
||||
"message": "Tu frase semilla privada"
|
||||
},
|
||||
"zeroGasPriceOnSpeedUpError": {
|
||||
"message":"No hubo precio de gas al agilizar"
|
||||
"message": "No hubo precio de gas al agilizar"
|
||||
},
|
||||
"currencyConversion": {
|
||||
"message": "Cambio de Monedas"
|
||||
|
@ -1549,6 +1549,6 @@
|
||||
"message": "Vaš zasebni seed phrase"
|
||||
},
|
||||
"zeroGasPriceOnSpeedUpError": {
|
||||
"message":"Ničelni gas price na pospešitvi"
|
||||
"message": "Ničelni gas price na pospešitvi"
|
||||
}
|
||||
}
|
||||
|
@ -655,5 +655,5 @@
|
||||
},
|
||||
"yourSigRequested": {
|
||||
"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"
|
||||
},
|
||||
"importUsingSeed": {
|
||||
"message": "利用助憶詞匯入帳戶" ,
|
||||
"message": "利用助憶詞匯入帳戶",
|
||||
"description": "登入頁面下方"
|
||||
},
|
||||
"importWithSeedPhrase": {
|
||||
@ -1584,6 +1584,6 @@
|
||||
"message": "您每一次在交易時,都會看到這個圖案。"
|
||||
},
|
||||
"zeroGasPriceOnSpeedUpError": {
|
||||
"message":"加速的 Gas 價格為 0"
|
||||
"message": "加速的 Gas 價格為 0"
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -133,7 +133,6 @@
|
||||
"address": "0x704107d04affddd9b66ab9de3dd7b095852e9b69"
|
||||
}
|
||||
},
|
||||
"selectedAddress": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc",
|
||||
"network": "1",
|
||||
"seedWords": null,
|
||||
"unconfMsgs": {},
|
||||
|
@ -99,7 +99,6 @@
|
||||
"status": "confirmed",
|
||||
"containsDelegateCall": false
|
||||
}],
|
||||
"selectedAddress": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc",
|
||||
"network": "2",
|
||||
"seedWords": null,
|
||||
"unconfMsgs": {},
|
||||
|
@ -57,7 +57,6 @@
|
||||
}
|
||||
},
|
||||
"transactions": [],
|
||||
"selectedAddress": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc",
|
||||
"network": "2",
|
||||
"seedWords": null,
|
||||
"unconfMsgs": {},
|
||||
|
@ -48,7 +48,6 @@
|
||||
"gasPrice": "4a817c800"
|
||||
}
|
||||
},
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 12.7200827,
|
||||
"conversionDate": 1487363041,
|
||||
"noActiveNotices": true,
|
||||
|
@ -22,8 +22,6 @@
|
||||
"name": "Send Account 4"
|
||||
}
|
||||
},
|
||||
"unapprovedTxs": {},
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 1200.88200327,
|
||||
"conversionDate": 1489013762,
|
||||
"noActiveNotices": true,
|
||||
|
@ -24,8 +24,6 @@
|
||||
}
|
||||
},
|
||||
"cachedBalances": {},
|
||||
"unapprovedTxs": {},
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 1200.88200327,
|
||||
"conversionDate": 1489013762,
|
||||
"noActiveNotices": true,
|
||||
|
@ -25,7 +25,6 @@
|
||||
},
|
||||
"cachedBalances": {},
|
||||
"unapprovedTxs": {},
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 19855,
|
||||
"conversionDate": 1489013762,
|
||||
"noActiveNotices": true,
|
||||
|
@ -54,7 +54,6 @@
|
||||
}
|
||||
},
|
||||
"transactions": [],
|
||||
"selectedAddress": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc",
|
||||
"network": "2",
|
||||
"seedWords": null,
|
||||
"unconfMsgs": {},
|
||||
|
@ -7,7 +7,6 @@
|
||||
"computedBalances": {},
|
||||
"frequentRpcList": [],
|
||||
"unapprovedTxs": {},
|
||||
"currentCurrency": "USD",
|
||||
"featureFlags": {"betaUI": false},
|
||||
"conversionRate": 12.7527416,
|
||||
"conversionDate": 1487624341,
|
||||
|
@ -11,7 +11,6 @@
|
||||
"conversionDate": 1473358355,
|
||||
"accounts": {},
|
||||
"transactions": [],
|
||||
"selectedAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
||||
"network": "1473186153102",
|
||||
"seedWords": null,
|
||||
"unconfMsgs": {},
|
||||
|
@ -61,7 +61,6 @@
|
||||
}
|
||||
},
|
||||
"transactions": [],
|
||||
"selectedAddress": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc",
|
||||
"network": "2",
|
||||
"seedWords": null,
|
||||
"unconfMsgs": {},
|
||||
|
@ -36,7 +36,6 @@
|
||||
"provider": {
|
||||
"type": "testnet"
|
||||
},
|
||||
"selectedAddress": "0xa6ef573d60594731178b7f85d80da13cc2af52dd",
|
||||
"unconfMsgs": {},
|
||||
"messages": [],
|
||||
"selectedAddress": "0xa6ef573d60594731178b7f85d80da13cc2af52dd",
|
||||
|
File diff suppressed because one or more lines are too long
@ -351,7 +351,6 @@
|
||||
"hash": "0xb6e6ff57e7b5f6bd7f2e6dc44c39f4e858a227c9509586634ca547179345a13e"
|
||||
}
|
||||
],
|
||||
"selectedAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
||||
"network": "1471904489432",
|
||||
"seedWords": null,
|
||||
"unconfMsgs": {
|
||||
|
@ -31,7 +31,6 @@
|
||||
"maxCost": "de234b52e4a0800"
|
||||
}
|
||||
},
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 12.59854817,
|
||||
"conversionDate": 1487662141,
|
||||
"noActiveNotices": true,
|
||||
|
@ -18,7 +18,6 @@
|
||||
}
|
||||
},
|
||||
"unapprovedTxs": {},
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 13.2126613,
|
||||
"conversionDate": 1487888522,
|
||||
"noActiveNotices": true,
|
||||
|
@ -52,7 +52,6 @@
|
||||
"hash": "0xad609a6931f54a575ad71222ffc27cd6746017106d5b89f4ad300b37b273f8ac"
|
||||
}
|
||||
],
|
||||
"selectedAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
||||
"network": "1479753732793",
|
||||
"isEthConfirmed": true,
|
||||
"unconfMsgs": {},
|
||||
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
"confirmTransaction": {
|
||||
"txData": {
|
||||
"id": 4768706228115573
|
||||
}
|
||||
},
|
||||
"metamask": {
|
||||
"completedOnboarding": true,
|
||||
"isInitialized": true,
|
||||
@ -30,8 +25,6 @@
|
||||
},
|
||||
"cachedBalances": {},
|
||||
"assetImages": {},
|
||||
"unapprovedTxs": {},
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 1200.88200327,
|
||||
"conversionDate": 1489013762,
|
||||
"noActiveNotices": true,
|
||||
|
@ -25,7 +25,6 @@
|
||||
},
|
||||
"cachedBalances": {},
|
||||
"unapprovedTxs": {},
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 1200.88200327,
|
||||
"conversionDate": 1489013762,
|
||||
"noActiveNotices": true,
|
||||
|
@ -23,7 +23,6 @@
|
||||
},
|
||||
"assetImages": {},
|
||||
"unapprovedTxs": {},
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 16.88200327,
|
||||
"conversionDate": 1489013762,
|
||||
"noActiveNotices": true,
|
||||
|
@ -46,7 +46,6 @@
|
||||
}
|
||||
},
|
||||
"transactions": [],
|
||||
"selectedAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
||||
"network": "1",
|
||||
"seedWords": null,
|
||||
"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",
|
||||
"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",
|
||||
|
Loading…
Reference in New Issue
Block a user