-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy patheslint.config.js
More file actions
84 lines (81 loc) · 2.19 KB
/
Copy patheslint.config.js
File metadata and controls
84 lines (81 loc) · 2.19 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import angular from 'angular-eslint';
import nxPlugin from '@nx/eslint-plugin';
import prettierConfig from 'eslint-config-prettier';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default tseslint.config(
{
// Common ignores
ignores: [
'**/node_modules/**',
'**/dist/**',
'**/tmp/**',
'**/.angular/**',
'**/.nx/cache/**',
// Ignore config files in root? Usually not needed for ESLint >= 8.35.0
// 'eslint.config.js',
// 'prettier.config.js',
// 'nx.json',
// etc.
],
},
{
plugins: {
'@nx': nxPlugin,
},
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
enforceBuildableLibDependency: true,
allow: [],
depConstraints: [
{
sourceTag: '*',
onlyDependOnLibsWithTags: ['*'],
},
],
},
],
'no-extra-semi': 'error', // Apply globally from root config
},
},
// JavaScript files configuration
{
files: ['**/*.js', '**/*.jsx'],
extends: [eslint.configs.recommended],
rules: {
// Rules specific to JS files if any, besides recommended
},
},
// Angular specific configurations (for apps/webapp)
{
files: ['apps/webapp/**/*.ts'],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...angular.configs.tsRecommended,
],
processor: angular.processInlineTemplates,
rules: {
// our project thinks using renaming inputs is ok
'@angular-eslint/no-input-rename': 'off',
},
},
// Angular template specific configurations (for apps/webapp)
{
files: ['apps/webapp/**/*.html'],
extends: [
...angular.configs.templateRecommended, // Recommended rules for templates
...angular.configs.templateAccessibility, // Accessibility rules
],
rules: {},
},
// Prettier configuration (must be last to override other style rules)
prettierConfig,
);