pull/1235/head
yikai 2 years ago
parent 5c148f0096
commit 65742f786f

@ -1,31 +1,31 @@
module.exports = { module.exports = {
env: { env: {
browser: true, browser: true,
es6: true, es6: true,
node: true, node: true,
}, },
extends: ["airbnb", "prettier"], extends: ["airbnb", "prettier"],
parser: "babel-eslint", parser: "babel-eslint",
parserOptions: { parserOptions: {
ecmaFeatures: { ecmaFeatures: {
jsx: true, jsx: true,
}, },
}, },
plugins: ["react"], plugins: ["react"],
rules: { rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off", "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"react/prefer-stateless-function": 0, // 关闭react默认的props-type验证 "react/prefer-stateless-function": 0, // 关闭react默认的props-type验证
"react/prop-types": [0], "react/prop-types": [0],
"react/jsx-closing-bracket-location": "off", "react/jsx-closing-bracket-location": "off",
"consistent-return": "off", "consistent-return": "off",
// 关闭使用解构赋值的检测 // 关闭使用解构赋值的检测
"react/destructuring-assignment": [0, "always"], "react/destructuring-assignment": [0, "always"],
// 解决require报错问题 // 解决require报错问题
"import/no-extraneous-dependencies": ["error", { devDependencies: true }], "import/no-extraneous-dependencies": ["error", { devDependencies: true }],
"react/jsx-wrap-multilines": "off", "react/jsx-wrap-multilines": "off",
"global-require": 0, "global-require": 0,
"jsx-a11y/no-static-element-interactions": 0, "jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/click-events-have-key-events": 0, "jsx-a11y/click-events-have-key-events": 0,
}, },
}; };
Loading…
Cancel
Save