-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
41 lines (41 loc) · 1022 Bytes
/
Copy path.eslintrc.cjs
File metadata and controls
41 lines (41 loc) · 1022 Bytes
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
/* eslint-env node */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
env: {
node: true,
es2022: true,
browser: true,
},
ignorePatterns: [
'dist/',
'node_modules/',
'.tmp-assets/',
'scripts/',
'*.cjs',
'src/plugin/dashboard/public/app.js',
'src/plugin/dashboard/public/sw.js',
],
rules: {
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'no-console': 'off',
},
overrides: [
{
files: ['tests/**/*.ts'],
env: { node: true },
},
{
files: ['src/plugin/dashboard/spa/**/*.tsx', 'src/plugin/dashboard/spa/**/*.ts'],
env: { browser: true },
},
],
};