保存进度!
This commit is contained in:
parent
88006b2db9
commit
c04c6e8365
|
@ -21,35 +21,35 @@ module.exports = {
|
|||
},
|
||||
extends:["eslint:recommended",],
|
||||
rules:{
|
||||
indent: [ "warn", 4, ],
|
||||
indent: ["warn", 4,],
|
||||
// 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格
|
||||
"space-in-parens": [ "error", "always", { exceptions: [ "{}", "[]", "()", "empty", ], },],
|
||||
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
|
||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-unused-vars": "warn",
|
||||
semi: [ "error", "always", ], // 控制行尾部分号
|
||||
quotes: [ "error", "double", ],
|
||||
"comma-dangle": [ "error", {
|
||||
semi: ["error", "always",], // 控制行尾部分号
|
||||
quotes: ["error", "double",],
|
||||
"comma-dangle": ["error", {
|
||||
arrays: "always",
|
||||
objects: "always",
|
||||
imports: "never",
|
||||
exports: "never",
|
||||
functions: "never",
|
||||
},], // 数组和对象键值对最后一个逗号
|
||||
"comma-style": [ "error", "last", ], // 逗号在行位
|
||||
"array-bracket-spacing": [ "error", "always", {
|
||||
singleValue: false,
|
||||
objectsInArrays: false,
|
||||
arraysInArrays: false,
|
||||
},],
|
||||
"comma-style": ["error", "last",], // 逗号在行位
|
||||
"no-undef-init": "error",
|
||||
"no-invalid-this": "error",
|
||||
"no-use-before-define": "error",
|
||||
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
||||
"comma-spacing": [ "error", { before: false, after: true, },],
|
||||
"brace-style": [ "error", "allman", { allowSingleLine: true, },],
|
||||
"comma-spacing": ["error", { before: false, after: true, },],
|
||||
"array-bracket-spacing": ["error", "never", {
|
||||
singleValue: false,
|
||||
objectsInArrays: false,
|
||||
arraysInArrays: false,
|
||||
},],
|
||||
"brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||
"prefer-const": "warn",
|
||||
"space-before-function-paren": [ "error", {
|
||||
"space-before-function-paren": ["error", {
|
||||
anonymous: "always",
|
||||
named: "never",
|
||||
asyncArrow: "always",
|
||||
|
@ -78,23 +78,23 @@ module.exports = {
|
|||
"plugin:@typescript-eslint/recommended",
|
||||
],
|
||||
rules: {
|
||||
indent: [ "warn", 4, ],
|
||||
indent: ["warn", 4,],
|
||||
// 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格
|
||||
"space-in-parens": [ "error", "always", { exceptions: [ "{}", "[]", "()", "empty", ], },],
|
||||
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
|
||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-unused-vars": "warn",
|
||||
semi: [ "error", "always", ], // 控制行尾部分号
|
||||
quotes: [ "error", "double", ],
|
||||
"comma-dangle": [ "error", {
|
||||
semi: ["error", "always",], // 控制行尾部分号
|
||||
quotes: ["error", "double",],
|
||||
"comma-dangle": ["error", {
|
||||
arrays: "always",
|
||||
objects: "always",
|
||||
imports: "never",
|
||||
exports: "never",
|
||||
functions: "never",
|
||||
},], // 数组和对象键值对最后一个逗号
|
||||
"comma-style": [ "error", "last", ], // 逗号在行位
|
||||
"array-bracket-spacing": [ "error", "always", {
|
||||
"comma-style": ["error", "last",], // 逗号在行位
|
||||
"array-bracket-spacing": ["error", "always", {
|
||||
singleValue: false,
|
||||
objectsInArrays: false,
|
||||
arraysInArrays: false,
|
||||
|
@ -103,33 +103,33 @@ module.exports = {
|
|||
"no-invalid-this": "error",
|
||||
"no-use-before-define": "error",
|
||||
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
||||
"comma-spacing": [ "error", { before: false, after: true, },],
|
||||
"brace-style": [ "error", "allman", { allowSingleLine: true, },],
|
||||
"comma-spacing": ["error", { before: false, after: true, },],
|
||||
"brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||
"prefer-const": "warn",
|
||||
"space-before-function-paren": [ "error", {
|
||||
"space-before-function-paren": ["error", {
|
||||
anonymous: "always",
|
||||
named: "never",
|
||||
asyncArrow: "always",
|
||||
},],
|
||||
// vue
|
||||
"vue/html-indent": [ "error", 4, ],
|
||||
"vue/html-indent": ["error", 4,],
|
||||
// typescript
|
||||
"@typescript-eslint/indent": [ "warn", 4, ],
|
||||
"@typescript-eslint/indent": ["warn", 4,],
|
||||
"@typescript-eslint/no-extra-semi": "off",
|
||||
"@typescript-eslint/no-inferrable-types": "off",
|
||||
"@typescript-eslint/no-unused-vars": "warn",
|
||||
"@typescript-eslint/ban-ts-comment": "warn",
|
||||
"@typescript-eslint/member-delimiter-style": "off",
|
||||
"@typescript-eslint/semi": [ "error", "always", ], // 控制行尾部分号
|
||||
"@typescript-eslint/brace-style": [ "error", "allman", { allowSingleLine: true, },],
|
||||
"@typescript-eslint/comma-dangle": [ "error", {
|
||||
"@typescript-eslint/semi": ["error", "always",], // 控制行尾部分号
|
||||
"@typescript-eslint/brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||
"@typescript-eslint/comma-dangle": ["error", {
|
||||
arrays: "always",
|
||||
objects: "always",
|
||||
imports: "never",
|
||||
exports: "never",
|
||||
functions: "never",
|
||||
},], // 数组和对象键值对最后一个逗号
|
||||
"@typescript-eslint/quotes": [ "error", "double", ],
|
||||
"@typescript-eslint/quotes": ["error", "double",],
|
||||
"@typescript-eslint/space-before-function-paren": "off",
|
||||
},
|
||||
},
|
||||
|
@ -141,38 +141,40 @@ module.exports = {
|
|||
},
|
||||
plugins: ["@typescript-eslint",],
|
||||
extends: [
|
||||
"standard-with-typescript",
|
||||
"eslint:recommended",
|
||||
"standard-with-typescript",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
],
|
||||
rules: {
|
||||
// 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格
|
||||
"space-in-parens": [ "error", "always", { exceptions: [ "{}", "[]", "()", "empty", ], },],
|
||||
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
|
||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"@typescript-eslint/indent": [ "error", 4, ],
|
||||
"@typescript-eslint/indent": ["error", 4,],
|
||||
"@typescript-eslint/no-extra-semi": "off",
|
||||
"@typescript-eslint/no-inferrable-types": "off",
|
||||
"@typescript-eslint/no-unused-vars": "warn",
|
||||
"@typescript-eslint/ban-ts-comment": "warn",
|
||||
"@typescript-eslint/member-delimiter-style": "off",
|
||||
"@typescript-eslint/semi": [ "error", "always", ], // 控制行尾部分号
|
||||
"@typescript-eslint/brace-style": [ "error", "allman", { allowSingleLine: true, },],
|
||||
"@typescript-eslint/comma-dangle": [ "error", {
|
||||
"@typescript-eslint/semi": ["error", "always",], // 控制行尾部分号
|
||||
"@typescript-eslint/brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||
"@typescript-eslint/comma-dangle": ["error", {
|
||||
arrays: "always",
|
||||
objects: "always",
|
||||
imports: "never",
|
||||
exports: "never",
|
||||
functions: "never",
|
||||
},], // 数组和对象键值对最后一个逗号
|
||||
"@typescript-eslint/quotes": [ "error", "double", ],
|
||||
"@typescript-eslint/quotes": ["error", "double",],
|
||||
"@typescript-eslint/space-before-function-paren": "off",
|
||||
"@typescript-eslint/strict-boolean-expressions": [ "error", {
|
||||
"@typescript-eslint/strict-boolean-expressions": ["error", {
|
||||
allowString: false,
|
||||
},],
|
||||
"comma-style": [ "error", "last", ], // 逗号在行位
|
||||
"array-bracket-spacing": [ "error", "always", {
|
||||
"comma-style": ["error", "last",], // 逗号在行位
|
||||
"comma-spacing": ["off", { before: false, after: true, },],
|
||||
"@typescript-eslint/comma-spacing": ["error", { before: false, after: true, },], // 使用eslint的,不用ts的
|
||||
"array-bracket-spacing": ["error", "always", {
|
||||
singleValue: false,
|
||||
objectsInArrays: false,
|
||||
arraysInArrays: false,
|
||||
|
|
|
@ -14,7 +14,7 @@ interface Cat
|
|||
{
|
||||
name: string;
|
||||
purrs: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
interface Dog
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue