-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheslint.config.js
80 lines (79 loc) · 2.54 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { FlatCompat } from '@eslint/eslintrc'
import path from 'path'
import { fileURLToPath } from 'url'
const baseDirectory = path.dirname(fileURLToPath(import.meta.url))
const eslintrc = new FlatCompat({ baseDirectory })
import stylistic from '@stylistic/eslint-plugin'
export default [
{
ignores: [
'node_modules',
'dist',
'reports',
'docker',
],
},
// not migrated to eslint flat config yet:
// https://github.com/vuejs/eslint-plugin-vue/pull/2319
...eslintrc.plugins('vue'),
...eslintrc.extends('plugin:vue/recommended'),
// not migrated to eslint flat config yet. Won’t do until vue-cli support it:
// https://github.com/vuejs/vue-cli/issues/6759
...eslintrc.plugins('vuetify'),
...eslintrc.extends('plugin:vuetify/base'),
stylistic.configs['recommended-flat'],
{
files: [
'**/*.js',
'**/*.mjs',
'**/*.cjs',
'**/*.vue',
],
languageOptions: {
parserOptions: {
ecmaVersion: 'latest', // default
sourceType: 'module', // default
requireConfigFile: false,
},
},
rules: {
'@stylistic/max-statements-per-line': ['error', { max: 2 }],
'@stylistic/semi': 'error',
'@stylistic/indent': ['error', 2],
'@stylistic/space-before-function-paren': 'off',
'@stylistic/brace-style': 'off',
'@stylistic/arrow-parens': 'off',
'no-prototype-builtins': 'off',
'no-undef': 'error',
'comma-dangle': ['warn', 'always-multiline'],
'no-irregular-whitespace': 'off',
'quote-props': ['warn', 'as-needed', { unnecessary: false }],
'max-len': ['warn', { code: 120 }],
'no-unused-vars': [
'error',
{
vars: 'all',
varsIgnorePattern: '[iI]gnored',
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^ignore',
args: 'after-used',
},
],
'vue/one-component-per-file': 'off',
'vue/custom-event-name-casing': 'off',
'vue/multi-word-component-names': 'off',
'vue/no-arrow-functions-in-watch': 'off',
'vue/no-custom-modifiers-on-v-model': 'off',
'vue/no-dupe-v-else-if': 'off',
'vue/no-multiple-template-root': 'off',
'vue/no-mutating-props': 'off',
'vue/no-v-for-template-key': 'off',
'vue/no-v-model-argument': 'off',
'vue/experimental-script-setup-vars': 'off',
'vue/v-on-event-hyphenation': 'warn',
'vue/v-slot-style': 'off',
'vue/valid-v-slot': ['error', { allowModifiers: true }],
'vuetify/no-deprecated-classes': 'off',
},
},
]