-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
51 lines (50 loc) · 1.39 KB
/
eslint.config.js
File metadata and controls
51 lines (50 loc) · 1.39 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
import globals from 'globals';
import pluginJs from '@eslint/js';
import pluginVue from 'eslint-plugin-vue';
import vueConfigPrettier from '@vue/eslint-config-prettier';
import {
defineConfigWithVueTs,
vueTsConfigs,
} from '@vue/eslint-config-typescript';
import tseslint from 'typescript-eslint';
export default defineConfigWithVueTs(
{
ignores: ['node_modules', 'dist'],
},
// JavaScript base config
pluginJs.configs.recommended,
// TypeScript base config
...tseslint.configs.recommended,
// Vue plugin with flat config (for Vue 3)
...pluginVue.configs['flat/recommended'],
// TypeScript config (enables parser, rules for .ts in Vue)
vueTsConfigs.recommended,
// Prettier integration: disables conflicting rules
vueConfigPrettier,
// Prettier and custom rules
{
rules: {
'prettier/prettier': 'warn',
'vue/html-closing-bracket-newline': [
'error',
{
singleline: 'never',
multiline: 'never',
},
],
'vue/max-attributes-per-line': 'off',
'vue/no-v-html': 'off',
'max-len': 'off',
'linebreak-style': 'off',
'vue/multi-word-component-names': 'off',
'vue/first-attribute-linebreak': 'off',
},
files: ['*.js', '*.ts', '*.vue', '**/*.js', '**/*.ts', '**/*.vue'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
}
);