@asd14/eslint-config 14.6.0 → 15.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/README.md +56 -15
- package/dist/types/eslint.config.d.ts +20 -22
- package/dist/types/src/configs/node.d.ts +16 -39
- package/dist/types/src/configs/nx.d.ts +2 -8
- package/dist/types/src/configs/react.d.ts +63 -80
- package/dist/types/src/configs/{typescript.d.ts → ts.d.ts} +18 -18
- package/dist/types/src/rules/dev.d.ts +6 -0
- package/dist/types/src/rules/ignores.d.ts +2 -5
- package/dist/types/src/rules/jsdoc.d.ts +13 -16
- package/dist/types/src/rules/typescript.d.ts +1 -0
- package/dist/types/src/utils/find-up-sync.d.ts +2 -3
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -16
- package/src/configs/node.js +5 -36
- package/src/configs/nx.js +35 -39
- package/src/configs/react.js +7 -21
- package/src/configs/{typescript.js → ts.js} +8 -7
- package/src/rules/dev.js +10 -0
- package/src/rules/ignores.js +2 -1
- package/src/rules/jsdoc.js +9 -16
- package/src/rules/typescript.js +4 -0
- package/src/rules/unicorn.js +0 -0
- package/src/utils/find-up-sync.js +2 -3
package/README.md
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
# @asd14/eslint-config
|
|
5
5
|
|
|
6
|
-
>
|
|
6
|
+
> ASD14's reusable ESLint configurations.
|
|
7
7
|
|
|
8
8
|
<!-- vim-markdown-toc GFM -->
|
|
9
9
|
|
|
10
10
|
- [Installation](#installation)
|
|
11
|
-
|
|
11
|
+
- [Exports](#exports)
|
|
12
12
|
- [Usage](#usage)
|
|
13
|
+
- [With NX](#with-nx)
|
|
13
14
|
- [License](#license)
|
|
14
15
|
|
|
15
16
|
<!-- vim-markdown-toc -->
|
|
@@ -17,26 +18,55 @@
|
|
|
17
18
|
## Installation
|
|
18
19
|
|
|
19
20
|
```sh
|
|
20
|
-
npm install --save-dev @asd14/
|
|
21
|
+
npm install --save-dev @asd14/eslint-config eslint@^9 prettier@^3 typescript@^5
|
|
21
22
|
```
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
> NOTE: `eslint`, `prettier` and `typescript` are peerDependencies
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
## Exports
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
| Entrypoint | Description |
|
|
29
|
+
| ---------------------------- | ----------------------------------------------------- |
|
|
30
|
+
| `@asd14/eslint-config/node` | Node.js source files config |
|
|
31
|
+
| `@asd14/eslint-config/react` | TypeScript + React source files combo config |
|
|
32
|
+
| `@asd14/eslint-config/ts` | TypeScript + Node.js source files combo config |
|
|
33
|
+
| `@asd14/eslint-config/nx` | NX module boundary configs (strict + relaxed for dev) |
|
|
34
|
+
|
|
35
|
+
All environment configs re-export `commonIgnores` array and `devConfig` for
|
|
36
|
+
convenience.
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
import { tsConfig, commonIgnores, devConfig } from "@asd14/eslint-config/ts"
|
|
42
|
+
|
|
43
|
+
const SRC_FILES = ["src/**/*.ts"]
|
|
44
|
+
const TEST_FILES = ["src/**/*.test.ts"]
|
|
45
|
+
const DEV_FILES = ["eslint.config.js"]
|
|
46
|
+
|
|
47
|
+
/** @type {import("eslint").Linter.Config[]} */
|
|
48
|
+
export default [
|
|
49
|
+
{ ignores: [...commonIgnores] },
|
|
50
|
+
{
|
|
51
|
+
...tsConfig,
|
|
52
|
+
files: [...SRC_FILES]
|
|
31
53
|
},
|
|
54
|
+
{
|
|
55
|
+
...tsConfig,
|
|
56
|
+
...devConfig,
|
|
57
|
+
files: [...TEST_FILES, ...DEV_FILES],
|
|
58
|
+
rules: { ...tsConfig.rules, ...devConfig.rules }
|
|
59
|
+
}
|
|
60
|
+
]
|
|
32
61
|
```
|
|
33
62
|
|
|
34
|
-
|
|
63
|
+
### With NX
|
|
35
64
|
|
|
36
|
-
|
|
65
|
+
Compose the NX boundary configs into your source and dev entries.
|
|
37
66
|
|
|
38
67
|
```js
|
|
39
|
-
import {
|
|
68
|
+
import { tsConfig, commonIgnores, devConfig } from "@asd14/eslint-config/ts"
|
|
69
|
+
import { nxConfig, nxDevConfig } from "@asd14/eslint-config/nx"
|
|
40
70
|
|
|
41
71
|
const SRC_FILES = ["src/**/*.ts"]
|
|
42
72
|
const TEST_FILES = ["src/**/*.test.ts"]
|
|
@@ -44,12 +74,23 @@ const DEV_FILES = ["eslint.config.js"]
|
|
|
44
74
|
|
|
45
75
|
/** @type {import("eslint").Linter.Config[]} */
|
|
46
76
|
export default [
|
|
77
|
+
{ ignores: commonIgnores },
|
|
47
78
|
{
|
|
48
|
-
|
|
79
|
+
...tsConfig,
|
|
80
|
+
files: [...SRC_FILES],
|
|
81
|
+
plugins: { ...tsConfig.plugins, ...nxConfig.plugins },
|
|
82
|
+
rules: { ...tsConfig.rules, ...nxConfig.rules }
|
|
49
83
|
},
|
|
50
84
|
{
|
|
51
|
-
...
|
|
52
|
-
|
|
85
|
+
...tsConfig,
|
|
86
|
+
...devConfig,
|
|
87
|
+
files: [...TEST_FILES, ...DEV_FILES],
|
|
88
|
+
plugins: { ...tsConfig.plugins, ...nxDevConfig.plugins },
|
|
89
|
+
rules: {
|
|
90
|
+
...tsConfig.rules,
|
|
91
|
+
...devConfig.rules,
|
|
92
|
+
...nxDevConfig.rules
|
|
93
|
+
}
|
|
53
94
|
}
|
|
54
95
|
]
|
|
55
96
|
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
-
let files: ["src/**/*.js", "types/*.d.ts", "eslint.config.js"];
|
|
3
|
-
|
|
4
|
-
let languageOptions: {
|
|
2
|
+
export let files: ["src/**/*.js", "types/*.d.ts", "eslint.config.js"];
|
|
3
|
+
export { commonIgnores as ignores };
|
|
4
|
+
export let languageOptions: {
|
|
5
5
|
readonly ecmaVersion: "latest";
|
|
6
6
|
readonly sourceType: "module";
|
|
7
7
|
readonly parserOptions: {
|
|
@@ -95,12 +95,12 @@ declare namespace _default {
|
|
|
95
95
|
};
|
|
96
96
|
readonly parser: typeof import("@typescript-eslint/parser");
|
|
97
97
|
};
|
|
98
|
-
let plugins: {
|
|
98
|
+
export let plugins: {
|
|
99
99
|
readonly jsdoc: import("@eslint/core", { with: { "resolution-mode": "require" } }).Plugin & {
|
|
100
100
|
configs: Record<`flat/${import("eslint-plugin-jsdoc").ConfigGroups}${import("eslint-plugin-jsdoc").ConfigVariants}${import("eslint-plugin-jsdoc").ErrorLevelVariants}`, import("eslint").Linter.Config> & Record<"examples" | "default-expressions" | "examples-and-default-expressions", import("eslint").Linter.Config[]> & Record<"flat/recommended-mixed", import("eslint").Linter.Config[]>;
|
|
101
101
|
};
|
|
102
102
|
};
|
|
103
|
-
let rules: {
|
|
103
|
+
export let rules: {
|
|
104
104
|
readonly "import/no-extraneous-dependencies": ["error", {
|
|
105
105
|
readonly includeTypes: true;
|
|
106
106
|
}];
|
|
@@ -140,26 +140,23 @@ declare namespace _default {
|
|
|
140
140
|
}];
|
|
141
141
|
readonly "jsdoc/sort-tags": ["error", {
|
|
142
142
|
readonly reportIntraTagGroupSpacing: false;
|
|
143
|
-
readonly reportTagGroupSpacing:
|
|
143
|
+
readonly reportTagGroupSpacing: true;
|
|
144
|
+
readonly tagSequence: readonly [{
|
|
145
|
+
readonly tags: readonly ["typedef", "callback"];
|
|
146
|
+
}, {
|
|
147
|
+
readonly tags: readonly ["param", "arg", "argument", "property", "prop"];
|
|
148
|
+
}, {
|
|
149
|
+
readonly tags: readonly ["returns", "return"];
|
|
150
|
+
}, {
|
|
151
|
+
readonly tags: readonly ["throws", "exception"];
|
|
152
|
+
}, {
|
|
153
|
+
readonly tags: readonly ["example"];
|
|
154
|
+
}];
|
|
144
155
|
}];
|
|
145
|
-
readonly "jsdoc/tag-lines": ["error", "
|
|
156
|
+
readonly "jsdoc/tag-lines": ["error", "any", {
|
|
146
157
|
readonly startLines: 1;
|
|
147
158
|
readonly endLines: 0;
|
|
148
159
|
readonly applyToEndTag: false;
|
|
149
|
-
readonly tags: {
|
|
150
|
-
readonly returns: {
|
|
151
|
-
readonly lines: "always";
|
|
152
|
-
};
|
|
153
|
-
readonly property: {
|
|
154
|
-
readonly lines: "any";
|
|
155
|
-
};
|
|
156
|
-
readonly param: {
|
|
157
|
-
readonly lines: "any";
|
|
158
|
-
};
|
|
159
|
-
readonly example: {
|
|
160
|
-
readonly lines: "always";
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
160
|
}];
|
|
164
161
|
readonly "jsdoc/check-indentation": "error";
|
|
165
162
|
readonly "jsdoc/check-alignment": "error";
|
|
@@ -215,8 +212,9 @@ declare namespace _default {
|
|
|
215
212
|
readonly allowInObjectDestructuring: true;
|
|
216
213
|
}];
|
|
217
214
|
};
|
|
218
|
-
let settings: {
|
|
215
|
+
export let settings: {
|
|
219
216
|
readonly [x: string]: unknown;
|
|
220
217
|
};
|
|
221
218
|
}
|
|
222
219
|
export default _default;
|
|
220
|
+
import commonIgnores from "./src/rules/ignores.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import commonIgnores from "../rules/ignores.js";
|
|
2
|
+
import devConfig from "../rules/dev.js";
|
|
2
3
|
export namespace nodeConfig {
|
|
3
4
|
let name: "ASD14 config for Node.js source files";
|
|
4
|
-
let ignores: ["node_modules", "dist", "coverage", "build"];
|
|
5
5
|
namespace languageOptions {
|
|
6
6
|
let ecmaVersion: "latest";
|
|
7
7
|
let sourceType: "module";
|
|
@@ -137,26 +137,23 @@ export namespace nodeConfig {
|
|
|
137
137
|
readonly "unicorn/error-message": "error";
|
|
138
138
|
readonly "jsdoc/sort-tags": ["error", {
|
|
139
139
|
readonly reportIntraTagGroupSpacing: false;
|
|
140
|
-
readonly reportTagGroupSpacing:
|
|
140
|
+
readonly reportTagGroupSpacing: true;
|
|
141
|
+
readonly tagSequence: readonly [{
|
|
142
|
+
readonly tags: readonly ["typedef", "callback"];
|
|
143
|
+
}, {
|
|
144
|
+
readonly tags: readonly ["param", "arg", "argument", "property", "prop"];
|
|
145
|
+
}, {
|
|
146
|
+
readonly tags: readonly ["returns", "return"];
|
|
147
|
+
}, {
|
|
148
|
+
readonly tags: readonly ["throws", "exception"];
|
|
149
|
+
}, {
|
|
150
|
+
readonly tags: readonly ["example"];
|
|
151
|
+
}];
|
|
141
152
|
}];
|
|
142
|
-
readonly "jsdoc/tag-lines": ["error", "
|
|
153
|
+
readonly "jsdoc/tag-lines": ["error", "any", {
|
|
143
154
|
readonly startLines: 1;
|
|
144
155
|
readonly endLines: 0;
|
|
145
156
|
readonly applyToEndTag: false;
|
|
146
|
-
readonly tags: {
|
|
147
|
-
readonly returns: {
|
|
148
|
-
readonly lines: "always";
|
|
149
|
-
};
|
|
150
|
-
readonly property: {
|
|
151
|
-
readonly lines: "any";
|
|
152
|
-
};
|
|
153
|
-
readonly param: {
|
|
154
|
-
readonly lines: "any";
|
|
155
|
-
};
|
|
156
|
-
readonly example: {
|
|
157
|
-
readonly lines: "always";
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
157
|
}];
|
|
161
158
|
readonly "jsdoc/check-indentation": "error";
|
|
162
159
|
readonly "jsdoc/check-alignment": "error";
|
|
@@ -219,24 +216,4 @@ export namespace nodeConfig {
|
|
|
219
216
|
readonly [x: string]: unknown;
|
|
220
217
|
};
|
|
221
218
|
}
|
|
222
|
-
export
|
|
223
|
-
let name_1: "ASD14's config for Node.js test files";
|
|
224
|
-
export { name_1 as name };
|
|
225
|
-
let languageOptions_1: import("@eslint/core", { with: { "resolution-mode": "require" } }).LanguageOptions | undefined;
|
|
226
|
-
export { languageOptions_1 as languageOptions };
|
|
227
|
-
let plugins_1: Record<string, import("@eslint/core", { with: { "resolution-mode": "require" } }).Plugin> | undefined;
|
|
228
|
-
export { plugins_1 as plugins };
|
|
229
|
-
let rules_1: {
|
|
230
|
-
readonly "jest/require-top-level-describe": "error";
|
|
231
|
-
readonly "jest/consistent-test-it": ["error", {
|
|
232
|
-
readonly fn: "test";
|
|
233
|
-
readonly withinDescribe: "test";
|
|
234
|
-
}];
|
|
235
|
-
readonly "jest/valid-title": ["error", {
|
|
236
|
-
readonly mustMatch: {
|
|
237
|
-
readonly test: "^given \\[.*\\] should \\[.*\\]$";
|
|
238
|
-
};
|
|
239
|
-
}];
|
|
240
|
-
};
|
|
241
|
-
export { rules_1 as rules };
|
|
242
|
-
}
|
|
219
|
+
export { commonIgnores, devConfig };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
export namespace nxConfig {
|
|
2
|
-
let name: "ASD14 config for source files inside an NX monorepo";
|
|
3
2
|
let plugins: {
|
|
4
3
|
readonly "@nx": Plugin;
|
|
5
4
|
};
|
|
6
5
|
let rules: {
|
|
7
6
|
readonly "@nx/enforce-module-boundaries": ["error", {
|
|
8
|
-
readonly allow: readonly [];
|
|
7
|
+
readonly allow: readonly ["^.*/types$", "^.*/const$"];
|
|
9
8
|
readonly depConstraints: readonly [{
|
|
10
9
|
sourceTag: string;
|
|
11
10
|
onlyDependOnLibsWithTags: string[];
|
|
@@ -44,21 +43,16 @@ export namespace nxConfig {
|
|
|
44
43
|
};
|
|
45
44
|
}
|
|
46
45
|
export namespace nxDevConfig {
|
|
47
|
-
let name_1: "ASD14 config for dev files inside an NX monorepo";
|
|
48
|
-
export { name_1 as name };
|
|
49
46
|
let plugins_1: {
|
|
50
47
|
readonly "@nx": Plugin;
|
|
51
48
|
};
|
|
52
49
|
export { plugins_1 as plugins };
|
|
53
50
|
let rules_1: {
|
|
54
|
-
readonly "import/no-extraneous-dependencies": ["error", {
|
|
55
|
-
readonly packageDir: readonly ["./", string];
|
|
56
|
-
}];
|
|
57
51
|
readonly "@nx/enforce-module-boundaries": ["error", {
|
|
58
52
|
readonly allow: readonly [];
|
|
59
53
|
readonly depConstraints: readonly [{
|
|
60
54
|
readonly sourceTag: "*";
|
|
61
|
-
readonly onlyDependOnLibsWithTags: readonly ["type:
|
|
55
|
+
readonly onlyDependOnLibsWithTags: readonly ["type:library"];
|
|
62
56
|
}];
|
|
63
57
|
}];
|
|
64
58
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import commonIgnores from "../rules/ignores.js";
|
|
2
|
+
import devConfig from "../rules/dev.js";
|
|
2
3
|
export namespace reactConfig {
|
|
3
|
-
let name: "ASD14 config for React source files";
|
|
4
|
-
let ignores: ["node_modules", "dist", "coverage", "build"];
|
|
4
|
+
let name: "ASD14 config for Typescript + React source files";
|
|
5
5
|
let languageOptions: {
|
|
6
6
|
readonly ecmaVersion: "latest";
|
|
7
7
|
readonly sourceType: "module";
|
|
@@ -121,6 +121,8 @@ export namespace reactConfig {
|
|
|
121
121
|
readonly CookieStore: false;
|
|
122
122
|
readonly CookieStoreManager: false;
|
|
123
123
|
readonly CountQueuingStrategy: false;
|
|
124
|
+
readonly crashReport: false;
|
|
125
|
+
readonly CrashReportContext: false;
|
|
124
126
|
readonly createImageBitmap: false;
|
|
125
127
|
readonly CreateMonitor: false;
|
|
126
128
|
readonly Credential: false;
|
|
@@ -709,6 +711,7 @@ export namespace reactConfig {
|
|
|
709
711
|
readonly Option: false;
|
|
710
712
|
readonly OrientationSensor: false;
|
|
711
713
|
readonly origin: false;
|
|
714
|
+
readonly Origin: false;
|
|
712
715
|
readonly originAgentCluster: false;
|
|
713
716
|
readonly OscillatorNode: false;
|
|
714
717
|
readonly OTPCredential: false;
|
|
@@ -748,6 +751,7 @@ export namespace reactConfig {
|
|
|
748
751
|
readonly PerformanceScriptTiming: false;
|
|
749
752
|
readonly PerformanceServerTiming: false;
|
|
750
753
|
readonly PerformanceTiming: false;
|
|
754
|
+
readonly PerformanceTimingConfidence: false;
|
|
751
755
|
readonly PeriodicSyncManager: false;
|
|
752
756
|
readonly PeriodicWave: false;
|
|
753
757
|
readonly Permissions: false;
|
|
@@ -1275,47 +1279,6 @@ export namespace reactConfig {
|
|
|
1275
1279
|
readonly "unicorn/no-useless-undefined": "off";
|
|
1276
1280
|
readonly "unicorn/new-for-builtins": "error";
|
|
1277
1281
|
readonly "unicorn/error-message": "error";
|
|
1278
|
-
readonly "@typescript-eslint/no-unused-vars": ["error", {
|
|
1279
|
-
readonly args: "all";
|
|
1280
|
-
readonly argsIgnorePattern: "^_";
|
|
1281
|
-
readonly caughtErrors: "all";
|
|
1282
|
-
readonly caughtErrorsIgnorePattern: "^_";
|
|
1283
|
-
readonly destructuredArrayIgnorePattern: "^_";
|
|
1284
|
-
readonly varsIgnorePattern: "^_";
|
|
1285
|
-
readonly ignoreRestSiblings: true;
|
|
1286
|
-
}];
|
|
1287
|
-
readonly "@typescript-eslint/require-await": "warn";
|
|
1288
|
-
readonly "@typescript-eslint/dot-notation": "off";
|
|
1289
|
-
readonly "@typescript-eslint/restrict-template-expressions": ["error", {
|
|
1290
|
-
readonly allowBoolean: true;
|
|
1291
|
-
readonly allowNumber: true;
|
|
1292
|
-
}];
|
|
1293
|
-
readonly "@typescript-eslint/no-var-requires": "off";
|
|
1294
|
-
readonly "@typescript-eslint/no-use-before-define": "error";
|
|
1295
|
-
readonly "@typescript-eslint/naming-convention": ["error", {
|
|
1296
|
-
readonly selector: "default";
|
|
1297
|
-
readonly leadingUnderscore: "allow";
|
|
1298
|
-
readonly format: readonly ["camelCase", "PascalCase", "UPPER_CASE"];
|
|
1299
|
-
}, {
|
|
1300
|
-
readonly selector: "variable";
|
|
1301
|
-
readonly types: readonly ["boolean"];
|
|
1302
|
-
readonly format: readonly ["camelCase", "PascalCase"];
|
|
1303
|
-
readonly prefix: readonly ["is", "has", "can", "does", "should", "will", "did", "was", "are"];
|
|
1304
|
-
}, {
|
|
1305
|
-
readonly selector: "variable";
|
|
1306
|
-
readonly types: readonly ["boolean", "number", "string", "array"];
|
|
1307
|
-
readonly modifiers: readonly ["const", "global"];
|
|
1308
|
-
readonly format: readonly ["UPPER_CASE"];
|
|
1309
|
-
}, {
|
|
1310
|
-
readonly selector: "typeAlias";
|
|
1311
|
-
readonly format: readonly ["PascalCase"];
|
|
1312
|
-
}, {
|
|
1313
|
-
readonly selector: "typeParameter";
|
|
1314
|
-
readonly format: readonly ["PascalCase"];
|
|
1315
|
-
}, {
|
|
1316
|
-
readonly selector: readonly ["classProperty", "objectLiteralProperty", "typeProperty", "classMethod", "objectLiteralMethod", "typeMethod", "accessor", "enumMember"];
|
|
1317
|
-
readonly format: readonly [];
|
|
1318
|
-
}];
|
|
1319
1282
|
readonly "react-refresh/only-export-components": "error";
|
|
1320
1283
|
readonly "react-hooks/rules-of-hooks": "error";
|
|
1321
1284
|
readonly "react-hooks/exhaustive-deps": "error";
|
|
@@ -1402,28 +1365,67 @@ export namespace reactConfig {
|
|
|
1402
1365
|
readonly "react/no-access-state-in-setstate": "error";
|
|
1403
1366
|
readonly "react/button-has-type": "error";
|
|
1404
1367
|
readonly "react/jsx-props-no-spreading": "off";
|
|
1368
|
+
readonly "@typescript-eslint/unified-signatures": "off";
|
|
1369
|
+
readonly "@typescript-eslint/no-unused-vars": ["error", {
|
|
1370
|
+
readonly args: "all";
|
|
1371
|
+
readonly argsIgnorePattern: "^_";
|
|
1372
|
+
readonly caughtErrors: "all";
|
|
1373
|
+
readonly caughtErrorsIgnorePattern: "^_";
|
|
1374
|
+
readonly destructuredArrayIgnorePattern: "^_";
|
|
1375
|
+
readonly varsIgnorePattern: "^_";
|
|
1376
|
+
readonly ignoreRestSiblings: true;
|
|
1377
|
+
}];
|
|
1378
|
+
readonly "@typescript-eslint/require-await": "warn";
|
|
1379
|
+
readonly "@typescript-eslint/dot-notation": "off";
|
|
1380
|
+
readonly "@typescript-eslint/restrict-template-expressions": ["error", {
|
|
1381
|
+
readonly allowBoolean: true;
|
|
1382
|
+
readonly allowNumber: true;
|
|
1383
|
+
}];
|
|
1384
|
+
readonly "@typescript-eslint/no-var-requires": "off";
|
|
1385
|
+
readonly "@typescript-eslint/no-use-before-define": "error";
|
|
1386
|
+
readonly "@typescript-eslint/naming-convention": ["error", {
|
|
1387
|
+
readonly selector: "default";
|
|
1388
|
+
readonly leadingUnderscore: "allow";
|
|
1389
|
+
readonly format: readonly ["camelCase", "PascalCase", "UPPER_CASE"];
|
|
1390
|
+
}, {
|
|
1391
|
+
readonly selector: "variable";
|
|
1392
|
+
readonly types: readonly ["boolean"];
|
|
1393
|
+
readonly format: readonly ["camelCase", "PascalCase"];
|
|
1394
|
+
readonly prefix: readonly ["is", "has", "can", "does", "should", "will", "did", "was", "are"];
|
|
1395
|
+
}, {
|
|
1396
|
+
readonly selector: "variable";
|
|
1397
|
+
readonly types: readonly ["boolean", "number", "string", "array"];
|
|
1398
|
+
readonly modifiers: readonly ["const", "global"];
|
|
1399
|
+
readonly format: readonly ["UPPER_CASE"];
|
|
1400
|
+
}, {
|
|
1401
|
+
readonly selector: "typeAlias";
|
|
1402
|
+
readonly format: readonly ["PascalCase"];
|
|
1403
|
+
}, {
|
|
1404
|
+
readonly selector: "typeParameter";
|
|
1405
|
+
readonly format: readonly ["PascalCase"];
|
|
1406
|
+
}, {
|
|
1407
|
+
readonly selector: readonly ["classProperty", "objectLiteralProperty", "typeProperty", "classMethod", "objectLiteralMethod", "typeMethod", "accessor", "enumMember"];
|
|
1408
|
+
readonly format: readonly [];
|
|
1409
|
+
}];
|
|
1405
1410
|
readonly "jsdoc/sort-tags": ["error", {
|
|
1406
1411
|
readonly reportIntraTagGroupSpacing: false;
|
|
1407
|
-
readonly reportTagGroupSpacing:
|
|
1412
|
+
readonly reportTagGroupSpacing: true;
|
|
1413
|
+
readonly tagSequence: readonly [{
|
|
1414
|
+
readonly tags: readonly ["typedef", "callback"];
|
|
1415
|
+
}, {
|
|
1416
|
+
readonly tags: readonly ["param", "arg", "argument", "property", "prop"];
|
|
1417
|
+
}, {
|
|
1418
|
+
readonly tags: readonly ["returns", "return"];
|
|
1419
|
+
}, {
|
|
1420
|
+
readonly tags: readonly ["throws", "exception"];
|
|
1421
|
+
}, {
|
|
1422
|
+
readonly tags: readonly ["example"];
|
|
1423
|
+
}];
|
|
1408
1424
|
}];
|
|
1409
|
-
readonly "jsdoc/tag-lines": ["error", "
|
|
1425
|
+
readonly "jsdoc/tag-lines": ["error", "any", {
|
|
1410
1426
|
readonly startLines: 1;
|
|
1411
1427
|
readonly endLines: 0;
|
|
1412
1428
|
readonly applyToEndTag: false;
|
|
1413
|
-
readonly tags: {
|
|
1414
|
-
readonly returns: {
|
|
1415
|
-
readonly lines: "always";
|
|
1416
|
-
};
|
|
1417
|
-
readonly property: {
|
|
1418
|
-
readonly lines: "any";
|
|
1419
|
-
};
|
|
1420
|
-
readonly param: {
|
|
1421
|
-
readonly lines: "any";
|
|
1422
|
-
};
|
|
1423
|
-
readonly example: {
|
|
1424
|
-
readonly lines: "always";
|
|
1425
|
-
};
|
|
1426
|
-
};
|
|
1427
1429
|
}];
|
|
1428
1430
|
readonly "jsdoc/check-indentation": "error";
|
|
1429
1431
|
readonly "jsdoc/check-alignment": "error";
|
|
@@ -1489,23 +1491,4 @@ export namespace reactConfig {
|
|
|
1489
1491
|
};
|
|
1490
1492
|
};
|
|
1491
1493
|
}
|
|
1492
|
-
|
|
1493
|
-
export const reactJestConfig: {
|
|
1494
|
-
readonly name: "ASD14 config for React test files";
|
|
1495
|
-
readonly plugins: {
|
|
1496
|
-
readonly [x: string]: import("@eslint/core", { with: { "resolution-mode": "require" } }).Plugin;
|
|
1497
|
-
};
|
|
1498
|
-
readonly rules: {
|
|
1499
|
-
readonly "jest/require-top-level-describe": "error";
|
|
1500
|
-
readonly "jest/consistent-test-it": ["error", {
|
|
1501
|
-
readonly fn: "test";
|
|
1502
|
-
readonly withinDescribe: "test";
|
|
1503
|
-
}];
|
|
1504
|
-
readonly "jest/valid-title": ["error", {
|
|
1505
|
-
readonly mustMatch: {
|
|
1506
|
-
readonly test: "^given \\[.*\\] should \\[.*\\]$";
|
|
1507
|
-
};
|
|
1508
|
-
}];
|
|
1509
|
-
};
|
|
1510
|
-
readonly languageOptions: import("@eslint/core", { with: { "resolution-mode": "require" } }).LanguageOptions | undefined;
|
|
1511
|
-
};
|
|
1494
|
+
export { commonIgnores, devConfig };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import commonIgnores from "../rules/ignores.js";
|
|
2
|
+
import devConfig from "../rules/dev.js";
|
|
3
|
+
export namespace tsConfig {
|
|
3
4
|
let name: "ASD14 config for Typescript + Node.js source files";
|
|
4
5
|
let languageOptions: {
|
|
5
6
|
readonly parser: typeof import("@typescript-eslint/parser");
|
|
@@ -137,26 +138,23 @@ export namespace tsNodeConfig {
|
|
|
137
138
|
readonly "unicorn/error-message": "error";
|
|
138
139
|
readonly "jsdoc/sort-tags": ["error", {
|
|
139
140
|
readonly reportIntraTagGroupSpacing: false;
|
|
140
|
-
readonly reportTagGroupSpacing:
|
|
141
|
+
readonly reportTagGroupSpacing: true;
|
|
142
|
+
readonly tagSequence: readonly [{
|
|
143
|
+
readonly tags: readonly ["typedef", "callback"];
|
|
144
|
+
}, {
|
|
145
|
+
readonly tags: readonly ["param", "arg", "argument", "property", "prop"];
|
|
146
|
+
}, {
|
|
147
|
+
readonly tags: readonly ["returns", "return"];
|
|
148
|
+
}, {
|
|
149
|
+
readonly tags: readonly ["throws", "exception"];
|
|
150
|
+
}, {
|
|
151
|
+
readonly tags: readonly ["example"];
|
|
152
|
+
}];
|
|
141
153
|
}];
|
|
142
|
-
readonly "jsdoc/tag-lines": ["error", "
|
|
154
|
+
readonly "jsdoc/tag-lines": ["error", "any", {
|
|
143
155
|
readonly startLines: 1;
|
|
144
156
|
readonly endLines: 0;
|
|
145
157
|
readonly applyToEndTag: false;
|
|
146
|
-
readonly tags: {
|
|
147
|
-
readonly returns: {
|
|
148
|
-
readonly lines: "always";
|
|
149
|
-
};
|
|
150
|
-
readonly property: {
|
|
151
|
-
readonly lines: "any";
|
|
152
|
-
};
|
|
153
|
-
readonly param: {
|
|
154
|
-
readonly lines: "any";
|
|
155
|
-
};
|
|
156
|
-
readonly example: {
|
|
157
|
-
readonly lines: "always";
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
158
|
}];
|
|
161
159
|
readonly "jsdoc/check-indentation": "error";
|
|
162
160
|
readonly "jsdoc/check-alignment": "error";
|
|
@@ -214,6 +212,7 @@ export namespace tsNodeConfig {
|
|
|
214
212
|
readonly allowInArrayDestructuring: true;
|
|
215
213
|
readonly allowInObjectDestructuring: true;
|
|
216
214
|
}];
|
|
215
|
+
readonly "@typescript-eslint/unified-signatures": "off";
|
|
217
216
|
readonly "@typescript-eslint/no-unused-vars": ["error", {
|
|
218
217
|
readonly args: "all";
|
|
219
218
|
readonly argsIgnorePattern: "^_";
|
|
@@ -260,3 +259,4 @@ export namespace tsNodeConfig {
|
|
|
260
259
|
readonly [x: string]: unknown;
|
|
261
260
|
};
|
|
262
261
|
}
|
|
262
|
+
export { commonIgnores, devConfig };
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* These are build outputs and dependencies that should never be linted
|
|
4
|
-
*/
|
|
5
|
-
export const commonIgnores: readonly ["node_modules/**", "dist/**", "coverage/**", "build/**", ".next/**", ".nuxt/**", "out/**", "tmp/**", "temp/**"];
|
|
1
|
+
declare const _default: string[];
|
|
2
|
+
export default _default;
|
|
@@ -5,26 +5,23 @@ declare namespace _default {
|
|
|
5
5
|
let rules: {
|
|
6
6
|
readonly "jsdoc/sort-tags": ["error", {
|
|
7
7
|
readonly reportIntraTagGroupSpacing: false;
|
|
8
|
-
readonly reportTagGroupSpacing:
|
|
8
|
+
readonly reportTagGroupSpacing: true;
|
|
9
|
+
readonly tagSequence: readonly [{
|
|
10
|
+
readonly tags: readonly ["typedef", "callback"];
|
|
11
|
+
}, {
|
|
12
|
+
readonly tags: readonly ["param", "arg", "argument", "property", "prop"];
|
|
13
|
+
}, {
|
|
14
|
+
readonly tags: readonly ["returns", "return"];
|
|
15
|
+
}, {
|
|
16
|
+
readonly tags: readonly ["throws", "exception"];
|
|
17
|
+
}, {
|
|
18
|
+
readonly tags: readonly ["example"];
|
|
19
|
+
}];
|
|
9
20
|
}];
|
|
10
|
-
readonly "jsdoc/tag-lines": ["error", "
|
|
21
|
+
readonly "jsdoc/tag-lines": ["error", "any", {
|
|
11
22
|
readonly startLines: 1;
|
|
12
23
|
readonly endLines: 0;
|
|
13
24
|
readonly applyToEndTag: false;
|
|
14
|
-
readonly tags: {
|
|
15
|
-
readonly returns: {
|
|
16
|
-
readonly lines: "always";
|
|
17
|
-
};
|
|
18
|
-
readonly property: {
|
|
19
|
-
readonly lines: "any";
|
|
20
|
-
};
|
|
21
|
-
readonly param: {
|
|
22
|
-
readonly lines: "any";
|
|
23
|
-
};
|
|
24
|
-
readonly example: {
|
|
25
|
-
readonly lines: "always";
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
25
|
}];
|
|
29
26
|
readonly "jsdoc/check-indentation": "error";
|
|
30
27
|
readonly "jsdoc/check-alignment": "error";
|
|
@@ -6,6 +6,7 @@ declare namespace _default {
|
|
|
6
6
|
readonly "@typescript-eslint": any;
|
|
7
7
|
};
|
|
8
8
|
let rules: {
|
|
9
|
+
readonly "@typescript-eslint/unified-signatures": "off";
|
|
9
10
|
readonly "@typescript-eslint/no-unused-vars": ["error", {
|
|
10
11
|
readonly args: "all";
|
|
11
12
|
readonly argsIgnorePattern: "^_";
|
|
@@ -15,20 +15,19 @@ export type FindUpSyncFn = (fileName: string, options?: FindUpSyncOptions | unde
|
|
|
15
15
|
*
|
|
16
16
|
* @param {string} fileName - The name of the file to find.
|
|
17
17
|
* @param {FindUpSyncOptions} [options] - Options for the function.
|
|
18
|
+
*
|
|
18
19
|
* @returns {string} The absolute path to the file.
|
|
19
20
|
*/
|
|
20
21
|
/**
|
|
21
22
|
* Find a file up the directory tree synchronously.
|
|
22
23
|
*
|
|
23
|
-
* @type {FindUpSyncFn}
|
|
24
|
-
*
|
|
25
24
|
* @throws {Error} If the starting folder does not exist.
|
|
26
|
-
*
|
|
27
25
|
* @throws {Error} If the file does not exist up the tree.
|
|
28
26
|
*
|
|
29
27
|
* @example
|
|
30
28
|
* const filePath = findUpSync("lerna.json");
|
|
31
29
|
* //=> "/Users/johndoe/Projects/WootWoot/lerna.json"
|
|
32
30
|
*
|
|
31
|
+
* @type {FindUpSyncFn}
|
|
33
32
|
*/
|
|
34
33
|
export const findUpSync: FindUpSyncFn;
|