-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
90 lines (89 loc) · 3.04 KB
/
eslint.config.js
File metadata and controls
90 lines (89 loc) · 3.04 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
79
80
81
82
83
84
85
86
87
88
89
90
import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import vue from 'eslint-plugin-vue';
import vuetify from 'eslint-plugin-vuetify';
import importPlugin from 'eslint-plugin-import';
import globals from 'globals';
import typescriptEslint from 'typescript-eslint';
export default typescriptEslint.config(
{ ignores: ['*.d.ts', '**/coverage', '**/dist'] },
{
extends: [
eslint.configs.recommended,
...typescriptEslint.configs.recommended,
...vue.configs['flat/essential'],
...vuetify.configs['flat/recommended'],
importPlugin.flatConfigs.recommended,
],
files: ['**/*.{ts,vue}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: globals.browser,
parserOptions: {
parser: typescriptEslint.parser,
},
},
settings: {
'import/resolver': {
alias: {
map: [['@', './src']],
extensions: ['.ts', '.tsx', '.js', '.jsx', '.vue'],
},
},
'import/ignore': ['node_modules'],
},
rules: {
'import/no-unresolved': 'off',
'import/prefer-default-export': 'off',
// allow optionalDependencies
'import/no-extraneous-dependencies': 'off',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'import/extensions': 'off',
'import/order': 'warn',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// ' ': 'warn',
'no-console': ['warn', { allow: ['warn', 'error'] }],
'max-len': 'off',
'no-plusplus': 'off',
'prefer-destructuring': 'off',
'no-param-reassign': 'off',
'linebreak-style': 'off',
'padded-blocks': 'off',
'implicit-arrow-linebreak': 0,
'no-restricted-syntax': 0,
'comma-dangle': ['error', 'always-multiline'],
'jsx-quotes': ['error', 'prefer-single'],
quotes: ['error', 'single', { avoidEscape: true }],
'operator-linebreak': ['off', 'before'],
'vuetify/no-deprecated-classes': 'error',
'vuetify/grid-unknown-attributes': 'error',
'vuetify/no-deprecated-colors': 'warn',
'vue/no-v-text-v-html-on-component': 'off',
'class-methods-use-this': 'off',
'lines-between-class-members': 'off',
'vue/order-in-components': 'off',
'vue/max-attributes-per-line': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-unused-vars': 'off',
'vue/no-unused-vars': 'warn',
'@typescript-eslint/no-unused-vars': [
'warn',
{
// this should avoid showing warning for the omit pattern of getModelData() in AbstractEditViewModel
vars: 'all',
args: 'after-used',
ignoreRestSiblings: true,
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-this-alias': 'warn',
},
},
eslintConfigPrettier,
);