-
Notifications
You must be signed in to change notification settings - Fork 23
/
eslint.config.mjs
40 lines (39 loc) · 1.08 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
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginJest from 'eslint-plugin-jest';
import pluginGithub from 'eslint-plugin-github'
export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.strict,
tseslint.configs.stylistic,
pluginGithub.getFlatConfigs().recommended,
...pluginGithub.getFlatConfigs().typescript,
{
files: ['src/**/*.ts'],
rules: {
'i18n-text/no-en': 'off',
'importPlugin/no-namespace': 'off',
'github/array-foreach': 'error',
'github/async-preventdefault': 'warn',
'github/no-then': 'error',
'github/no-blur': 'error',
},
},
{
files: ['**/*.test.ts'],
plugins: { jest: pluginJest },
languageOptions: {
globals: pluginJest.environments.globals.globals,
},
rules: {
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
},
},
{
ignores: ['dist/', 'lib/', 'node_modules/']
}
);