forked from moonrepo/dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
53 lines (50 loc) · 1.24 KB
/
eslint.config.mjs
File metadata and controls
53 lines (50 loc) · 1.24 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
42
43
44
45
46
47
48
49
50
51
52
53
import { defineConfig, globalIgnores } from 'eslint/config';
import moonConfig from 'eslint-config-moon';
import moonNodeConfig from 'eslint-config-moon/node';
const config = defineConfig([
globalIgnores([
'**/cjs/',
'**/coverage/',
'**/esm/',
'**/lib/',
'**/mjs/',
'**/node_modules/',
'**/*.d.ts',
'**/*.json',
'packages/eslint-config/*.js',
'packages/jest-preset/*.js',
]),
...moonConfig,
...moonNodeConfig,
{
rules: {
// Temporarily disabled
'unicorn/no-empty-file': 'off',
'unicorn/prefer-module': 'off',
'unicorn/prefer-node-protocol': 'off',
},
},
{
files: ['packages/eslint-config/**/*'],
rules: { 'no-magic-numbers': 'off', 'sort-keys': 'off', 'import/no-default-export': 'off' },
},
{
files: ['packages/vscode-extension/**/*'],
rules: {
'max-classes-per-file': 'off',
'no-console': 'off',
'no-nested-ternary': 'off',
'no-param-reassign': 'off',
// We want to use exhaustive checks
'default-case': 'off',
// Random version conditionals
'no-magic-numbers': 'off',
// The `vscode` import isn't real
'import/no-unresolved': 'off',
// It doesnt like our `@moonrepo/types` package
'node/no-unpublished-import': 'off',
},
},
]);
// console.log(config);
export default config;