-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
84 lines (79 loc) · 2.09 KB
/
.eslintrc.js
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
module.exports = {
root: true,
env: {
browser: true,
node: true,
serviceworker: true,
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier',
// 'plugin:vue/vue3-recommended',
// 'eslint:recommended',
// '@vue/typescript/recommended',
// '@vue/prettier',
// '@vue/prettier/@typescript-eslint',
],
parserOptions: {
ecmaVersion: 2020,
},
plugins: ['import'],
rules: {
// 'gdx-lint/vue-setup-sorting': 1,
'import/order': [
1,
{
pathGroups: [
{
pattern: '@/**',
group: 'internal',
},
],
groups: ['external', 'internal', ['parent', 'sibling', 'index']],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
'no-console': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'import/prefer-default-export': 0,
'import/no-cycle': 0,
'max-len': 0,
'class-methods-use-this': 0,
'no-shadow': 0,
'lines-between-class-members': 0,
'no-use-before-define': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'vue/no-v-html': 0,
// Disable this rule according to this doc
// https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
'no-undef': 0,
// There is no way to make `self` work in ServiceWorker
// https://github.com/airbnb/javascript/issues/1632
'no-restricted-globals': 0,
// Prevent CRLF errors for Windows projects.
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
'vue/multi-word-component-names': 'off',
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)',
],
env: {
jest: true,
},
},
],
};