-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy patheslint.config.mts
More file actions
61 lines (60 loc) · 1.76 KB
/
eslint.config.mts
File metadata and controls
61 lines (60 loc) · 1.76 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
import jsLint from '@eslint/js';
import tsLint from 'typescript-eslint';
import vueLint from 'eslint-plugin-vue';
import importPlugin from 'eslint-plugin-import';
import globals from "globals";
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript';
export default defineConfigWithVueTs(
jsLint.configs.recommended,
...tsLint.configs.recommended,
importPlugin.flatConfigs.recommended,
...vueLint.configs['flat/essential'],
vueTsConfigs.recommended,
{
files: ['**/*.vue', '**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs', '**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
// Ensure we have access to browser related globals like window/document
...globals.browser,
}
},
rules: {
'import/extensions': [
'error',
'ignorePackages',
{
'': 'never',
ts: 'never',
js: 'never',
vue: 'off',
},
],
'import/prefer-default-export': 'off',
radix: 'off',
'dot-notation': 'off',
'vue/no-use-v-if-with-v-for': 'warn',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-extra-boolean-cast': 'off',
// Disable full warning, and customize the typescript one
// Warn about unused vars unless they start with an underscore
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
settings: {
'import/resolver': {
typescript: true,
node: true,
},
},
}
);