-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.js
More file actions
64 lines (63 loc) · 1.32 KB
/
.eslintrc.js
File metadata and controls
64 lines (63 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
const { getESLintImportOrderRule, getESLintImportSettings } = require('t-comm');
module.exports = {
root: true,
extends: ['eslint-config-light-vue3'],
globals: {
getCurrentPages: true,
globalThis: true,
uni: true,
qq: true,
wx: true,
requirePlugin: true,
},
parserOptions: {
ecmaVersion: 'latest',
extraFileExtensions: ['.vue'],
},
overrides: [
{
files: ['*.mjs'],
parserOptions: {
project: 'tsconfig.eslint.json',
sourceType: 'module',
},
},
{
files: ['*.js', '*.ts'],
excludedFiles: ['*.test.js', '*.spec.js'],
parserOptions: {
project: 'tsconfig.eslint.json',
},
},
{
files: [
'src/packages/**/*',
],
excludedFiles: [
'**/*/demo.vue',
'**/*/demo-helper/**/*',
],
rules: {
'no-alert': 2,
},
},
],
settings: {
...getESLintImportSettings(),
},
rules: {
...getESLintImportOrderRule(),
'light/no-import-all-in-one-api': 2,
'light/valid-file-name': [2, {
exclude: [
'src/App.vue',
'src/utils/i18n/lang/*.{js,ts}',
'src/packages/locale/lang/*.{js,ts}',
],
}],
'light/no-js-file': 2,
'light/valid-spelling': 2,
'light/valid-shaohou': 2,
'light/classname-per-line': 2,
},
};