Created
June 4, 2019 18:06
-
-
Save hpneo/785ba993f37e81bc834c11e2d288ad62 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
Show hidden characters
const path = require("path"); | |
module.exports = { | |
root: true, | |
env: { | |
browser: true, | |
node: true, | |
es6: true, | |
jest: true | |
}, | |
settings: { | |
"import/resolver": { | |
webpack: { | |
config: path.resolve("./webpack.config.js") // Find file or ignore property if doesn't exist | |
}, | |
node: { | |
paths: ["src"], | |
extensions: [".js", ".json"] | |
} | |
}, | |
react: { | |
version: "detect" | |
} | |
}, | |
parser: "babel-eslint", | |
plugins: ["import", "react", "prettier"], | |
rules: { | |
"no-dupe-keys": "error", | |
"no-undef": "error", | |
"no-unreachable": "error", | |
"no-unused-vars": [ | |
"error", | |
{ | |
argsIgnorePattern: "^_", | |
varsIgnorePattern: "^_", | |
ignoreRestSiblings: true | |
} | |
], | |
"no-useless-constructor": "error", | |
"no-var": "error", | |
"no-duplicate-imports": "error", | |
"no-duplicate-case": "error", | |
"import/no-unresolved": "error", | |
"import/default": "error", | |
"react/jsx-no-undef": "error", | |
"react/jsx-uses-vars": "error", | |
"react/jsx-uses-react": "error", | |
"react/react-in-jsx-scope": "error", | |
"react/no-string-refs": "error", | |
"react/prop-types": ["error", { skipUndeclared: true }], | |
"react/forbid-prop-types": "error", | |
"react/prefer-stateless-function": [ | |
"error", | |
{ ignorePureComponents: true } | |
], | |
"prettier/prettier": "error", | |
"no-console": ["error", { "allow": ["warn", "error"] }], | |
"no-debugger": "error" | |
} | |
}; | |
// Globals added dynamically or add them in .eslintignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment