-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
67 lines (65 loc) · 2.17 KB
/
eslint.config.mjs
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
// @ts-check
import globals from 'globals';
import prettier from 'eslint-plugin-prettier/recommended';
import tseslint from 'typescript-eslint';
import js from '@eslint/js';
import vue from 'eslint-plugin-vue';
// jhipster-needle-eslint-add-import - JHipster will add additional import here
export default tseslint.config(
{
languageOptions: {
globals: {
...globals.node,
},
},
},
{ ignores: ['src/main/docker/'] },
{ ignores: ['target/classes/static/', 'target/'] },
js.configs.recommended,
...tseslint.configs.recommended.map(config =>
config.name === 'typescript-eslint/base' ? config : { ...config, files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'] },
),
{
files: ['**/*.{js,cjs,mjs}'],
rules: {
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
},
},
...vue.configs['flat/recommended'],
{
files: ['**/*.vue'],
languageOptions: {
parserOptions: { parser: '@typescript-eslint/parser' },
globals: { ...globals.browser },
},
},
{
files: ['src/main/webapp/**/*.vue', 'src/main/webapp/**/*.ts'],
languageOptions: {
globals: { ...globals.browser },
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/multi-word-component-names': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'vue/no-v-text-v-html-on-component': ['error', { allow: ['router-link', 'b-alert', 'b-badge', 'b-button', 'b-link'] }],
'vue/no-reserved-component-names': 'off',
'vue/attributes-order': 'off',
},
},
{
files: ['src/main/webapp/**/*.spec.ts'],
rules: {
'@typescript-eslint/no-empty-function': 'off',
},
},
// jhipster-needle-eslint-add-config - JHipster will add additional config here
prettier,
);