-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy patheslint.config.js
More file actions
55 lines (54 loc) · 1.48 KB
/
eslint.config.js
File metadata and controls
55 lines (54 loc) · 1.48 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
const eslint = require('@eslint/js');
const tseslint = require('@typescript-eslint/eslint-plugin');
const tsparser = require('@typescript-eslint/parser');
const globals = require('globals');
const prettierConfig = require('eslint-config-prettier');
module.exports = [
// Global ignores
{
ignores: [
'node_modules/**',
'dist/**',
'build/**',
'test/**',
'coverage/**',
'*.min.js',
'test/eval/jquery.min.js',
'rollup.config.mjs',
'jest.config.js',
'eslint.config.js'
]
},
// Base config for all TypeScript files
{
files: ['**/*.ts'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json'
},
globals: {
...globals.browser,
...globals.node,
...globals.es2021
}
},
plugins: {
'@typescript-eslint': tseslint
},
rules: {
...eslint.configs.recommended.rules,
...tseslint.configs.recommended.rules,
...prettierConfig.rules,
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-empty-object-type': 'warn',
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-unsafe-function-type': 'off',
'no-fallthrough': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^lastLastLastLastPart' }],
'@typescript-eslint/no-unsafe-assignment': 'off',
}
}
];