Created
June 23, 2018 06:09
-
-
Save aszx87410/1aba246fe2330b33785e74f62bf64c22 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//.eslintrc | |
{ | |
"env": { | |
"browser": true, | |
"es6": true, | |
"node": true, | |
"jest": true | |
}, | |
"parser": "babel-eslint", | |
"plugins": [ | |
"react", | |
"jest" | |
], | |
"extends": [ | |
"eslint:recommended", | |
"plugin:react/recommended", | |
"plugin:import/warnings", | |
"plugin:jest/recommended", | |
"prettier" | |
], | |
"rules": { | |
"jsx-quotes": ["warn", "prefer-single"], | |
"no-console": "error", | |
"no-unused-vars": "error", | |
"react/display-name": "error", | |
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], | |
"no-useless-escape": "error", | |
"eqeqeq": "error", | |
"no-eval": "error", | |
"radix": "error", | |
"no-bitwise": "error", | |
"no-nested-ternary": "error", | |
"no-var": "error", | |
"react/sort-comp": "error", | |
"react/sort-prop-types": "error", | |
"react/jsx-sort-props": "error" | |
}, | |
"parserOptions": { | |
"ecmaVersion": 6, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"jsx": true | |
} | |
}, | |
"globals": { | |
"firebase": false | |
} | |
} | |
//.prettierrc | |
{ | |
"semi": false, | |
"singleQuote": true | |
} | |
// package.json | |
{ | |
"scripts": { | |
"format": "prettier --write \"{src,config}/**/*{.js,.jsx}\"", | |
"lint": "eslint --ext .jsx --ext .js src config", | |
"precommit": "lint-staged", | |
}, | |
"lint-staged": { | |
"*.{js,jsx}": [ | |
"prettier --write", | |
"eslint --fix", | |
"git add" | |
], | |
"*.less": [ | |
"prettier --write", | |
"git add" | |
] | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment