-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy patheslint.config.js
More file actions
41 lines (40 loc) · 1.12 KB
/
eslint.config.js
File metadata and controls
41 lines (40 loc) · 1.12 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
const tsPlugin = require('@typescript-eslint/eslint-plugin');
const compat = require('eslint-plugin-compat');
const tsdoc = require('eslint-plugin-tsdoc');
const prettier = require('eslint-config-prettier');
const espree = require('espree');
const globals = require('globals');
module.exports = [
...tsPlugin.configs['flat/recommended'],
compat.configs['flat/recommended'],
{
files: ['**/*.ts', '**/*.tsx'],
plugins: { tsdoc },
rules: {
...prettier.rules,
'comma-dangle': ['error', 'never'],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true }
]
}
},
{
files: ['**/*.webjs'],
plugins: { compat },
languageOptions: {
parser: espree,
ecmaVersion: 5,
sourceType: 'script',
globals: globals.browser
},
rules: {
'no-unused-vars': 0,
'strict': ['error', 'never'],
'@typescript-eslint/no-unused-vars': 'off',
'dot-notation': 'off',
'compat/compat': ['error', 'Android >= 4.1, iOS >= 7.0']
}
}
];