-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy patheslint.config.mjs
71 lines (68 loc) · 1.54 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
67
68
69
70
71
/* eslint-disable import/no-unresolved */
import jest from 'eslint-plugin-jest';
import globals from 'globals';
import github from 'eslint-plugin-github';
import prettier from 'eslint-config-prettier';
import prettierPlugin from 'eslint-plugin-prettier';
import typescriptParser from '@typescript-eslint/parser';
import typescriptEslint from '@typescript-eslint/eslint-plugin';
export default [
github.getFlatConfigs().recommended,
prettier,
{
ignores: [
'**/dist/',
'**/lib/',
'**/node_modules/',
'**/jest.config.js',
'**/__tests__/'
]
},
{
languageOptions: {
globals: {
...globals.node,
...jest.environments.globals.globals
},
ecmaVersion: 'latest'
}
},
{
rules: {
'prettier/prettier': [
'error',
{
trailingComma: 'none',
singleQuote: true,
printWidth: 80,
// below line only for windows users facing CLRF and eslint/prettier error
// non windows users feel free to delete it
endOfLine: 'auto',
useTabs: false
}
],
'eslint-comments/no-use': 'off',
'import/no-namespace': 'off',
camelcase: 'off',
'i18n-text/no-en': 'off',
'no-unused-vars': 'off'
},
plugins: {
prettier: prettierPlugin
}
},
{
files: ['**/*.mjs'],
rules: {}
},
{
files: ['**/*.ts'],
languageOptions: {
parser: typescriptParser
},
plugins: {
'@typescript-eslint': typescriptEslint
},
rules: {}
}
];