-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
71 lines (67 loc) · 1.74 KB
/
Copy patheslint.config.mjs
File metadata and controls
71 lines (67 loc) · 1.74 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
65
66
67
68
69
70
71
import tseslint from 'typescript-eslint'
import pluginVue from 'eslint-plugin-vue'
import pluginReact from 'eslint-plugin-react'
export default tseslint.config(
{
ignores: [
'**/.nuxt/**',
'**/.output/**',
'**/dist/**',
'**/.turbo/**',
'**/node_modules/**',
'**/scratch/**'
]
},
...tseslint.configs.recommended,
...pluginVue.configs['flat/recommended'],
{
files: ['**/*.vue'],
languageOptions: {
parserOptions: {
parser: tseslint.parser,
},
},
},
{
plugins: {
react: pluginReact,
},
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
rules: {
// Vue rules
'vue/no-unused-components': 'warn',
'vue/no-mutating-props': 'error',
'vue/require-default-prop': 'warn',
'vue/multi-word-component-names': 'off',
'vue/attribute-hyphenation': ['error', 'never'],
'vue/attributes-order': 'warn',
'vue/no-multiple-template-root': 'off',
'vue/no-template-shadow': 'off',
// General rules matching facturador
'no-tabs': 'error',
'array-callback-return': 'error',
'no-await-in-loop': 'error',
'no-constant-binary-expression': 'error',
'no-duplicate-imports': ['error', { allowSeparateTypeImports: true }],
'no-console': ['warn', { allow: ['warn', 'error'] }],
// TypeScript rules
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
// React rules
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
'react/prop-types': 'off',
},
settings: {
react: {
version: 'detect',
},
},
}
)