-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
78 lines (77 loc) · 2.15 KB
/
Copy patheslint.config.js
File metadata and controls
78 lines (77 loc) · 2.15 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
72
73
74
75
76
77
78
import vue from 'eslint-plugin-vue'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
import pluginSecurity from 'eslint-plugin-security'
import pluginPlaywright from 'eslint-plugin-playwright'
import globals from 'globals'
import autoImportGlobals from './.eslintrc-auto-import.json' with { type: 'json' }
export default [
{
ignores: [
'dist/**',
'node_modules/**',
'coverage/**',
'tests/e2e/**/*.ts',
'auto-imports.d.ts',
'components.d.ts',
],
},
...vue.configs['flat/recommended'],
...vueTsEslintConfig(),
pluginSecurity.configs.recommended,
skipFormatting,
{
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.browser,
...autoImportGlobals.globals,
},
},
},
{
files: ['**/*.cjs', '*.config.{js,cjs,mjs}'],
languageOptions: {
sourceType: 'commonjs',
globals: globals.node,
},
rules: {
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: ['tests/e2e/**/*.{test,spec}.{js,ts,jsx,tsx}'],
...pluginPlaywright.configs['flat/recommended'],
},
{
rules: {
'no-var': 'error',
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'comma-dangle': ['error', 'only-multiline'],
'id-length': [2, { exceptions: ['i', 'j', '_'] }],
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '_' }],
// slot="media" est un attribut natif requis par les web components (media-theme-*)
'vue/no-deprecated-slot-attribute': ['error', { ignore: ['youtube-video'] }],
'vue/multi-word-component-names': [
'error',
{
ignores: [
'Action',
'Contact',
'Event',
'Footer',
'Formule',
'Header',
'Heroe',
'Insta',
'Partenaire',
'Stats',
'Vision',
],
},
],
},
},
]