Skip to content

Commit

Permalink
Use shared MetaMask ESLint config (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
whymarrh authored Jan 21, 2020
1 parent 2cb7562 commit 7bb268f
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 162 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.eslintrc.js
161 changes: 0 additions & 161 deletions .eslintrc

This file was deleted.

34 changes: 34 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
parserOptions: {
'sourceType': 'module',
'ecmaVersion': 2017,
'ecmaFeatures': {
'experimentalObjectRestSpread': true,
'impliedStrict': true,
'modules': true,
'blockBindings': true,
'arrowFunctions': true,
'objectLiteralShorthandMethods': true,
'objectLiteralShorthandProperties': true,
'templateStrings': true,
'classes': true,
},
},

env: {
'browser': true,
},

plugins: [
'json',
],

extends: [
'@metamask/eslint-config',
'@metamask/eslint-config/config/nodejs',
],

globals: {
'web3': true,
},
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"lint": "eslint . --ext js,json",
"lint:fix": "eslint . --fix --ext js,json",
"serve": "static-server . --port 9011",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "yarn lint"
},
"repository": {
"type": "git",
Expand All @@ -27,6 +27,7 @@
"@metamask/onboarding": "^0.2.0"
},
"devDependencies": {
"@metamask/eslint-config": "^1.0.0",
"eslint": "^6.8.0",
"eslint-plugin-json": "^2.0.1",
"static-server": "^2.2.1"
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
esutils "^2.0.2"
js-tokens "^4.0.0"

"@metamask/eslint-config@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@metamask/eslint-config/-/eslint-config-1.0.0.tgz#046012398bb27f56395355c96ef07152925043b7"
integrity sha512-MmxM2sknVhIHyXCjR6LcK57OPJ30gTEX5v/jwC+qXuw4GIgUAPbxFp3AFmFRAJwty3RMjJSbRJ7YlamMq67U8w==

"@metamask/onboarding@^0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@metamask/onboarding/-/onboarding-0.2.0.tgz#9594f6a9a1c779083d71434b9f5e6a973af941f7"
Expand Down

0 comments on commit 7bb268f

Please sign in to comment.