Repository navigation
Expand file tree
/
Copy patheslint.config.mjs
More file actions
61 lines (60 loc) · 1.66 KB
/
Copy patheslint.config.mjs
File metadata and controls
61 lines (60 loc) · 1.66 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
54
55
56
57
58
59
60
61
import nx from '@nx/eslint-plugin';
import jsoncEslintParser from 'jsonc-eslint-parser';
export default [
...nx.configs['flat/base'],
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
enforceBuildableLibDependency: true,
allow: [],
depConstraints: [
{
sourceTag: '*',
onlyDependOnLibsWithTags: ['*'],
},
],
},
],
},
},
...nx.configs['flat/typescript'],
...nx.configs['flat/javascript'],
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
rules: {
// Newly enabled by the ESLint v9 / typescript-eslint v8 recommended presets;
// these were not enforced before the flat-config migration.
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'prefer-const': 'off',
},
},
{
files: ['**/*.json'],
rules: {
'@nx/dependency-checks': [
'error',
{
// typescript is a host-provided tool and tslib is supplied by the
// Nx runtime; neither needs to be declared in package.json.
ignoredDependencies: ['typescript', 'tslib'],
},
],
},
languageOptions: {
parser: jsoncEslintParser,
},
},
{
// Generator template package.json files are app scaffolding, not this
// project's manifest; skip dependency checks for them.
files: ['**/src/generators/**/files_*/**/package.json'],
rules: {
'@nx/dependency-checks': 'off',
},
},
];