-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
54 lines (49 loc) · 1.45 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
import configurations from '@plugjs/eslint-plugin'
export default [
...configurations,
// ===== DEFINE THE LOCATION OF OUR TSCONFIG.JSON FILES ======================
{
languageOptions: {
parserOptions: {
createDefaultProgram: false,
project: [
'./tsconfig.json',
'./test/tsconfig.json',
],
},
},
},
// ===== ENSURE THAT OUR MAIN FILES DEPEND ONLY ON PROPER DEPENDENCIES =======
{
files: [ 'src/**' ],
rules: {
// Turn _ON_ dependencies checks only for sources
'import-x/no-extraneous-dependencies': [ 'error', {
'devDependencies': true,
'peerDependencies': true,
'optionalDependencies': true,
'bundledDependencies': false,
} ],
},
},
// ===== PROJECT LOCAL RULES =================================================
// Add any extra rule not tied to a specific "files" pattern here, e.g.:
{
files: [ 'test/**' ],
rules: {
// tests are using "chai" with open assertions...
'@typescript-eslint/no-unused-expressions': 'off',
},
},
// ===== IGNORED FILES =======================================================
// REMEMBER! Ignores *must* be in its own configuration, they can not coexist
// with "rules", "languageOptions", "files", ... or anything else, otherwise
// ESLint will blaantly ignore the ignore files!
{
ignores: [
'coverage/',
'dist/',
'node_modules/',
],
},
]