lint-suite 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +10 -13
- package/{README.md → packages/lint-suite/src/README.md} +121 -135
- package/{index.cjs → packages/lint-suite/src/index.cjs} +59 -109
- package/packages/lint-suite/src/index.cjs.map +7 -0
- package/packages/lint-suite/src/index.d.ts +357 -0
- package/packages/lint-suite/src/index.d.ts.map +1 -0
- package/{index.js → packages/lint-suite/src/index.js} +55 -105
- package/packages/lint-suite/src/index.js.map +7 -0
- package/packages/lint-suite/src/lib/angular-template.d.ts +25 -0
- package/{lib → packages/lint-suite/src/lib}/angular-template.d.ts.map +1 -1
- package/packages/lint-suite/src/lib/angular.d.ts +7 -0
- package/{lib → packages/lint-suite/src/lib}/angular.d.ts.map +1 -1
- package/packages/lint-suite/src/lib/base.d.ts +3 -0
- package/{lib → packages/lint-suite/src/lib}/base.d.ts.map +1 -1
- package/packages/lint-suite/src/lib/javascript.d.ts +2 -0
- package/{lib → packages/lint-suite/src/lib}/javascript.d.ts.map +1 -1
- package/packages/lint-suite/src/lib/jest.d.ts +3 -0
- package/{lib → packages/lint-suite/src/lib}/jest.d.ts.map +1 -1
- package/packages/lint-suite/src/lib/json.d.ts +3 -0
- package/{lib → packages/lint-suite/src/lib}/json.d.ts.map +1 -1
- package/packages/lint-suite/src/lib/rxjs.d.ts +3 -0
- package/{lib → packages/lint-suite/src/lib}/rxjs.d.ts.map +1 -1
- package/packages/lint-suite/src/lib/storybook.d.ts +3 -0
- package/{lib → packages/lint-suite/src/lib}/storybook.d.ts.map +1 -1
- package/packages/lint-suite/src/lib/typescript.d.ts +319 -0
- package/packages/lint-suite/src/lib/typescript.d.ts.map +1 -0
- package/packages/lint-suite/src/package.json +60 -0
- package/index.cjs.map +0 -7
- package/index.d.ts +0 -13
- package/index.d.ts.map +0 -1
- package/index.js.map +0 -7
- package/lib/angular-template.d.ts +0 -3
- package/lib/angular.d.ts +0 -3
- package/lib/base.d.ts +0 -3
- package/lib/javascript.d.ts +0 -3
- package/lib/jest.d.ts +0 -3
- package/lib/json.d.ts +0 -3
- package/lib/rxjs.d.ts +0 -3
- package/lib/storybook.d.ts +0 -3
- package/lib/typescript.d.ts +0 -3
- package/lib/typescript.d.ts.map +0 -1
- /package/{LICENSE → packages/lint-suite/src/LICENSE} +0 -0
- /package/{lib → packages/lint-suite/src/lib}/rules/explicit-accessibility.d.ts +0 -0
- /package/{lib → packages/lint-suite/src/lib}/rules/explicit-accessibility.d.ts.map +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lint-suite",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Reusable ESLint configurations",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,19 +24,16 @@
|
|
|
24
24
|
"module": "./index.js",
|
|
25
25
|
"types": "./index.d.ts",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"
|
|
28
|
-
"eslint": "^
|
|
29
|
-
"
|
|
30
|
-
"eslint-plugin-jest": "^28.11.0",
|
|
27
|
+
"eslint": "^9.38.0",
|
|
28
|
+
"@nx/eslint-plugin": "^21.6.5",
|
|
29
|
+
"eslint-plugin-jest": "29.0.1",
|
|
31
30
|
"eslint-plugin-json": "^4.0.1",
|
|
32
|
-
"@smarttools/eslint-plugin-rxjs": "
|
|
33
|
-
"eslint-plugin-storybook": "
|
|
34
|
-
"eslint-plugin-import-x": "
|
|
35
|
-
"
|
|
36
|
-
"typescript
|
|
37
|
-
"@
|
|
38
|
-
"eslint-import-resolver-typescript": "^4.3.4",
|
|
39
|
-
"@typescript-eslint/utils": "8.32.0"
|
|
31
|
+
"@smarttools/eslint-plugin-rxjs": "1.0.22",
|
|
32
|
+
"eslint-plugin-storybook": "9.1.13",
|
|
33
|
+
"eslint-plugin-import-x": "4.16.1",
|
|
34
|
+
"@stylistic/eslint-plugin": "5.5.0",
|
|
35
|
+
"eslint-import-resolver-typescript": "4.4.4",
|
|
36
|
+
"@typescript-eslint/utils": "8.46.2"
|
|
40
37
|
},
|
|
41
38
|
"scripts": {
|
|
42
39
|
"build": "nx build lint-suite",
|
|
@@ -1,135 +1,121 @@
|
|
|
1
|
-
# Lint Suite
|
|
2
|
-
|
|
3
|
-
A comprehensive collection of ESLint Flat configurations for modern web applications.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- **TypeScript Linting**: Strict typing rules, consistent imports, and code organization
|
|
8
|
-
- **Angular Support**: Component best practices and template accessibility rules
|
|
9
|
-
- **RxJS Guidelines**: Observable patterns, Finnish notation, and operator safety
|
|
10
|
-
- **Code Style**: Formatting rules, line limits, and structural consistency
|
|
11
|
-
- **Accessibility**: ARIA validation, keyboard events, and semantic HTML
|
|
12
|
-
- **Testing**: Jest configurations with appropriate relaxations for test files
|
|
13
|
-
- **Additional Support**: JSON, Storybook, and more
|
|
14
|
-
|
|
15
|
-
## Installation
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install --save-dev lint-suite
|
|
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
|
-
- `
|
|
85
|
-
- ...
|
|
86
|
-
|
|
87
|
-
### eslint-plugin-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
- `
|
|
104
|
-
- `
|
|
105
|
-
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
See [CONTRIBUTING.md](./CONTRIBUTING.md) for contribution guidelines.
|
|
124
|
-
|
|
125
|
-
## License
|
|
126
|
-
|
|
127
|
-
MIT
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
```
|
|
1
|
+
# Lint Suite
|
|
2
|
+
|
|
3
|
+
A comprehensive collection of ESLint Flat configurations for modern web applications.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **TypeScript Linting**: Strict typing rules, consistent imports, and code organization
|
|
8
|
+
- **Angular Support**: Component best practices and template accessibility rules
|
|
9
|
+
- **RxJS Guidelines**: Observable patterns, Finnish notation, and operator safety
|
|
10
|
+
- **Code Style**: Formatting rules, line limits, and structural consistency
|
|
11
|
+
- **Accessibility**: ARIA validation, keyboard events, and semantic HTML
|
|
12
|
+
- **Testing**: Jest configurations with appropriate relaxations for test files
|
|
13
|
+
- **Additional Support**: JSON, Storybook, and more
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install --save-dev lint-suite
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
Create a `.eslintrc.config.mjs` file in your project root:
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { base, javascript, typescript } from 'lint-suite';
|
|
27
|
+
|
|
28
|
+
export default [
|
|
29
|
+
...base,
|
|
30
|
+
...javascript,
|
|
31
|
+
...typescript,
|
|
32
|
+
// Rest of the required configurations
|
|
33
|
+
];
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
You can selectively include configurations you need.
|
|
37
|
+
|
|
38
|
+
## Available Configurations
|
|
39
|
+
|
|
40
|
+
- `base`: Core JavaScript rules and formatting
|
|
41
|
+
- `typescript`: TypeScript-specific rules
|
|
42
|
+
- `angular`: Angular component best practices
|
|
43
|
+
- `angularTemplate`: HTML template rules with accessibility focus
|
|
44
|
+
- `rxjs`: Observable patterns and operator safety
|
|
45
|
+
- `jest`: Testing configurations
|
|
46
|
+
- `json`: JSON file linting
|
|
47
|
+
- `storybook`: Storybook support
|
|
48
|
+
|
|
49
|
+
## Customization
|
|
50
|
+
|
|
51
|
+
You can override any rules by adding a `rules` section to your ESLint config:
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
import { typescript } from 'lint-suite';
|
|
55
|
+
|
|
56
|
+
export default [
|
|
57
|
+
...typescript,
|
|
58
|
+
{
|
|
59
|
+
rules: {
|
|
60
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Available Rules (you can add more as you prefer)
|
|
67
|
+
|
|
68
|
+
### nx/eslint-plugin
|
|
69
|
+
|
|
70
|
+
- `@nx/enforce-module-boundaries`: Enforces module boundary restrictions
|
|
71
|
+
- `@nx/dependency-checks`: Validates dependencies in workspace projects
|
|
72
|
+
- ...
|
|
73
|
+
|
|
74
|
+
### eslint-plugin-jest
|
|
75
|
+
|
|
76
|
+
- `jest/no-disabled-tests`: Disallows disabled tests
|
|
77
|
+
- `jest/expect-expect`: Ensures test cases contain at least one expect statement
|
|
78
|
+
- `jest/valid-expect`: Validates expect() usage
|
|
79
|
+
- ...
|
|
80
|
+
|
|
81
|
+
### eslint-plugin-json
|
|
82
|
+
|
|
83
|
+
- `json/json`: Validates JSON syntax
|
|
84
|
+
- `json/sort-package-json`: Enforces consistent ordering in package.json
|
|
85
|
+
- ...
|
|
86
|
+
|
|
87
|
+
### @smarttools/eslint-plugin-rxjs
|
|
88
|
+
|
|
89
|
+
- `@rxjs/finnish`: Enforces Finnish notation for observables
|
|
90
|
+
- `@rxjs/no-ignored-subscription`: Prevents ignoring returned subscriptions
|
|
91
|
+
- `@rxjs/no-unsafe-takeuntil`: Ensures proper usage of takeUntil operator
|
|
92
|
+
- ...
|
|
93
|
+
|
|
94
|
+
### eslint-plugin-storybook
|
|
95
|
+
|
|
96
|
+
- `storybook/no-redundant-story-name`: Prevents redundant story names
|
|
97
|
+
- `storybook/csf-component`: Enforces Component Story Format standards
|
|
98
|
+
- `storybook/hierarchy-separator`: Enforces story hierarchy separators
|
|
99
|
+
- ...
|
|
100
|
+
|
|
101
|
+
### eslint-plugin-import
|
|
102
|
+
|
|
103
|
+
- `import/no-unresolved`: Ensures imports point to valid modules
|
|
104
|
+
- `import/order`: Enforces a consistent order of import statements
|
|
105
|
+
- `import/no-duplicates`: Prevents duplicate imports
|
|
106
|
+
- ...
|
|
107
|
+
|
|
108
|
+
### @stylistic/eslint-plugin
|
|
109
|
+
|
|
110
|
+
- `@stylistic/max-len`: Enforces maximum line length
|
|
111
|
+
- `@stylistic/indent`: Enforces consistent indentation
|
|
112
|
+
- `@stylistic/quotes`: Enforces consistent quote style
|
|
113
|
+
- ...
|
|
114
|
+
|
|
115
|
+
## Contributing
|
|
116
|
+
|
|
117
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for contribution guidelines.
|
|
118
|
+
|
|
119
|
+
## License
|
|
120
|
+
|
|
121
|
+
MIT
|
|
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// packages/lint-suite/src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
angular: () => angular,
|
|
34
34
|
angularTemplate: () => angularTemplate,
|
|
35
35
|
base: () => base,
|
|
@@ -41,17 +41,15 @@ __export(src_exports, {
|
|
|
41
41
|
storybook: () => storybook,
|
|
42
42
|
typescript: () => typescript
|
|
43
43
|
});
|
|
44
|
-
module.exports = __toCommonJS(
|
|
44
|
+
module.exports = __toCommonJS(index_exports);
|
|
45
45
|
|
|
46
46
|
// packages/lint-suite/src/lib/angular-template.ts
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
|
|
47
|
+
var import_eslint_plugin = __toESM(require("@nx/eslint-plugin"), 1);
|
|
48
|
+
var angularTemplate = [
|
|
49
|
+
...import_eslint_plugin.default.configs["flat/angular-template"],
|
|
50
50
|
{
|
|
51
51
|
files: ["**/*.html"],
|
|
52
|
-
extends: [...import_angular_eslint.configs.templateAccessibility, ...import_angular_eslint.configs.templateRecommended],
|
|
53
52
|
rules: {
|
|
54
|
-
"@angular-eslint/template/prefer-template-literal": "error",
|
|
55
53
|
"@angular-eslint/template/no-any": "error",
|
|
56
54
|
"@angular-eslint/template/no-duplicate-attributes": "error",
|
|
57
55
|
"@angular-eslint/template/button-has-type": "error",
|
|
@@ -89,40 +87,26 @@ var angularTemplate = (0, import_typescript_eslint.config)([
|
|
|
89
87
|
]
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
|
-
]
|
|
90
|
+
];
|
|
93
91
|
|
|
94
92
|
// packages/lint-suite/src/lib/angular.ts
|
|
95
|
-
var
|
|
96
|
-
var
|
|
97
|
-
|
|
98
|
-
var angular = (0, import_typescript_eslint2.config)([
|
|
93
|
+
var import_eslint_plugin2 = __toESM(require("@nx/eslint-plugin"), 1);
|
|
94
|
+
var angular = [
|
|
95
|
+
...import_eslint_plugin2.default.configs["flat/angular"],
|
|
99
96
|
{
|
|
100
97
|
files: ["**/*.ts"],
|
|
101
|
-
extends: [...import_angular_eslint2.configs.tsRecommended],
|
|
102
|
-
languageOptions: {
|
|
103
|
-
globals: {
|
|
104
|
-
...import_globals.default.browser,
|
|
105
|
-
...import_globals.default.es2025,
|
|
106
|
-
...import_globals.default.node
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
processor: import_angular_eslint2.processInlineTemplates,
|
|
110
|
-
plugins: { "@angular-eslint": import_angular_eslint2.tsPlugin },
|
|
111
98
|
rules: {
|
|
112
|
-
"@angular-eslint/prefer-on-push-component-change-detection": "error"
|
|
113
|
-
"@angular-eslint/prefer-signals": "error",
|
|
114
|
-
"@angular-eslint/use-injectable-provided-in": "error"
|
|
99
|
+
"@angular-eslint/prefer-on-push-component-change-detection": "error"
|
|
115
100
|
}
|
|
116
101
|
}
|
|
117
|
-
]
|
|
102
|
+
];
|
|
118
103
|
|
|
119
104
|
// packages/lint-suite/src/lib/base.ts
|
|
120
|
-
var
|
|
121
|
-
var
|
|
105
|
+
var import_eslint_plugin3 = __toESM(require("@nx/eslint-plugin"), 1);
|
|
106
|
+
var import_eslint_plugin4 = __toESM(require("@stylistic/eslint-plugin"), 1);
|
|
122
107
|
var import_eslint_plugin_import_x = __toESM(require("eslint-plugin-import-x"), 1);
|
|
123
|
-
var
|
|
124
|
-
|
|
125
|
-
{ extends: [...import_eslint_plugin.configs["flat/base"]] },
|
|
108
|
+
var base = [
|
|
109
|
+
...import_eslint_plugin3.default.configs["flat/base"],
|
|
126
110
|
{
|
|
127
111
|
files: [
|
|
128
112
|
"**/*.js",
|
|
@@ -134,7 +118,7 @@ var base = (0, import_typescript_eslint3.config)([
|
|
|
134
118
|
"**/*.cts",
|
|
135
119
|
"**/*.mts"
|
|
136
120
|
],
|
|
137
|
-
|
|
121
|
+
...import_eslint_plugin_import_x.default.flatConfigs.recommended
|
|
138
122
|
},
|
|
139
123
|
{
|
|
140
124
|
files: [
|
|
@@ -147,7 +131,7 @@ var base = (0, import_typescript_eslint3.config)([
|
|
|
147
131
|
"**/*.cts",
|
|
148
132
|
"**/*.mts"
|
|
149
133
|
],
|
|
150
|
-
|
|
134
|
+
...import_eslint_plugin4.default.configs.recommended
|
|
151
135
|
},
|
|
152
136
|
{
|
|
153
137
|
files: [
|
|
@@ -166,7 +150,7 @@ var base = (0, import_typescript_eslint3.config)([
|
|
|
166
150
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
167
151
|
"no-debugger": "error",
|
|
168
152
|
eqeqeq: ["error", "always", { null: "ignore" }],
|
|
169
|
-
curly: ["error", "
|
|
153
|
+
curly: ["error", "all"],
|
|
170
154
|
"prefer-const": ["error", { destructuring: "all" }],
|
|
171
155
|
"no-var": "error",
|
|
172
156
|
"object-shorthand": "error",
|
|
@@ -197,6 +181,24 @@ var base = (0, import_typescript_eslint3.config)([
|
|
|
197
181
|
// Enforce consistency for getters/setters
|
|
198
182
|
"class-methods-use-this": "error",
|
|
199
183
|
"no-underscore-dangle": "error",
|
|
184
|
+
"padding-line-between-statements": [
|
|
185
|
+
"error",
|
|
186
|
+
{
|
|
187
|
+
blankLine: "always",
|
|
188
|
+
prev: "export",
|
|
189
|
+
next: ["export", "const"]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
blankLine: "always",
|
|
193
|
+
prev: "*",
|
|
194
|
+
next: "return"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
blankLine: "always",
|
|
198
|
+
prev: "*",
|
|
199
|
+
next: "if"
|
|
200
|
+
}
|
|
201
|
+
],
|
|
200
202
|
"max-len": [
|
|
201
203
|
"error",
|
|
202
204
|
{
|
|
@@ -213,38 +215,6 @@ var base = (0, import_typescript_eslint3.config)([
|
|
|
213
215
|
}
|
|
214
216
|
}
|
|
215
217
|
],
|
|
216
|
-
"@stylistic/padding-line-between-statements": [
|
|
217
|
-
"error",
|
|
218
|
-
{
|
|
219
|
-
blankLine: "always",
|
|
220
|
-
prev: "export",
|
|
221
|
-
next: ["export", "const"]
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
blankLine: "always",
|
|
225
|
-
prev: ["const", "let", "var"],
|
|
226
|
-
next: "*"
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
blankLine: "any",
|
|
230
|
-
prev: ["const", "let", "var"],
|
|
231
|
-
next: ["const", "let", "var"]
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
blankLine: "always",
|
|
235
|
-
prev: "*",
|
|
236
|
-
next: [
|
|
237
|
-
"for",
|
|
238
|
-
"if",
|
|
239
|
-
"return",
|
|
240
|
-
"throw",
|
|
241
|
-
"switch",
|
|
242
|
-
"try",
|
|
243
|
-
"class",
|
|
244
|
-
"function"
|
|
245
|
-
]
|
|
246
|
-
}
|
|
247
|
-
],
|
|
248
218
|
"@stylistic/comma-dangle": [
|
|
249
219
|
"error",
|
|
250
220
|
{
|
|
@@ -330,45 +300,36 @@ var base = (0, import_typescript_eslint3.config)([
|
|
|
330
300
|
"class-methods-use-this": "off"
|
|
331
301
|
}
|
|
332
302
|
}
|
|
333
|
-
]
|
|
303
|
+
];
|
|
334
304
|
|
|
335
305
|
// packages/lint-suite/src/lib/javascript.ts
|
|
336
|
-
var
|
|
337
|
-
var
|
|
338
|
-
var javascript = (0, import_typescript_eslint4.config)({
|
|
339
|
-
files: ["**/*.js", "**/*.jsx", "**/*.cjs", "**/*.mjs"],
|
|
340
|
-
extends: [...import_eslint_plugin3.configs["flat/javascript"]],
|
|
341
|
-
rules: {}
|
|
342
|
-
});
|
|
306
|
+
var import_eslint_plugin5 = __toESM(require("@nx/eslint-plugin"), 1);
|
|
307
|
+
var javascript = import_eslint_plugin5.default.configs["flat/javascript"];
|
|
343
308
|
|
|
344
309
|
// packages/lint-suite/src/lib/jest.ts
|
|
345
310
|
var import_eslint_plugin_jest = __toESM(require("eslint-plugin-jest"), 1);
|
|
346
|
-
var
|
|
347
|
-
var jest = (0, import_typescript_eslint5.config)([
|
|
311
|
+
var jest = [
|
|
348
312
|
{
|
|
349
313
|
files: ["**/*.spec.ts", "**/*.test.ts", "**/*.spec.js", "**/*.test.js"],
|
|
350
|
-
|
|
314
|
+
...import_eslint_plugin_jest.default.configs["flat/all"],
|
|
351
315
|
rules: {
|
|
352
316
|
"jest/no-done-callback": "off"
|
|
353
317
|
}
|
|
354
318
|
}
|
|
355
|
-
]
|
|
319
|
+
];
|
|
356
320
|
|
|
357
321
|
// packages/lint-suite/src/lib/json.ts
|
|
358
322
|
var import_eslint_plugin_json = __toESM(require("eslint-plugin-json"), 1);
|
|
359
|
-
var
|
|
360
|
-
var json = (0, import_typescript_eslint6.config)([
|
|
323
|
+
var json = [
|
|
361
324
|
{
|
|
362
325
|
files: ["**/*.json"],
|
|
363
|
-
|
|
364
|
-
rules: {}
|
|
326
|
+
...import_eslint_plugin_json.default.configs.recommended
|
|
365
327
|
}
|
|
366
|
-
]
|
|
328
|
+
];
|
|
367
329
|
|
|
368
330
|
// packages/lint-suite/src/lib/rxjs.ts
|
|
369
331
|
var import_eslint_plugin_rxjs = __toESM(require("@smarttools/eslint-plugin-rxjs"), 1);
|
|
370
|
-
var
|
|
371
|
-
var rxjs = (0, import_typescript_eslint7.config)([
|
|
332
|
+
var rxjs = [
|
|
372
333
|
{
|
|
373
334
|
files: [
|
|
374
335
|
"**/*.js",
|
|
@@ -385,7 +346,7 @@ var rxjs = (0, import_typescript_eslint7.config)([
|
|
|
385
346
|
projectService: true
|
|
386
347
|
}
|
|
387
348
|
},
|
|
388
|
-
|
|
349
|
+
...import_eslint_plugin_rxjs.default.configs.recommended
|
|
389
350
|
},
|
|
390
351
|
{
|
|
391
352
|
files: [
|
|
@@ -433,22 +394,20 @@ var rxjs = (0, import_typescript_eslint7.config)([
|
|
|
433
394
|
"rxjs/no-ignored-subscription": "off"
|
|
434
395
|
}
|
|
435
396
|
}
|
|
436
|
-
]
|
|
397
|
+
];
|
|
437
398
|
|
|
438
399
|
// packages/lint-suite/src/lib/storybook.ts
|
|
439
400
|
var import_eslint_plugin_storybook = __toESM(require("eslint-plugin-storybook"), 1);
|
|
440
|
-
var
|
|
441
|
-
|
|
401
|
+
var storybook = [
|
|
402
|
+
...import_eslint_plugin_storybook.default.configs["flat/recommended"],
|
|
442
403
|
{
|
|
443
404
|
ignores: ["!.storybook"],
|
|
444
|
-
files: ["**/*.stories.ts"]
|
|
445
|
-
extends: [import_eslint_plugin_storybook.default.configs["flat/recommended"]],
|
|
446
|
-
rules: {}
|
|
405
|
+
files: ["**/*.stories.ts"]
|
|
447
406
|
}
|
|
448
|
-
]
|
|
407
|
+
];
|
|
449
408
|
|
|
450
409
|
// packages/lint-suite/src/lib/typescript.ts
|
|
451
|
-
var
|
|
410
|
+
var import_eslint_plugin6 = __toESM(require("@nx/eslint-plugin"), 1);
|
|
452
411
|
var import_eslint_import_resolver_typescript = require("eslint-import-resolver-typescript");
|
|
453
412
|
var import_eslint_plugin_import_x2 = __toESM(require("eslint-plugin-import-x"), 1);
|
|
454
413
|
|
|
@@ -558,8 +517,7 @@ var explicit_accessibility_default = createRule({
|
|
|
558
517
|
tokenToInsertBefore = firstToken;
|
|
559
518
|
}
|
|
560
519
|
}
|
|
561
|
-
if (!tokenToInsertBefore)
|
|
562
|
-
return null;
|
|
520
|
+
if (!tokenToInsertBefore) return null;
|
|
563
521
|
const tokenAfterInsertion = sourceCode.getTokenAfter(
|
|
564
522
|
tokenToInsertBefore,
|
|
565
523
|
{ includeComments: false }
|
|
@@ -590,21 +548,15 @@ var explicit_accessibility_default = createRule({
|
|
|
590
548
|
});
|
|
591
549
|
|
|
592
550
|
// packages/lint-suite/src/lib/typescript.ts
|
|
593
|
-
var import_typescript_eslint9 = require("typescript-eslint");
|
|
594
551
|
var localTypescriptRules = {
|
|
595
552
|
rules: {
|
|
596
553
|
"explicit-accessibility": explicit_accessibility_default
|
|
597
554
|
}
|
|
598
555
|
};
|
|
599
|
-
var typescript =
|
|
556
|
+
var typescript = [
|
|
600
557
|
// NOTE: Checks for 'prettier' and 'eslint-plugin-prettier'
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
extends: [
|
|
604
|
-
import_eslint_plugin_import_x2.default.flatConfigs.typescript,
|
|
605
|
-
...import_eslint_plugin4.configs["flat/typescript"]
|
|
606
|
-
]
|
|
607
|
-
},
|
|
558
|
+
import_eslint_plugin_import_x2.default.flatConfigs.typescript,
|
|
559
|
+
...import_eslint_plugin6.default.configs["flat/typescript"],
|
|
608
560
|
{
|
|
609
561
|
files: ["**/*.ts", "**/*.tsx", "**/*.cts", "**/*.mts"],
|
|
610
562
|
plugins: { local: localTypescriptRules },
|
|
@@ -627,8 +579,6 @@ var typescript = (0, import_typescript_eslint9.config)([
|
|
|
627
579
|
// Consider enabling if maximum explicitness is desired, even if verbose:
|
|
628
580
|
// C. Null/Undefined Safety (Requires strictNullChecks)
|
|
629
581
|
"@typescript-eslint/no-non-null-assertion": "error",
|
|
630
|
-
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
|
631
|
-
"@typescript-eslint/prefer-optional-chain": "error",
|
|
632
582
|
// D. Promise Handling (Supplementing plugin:promise/recommended)
|
|
633
583
|
"@typescript-eslint/no-floating-promises": [
|
|
634
584
|
"error",
|
|
@@ -795,7 +745,7 @@ var typescript = (0, import_typescript_eslint9.config)([
|
|
|
795
745
|
"@typescript-eslint/naming-convention": "off"
|
|
796
746
|
}
|
|
797
747
|
}
|
|
798
|
-
]
|
|
748
|
+
];
|
|
799
749
|
|
|
800
750
|
// packages/lint-suite/src/index.ts
|
|
801
751
|
var recommended = [
|