@book000/eslint-config 1.8.82 → 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.
Files changed (3) hide show
  1. package/index.mjs +2 -1
  2. package/package.json +1 -1
  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.8.82",
3
+ "version": "1.9.0",
4
4
  "description": "ESLint config",
5
5
  "keywords": [
6
6
  "eslint-config"
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"]に確実にマッチさせる