@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.
@@ -13,3 +13,8 @@ jobs:
13
13
  bun-version: latest
14
14
  - run: make deps
15
15
  - run: make lint
16
+ - run: make codegen.dts
17
+ - name: Ensure type definition is up-to-date
18
+ run: |
19
+ git add --intent-to-add .
20
+ git diff --exit-code --stat
package/Makefile CHANGED
@@ -9,4 +9,8 @@ lint: deps PHONY
9
9
  lint.fix: deps PHONY
10
10
  $(biome) check --write .
11
11
 
12
+ codegen.dts: deps PHONY
13
+ bunx tsup src/eslint/index.js --dts-only --format esm --out-dir src/eslint
14
+ $(biome) check --write src/**/*.d.ts
15
+
12
16
  PHONY:
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Biome
4
4
 
5
- [biome.shared.json](./biome.shared.json)
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
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3
- "extends": ["./biome.shared.json"]
3
+ "extends": ["./src/biome/index.json"]
4
4
  }
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.0.0",
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.shared.json"
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
- "typescript": "^5.0.0"
19
+ "eslint": "^9.18.0",
20
+ "typescript": "^5.0.0",
21
+ "typescript-eslint": "^8.20.0"
18
22
  }
19
23
  }
@@ -0,0 +1,5 @@
1
+ import type * as _typescript_eslint_utils_ts_eslint from "@typescript-eslint/utils/ts-eslint";
2
+
3
+ declare const typescriptWithBiome: _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
4
+
5
+ export { typescriptWithBiome };
@@ -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