Skip to content

Commit ba488b5

Browse files
committed
Merge branch 'refeat-branch'
2 parents 9192d1e + 0303127 commit ba488b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+123077
-1833
lines changed

.eslintrc.js

+60-113
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,60 @@
1-
module.exports = {
2-
// "parser": '@typescript-eslint/parser', // 启用会导致vue文件eslint错误
3-
extends: [
4-
'plugin:vue/vue3-recommended',
5-
// 'eslint:alins',
6-
],
7-
'plugins': [
8-
'@typescript-eslint',
9-
],
10-
'env': {
11-
'browser': true,
12-
'es6': true,
13-
'node': true,
14-
'commonjs': true
15-
},
16-
// 接入vue失败 暂且eslint 忽略vue文件
17-
'extends': [
18-
// "standard",
19-
'plugin:vue/essential'
20-
],
21-
'parserOptions': {
22-
// "parser": "babel-eslint",
23-
'parser': '@typescript-eslint/parser',
24-
'ecmaVersion': 2018,
25-
'ecmaFeatures': {
26-
'arrowFunctions': true,
27-
'classes': true,
28-
'modules': true,
29-
'defaultParams': true,
30-
'experimentalObjectRestSpread': true
31-
},
32-
'sourceType': 'module',
33-
'parserOptions': {
34-
'allowImportExportEverywhere': true
35-
},
36-
project: 'tsconfig.json',
37-
tsconfigRootDir: './',
38-
extraFileExtensions: [ '.vue' ],
39-
},
40-
'globals': {
41-
'window': true,
42-
'define': true,
43-
'console': true,
44-
'require': true,
45-
'module': true,
46-
__DEBUG__: true,
47-
__DEV__: true,
48-
__VERSION__: true,
49-
},
50-
'rules': {
51-
// 'no-var': "error",
52-
// 优先使用 interface 而不是 type
53-
'@typescript-eslint/consistent-type-definitions': [
54-
'error',
55-
'interface'
56-
],
57-
'@typescript-eslint/no-unused-vars': 'error', // 使用 ts 未使用变量的规则 比如枚举类型在es中会报错
58-
'no-extend-native': 0,
59-
'no-new': 0,
60-
'no-var': 2,
61-
'prefer-const': 2,
62-
'no-useless-escape': 0,
63-
'no-useless-constructor': 0,
64-
'no-trailing-spaces': [ 'error', {'skipBlankLines': true} ],
65-
'indent': [ 'error', 4, {
66-
'SwitchCase': 1
67-
} ],
68-
'space-infix-ops': [ 'error', {'int32Hint': false} ],
69-
'space-before-function-paren': [ 'error', {
70-
'anonymous': 'always',
71-
'named': 'always',
72-
'asyncArrow': 'always'
73-
} ],
74-
'semi': [ 'error', 'always' ],
75-
'comma-dangle': 0,
76-
'no-console': 0,
77-
'no-debugger': 0,
78-
'id-length': 0,
79-
'eol-last': 0,
80-
'object-curly-spacing': [ 'error', 'never' ],
81-
'arrow-spacing': 'error',
82-
'no-multiple-empty-lines': 'error',
83-
'no-unused-vars': 'error',
84-
'spaced-comment': 'error',
85-
'quotes': [ 'error', 'single', {'allowTemplateLiterals': true} ],
86-
'no-unreachable': 'error',
87-
'keyword-spacing': 'error',
88-
'space-before-blocks': 'error',
89-
'semi-spacing': 'error',
90-
'comma-spacing': 'error',
91-
'key-spacing': 'error',
92-
'no-undef': 'error',
93-
'prefer-const': [ 'error', {
94-
'destructuring': 'any',
95-
'ignoreReadBeforeAssign': false
96-
} ],
97-
'vue/script-indent': [ 'warn', 4, {
98-
'baseIndent': 1,
99-
'switchCase': 1
100-
} ],
101-
'vue/html-indent': [ 'error', 4 ],
102-
'vue/html-quotes': [ 'error', 'single', {'avoidEscape': true} ],
103-
'no-restricted-syntax': 'off',
104-
},
105-
'overrides': [
106-
{
107-
'files': [ '*.vue' ],
108-
'rules': {
109-
'indent': 'off'
110-
}
111-
}
112-
]
113-
};
1+
// /*
2+
// * @Author: tackchen
3+
// * @Date: 2022-09-04 08:02:56
4+
// * @Description: Coding something
5+
// */
6+
// module.exports = {
7+
// parser: '@typescript-eslint/parser',
8+
// plugins: [
9+
// 'eslint-plugin-react',
10+
// '@typescript-eslint',
11+
// ],
12+
// 'env': {
13+
// 'node': true,
14+
// },
15+
// rules: {
16+
// 'no-var': 'error',
17+
// 'no-extend-native': 0,
18+
// 'no-new': 0,
19+
// 'no-useless-escape': 0,
20+
// 'no-useless-constructor': 0,
21+
// 'no-trailing-spaces': [ 'error', { 'skipBlankLines': true } ],
22+
// 'indent': [ 'error', 4, {
23+
// 'SwitchCase': 1
24+
// } ],
25+
// 'space-infix-ops': [ 'error', { 'int32Hint': false } ],
26+
// 'space-before-function-paren': [ 'error', {
27+
// 'anonymous': 'always',
28+
// 'named': 'always',
29+
// 'asyncArrow': 'always'
30+
// } ],
31+
// 'semi': [ 'error', 'always' ],
32+
// 'comma-dangle': 0,
33+
// 'no-console': 0,
34+
// 'no-debugger': 0,
35+
// 'id-length': 0,
36+
// 'eol-last': 0,
37+
// 'object-curly-spacing': [ 'error', 'always' ],
38+
// 'array-bracket-spacing': [ 'error', 'always' ],
39+
// 'arrow-spacing': 'error',
40+
// 'no-multiple-empty-lines': 'error',
41+
// // 'no-unused-vars': 'error',
42+
// 'spaced-comment': 'error',
43+
// 'quotes': [ 'error', 'single', { 'allowTemplateLiterals': true } ],
44+
// 'no-unreachable': 'error',
45+
// 'keyword-spacing': 'error',
46+
// 'space-before-blocks': 'error',
47+
// 'semi-spacing': 'error',
48+
// 'comma-spacing': 'error',
49+
// 'key-spacing': 'error',
50+
// 'prefer-const': [ 'error', {
51+
// 'destructuring': 'any',
52+
// 'ignoreReadBeforeAssign': false
53+
// } ],
54+
// 'space-infix-ops': 2,
55+
// 'no-irregular-whitespace': 2, // 不规则的空白不允许
56+
// 'no-trailing-spaces': 2, // 一行结束后面有空格就发出警告
57+
// '@typescript-eslint/ban-ts-comment': 'off',
58+
// '@typescript-eslint/no-unused-vars': 'error',
59+
// }
60+
// };

0 commit comments

Comments
 (0)