eslint-plugin-itgalaxy
Version:
Itgalaxy org's ESLint rules and configs.
50 lines (47 loc) • 1.11 kB
JavaScript
;
const jsxA11yRules = require("./rules/jsx-a11y");
const reactRules = require("./rules/react");
module.exports = {
env: {
es6: true
},
parserOptions: {
ecmaVersion: 2019,
ecmaFeatures: {
jsx: true
},
allowImportExportEverywhere: true
},
settings: {
react: {
pragma: "React",
version: "detect"
}
},
plugins: ["react", "jsx-a11y"],
rules: Object.assign({}, reactRules, jsxA11yRules, {
"class-methods-use-this": [
"error",
{
exceptMethods: [
"render",
"getInitialState",
"getDefaultProps",
"getChildContext",
"componentWillMount",
"UNSAFE_componentWillMount",
"componentDidMount",
"componentWillReceiveProps",
"UNSAFE_componentWillReceiveProps",
"shouldComponentUpdate",
"componentWillUpdate",
"UNSAFE_componentWillUpdate",
"componentDidUpdate",
"componentWillUnmount",
"componentDidCatch",
"getSnapshotBeforeUpdate"
]
}
]
})
};