forked from FranciscoKloganB/vitesse-enterprise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
46 lines (45 loc) · 1.22 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
const inProductionEnv = process.env.NODE_ENV === 'production'
const rulesSeverityOff = inProductionEnv ? 'warn' : 'off'
module.exports = {
root: true,
env: {
node: true,
},
extends: ['@antfu', 'plugin:prettier/recommended'],
parserOptions: {
ecmaVersion: 2020,
},
rules: {
'@typescript-eslint/no-namespace': ['error', { allowDeclarations: true }],
'@typescript-eslint/no-explicit-any': rulesSeverityOff,
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^(_|Cypress)' },
],
'comma-dangle': ['error', 'only-multiline'],
'no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^(_|Cypress)' },
],
'no-console': rulesSeverityOff,
'no-debugger': rulesSeverityOff,
'no-unused-expressions': 'off',
'max-len': [
'error',
{
code: 88,
tabWidth: 2,
},
],
// Delegates import sorting order to import-sort plugin
'import/order': 'off',
// Delegates curly brace spacing to prettier
'object-curly-spacing': 'off',
},
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
},
}