@aidc-toolkit/dev 0.9.2 → 0.9.3
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 +20 -16
- package/eslint.config.js +1 -11
- package/package.json +12 -5
- package/src/eslint.config.template.ts +10 -3
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ a development dependency.
|
|
|
6
6
|
## TypeScript Configuration
|
|
7
7
|
|
|
8
8
|
All AIDC Toolkit packages are expected to be built the same way, which implies that they all have the same TypeScript
|
|
9
|
-
configuration. This is supported by the [`tsconfig.json` file](tsconfig.json) in this package.
|
|
9
|
+
configuration. This is supported by the [`tsconfig.json` file](tsconfig.json) in this package. Core changes should be managed
|
|
10
10
|
in that file, with other packages declaring their own `tsconfig.json` as follows:
|
|
11
11
|
|
|
12
12
|
```json
|
|
@@ -15,32 +15,36 @@ in that file, with other packages declaring their own `tsconfig.json` as follows
|
|
|
15
15
|
}
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
Options specific to the package may override or supplement core options if required.
|
|
19
|
+
|
|
18
20
|
## ESLint Configuration
|
|
19
21
|
|
|
20
22
|
All AIDC Toolkit packages are expected to follow a common coding style (enforced by [ESLint](https://eslint.org/)),
|
|
21
23
|
which implies that they all have the same ESLint configuration. This is supported by the [`eslint.config.template.ts`
|
|
22
|
-
file](src/eslint.config.template.ts) in this package.
|
|
24
|
+
file](src/eslint.config.template.ts) in this package. Core changes should be managed in that file, with other packages
|
|
23
25
|
declaring their own `eslint.config.js` file as follows:
|
|
24
26
|
|
|
27
|
+
```javascript
|
|
28
|
+
import { esLintConfigAIDCToolkit } from "@aidc-toolkit/dev";
|
|
29
|
+
|
|
30
|
+
export default esLintConfigAIDCToolkit;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Rules specific to the package may override or supplement core rules if required. If so, the `eslint.config.js` file
|
|
34
|
+
should be declared as follows:
|
|
35
|
+
|
|
25
36
|
```javascript
|
|
26
37
|
import tseslint from "typescript-eslint";
|
|
27
|
-
import stylistic from "@stylistic/eslint-plugin";
|
|
28
|
-
import jsdoc from "eslint-plugin-jsdoc";
|
|
29
|
-
import esLintConfigLove from "eslint-config-love";
|
|
30
38
|
import { esLintConfigAIDCToolkit } from "@aidc-toolkit/dev";
|
|
39
|
+
// Additional imports here as required.
|
|
40
|
+
// ...
|
|
31
41
|
|
|
32
42
|
export default tseslint.config(
|
|
33
|
-
...
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
esLintConfigLove,
|
|
37
|
-
esLintConfigAIDCToolkit
|
|
43
|
+
...esLintConfigAIDCToolkit,
|
|
44
|
+
// Additional rules here as required.
|
|
45
|
+
// ...
|
|
38
46
|
);
|
|
39
47
|
```
|
|
40
48
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- @stylistic/eslint-plugin
|
|
44
|
-
- eslint-config-love
|
|
45
|
-
- eslint-plugin-jsdoc
|
|
46
|
-
- typescript-eslint
|
|
49
|
+
ESLint requires the installation of the `eslint` package as a development dependency. Other development dependencies may
|
|
50
|
+
be required if overriding or supplementing the core rules.
|
package/eslint.config.js
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import tseslint from "typescript-eslint";
|
|
2
|
-
import stylistic from "@stylistic/eslint-plugin";
|
|
3
|
-
import jsdoc from "eslint-plugin-jsdoc";
|
|
4
|
-
import esLintConfigLove from "eslint-config-love";
|
|
5
1
|
import { esLintConfigAIDCToolkit } from "./dist/index.js";
|
|
6
2
|
|
|
7
|
-
export default
|
|
8
|
-
...tseslint.configs.strictTypeChecked,
|
|
9
|
-
stylistic.configs["recommended-flat"],
|
|
10
|
-
jsdoc.configs["flat/recommended-typescript"],
|
|
11
|
-
esLintConfigLove,
|
|
12
|
-
...esLintConfigAIDCToolkit
|
|
13
|
-
);
|
|
3
|
+
export default esLintConfigAIDCToolkit;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aidc-toolkit/dev",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "Shared development artefacts for AIDC Toolkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,16 +20,23 @@
|
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"eslint": "eslint .",
|
|
23
|
-
"build": "tsup src/index.ts --format cjs,esm --dts"
|
|
23
|
+
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
24
|
+
"build-doc": "npm run build"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
27
|
+
"eslint": "^9.14.0",
|
|
28
|
+
"ts-node": "^10.9.2",
|
|
29
|
+
"tsup": "^8.3.5",
|
|
30
|
+
"typescript": "^5.6.3"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"eslint": ">=9"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
26
36
|
"@eslint/js": "^9.14.0",
|
|
27
37
|
"@stylistic/eslint-plugin": "^2.10.1",
|
|
28
38
|
"eslint-config-love": "^98.0.2",
|
|
29
39
|
"eslint-plugin-jsdoc": "^50.5.0",
|
|
30
|
-
"ts-node": "^10.9.2",
|
|
31
|
-
"tsup": "^8.3.5",
|
|
32
|
-
"typescript": "^5.6.3",
|
|
33
40
|
"typescript-eslint": "^8.14.0"
|
|
34
41
|
}
|
|
35
42
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import js from "@eslint/js";
|
|
2
|
-
import
|
|
2
|
+
import stylistic from "@stylistic/eslint-plugin";
|
|
3
|
+
import esLintConfigLove from "eslint-config-love";
|
|
4
|
+
import jsdoc from "eslint-plugin-jsdoc";
|
|
5
|
+
import tseslint from "typescript-eslint";
|
|
3
6
|
|
|
4
|
-
export const esLintConfigAIDCToolkit
|
|
7
|
+
export const esLintConfigAIDCToolkit = tseslint.config(
|
|
5
8
|
{
|
|
6
9
|
ignores: ["eslint.config.js", "dist"]
|
|
7
10
|
},
|
|
8
11
|
js.configs.recommended,
|
|
12
|
+
...tseslint.configs.strictTypeChecked,
|
|
13
|
+
stylistic.configs["recommended-flat"],
|
|
14
|
+
jsdoc.configs["flat/recommended-typescript"],
|
|
15
|
+
esLintConfigLove,
|
|
9
16
|
{
|
|
10
17
|
languageOptions: {
|
|
11
18
|
parserOptions: {
|
|
@@ -98,4 +105,4 @@ export const esLintConfigAIDCToolkit: ConfigWithExtends[] = [
|
|
|
98
105
|
"@typescript-eslint/dot-notation": "off"
|
|
99
106
|
}
|
|
100
107
|
}
|
|
101
|
-
|
|
108
|
+
);
|