@book000/eslint-config 1.8.81 → 1.9.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/index.mjs +2 -1
- package/package.json +3 -3
- package/test.mjs +6 -0
package/index.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @ts-check
|
|
2
1
|
import { FlatCompat } from "@eslint/eslintrc";
|
|
3
2
|
import tseslintParser from "@typescript-eslint/parser";
|
|
4
3
|
import eslintPrettier from "eslint-config-prettier";
|
|
@@ -74,6 +73,8 @@ export default tseslint.config(
|
|
|
74
73
|
"unicorn/prevent-abbreviations": "off",
|
|
75
74
|
// nullを許可する
|
|
76
75
|
"unicorn/no-null": "off",
|
|
76
|
+
// 無駄なundefinedを許可する
|
|
77
|
+
"unicorn/no-useless-undefined": "off",
|
|
77
78
|
},
|
|
78
79
|
},
|
|
79
80
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@book000/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "ESLint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config"
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@eslint/eslintrc": "3.3.1",
|
|
21
|
-
"@typescript-eslint/parser": "8.
|
|
21
|
+
"@typescript-eslint/parser": "8.33.1",
|
|
22
22
|
"eslint-config-prettier": "10.1.5",
|
|
23
23
|
"eslint-plugin-import": "2.31.0",
|
|
24
24
|
"eslint-plugin-n": "17.19.0",
|
|
25
25
|
"eslint-plugin-promise": "7.2.1",
|
|
26
26
|
"eslint-plugin-unicorn": "59.0.1",
|
|
27
27
|
"globals": "16.2.0",
|
|
28
|
-
"typescript-eslint": "8.
|
|
28
|
+
"typescript-eslint": "8.33.1"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"eslint": "9.28.0",
|
package/test.mjs
CHANGED
|
@@ -149,6 +149,12 @@ async function main() {
|
|
|
149
149
|
shouldError: false,
|
|
150
150
|
rules: ["@typescript-eslint/no-extraneous-class"],
|
|
151
151
|
},
|
|
152
|
+
{
|
|
153
|
+
name: "no-useless-undefined: 無駄なundefinedはOK",
|
|
154
|
+
code: "function f(x = undefined) { return undefined; }",
|
|
155
|
+
shouldError: false,
|
|
156
|
+
rules: ["unicorn/no-useless-undefined"],
|
|
157
|
+
},
|
|
152
158
|
];
|
|
153
159
|
|
|
154
160
|
// テスト用一時ファイルをsrc/配下に作成することで、flat configのfiles: ["**/*.ts"]に確実にマッチさせる
|