@asd14/eslint-config 11.0.0 → 13.0.0
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/dist/types/eslint.config.d.ts +40 -0
- package/dist/types/src/configs/node.d.ts +21 -38
- package/dist/types/src/{rules → configs}/nx.d.ts +23 -2
- package/dist/types/src/configs/react.d.ts +20 -38
- package/dist/types/src/configs/{ts-node.d.ts → typescript.d.ts} +0 -38
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -5
- package/src/configs/node.js +33 -5
- package/src/{rules → configs}/nx.js +41 -1
- package/src/configs/react.js +22 -7
- package/src/rules/typescript.js +1 -1
- package/dist/types/src/configs/dev-files.d.ts +0 -14
- package/dist/types/src/configs/node-jest.d.ts +0 -17
- package/dist/types/src/configs/react-jest.d.ts +0 -20
- package/dist/types/src/index.d.ts +0 -6
- package/dist/types/src/rules/import-dev.d.ts +0 -9
- package/dist/types/src/rules/nx-dev.d.ts +0 -13
- package/src/configs/dev-files.js +0 -17
- package/src/configs/node-jest.js +0 -29
- package/src/configs/react-jest.js +0 -16
- package/src/index.js +0 -6
- package/src/rules/import-dev.js +0 -31
- package/src/rules/nx-dev.js +0 -23
- /package/src/configs/{ts-node.js → typescript.js} +0 -0
|
@@ -97,6 +97,43 @@ declare namespace _default {
|
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
99
|
let rules: {
|
|
100
|
+
readonly "import/no-extraneous-dependencies": ["error", {
|
|
101
|
+
readonly includeTypes: true;
|
|
102
|
+
}];
|
|
103
|
+
readonly "import/no-cycle": ["error", {
|
|
104
|
+
readonly maxDepth: number;
|
|
105
|
+
}];
|
|
106
|
+
readonly "import/no-self-import": "error";
|
|
107
|
+
readonly "import/no-absolute-path": "error";
|
|
108
|
+
readonly "import/default": "error";
|
|
109
|
+
readonly "import/export": "error";
|
|
110
|
+
readonly "import/prefer-default-export": "off";
|
|
111
|
+
readonly "import/namespace": ["error", {
|
|
112
|
+
readonly allowComputed: true;
|
|
113
|
+
}];
|
|
114
|
+
readonly "import/no-duplicates": "error";
|
|
115
|
+
readonly "import/no-named-as-default": "error";
|
|
116
|
+
readonly "import/no-named-as-default-member": "error";
|
|
117
|
+
readonly "import/unambiguous": "off";
|
|
118
|
+
readonly "import/exports-last": "error";
|
|
119
|
+
readonly "import/named": "off";
|
|
120
|
+
readonly "import/no-unresolved": "off";
|
|
121
|
+
readonly "import/extensions": ["error", "always", {
|
|
122
|
+
readonly ignorePackages: true;
|
|
123
|
+
}];
|
|
124
|
+
readonly "import/order": ["error", {
|
|
125
|
+
readonly groups: readonly ["builtin", "external", "internal", readonly ["index", "sibling", "parent"], "object", "unknown"];
|
|
126
|
+
readonly pathGroups: readonly [{
|
|
127
|
+
readonly pattern: "@self-ui/*";
|
|
128
|
+
readonly group: "external";
|
|
129
|
+
readonly position: "after";
|
|
130
|
+
}];
|
|
131
|
+
readonly pathGroupsExcludedImportTypes: readonly ["builtin"];
|
|
132
|
+
readonly alphabetize: {
|
|
133
|
+
readonly order: "asc";
|
|
134
|
+
readonly caseInsensitive: true;
|
|
135
|
+
};
|
|
136
|
+
}];
|
|
100
137
|
readonly "jsdoc/sort-tags": ["error", {
|
|
101
138
|
readonly reportIntraTagGroupSpacing: false;
|
|
102
139
|
readonly reportTagGroupSpacing: false;
|
|
@@ -168,5 +205,8 @@ declare namespace _default {
|
|
|
168
205
|
readonly allowInObjectDestructuring: true;
|
|
169
206
|
}];
|
|
170
207
|
};
|
|
208
|
+
let settings: {
|
|
209
|
+
readonly [x: string]: unknown;
|
|
210
|
+
};
|
|
171
211
|
}
|
|
172
212
|
export default _default;
|
|
@@ -91,7 +91,6 @@ export namespace nodeConfig {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
let plugins: {
|
|
94
|
-
readonly "@nx": Plugin;
|
|
95
94
|
readonly jsdoc: import("eslint").ESLint.Plugin & {
|
|
96
95
|
configs: Record<`flat/${import("eslint-plugin-jsdoc").ConfigGroups}${import("eslint-plugin-jsdoc").ConfigVariants}${import("eslint-plugin-jsdoc").ErrorLevelVariants}`, import("eslint").Linter.Config>;
|
|
97
96
|
};
|
|
@@ -125,43 +124,6 @@ export namespace nodeConfig {
|
|
|
125
124
|
readonly "unicorn/no-useless-undefined": "off";
|
|
126
125
|
readonly "unicorn/new-for-builtins": "error";
|
|
127
126
|
readonly "unicorn/error-message": "error";
|
|
128
|
-
readonly "@nx/enforce-module-boundaries": ["error", {
|
|
129
|
-
readonly allow: readonly [];
|
|
130
|
-
readonly depConstraints: readonly [{
|
|
131
|
-
sourceTag: string;
|
|
132
|
-
onlyDependOnLibsWithTags: string[];
|
|
133
|
-
}, {
|
|
134
|
-
sourceTag: string;
|
|
135
|
-
onlyDependOnLibsWithTags: string[];
|
|
136
|
-
}, {
|
|
137
|
-
sourceTag: string;
|
|
138
|
-
onlyDependOnLibsWithTags: string[];
|
|
139
|
-
}, {
|
|
140
|
-
sourceTag: string;
|
|
141
|
-
onlyDependOnLibsWithTags: string[];
|
|
142
|
-
}, {
|
|
143
|
-
sourceTag: string;
|
|
144
|
-
onlyDependOnLibsWithTags: string[];
|
|
145
|
-
}, {
|
|
146
|
-
sourceTag: string;
|
|
147
|
-
onlyDependOnLibsWithTags: string[];
|
|
148
|
-
}, {
|
|
149
|
-
sourceTag: string;
|
|
150
|
-
onlyDependOnLibsWithTags: string[];
|
|
151
|
-
}, {
|
|
152
|
-
sourceTag: string;
|
|
153
|
-
onlyDependOnLibsWithTags: string[];
|
|
154
|
-
}, {
|
|
155
|
-
sourceTag: string;
|
|
156
|
-
onlyDependOnLibsWithTags: string[];
|
|
157
|
-
}, {
|
|
158
|
-
sourceTag: string;
|
|
159
|
-
onlyDependOnLibsWithTags: string[];
|
|
160
|
-
}, {
|
|
161
|
-
sourceTag: string;
|
|
162
|
-
bannedExternalImports: string[];
|
|
163
|
-
}];
|
|
164
|
-
}];
|
|
165
127
|
readonly "jsdoc/sort-tags": ["error", {
|
|
166
128
|
readonly reportIntraTagGroupSpacing: false;
|
|
167
129
|
readonly reportTagGroupSpacing: false;
|
|
@@ -246,3 +208,24 @@ export namespace nodeConfig {
|
|
|
246
208
|
readonly [x: string]: unknown;
|
|
247
209
|
};
|
|
248
210
|
}
|
|
211
|
+
export namespace nodeJestConfig {
|
|
212
|
+
let name_1: "ASD14's config for Node.js test files";
|
|
213
|
+
export { name_1 as name };
|
|
214
|
+
let languageOptions_1: import("eslint").Linter.LanguageOptions | undefined;
|
|
215
|
+
export { languageOptions_1 as languageOptions };
|
|
216
|
+
let plugins_1: Record<string, import("eslint").ESLint.Plugin> | undefined;
|
|
217
|
+
export { plugins_1 as plugins };
|
|
218
|
+
let rules_1: {
|
|
219
|
+
readonly "jest/require-top-level-describe": "error";
|
|
220
|
+
readonly "jest/consistent-test-it": ["error", {
|
|
221
|
+
readonly fn: "test";
|
|
222
|
+
readonly withinDescribe: "test";
|
|
223
|
+
}];
|
|
224
|
+
readonly "jest/valid-title": ["error", {
|
|
225
|
+
readonly mustMatch: {
|
|
226
|
+
readonly test: "^given \\[.*\\] should \\[.*\\]$";
|
|
227
|
+
};
|
|
228
|
+
}];
|
|
229
|
+
};
|
|
230
|
+
export { rules_1 as rules };
|
|
231
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export namespace nxConfig {
|
|
2
|
+
let name: "ASD14 config for source files inside an NX monorepo";
|
|
2
3
|
let plugins: {
|
|
3
4
|
readonly "@nx": Plugin;
|
|
4
5
|
};
|
|
@@ -42,4 +43,24 @@ declare namespace _default {
|
|
|
42
43
|
}];
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
|
-
export
|
|
46
|
+
export namespace nxDevConfig {
|
|
47
|
+
let name_1: "ASD14 config for dev files inside an NX monorepo";
|
|
48
|
+
export { name_1 as name };
|
|
49
|
+
let plugins_1: {
|
|
50
|
+
readonly "@nx": Plugin;
|
|
51
|
+
};
|
|
52
|
+
export { plugins_1 as plugins };
|
|
53
|
+
let rules_1: {
|
|
54
|
+
readonly "import/no-extraneous-dependencies": ["error", {
|
|
55
|
+
readonly packageDir: readonly ["./", string];
|
|
56
|
+
}];
|
|
57
|
+
readonly "@nx/enforce-module-boundaries": ["error", {
|
|
58
|
+
readonly allow: readonly [];
|
|
59
|
+
readonly depConstraints: readonly [{
|
|
60
|
+
readonly sourceTag: "*";
|
|
61
|
+
readonly onlyDependOnLibsWithTags: readonly ["type:lib"];
|
|
62
|
+
}];
|
|
63
|
+
}];
|
|
64
|
+
};
|
|
65
|
+
export { rules_1 as rules };
|
|
66
|
+
}
|
|
@@ -1232,7 +1232,6 @@ export namespace reactConfig {
|
|
|
1232
1232
|
};
|
|
1233
1233
|
};
|
|
1234
1234
|
};
|
|
1235
|
-
readonly "@nx": Plugin;
|
|
1236
1235
|
readonly jsdoc: import("eslint").ESLint.Plugin & {
|
|
1237
1236
|
configs: Record<`flat/${import("eslint-plugin-jsdoc").ConfigGroups}${import("eslint-plugin-jsdoc").ConfigVariants}${import("eslint-plugin-jsdoc").ErrorLevelVariants}`, import("eslint").Linter.Config>;
|
|
1238
1237
|
};
|
|
@@ -1393,43 +1392,6 @@ export namespace reactConfig {
|
|
|
1393
1392
|
readonly "react/no-access-state-in-setstate": "error";
|
|
1394
1393
|
readonly "react/button-has-type": "error";
|
|
1395
1394
|
readonly "react/jsx-props-no-spreading": "off";
|
|
1396
|
-
readonly "@nx/enforce-module-boundaries": ["error", {
|
|
1397
|
-
readonly allow: readonly [];
|
|
1398
|
-
readonly depConstraints: readonly [{
|
|
1399
|
-
sourceTag: string;
|
|
1400
|
-
onlyDependOnLibsWithTags: string[];
|
|
1401
|
-
}, {
|
|
1402
|
-
sourceTag: string;
|
|
1403
|
-
onlyDependOnLibsWithTags: string[];
|
|
1404
|
-
}, {
|
|
1405
|
-
sourceTag: string;
|
|
1406
|
-
onlyDependOnLibsWithTags: string[];
|
|
1407
|
-
}, {
|
|
1408
|
-
sourceTag: string;
|
|
1409
|
-
onlyDependOnLibsWithTags: string[];
|
|
1410
|
-
}, {
|
|
1411
|
-
sourceTag: string;
|
|
1412
|
-
onlyDependOnLibsWithTags: string[];
|
|
1413
|
-
}, {
|
|
1414
|
-
sourceTag: string;
|
|
1415
|
-
onlyDependOnLibsWithTags: string[];
|
|
1416
|
-
}, {
|
|
1417
|
-
sourceTag: string;
|
|
1418
|
-
onlyDependOnLibsWithTags: string[];
|
|
1419
|
-
}, {
|
|
1420
|
-
sourceTag: string;
|
|
1421
|
-
onlyDependOnLibsWithTags: string[];
|
|
1422
|
-
}, {
|
|
1423
|
-
sourceTag: string;
|
|
1424
|
-
onlyDependOnLibsWithTags: string[];
|
|
1425
|
-
}, {
|
|
1426
|
-
sourceTag: string;
|
|
1427
|
-
onlyDependOnLibsWithTags: string[];
|
|
1428
|
-
}, {
|
|
1429
|
-
sourceTag: string;
|
|
1430
|
-
bannedExternalImports: string[];
|
|
1431
|
-
}];
|
|
1432
|
-
}];
|
|
1433
1395
|
readonly "jsdoc/sort-tags": ["error", {
|
|
1434
1396
|
readonly reportIntraTagGroupSpacing: false;
|
|
1435
1397
|
readonly reportTagGroupSpacing: false;
|
|
@@ -1517,3 +1479,23 @@ export namespace reactConfig {
|
|
|
1517
1479
|
};
|
|
1518
1480
|
};
|
|
1519
1481
|
}
|
|
1482
|
+
/** @satisfies {import("eslint").Linter.Config} */
|
|
1483
|
+
export const reactJestConfig: {
|
|
1484
|
+
readonly name: "ASD14 config for React test files";
|
|
1485
|
+
readonly plugins: {
|
|
1486
|
+
readonly [x: string]: import("eslint").ESLint.Plugin;
|
|
1487
|
+
};
|
|
1488
|
+
readonly rules: {
|
|
1489
|
+
readonly "jest/require-top-level-describe": "error";
|
|
1490
|
+
readonly "jest/consistent-test-it": ["error", {
|
|
1491
|
+
readonly fn: "test";
|
|
1492
|
+
readonly withinDescribe: "test";
|
|
1493
|
+
}];
|
|
1494
|
+
readonly "jest/valid-title": ["error", {
|
|
1495
|
+
readonly mustMatch: {
|
|
1496
|
+
readonly test: "^given \\[.*\\] should \\[.*\\]$";
|
|
1497
|
+
};
|
|
1498
|
+
}];
|
|
1499
|
+
};
|
|
1500
|
+
readonly languageOptions: import("eslint").Linter.LanguageOptions | undefined;
|
|
1501
|
+
};
|
|
@@ -91,7 +91,6 @@ export namespace tsNodeConfig {
|
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
93
|
let plugins: {
|
|
94
|
-
readonly "@nx": Plugin;
|
|
95
94
|
readonly jsdoc: import("eslint").ESLint.Plugin & {
|
|
96
95
|
configs: Record<`flat/${import("eslint-plugin-jsdoc").ConfigGroups}${import("eslint-plugin-jsdoc").ConfigVariants}${import("eslint-plugin-jsdoc").ErrorLevelVariants}`, import("eslint").Linter.Config>;
|
|
97
96
|
};
|
|
@@ -126,43 +125,6 @@ export namespace tsNodeConfig {
|
|
|
126
125
|
readonly "unicorn/no-useless-undefined": "off";
|
|
127
126
|
readonly "unicorn/new-for-builtins": "error";
|
|
128
127
|
readonly "unicorn/error-message": "error";
|
|
129
|
-
readonly "@nx/enforce-module-boundaries": ["error", {
|
|
130
|
-
readonly allow: readonly [];
|
|
131
|
-
readonly depConstraints: readonly [{
|
|
132
|
-
sourceTag: string;
|
|
133
|
-
onlyDependOnLibsWithTags: string[];
|
|
134
|
-
}, {
|
|
135
|
-
sourceTag: string;
|
|
136
|
-
onlyDependOnLibsWithTags: string[];
|
|
137
|
-
}, {
|
|
138
|
-
sourceTag: string;
|
|
139
|
-
onlyDependOnLibsWithTags: string[];
|
|
140
|
-
}, {
|
|
141
|
-
sourceTag: string;
|
|
142
|
-
onlyDependOnLibsWithTags: string[];
|
|
143
|
-
}, {
|
|
144
|
-
sourceTag: string;
|
|
145
|
-
onlyDependOnLibsWithTags: string[];
|
|
146
|
-
}, {
|
|
147
|
-
sourceTag: string;
|
|
148
|
-
onlyDependOnLibsWithTags: string[];
|
|
149
|
-
}, {
|
|
150
|
-
sourceTag: string;
|
|
151
|
-
onlyDependOnLibsWithTags: string[];
|
|
152
|
-
}, {
|
|
153
|
-
sourceTag: string;
|
|
154
|
-
onlyDependOnLibsWithTags: string[];
|
|
155
|
-
}, {
|
|
156
|
-
sourceTag: string;
|
|
157
|
-
onlyDependOnLibsWithTags: string[];
|
|
158
|
-
}, {
|
|
159
|
-
sourceTag: string;
|
|
160
|
-
onlyDependOnLibsWithTags: string[];
|
|
161
|
-
}, {
|
|
162
|
-
sourceTag: string;
|
|
163
|
-
bannedExternalImports: string[];
|
|
164
|
-
}];
|
|
165
|
-
}];
|
|
166
128
|
readonly "jsdoc/sort-tags": ["error", {
|
|
167
129
|
readonly reportIntraTagGroupSpacing: false;
|
|
168
130
|
readonly reportTagGroupSpacing: false;
|