-
-
Notifications
You must be signed in to change notification settings - Fork 215
/
Copy patheslint.config.js
61 lines (60 loc) · 1.76 KB
/
eslint.config.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
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import cypress from 'eslint-plugin-cypress/flat';
import vue from 'eslint-plugin-vue';
import globals from 'globals';
import typescript from 'typescript-eslint';
export default typescript.config(
{
languageOptions: {
globals: globals.node,
},
},
{
ignores: ['target/', 'src/test/resources/'],
},
js.configs.recommended,
...typescript.configs.recommended.map(config => (config.name === 'typescript-eslint/base' ? config : { ...config, files: ['**/*.ts'] })),
...vue.configs['flat/recommended'],
{
files: ['**/*.vue'],
languageOptions: {
parserOptions: { parser: '@typescript-eslint/parser' },
},
},
{
files: ['src/*/webapp/**/*.vue', 'src/*/webapp/**/*.ts'],
rules: {
quotes: ['error', 'single', { avoidEscape: true }],
'@typescript-eslint/no-explicit-any': 'off',
'vue/multi-word-component-names': 'off',
'vue/no-reserved-component-names': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
},
},
{
files: ['src/test/webapp/component/integration/**/*.ts'],
extends: [...typescript.configs.recommendedTypeChecked, cypress.configs.recommended],
languageOptions: {
parserOptions: {
project: ['src/test/webapp/component/tsconfig.json'],
},
},
rules: {
'@typescript-eslint/no-unsafe-assignment': 'off',
},
},
{
files: ['src/test/webapp/e2e/integration/**/*.ts'],
extends: [...typescript.configs.recommendedTypeChecked, cypress.configs.recommended],
languageOptions: {
parserOptions: {
project: ['src/test/webapp/e2e/tsconfig.json'],
},
},
rules: {
'@typescript-eslint/no-unsafe-assignment': 'off',
},
},
prettier,
);