-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
eslint.config.mjs
66 lines (65 loc) · 2.01 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
import eslint from '@eslint/js';
import cypress from 'eslint-plugin-cypress/flat';
import globals from 'globals';
import n from 'eslint-plugin-n';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: [
'**/*.{js,mjs}',
'**/*/*.d.ts',
'**/dist',
'**/__tests__/*',
],
},
{
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
],
plugins: {
cypress,
n
},
files: ['**/*.ts'],
languageOptions: {
globals: {
...globals.es2021,
...globals.browser,
},
parser: tseslint.parser,
parserOptions: {
project: ['./tsconfig.json', './test/tsconfig.spec.json', './test/cypress/tsconfig.json']
}
},
settings: {
node: {
tryExtensions: ['.ts'],
resolvePaths: ['node_modules/@types']
}
},
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-empty-object-type': [
'error',
{ allowInterfaces: 'with-single-extends' }, // maybe we should turn this on in a new PR
],
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_', 'destructuredArrayIgnorePattern': '^_', caughtErrors: 'none' }],
'cypress/no-assigning-return-values': 'off',
'cypress/unsafe-to-chain-command': 'off',
'object-shorthand': 'error',
'no-async-promise-executor': 'off',
'no-case-declarations': 'off',
'no-prototype-builtins': 'off',
'no-extra-boolean-cast': 'off',
'semi': 'off',
}
});