@mkobayashime/shared-config 1.0.0 → 1.1.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/.github/workflows/ci.yaml +5 -0
- package/Makefile +4 -0
- package/README.md +25 -1
- package/biome.json +1 -1
- package/bun.lockb +0 -0
- package/package.json +8 -4
- package/src/eslint/index.d.ts +5 -0
- package/src/eslint/index.js +1 -0
- package/src/eslint/typescriptWithBiome.js +35 -0
- /package/{biome.shared.json → src/biome/index.json} +0 -0
package/Makefile
CHANGED
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Biome
|
|
4
4
|
|
|
5
|
-
[
|
|
5
|
+
[config](./src/biome/index.json)
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
bun add -d @mkobayashime/shared-config
|
|
@@ -18,3 +18,27 @@ in `biome.json`
|
|
|
18
18
|
]
|
|
19
19
|
}
|
|
20
20
|
```
|
|
21
|
+
|
|
22
|
+
## ESLint
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
bun add -d @mkobayashime/shared-config eslint typescript-eslint
|
|
26
|
+
pnpm add -D @mkobayashime/shared-config eslint typescript-eslint
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### [`typescript-with-biome`](./src/eslint/typescriptWithBiome.js)
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
import { typescriptWithBiome } from "@mkobayashime/shared-config/eslint";
|
|
33
|
+
|
|
34
|
+
export default [
|
|
35
|
+
...typescriptWithBiome,
|
|
36
|
+
{
|
|
37
|
+
languageOptions: {
|
|
38
|
+
parserOptions: {
|
|
39
|
+
project: "./tsconfig.json",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
```
|
package/biome.json
CHANGED
package/bun.lockb
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mkobayashime/shared-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/mkobayashime/shared-config"
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
|
-
"./biome": "./biome.
|
|
10
|
+
"./biome": "./src/biome/index.json",
|
|
11
|
+
"./eslint": "./src/eslint/index.js"
|
|
11
12
|
},
|
|
12
13
|
"devDependencies": {
|
|
13
14
|
"@biomejs/biome": "1.9.4",
|
|
14
|
-
"@types/bun": "latest"
|
|
15
|
+
"@types/bun": "latest",
|
|
16
|
+
"tsup": "8.3.5"
|
|
15
17
|
},
|
|
16
18
|
"peerDependencies": {
|
|
17
|
-
"
|
|
19
|
+
"eslint": "^9.18.0",
|
|
20
|
+
"typescript": "^5.0.0",
|
|
21
|
+
"typescript-eslint": "^8.20.0"
|
|
18
22
|
}
|
|
19
23
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { typescriptWithBiome } from "./typescriptWithBiome.js";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import tsESLint from "typescript-eslint";
|
|
2
|
+
|
|
3
|
+
export const typescriptWithBiome = tsESLint.config({
|
|
4
|
+
extends: [tsESLint.configs.base],
|
|
5
|
+
files: ["**/*.ts", "**/*.tsx"],
|
|
6
|
+
rules: {
|
|
7
|
+
"@typescript-eslint/await-thenable": "error",
|
|
8
|
+
"@typescript-eslint/no-array-delete": "error",
|
|
9
|
+
"@typescript-eslint/no-base-to-string": "error",
|
|
10
|
+
"@typescript-eslint/no-duplicate-type-constituents": "error",
|
|
11
|
+
"@typescript-eslint/no-floating-promises": "error",
|
|
12
|
+
"@typescript-eslint/no-for-in-array": "error",
|
|
13
|
+
"no-implied-eval": "off",
|
|
14
|
+
"@typescript-eslint/no-implied-eval": "error",
|
|
15
|
+
"@typescript-eslint/no-misused-promises": "error",
|
|
16
|
+
"@typescript-eslint/no-redundant-type-constituents": "error",
|
|
17
|
+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
18
|
+
"@typescript-eslint/no-unsafe-argument": "error",
|
|
19
|
+
"@typescript-eslint/no-unsafe-assignment": "error",
|
|
20
|
+
"@typescript-eslint/no-unsafe-call": "error",
|
|
21
|
+
"@typescript-eslint/no-unsafe-enum-comparison": "error",
|
|
22
|
+
"@typescript-eslint/no-unsafe-member-access": "error",
|
|
23
|
+
"@typescript-eslint/no-unsafe-return": "error",
|
|
24
|
+
"@typescript-eslint/no-unsafe-unary-minus": "error",
|
|
25
|
+
"no-throw-literal": "off",
|
|
26
|
+
"@typescript-eslint/only-throw-error": "error",
|
|
27
|
+
"prefer-promise-reject-errors": "off",
|
|
28
|
+
"@typescript-eslint/prefer-promise-reject-errors": "error",
|
|
29
|
+
"require-await": "off",
|
|
30
|
+
"@typescript-eslint/require-await": "error",
|
|
31
|
+
"@typescript-eslint/restrict-plus-operands": "error",
|
|
32
|
+
"@typescript-eslint/restrict-template-expressions": "error",
|
|
33
|
+
"@typescript-eslint/unbound-method": "error",
|
|
34
|
+
},
|
|
35
|
+
});
|
|
File without changes
|