-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.js
72 lines (70 loc) · 2.14 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
// https://eslint.org/docs/latest/use/configure/
// https://eslint.vuejs.org/user-guide/
// https://typescript-eslint.io/rules/?=recommended
import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginVue from 'eslint-plugin-vue';
import globals from 'globals';
import typescriptEslint from 'typescript-eslint';
export default typescriptEslint.config(
{
ignores: [
'*.d.ts',
'**/coverage',
'**/dist',
'vendor/**',
'public/build/**',
],
},
{
files: ['**/*.js'],
...eslint.configs.recommended,
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
process: 'readonly',
module: 'readonly',
require: 'readonly',
Ziggy: 'readonly',
window: 'readonly',
},
},
},
{
files: ['**/*.{ts,vue}'],
extends: [
eslint.configs.recommended,
...typescriptEslint.configs.recommended,
...eslintPluginVue.configs['flat/strongly-recommended'],
],
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.browser,
Ziggy: 'readonly',
},
sourceType: 'module',
parserOptions: {
parser: typescriptEslint.parser,
},
},
rules: {
'vue/require-default-prop': 'off',
'vue/attribute-hyphenation': 'off',
'vue/v-on-event-hyphenation': 'off',
'vue/multi-word-component-names': 'off',
'vue/block-lang': 'off',
'vue/first-attribute-linebreak': [
'error',
{
singleline: 'ignore',
multiline: 'ignore',
},
],
'@typescript-eslint/no-explicit-any': 'off',
},
},
eslintConfigPrettier
);