代码拉取完成,页面将自动刷新
module.exports = {
root: true,
parserOptions: {
parser: "babel-eslint",
sourceType: "module"
},
env: {
browser: true,
node: true,
es6: true
},
extends: ["airbnb-base"],
rules: {
// error
"func-style": ["error", "declaration", { allowArrowFunctions: true }],
quotes: ["error", "single", { allowTemplateLiterals: true }],
semi: ["error", "never"],
// warn
"import/first": "warn", // import 放在文件头
"spaced-comment": "warn", // 注释要含有空格
camelcase: "warn", // 驼峰命名
"max-len": ["warn", { code: 150 }],
"operator-assignment": "warn",
"prefer-destructuring": "warn",
"prefer-template": "warn",
"eol-last": "warn",
"object-curly-spacing": "warn",
"no-return-assign": "warn",
// off
"no-underscore-dangle": "off",
"object-curly-newline": "off",
"comma-dangle": "off",
"linebreak-style": "off",
"no-restricted-syntax": "off",
radix: "off",
"consistent-return": "off",
"no-plusplus": "off",
"import/prefer-default-export": "off",
"arrow-parens": "off",
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"no-alert": process.env.NODE_ENV === "production" ? "error" : "off",
indent: [
2,
2,
{
SwitchCase: 1
}
],
"import/no-named-as-default": "off"
}
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。