eslint-config-moneyforward 5.0.2 → 5.1.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/README.md +4 -4
- package/configs/flat/storybook.mjs +4 -0
- package/package.json +24 -20
- package/rules/storybook.js +4 -0
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# eslint-config-moneyforward
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/eslint-config-moneyforward?activeTab=versions)
|
|
4
|
-
[](https://github.com/moneyforward/frontend-tools/blob/main/packages/eslint-config/LICENSE)
|
|
5
5
|
|
|
6
6
|
This package provides moneyforward's `.eslintrc` as an extensible shared config.
|
|
7
7
|
|
|
@@ -112,7 +112,7 @@ We also provide various other rule sets that you can configure to suit your proj
|
|
|
112
112
|
| `next` | Contains Next.js recommended rules | [`@next/eslint-plugin-next`](https://github.com/vercel/next.js/tree/canary/packages/eslint-plugin-next) |
|
|
113
113
|
| `node` | Contains Node.js recommended rules | [`eslint-plugin-n`](https://github.com/eslint-community/eslint-plugin-n) |
|
|
114
114
|
| `react` | Contains React recommended rules | [`eslint-plugin-jsx-a11y`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) <br> [`eslint-plugin-react-hooks`](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks) <br> [`eslint-plugin-react`](https://github.com/jsx-eslint/eslint-plugin-react) |
|
|
115
|
-
| `storybook` | Contains Storybook recommended rules | [`eslint-plugin-storybook`](https://github.com/storybookjs/eslint-plugin
|
|
115
|
+
| `storybook` | Contains Storybook recommended rules | [`eslint-plugin-storybook`](https://github.com/storybookjs/storybook/tree/next/code/lib/eslint-plugin) |
|
|
116
116
|
| `test/react` | Contains Jest and React Testing Library rules | [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest) <br> [`eslint-plugin-jest-dom`](https://github.com/testing-library/eslint-plugin-jest-dom) <br> [`eslint-plugin-testing-library`](https://github.com/testing-library/eslint-plugin-testing-library) |
|
|
117
117
|
| `typescript` | Contains TypeScript recommended rules | [`@eslint-typescript/eslint-plugin`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin) <br> [`@eslint-typescript/parser`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser) |
|
|
118
118
|
|
|
@@ -180,8 +180,8 @@ npm uninstall eslint-plugin-promise eslint-plugin-import eslint-plugin-unicorn \
|
|
|
180
180
|
|
|
181
181
|
## Troubleshooting
|
|
182
182
|
|
|
183
|
-
- [ESLint Configuration Issue with Non-Standard TSConfig Filenames in Flat Config](https://github.com/moneyforward/
|
|
183
|
+
- [ESLint Configuration Issue with Non-Standard TSConfig Filenames in Flat Config](https://github.com/moneyforward/frontend-tools/blob/main/packages/eslint-config/docs/troubleshooting/eslint-configuration-issue-with-non-standard-tsconfig-filenames-in-flat-config.md)
|
|
184
184
|
|
|
185
185
|
## License
|
|
186
186
|
|
|
187
|
-
Open source [licensed as MIT](https://github.com/moneyforward/
|
|
187
|
+
Open source [licensed as MIT](https://github.com/moneyforward/frontend-tools/blob/main/packages/eslint-config/LICENSE).
|
|
@@ -21,6 +21,10 @@ export default [
|
|
|
21
21
|
],
|
|
22
22
|
rules: {
|
|
23
23
|
'import/no-default-export': ['off'],
|
|
24
|
+
|
|
25
|
+
// Turn off this rule because type definitions such as `Meta` and `StoryObj` need to be imported from `@storybook/react`.
|
|
26
|
+
// https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/no-renderer-packages.md
|
|
27
|
+
'storybook/no-renderer-packages': ['off'],
|
|
24
28
|
},
|
|
25
29
|
},
|
|
26
30
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-moneyforward",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"description": "Money Forward's ESLint rules as an extensible shared config.",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./flat": {
|
|
@@ -23,27 +23,36 @@
|
|
|
23
23
|
"rules"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
|
-
"lint": "eslint
|
|
27
|
-
"lint:fix": "eslint --fix && prettier --write .",
|
|
26
|
+
"lint": "eslint './**/*.@(js|ts|tsx)'",
|
|
28
27
|
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest",
|
|
29
28
|
"release": "semantic-release"
|
|
30
29
|
},
|
|
31
30
|
"repository": {
|
|
32
31
|
"type": "git",
|
|
33
|
-
"url": "
|
|
32
|
+
"url": "https://github.com/moneyforward/frontend-tools.git",
|
|
33
|
+
"directory": "packages/eslint-config"
|
|
34
34
|
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"eslint",
|
|
37
|
+
"eslint-config",
|
|
38
|
+
"flat-config",
|
|
39
|
+
"flatconfig",
|
|
40
|
+
"flatConfig",
|
|
41
|
+
"lint",
|
|
42
|
+
"typescript"
|
|
43
|
+
],
|
|
35
44
|
"author": "Money Forward Engineers",
|
|
36
45
|
"license": "MIT",
|
|
37
46
|
"bugs": {
|
|
38
|
-
"url": "https://github.com/moneyforward/
|
|
47
|
+
"url": "https://github.com/moneyforward/frontend-tools/issues"
|
|
39
48
|
},
|
|
40
|
-
"homepage": "https://github.com/moneyforward/eslint-config
|
|
49
|
+
"homepage": "https://github.com/moneyforward/frontend-tools/tree/main/packages/eslint-config#readme",
|
|
41
50
|
"dependencies": {
|
|
42
51
|
"@next/eslint-plugin-next": "^15.0.3",
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
44
|
-
"@typescript-eslint/parser": "^8.
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^8.24.0",
|
|
53
|
+
"@typescript-eslint/parser": "^8.24.0",
|
|
45
54
|
"confusing-browser-globals": "^1.0.11",
|
|
46
|
-
"eslint-import-resolver-typescript": "^
|
|
55
|
+
"eslint-import-resolver-typescript": "^4.0.0",
|
|
47
56
|
"eslint-plugin-import": "^2.31.0",
|
|
48
57
|
"eslint-plugin-jest": "^28.9.0",
|
|
49
58
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
@@ -53,23 +62,18 @@
|
|
|
53
62
|
"eslint-plugin-promise": "^7.2.1",
|
|
54
63
|
"eslint-plugin-react": "^7.37.2",
|
|
55
64
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
56
|
-
"eslint-plugin-storybook": "^0.
|
|
65
|
+
"eslint-plugin-storybook": "^9.0.4",
|
|
57
66
|
"eslint-plugin-testing-library": "^7.0.0",
|
|
58
67
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
59
68
|
"globals": "^15.11.0",
|
|
60
|
-
"typescript-eslint": "^8.
|
|
69
|
+
"typescript-eslint": "^8.24.0"
|
|
61
70
|
},
|
|
62
71
|
"devDependencies": {
|
|
63
|
-
"@
|
|
64
|
-
"
|
|
65
|
-
"conventional-changelog-conventionalcommits": "8.0.0",
|
|
66
|
-
"eslint": "9.16.0",
|
|
67
|
-
"eslint-config-prettier": "9.1.0",
|
|
72
|
+
"@frontend-tools/release-config": "workspace:*",
|
|
73
|
+
"eslint": "9.28.0",
|
|
68
74
|
"jest": "29.7.0",
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"semantic-release": "24.2.1",
|
|
72
|
-
"typescript": "5.7.3"
|
|
75
|
+
"semantic-release": "24.2.5",
|
|
76
|
+
"typescript": "5.8.3"
|
|
73
77
|
},
|
|
74
78
|
"peerDependencies": {
|
|
75
79
|
"eslint": "^8.57.0 || ^9.0.0",
|
package/rules/storybook.js
CHANGED
|
@@ -2,6 +2,10 @@ module.exports = {
|
|
|
2
2
|
plugins: ['storybook'],
|
|
3
3
|
extends: ['plugin:storybook/recommended'],
|
|
4
4
|
rules: {
|
|
5
|
+
// Turn off this rule because type definitions such as `Meta` and `StoryObj` need to be imported from `@storybook/react`.
|
|
6
|
+
// https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/no-renderer-packages.md
|
|
7
|
+
'storybook/no-renderer-packages': ['off'],
|
|
8
|
+
|
|
5
9
|
// `storiesOf` is deprecated and should not be used
|
|
6
10
|
// https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/no-stories-of.md
|
|
7
11
|
// Since Storybook 5.2, the CSF format was introduced and the storiesOf API has been deprecated.
|