-
Notifications
You must be signed in to change notification settings - Fork 19
/
.eslintrc.cjs
99 lines (99 loc) · 2.39 KB
/
.eslintrc.cjs
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/* eslint-disable vue/sort-keys */
module.exports = exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'@nuxtjs/eslint-config-typescript',
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:nuxt/recommended',
'@vue/eslint-config-typescript',
'plugin:prettier/recommended',
'plugin:vuejs-accessibility/recommended',
'plugin:tailwindcss/recommended',
],
ignorePatterns: [
'.nuxt',
'.output',
'.github',
'.husky',
'.vscode',
'coverage',
'node_modules',
'static',
'testUtils.ts',
'vite*.ts',
],
plugins: [
// put these in the same order as they appear in devDeps for my own sanity :)
'@typescript-eslint',
'nuxt',
'prettier',
'tailwindcss',
'vue',
'vuejs-accessibility',
],
// "parser": "vue-eslint-parser",
// Parser is defined by @nuxtjs eslint config
parserOptions: {
// "parser": "@typescript-eslint/parser",
sourceType: 'module',
ecmaVersion: 'latest',
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'arrow-parens': ['error', 'always'],
'comma-dangle': 'off',
'eol-last': ['error', 'always'],
'import/order': [
'error',
{
groups: [
'builtin',
'external',
['internal', 'parent', 'sibling'],
'index',
'object',
'type',
],
},
],
semi: 'off',
'space-before-function-paren': 'off',
'tailwindcss/no-custom-classname': 'off',
'vue/html-self-closing': 'off',
'vue/multi-word-component-names': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/sort-keys': [
'error',
'asc',
{
caseSensitive: true,
ignoreChildrenOf: ['model'],
ignoreGrandchildrenOf: [
'computed',
'directives',
'inject',
'props',
'watch',
],
minKeys: 2,
natural: false,
},
],
// disabled since this is only relevant for IE support
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/398#issuecomment-685442841
'vuejs-accessibility/no-onchange': 'off',
},
settings: {
'vue-i18n': {
localedir: '',
},
},
}