mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-25 16:38:08 +00:00
Added eslint
This commit is contained in:
parent
c5bb32684d
commit
036f81209a
55
.eslintrc
Normal file
55
.eslintrc
Normal file
@ -0,0 +1,55 @@
|
||||
{
|
||||
"extends": [
|
||||
"eslint-config-airbnb",
|
||||
"plugin:flowtype/recommended",
|
||||
"plugin:jest/recommended"
|
||||
|
||||
],
|
||||
"env": {
|
||||
"browser": true,
|
||||
"jest": true
|
||||
},
|
||||
"rules": {
|
||||
"react/jsx-one-expression-per-line": 0,
|
||||
"react/jsx-indent": [2, 4],
|
||||
"react/jsx-indent-props": [2, 4],
|
||||
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"]}],
|
||||
"indent": [2, 4, { "SwitchCase": 1 }],
|
||||
"no-confusing-arrow": [2,{ "allowParens": true }],
|
||||
"no-console": 0,
|
||||
"no-alert": 0,
|
||||
"no-prototype-builtins": 0,
|
||||
"new-cap": 0,
|
||||
"max-len": 0,
|
||||
"eol-last": 0,
|
||||
"spaced-comment": 0
|
||||
},
|
||||
"plugins": [
|
||||
"react",
|
||||
"import",
|
||||
"jest",
|
||||
"flowtype"
|
||||
],
|
||||
"settings": {
|
||||
"import/parser": "babel-eslint",
|
||||
"import/resolver": {
|
||||
"node": {
|
||||
"moduleDirectory": [
|
||||
"src",
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
},
|
||||
"import/ignore": [
|
||||
"\\.(scss|less|css)$"
|
||||
]
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 7,
|
||||
"sourceType": "module",
|
||||
"ecmaFeatures": {
|
||||
"jsx": true,
|
||||
"experimentalObjectRestSpread": true
|
||||
}
|
||||
}
|
||||
}
|
11
package.json
11
package.json
@ -18,7 +18,8 @@
|
||||
"dev": "webpack-dev-server --config ./webpack/config.dev.babel.js --mode development",
|
||||
"build": "rm -rf build && webpack --config ./webpack/config.prod.babel.js --progress",
|
||||
"flow": "flow check src/js",
|
||||
"test": ""
|
||||
"test": "",
|
||||
"lint": "npx eslint ./"
|
||||
},
|
||||
"dependencies": {
|
||||
"color-hash": "^1.0.3",
|
||||
@ -49,6 +50,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.24.1",
|
||||
"babel-eslint": "^8.2.6",
|
||||
"babel-loader": "7.1.4",
|
||||
"babel-plugin-root-import": "^5.1.0",
|
||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||
@ -59,6 +61,13 @@
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"copy-webpack-plugin": "4.5.1",
|
||||
"css-loader": "0.28.11",
|
||||
"eslint": "^4",
|
||||
"eslint-config-airbnb": "^17.0.0",
|
||||
"eslint-plugin-flowtype": "^2.50.0",
|
||||
"eslint-plugin-import": "^2.13.0",
|
||||
"eslint-plugin-jest": "^21.18.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.1.1",
|
||||
"eslint-plugin-react": "^7.10.0",
|
||||
"file-loader": "1.1.11",
|
||||
"flow-bin": "0.72.0",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
|
Loading…
Reference in New Issue
Block a user