1 Star 0 Fork 2

ljchen/k8s-dashboard

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.eslintrc 3.13 KB
一键复制 编辑 原始数据 按行查看 历史
{
// This file contains root configuration for ESLint. Its rules may be overriden in a specific
// folder (e.g., tests) by placing .eslintrc in it.
// All lint rules should be placed here unless they do not apply to entire JavaScript codebase.
// For example, indentation rules should be here (applies to all JS files), but Protractor
// should not (applies only to integration tests files).
// Base rules on recommended ESLint settings.
// TODO(bryk): Determine whether there is a better base config.
"extends": "eslint:recommended",
"env": {
// Enables all ES6 features except modules.
"es6": true,
},
"parserOptions": {
// Enable ES6 modules to have all language features covered.
"sourceType": "module"
},
"rules": {
// Require parens in arrow function arguments.
"arrow-parens": [2, "always"],
// Require dangling comma at the end of any multiline list/object. This is to be consistent
// with backend code.
"comma-dangle": [2, "always-multiline"],
// Enforce newline consistency in member expressions. Dots are places on the same line as
// the property.
"dot-location": [2, "property"],
// Enforce newline at the end of file, with no multiple empty lines.
"eol-last": 2,
// Force using === and !=== except when comparing to null. This is to prevent from bugs that
// come from automatic type conversion in == operator and to be consistent across the codebase.
"eqeqeq": [2, "allow-null"],
// Require a capital letter for constructors.
"new-cap": 2,
// Disallow the omission of parentheses when invoking a constructor with no arguments.
"new-parens": 2,
// Disallow modifying constant variables.
"no-const-assign": 2,
// Disallow this keywords outside of classes or class-like objects.
"no-invalid-this": 2,
// Allow at most one newline between code blocks.
"no-multiple-empty-lines": [2, {"max": 2, "maxEOF": 1}],
// Disallow the use of ternary operators when a simpler alternative exists.
"no-unneeded-ternary": 2,
// Disallow trailing spaces. This is to unify code because editors may have different
// settings.
"no-trailing-spaces": 2,
// Force using 'let' or 'const' instead of 'var'. This is to prevent from var hoisting bugs.
"no-var": 2,
// Require one variable declaration statement.
"one-var": [2, "never"],
// Prefer using template literals instead of strings concatenation.
"prefer-template": 2,
// Require use of the second argument for parseInt().
"radix": 2,
// Require semicolons in every place they are valid. This is to prevent from automatic
// semicolon insertion bugs.
"semi": [2, "always"],
// Disallow setting strict mode in files. All JS code in the project uses ES6 modules so is
// implicitly strict.
"strict": [2, "never"],
// Require valid JSDoc.
"valid-jsdoc": [2, {
"prefer": {
"returns": "return"
},
"requireReturnDescription": false,
"requireReturn": false,
"requireParamDescription": false
}],
// No spacing in object literals nor in imports/exports.
"object-curly-spacing": [2, "never"],
},
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chenleji/k8s-dashboard.git
git@gitee.com:chenleji/k8s-dashboard.git
chenleji
k8s-dashboard
k8s-dashboard
master

搜索帮助