-
-
Notifications
You must be signed in to change notification settings - Fork 127
/
Copy patheslint.config.mjs
77 lines (74 loc) · 1.85 KB
/
eslint.config.mjs
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
import eslintPlugin from '@typescript-eslint/eslint-plugin'
import eslintParser from '@typescript-eslint/parser'
import js from '@eslint/js'
import globals from 'globals'
export default [
{
/**
* Ignore the following files.
*
* ESLint requires "ignores" key to be the only one in this object
*/
ignores: [
'**/node_modules',
'**/eslint.config.mjs',
'**/eslint.config.js',
'**/.quasar',
'**/dist',
'**/*.md',
'dist/*',
'src-capacitor/*',
'src-cordova/*',
'.quasar/*',
'quasar.config.*.temporary.compiled*',
],
},
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: eslintParser,
parserOptions: {
project: './tsconfig.json',
},
globals: {
...globals.node,
},
},
files: ['src/**/*.ts', 'src/**/*.js', 'ui/**/*.ts', 'ui/**/*.js'], // Match all TypeScript files
plugins: {
'@typescript-eslint': eslintPlugin,
},
rules: {
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/explicit-function-return-type': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'warn',
eqeqeq: ['error', 'always'],
'no-prototype-builtins': 'off',
'no-console': [
'warn',
{
allow: ['error', 'warn'], // Allow console.error and console.warn
},
],
},
},
]