@yoshinani/style-guide 1.0.0 → 1.0.1

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/eslint/base.mjs CHANGED
@@ -2,13 +2,14 @@
2
2
 
3
3
  import eslint from "@eslint/js"
4
4
  import comments from "@eslint-community/eslint-plugin-eslint-comments"
5
+ import { defineConfig } from "eslint/config"
5
6
  import eslintConfigPrettier from "eslint-config-prettier/flat"
6
7
  import functional from "eslint-plugin-functional"
7
8
  import * as importPlugin from "eslint-plugin-import"
8
9
  import noBarrelFiles from "eslint-plugin-no-barrel-files"
9
10
  import tseslint from "typescript-eslint"
10
11
 
11
- export default tseslint.config(
12
+ export default defineConfig(
12
13
  eslint.configs.recommended,
13
14
  tseslint.configs.recommendedTypeChecked,
14
15
  eslintConfigPrettier,
@@ -22,7 +23,9 @@ export default tseslint.config(
22
23
  import: importPlugin,
23
24
  functional,
24
25
  "@eslint-community/eslint-comments": comments,
25
- "no-barrel-files": noBarrelFiles,
26
+ "no-barrel-files": /** @type {import("eslint").ESLint.Plugin} */ (
27
+ noBarrelFiles
28
+ ),
26
29
  },
27
30
  languageOptions: {
28
31
  parserOptions: {
@@ -32,8 +35,6 @@ export default tseslint.config(
32
35
  },
33
36
  rules: {
34
37
  "functional/immutable-data": "error",
35
- // [barrel exportを禁止](https://github.com/art0rz/eslint-plugin-no-barrel-files)
36
- "no-barrel-files/no-barrel-files": "error",
37
38
  // [比較演算子禁止](https://www.notion.so/yoshinani-note/1dff5577f5838145acfcca9176913b79)
38
39
  eqeqeq: [
39
40
  "error",
@@ -1,10 +1,11 @@
1
1
  // @ts-check
2
2
 
3
+ import { defineConfig } from "eslint/config"
3
4
  import globals from "globals"
4
5
 
5
6
  import base from "./base.mjs"
6
7
 
7
- const eslintConfig = [
8
+ export default defineConfig([
8
9
  ...base,
9
10
  {
10
11
  languageOptions: {
@@ -15,6 +16,4 @@ const eslintConfig = [
15
16
  },
16
17
  ignores: ["node_modules/", "dist/", "*.js"],
17
18
  },
18
- ]
19
-
20
- export default eslintConfig
19
+ ])
package/eslint/next.mjs CHANGED
@@ -1,12 +1,13 @@
1
1
  // @ts-check
2
2
 
3
+ import { defineConfig } from "eslint/config"
3
4
  import globals from "globals"
4
5
 
5
6
  import base from "./base.mjs"
6
7
  import react from "./rules/react.mjs"
7
8
  import reactHooks from "./rules/react-hooks.mjs"
8
9
 
9
- const eslintConfig = [
10
+ export default defineConfig([
10
11
  ...base,
11
12
  react,
12
13
  reactHooks,
@@ -20,6 +21,4 @@ const eslintConfig = [
20
21
  },
21
22
  ignores: ["node_modules/", "dist/"],
22
23
  },
23
- ]
24
-
25
- export default eslintConfig
24
+ ])
@@ -1,12 +1,13 @@
1
1
  // @ts-check
2
2
 
3
+ import { defineConfig } from "eslint/config"
3
4
  import globals from "globals"
4
5
 
5
6
  import base from "./base.mjs"
6
7
  import react from "./rules/react.mjs"
7
8
  import reactHooks from "./rules/react-hooks.mjs"
8
9
 
9
- const eslintConfig = [
10
+ export default defineConfig([
10
11
  ...base,
11
12
  react,
12
13
  reactHooks,
@@ -20,6 +21,4 @@ const eslintConfig = [
20
21
  },
21
22
  ignores: ["node_modules/", "dist/", "*.js"],
22
23
  },
23
- ]
24
-
25
- export default eslintConfig
24
+ ])
@@ -2,7 +2,7 @@
2
2
 
3
3
  import reactHooks from "eslint-plugin-react-hooks"
4
4
 
5
- export default {
5
+ export default /** @type {import("eslint").Linter.Config} */ ({
6
6
  name: "react-hooks",
7
7
  plugins: {
8
8
  "react-hooks": reactHooks,
@@ -10,4 +10,4 @@ export default {
10
10
  rules: {
11
11
  ...reactHooks.configs["recommended-latest"].rules,
12
12
  },
13
- }
13
+ })
@@ -2,7 +2,7 @@
2
2
 
3
3
  import react from "eslint-plugin-react"
4
4
 
5
- export default {
5
+ export default /** @type {import("eslint").Linter.Config} */ ({
6
6
  name: "react",
7
7
  files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
8
8
  settings: {
@@ -24,4 +24,4 @@ export default {
24
24
  // prop-typesを使用しない
25
25
  "react/prop-types": "off",
26
26
  },
27
- }
27
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoshinani/style-guide",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "YOSHINANI's Style Guide",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,25 +36,28 @@
36
36
  "typescript"
37
37
  ],
38
38
  "dependencies": {
39
- "@commitlint/config-conventional": "^20.3.1",
40
- "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
41
- "@eslint/js": "^9.31.0",
39
+ "@commitlint/config-conventional": "^20.5.3",
40
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
41
+ "@eslint/js": "^9.39.4",
42
42
  "eslint-config-prettier": "^10.1.8",
43
- "eslint-import-resolver-typescript": "^3.6.1",
44
- "eslint-plugin-better-tailwindcss": "^3.7.9",
45
- "eslint-plugin-functional": "^9.0.2",
43
+ "eslint-import-resolver-typescript": "^3.10.1",
44
+ "eslint-plugin-better-tailwindcss": "^3.8.0",
45
+ "eslint-plugin-functional": "^9.0.5",
46
46
  "eslint-plugin-import": "^2.32.0",
47
47
  "eslint-plugin-no-barrel-files": "^1.3.1",
48
48
  "eslint-plugin-react": "^7.37.5",
49
49
  "eslint-plugin-react-hooks": "^5.2.0",
50
- "globals": "^16.3.0",
51
- "typescript-eslint": "^8.38.0"
50
+ "globals": "^16.5.0",
51
+ "typescript-eslint": "^8.61.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@biomejs/biome": "^2.3.2",
55
- "@changesets/cli": "^2.29.5",
56
- "@commitlint/cli": "^20.3.1",
57
- "husky": "^9.1.7"
54
+ "@biomejs/biome": "^2.4.16",
55
+ "@changesets/cli": "^2.31.0",
56
+ "@commitlint/cli": "^20.5.3",
57
+ "eslint": "9.31.0",
58
+ "husky": "^9.1.7",
59
+ "typescript": "5.9.3",
60
+ "vitest": "3.2.6"
58
61
  },
59
62
  "peerDependencies": {
60
63
  "@biomejs/biome": "^2",
@@ -65,6 +68,8 @@
65
68
  "scripts": {
66
69
  "release": "changeset publish",
67
70
  "check": "biome check .",
68
- "check:fix": "biome check --write ."
71
+ "check:fix": "biome check --write .",
72
+ "test": "vitest run",
73
+ "typecheck": "tsc --noEmit"
69
74
  }
70
75
  }