From 3933f3c2407e97d63c6f32d1e2cb7a430e6dec31 Mon Sep 17 00:00:00 2001 From: wakamsha Date: Mon, 2 Dec 2024 15:11:58 +0900 Subject: [PATCH 1/5] feat: Update eslint-plugin-storybook version --- package-lock.json | 391 +++++++++++++++++++++------------------------- package.json | 2 +- 2 files changed, 180 insertions(+), 213 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6e04938..f36e058 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "eslint-plugin-promise": "^7.2.1", "eslint-plugin-react": "^7.37.2", "eslint-plugin-react-hooks": "^5.0.0", - "eslint-plugin-storybook": "^0.8.0", + "eslint-plugin-storybook": "^0.11.1", "eslint-plugin-testing-library": "^7.0.0", "eslint-plugin-unicorn": "^56.0.0", "globals": "^15.11.0" @@ -2242,11 +2242,24 @@ } }, "node_modules/@storybook/csf": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@storybook/csf/-/csf-0.0.1.tgz", - "integrity": "sha512-USTLkZze5gkel8MYCujSRBVIrUQ3YPBrLOx7GNk/0wttvVtlzWXAq9eLbQ4p/NicGxP+3T7KPEMVV//g+yubpw==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/@storybook/csf/-/csf-0.1.12.tgz", + "integrity": "sha512-9/exVhabisyIVL0VxTCxo01Tdm8wefIXKXfltAPTSr8cbLn5JAxGQ6QV3mjdecLGEOucfoVhAKtJfVHxEK1iqw==", + "license": "MIT", "dependencies": { - "lodash": "^4.17.15" + "type-fest": "^2.19.0" + } + }, + "node_modules/@storybook/csf/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@types/babel__core": { @@ -2323,11 +2336,6 @@ "@types/istanbul-lib-report": "*" } }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" - }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -2351,7 +2359,8 @@ "node_modules/@types/semver": { "version": "7.5.7", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz", - "integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==" + "integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==", + "dev": true }, "node_modules/@types/stack-utils": { "version": "2.0.3", @@ -2662,22 +2671,6 @@ "node": ">=10" } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@typescript-eslint/type-utils": { "version": "7.10.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.10.0.tgz", @@ -2829,165 +2822,6 @@ "node": ">=10" } }, - "node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -5400,13 +5234,13 @@ } }, "node_modules/eslint-plugin-storybook": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-0.8.0.tgz", - "integrity": "sha512-CZeVO5EzmPY7qghO2t64oaFM+8FTaD4uzOEjHKp516exyTKo+skKAL9GI3QALS2BXhyALJjNtwbmr1XinGE8bA==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-0.11.1.tgz", + "integrity": "sha512-yGKpAYkBm/Q2hZg476vRUAvd9lAccjjSvzU5nYy3BSQbKTPy7uopx7JEpwk2vSuw4weTMZzWF64z9/gp/K5RCg==", + "license": "MIT", "dependencies": { - "@storybook/csf": "^0.0.1", - "@typescript-eslint/utils": "^5.62.0", - "requireindex": "^1.2.0", + "@storybook/csf": "^0.1.11", + "@typescript-eslint/utils": "^8.8.1", "ts-dedent": "^2.2.0" }, "engines": { @@ -5416,6 +5250,156 @@ "eslint": ">=6" } }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/scope-manager": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.16.0.tgz", + "integrity": "sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/visitor-keys": "8.16.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/types": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.16.0.tgz", + "integrity": "sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==", + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.16.0.tgz", + "integrity": "sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==", + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/visitor-keys": "8.16.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/utils": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.16.0.tgz", + "integrity": "sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==", + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.16.0", + "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/typescript-estree": "8.16.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.16.0.tgz", + "integrity": "sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.16.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/eslint-plugin-testing-library": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-7.0.0.tgz", @@ -8011,7 +7995,8 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true }, "node_modules/lodash-es": { "version": "4.17.21", @@ -13642,6 +13627,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", "integrity": "sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==", + "license": "MIT", "engines": { "node": ">=6.10" } @@ -13685,25 +13671,6 @@ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index f90b161..50de944 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "eslint-plugin-promise": "^7.2.1", "eslint-plugin-react": "^7.37.2", "eslint-plugin-react-hooks": "^5.0.0", - "eslint-plugin-storybook": "^0.8.0", + "eslint-plugin-storybook": "^0.11.1", "eslint-plugin-testing-library": "^7.0.0", "eslint-plugin-unicorn": "^56.0.0", "globals": "^15.11.0" From 27fb55443b9c2094719affb87e23129b72faf8f6 Mon Sep 17 00:00:00 2001 From: wakamsha Date: Mon, 2 Dec 2024 18:30:33 +0900 Subject: [PATCH 2/5] update snapshot --- .../next/__snapshots__/snapshot.test.js.snap | 14 -- .../node/__snapshots__/snapshot.test.js.snap | 14 -- .../react/__snapshots__/snapshot.test.js.snap | 14 -- .../__snapshots__/snapshot.test.js.snap | 14 -- .../next/__snapshots__/snapshot.test.js.snap | 139 ++++++++++++++++- .../node/__snapshots__/snapshot.test.js.snap | 145 +++++++++++++++++- .../react/__snapshots__/snapshot.test.js.snap | 139 ++++++++++++++++- .../__snapshots__/snapshot.test.js.snap | 139 ++++++++++++++++- 8 files changed, 553 insertions(+), 65 deletions(-) diff --git a/tests/snapshot-test/eslintrc/next/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/eslintrc/next/__snapshots__/snapshot.test.js.snap index e2cb099..1e97dea 100644 --- a/tests/snapshot-test/eslintrc/next/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/eslintrc/next/__snapshots__/snapshot.test.js.snap @@ -290,7 +290,6 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, - "enforceForJSX": false, }, ], "@typescript-eslint/no-unused-vars": [ @@ -406,8 +405,6 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` 2, { "allowImplicit": true, - "allowVoid": false, - "checkForEach": false, }, ], "arrow-body-style": [ @@ -428,8 +425,6 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` 0, { "ignoreDestructuring": false, - "ignoreGlobals": false, - "ignoreImports": false, "properties": "never", }, ], @@ -452,7 +447,6 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` "class-methods-use-this": [ 2, { - "enforceForClassFields": true, "exceptMethods": [], }, ], @@ -1323,7 +1317,6 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` ], "newIsCap": true, "newIsCapExceptions": [], - "properties": true, }, ], "no-alert": [ @@ -1478,7 +1471,6 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` { "allow": [], "boolean": false, - "disallowTemplateShorthand": false, "number": true, "string": true, }, @@ -2008,11 +2000,6 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` "allow": [], "allowAfterSuper": false, "allowAfterThis": false, - "allowAfterThisConstructor": false, - "allowFunctionParams": true, - "allowInArrayDestructuring": true, - "allowInObjectDestructuring": true, - "enforceInClassFields": false, "enforceInMethodNames": true, }, ], @@ -2055,7 +2042,6 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, - "enforceForJSX": false, }, ], "no-unused-labels": [ diff --git a/tests/snapshot-test/eslintrc/node/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/eslintrc/node/__snapshots__/snapshot.test.js.snap index 411803b..e8b87c9 100644 --- a/tests/snapshot-test/eslintrc/node/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/eslintrc/node/__snapshots__/snapshot.test.js.snap @@ -14,8 +14,6 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` 2, { "allowImplicit": true, - "allowVoid": false, - "checkForEach": false, }, ], "arrow-body-style": [ @@ -36,8 +34,6 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` 2, { "ignoreDestructuring": false, - "ignoreGlobals": false, - "ignoreImports": false, "properties": "never", }, ], @@ -60,7 +56,6 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` "class-methods-use-this": [ 2, { - "enforceForClassFields": true, "exceptMethods": [], }, ], @@ -94,7 +89,6 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` 2, { "allowKeywords": true, - "allowPattern": "", }, ], "eqeqeq": [ @@ -476,7 +470,6 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` ], "newIsCap": true, "newIsCapExceptions": [], - "properties": true, }, ], "no-alert": [ @@ -631,7 +624,6 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` { "allow": [], "boolean": false, - "disallowTemplateShorthand": false, "number": true, "string": true, }, @@ -1155,11 +1147,6 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` "allow": [], "allowAfterSuper": false, "allowAfterThis": false, - "allowAfterThisConstructor": false, - "allowFunctionParams": true, - "allowInArrayDestructuring": true, - "allowInObjectDestructuring": true, - "enforceInClassFields": false, "enforceInMethodNames": true, }, ], @@ -1202,7 +1189,6 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, - "enforceForJSX": false, }, ], "no-unused-labels": [ diff --git a/tests/snapshot-test/eslintrc/react/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/eslintrc/react/__snapshots__/snapshot.test.js.snap index a6d3fd1..59b0614 100644 --- a/tests/snapshot-test/eslintrc/react/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/eslintrc/react/__snapshots__/snapshot.test.js.snap @@ -227,7 +227,6 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, - "enforceForJSX": false, }, ], "@typescript-eslint/no-unused-vars": [ @@ -343,8 +342,6 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` 2, { "allowImplicit": true, - "allowVoid": false, - "checkForEach": false, }, ], "arrow-body-style": [ @@ -365,8 +362,6 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` 0, { "ignoreDestructuring": false, - "ignoreGlobals": false, - "ignoreImports": false, "properties": "never", }, ], @@ -389,7 +384,6 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` "class-methods-use-this": [ 2, { - "enforceForClassFields": true, "exceptMethods": [], }, ], @@ -1260,7 +1254,6 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` ], "newIsCap": true, "newIsCapExceptions": [], - "properties": true, }, ], "no-alert": [ @@ -1415,7 +1408,6 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` { "allow": [], "boolean": false, - "disallowTemplateShorthand": false, "number": true, "string": true, }, @@ -1945,11 +1937,6 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` "allow": [], "allowAfterSuper": false, "allowAfterThis": false, - "allowAfterThisConstructor": false, - "allowFunctionParams": true, - "allowInArrayDestructuring": true, - "allowInObjectDestructuring": true, - "enforceInClassFields": false, "enforceInMethodNames": true, }, ], @@ -1992,7 +1979,6 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, - "enforceForJSX": false, }, ], "no-unused-labels": [ diff --git a/tests/snapshot-test/eslintrc/storybook/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/eslintrc/storybook/__snapshots__/snapshot.test.js.snap index 5505acc..439e379 100644 --- a/tests/snapshot-test/eslintrc/storybook/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/eslintrc/storybook/__snapshots__/snapshot.test.js.snap @@ -227,7 +227,6 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, - "enforceForJSX": false, }, ], "@typescript-eslint/no-unused-vars": [ @@ -343,8 +342,6 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` 2, { "allowImplicit": true, - "allowVoid": false, - "checkForEach": false, }, ], "arrow-body-style": [ @@ -365,8 +362,6 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` 0, { "ignoreDestructuring": false, - "ignoreGlobals": false, - "ignoreImports": false, "properties": "never", }, ], @@ -389,7 +384,6 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` "class-methods-use-this": [ 2, { - "enforceForClassFields": true, "exceptMethods": [], }, ], @@ -1017,7 +1011,6 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` ], "newIsCap": true, "newIsCapExceptions": [], - "properties": true, }, ], "no-alert": [ @@ -1172,7 +1165,6 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` { "allow": [], "boolean": false, - "disallowTemplateShorthand": false, "number": true, "string": true, }, @@ -1702,11 +1694,6 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` "allow": [], "allowAfterSuper": false, "allowAfterThis": false, - "allowAfterThisConstructor": false, - "allowFunctionParams": true, - "allowInArrayDestructuring": true, - "allowInObjectDestructuring": true, - "enforceInClassFields": false, "enforceInMethodNames": true, }, ], @@ -1749,7 +1736,6 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, - "enforceForJSX": false, }, ], "no-unused-labels": [ diff --git a/tests/snapshot-test/flat/next/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/flat/next/__snapshots__/snapshot.test.js.snap index 9b2236a..f284e4e 100644 --- a/tests/snapshot-test/flat/next/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/flat/next/__snapshots__/snapshot.test.js.snap @@ -3,7 +3,7 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` { "languageOptions": { - "ecmaVersion": "latest", + "ecmaVersion": 2025, "globals": { "AggregateError": false, "Array": false, @@ -372,7 +372,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, - "enforceForJSX": false, }, ], "@typescript-eslint/no-unused-vars": [ @@ -479,6 +478,11 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "accessor-pairs": [ 0, + { + "enforceForClassMembers": true, + "getWithoutSet": false, + "setWithoutGet": true, + }, ], "array-bracket-newline": [ 0, @@ -509,7 +513,10 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` "camelcase": [ 0, { + "allow": [], "ignoreDestructuring": false, + "ignoreGlobals": false, + "ignoreImports": false, "properties": "never", }, ], @@ -542,9 +549,13 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "consistent-return": [ 0, + { + "treatUndefinedAsUnspecified": false, + }, ], "consistent-this": [ 0, + "that", ], "constructor-super": [ 0, @@ -555,6 +566,7 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "default-case": [ 0, + {}, ], "default-case-last": [ 2, @@ -566,6 +578,7 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` 0, { "allowKeywords": true, + "allowPattern": "", }, ], "eqeqeq": [ @@ -589,10 +602,15 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` "func-names": [ 2, "as-needed", + {}, ], "func-style": [ 0, "expression", + { + "allowArrowFunctions": false, + "overrides": {}, + }, ], "getter-return": [ 0, @@ -602,6 +620,7 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "grouped-accessor-pairs": [ 2, + "anyOrder", ], "guard-for-in": [ 2, @@ -611,9 +630,22 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "id-length": [ 0, + { + "exceptionPatterns": [], + "exceptions": [], + "min": 2, + "properties": "always", + }, ], "id-match": [ 0, + "^.+$", + { + "classFields": false, + "ignoreDestructuring": false, + "onlyDeclarations": false, + "properties": false, + }, ], "import/consistent-type-specifier-style": [ 2, @@ -1405,6 +1437,10 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-bitwise": [ 2, + { + "allow": [], + "int32Hint": false, + }, ], "no-caller": [ 2, @@ -1439,6 +1475,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-constant-condition": [ 2, + { + "checkLoops": "allExceptWhileTrue", + }, ], "no-constructor-return": [ 2, @@ -1475,6 +1514,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-duplicate-imports": [ 0, + { + "includeExports": false, + }, ], "no-else-return": [ 2, @@ -1484,6 +1526,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-empty": [ 2, + { + "allowEmptyCatch": false, + }, ], "no-empty-character-class": [ 2, @@ -1501,6 +1546,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-empty-pattern": [ 2, + { + "allowObjectPatternsAsParameters": false, + }, ], "no-empty-static-block": [ 2, @@ -1510,24 +1558,35 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-eval": [ 2, + { + "allowIndirect": false, + }, ], "no-ex-assign": [ 2, ], "no-extend-native": [ 2, + { + "exceptions": [], + }, ], "no-extra-bind": [ 2, ], "no-extra-boolean-cast": [ 2, + {}, ], "no-extra-label": [ 2, ], "no-fallthrough": [ 2, + { + "allowEmptyCase": false, + "reportUnusedFallthroughComment": false, + }, ], "no-func-assign": [ 0, @@ -1550,6 +1609,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-implicit-globals": [ 2, + { + "lexicalBindings": false, + }, ], "no-implied-eval": [ 0, @@ -1559,18 +1621,34 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-inline-comments": [ 0, + {}, ], "no-inner-declarations": [ 2, + "functions", + { + "blockScopedFunctions": "allow", + }, ], "no-invalid-regexp": [ 2, + {}, ], "no-invalid-this": [ 2, + { + "capIsConstructor": true, + }, ], "no-irregular-whitespace": [ 2, + { + "skipComments": false, + "skipJSXText": false, + "skipRegExps": false, + "skipStrings": true, + "skipTemplates": false, + }, ], "no-iterator": [ 2, @@ -1611,6 +1689,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-multi-assign": [ 2, + { + "ignoreNonDeclaration": false, + }, ], "no-multi-str": [ 2, @@ -1678,6 +1759,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-promise-executor-return": [ 2, + { + "allowVoid": false, + }, ], "no-proto": [ 2, @@ -1687,6 +1771,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-redeclare": [ 0, + { + "builtinGlobals": true, + }, ], "no-regex-spaces": [ 2, @@ -2033,12 +2120,21 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-sequences": [ 2, + { + "allowInParentheses": true, + }, ], "no-setter-return": [ 0, ], "no-shadow": [ 0, + { + "allow": [], + "builtinGlobals": false, + "hoist": "functions", + "ignoreOnInitialization": false, + }, ], "no-shadow-restricted-names": [ 2, @@ -2060,6 +2156,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-undef": [ 0, + { + "typeof": false, + }, ], "no-undef-init": [ 2, @@ -2107,6 +2206,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-unsafe-negation": [ 0, + { + "enforceForOrderingRelations": false, + }, ], "no-unsafe-optional-chaining": [ 2, @@ -2120,6 +2222,7 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, + "enforceForJSX": false, }, ], "no-unused-labels": [ @@ -2138,6 +2241,12 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-use-before-define": [ 0, + { + "allowNamedExports": false, + "classes": true, + "functions": true, + "variables": true, + }, ], "no-useless-backreference": [ 2, @@ -2150,6 +2259,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-useless-computed-key": [ 2, + { + "enforceForClassMembers": true, + }, ], "no-useless-concat": [ 2, @@ -2176,6 +2288,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-void": [ 2, + { + "allowAsStatement": false, + }, ], "no-warning-comments": [ 0, @@ -2314,6 +2429,7 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "radix": [ 2, + "always", ], "react-hooks/exhaustive-deps": [ 2, @@ -2770,6 +2886,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "require-atomic-updates": [ 0, + { + "allowProperties": false, + }, ], "require-await": [ 0, @@ -2783,6 +2902,7 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` "sort-imports": [ 0, { + "allowSeparatedGroups": false, "ignoreCase": false, "ignoreDeclarationSort": false, "ignoreMemberSort": false, @@ -2798,12 +2918,18 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` 0, "asc", { + "allowLineSeparatedGroups": false, "caseSensitive": false, + "ignoreComputedKeys": false, + "minKeys": 2, "natural": true, }, ], "sort-vars": [ 0, + { + "ignoreCase": false, + }, ], "symbol-description": [ 2, @@ -3218,6 +3344,10 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "use-isnan": [ 2, + { + "enforceForIndexOf": false, + "enforceForSwitchCase": true, + }, ], "valid-typeof": [ 2, @@ -3230,6 +3360,11 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "yoda": [ 2, + "never", + { + "exceptRange": false, + "onlyEquality": false, + }, ], }, "settings": { diff --git a/tests/snapshot-test/flat/node/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/flat/node/__snapshots__/snapshot.test.js.snap index 900962b..65d7e46 100644 --- a/tests/snapshot-test/flat/node/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/flat/node/__snapshots__/snapshot.test.js.snap @@ -3,7 +3,7 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` { "languageOptions": { - "ecmaVersion": "latest", + "ecmaVersion": 2025, "globals": { "AggregateError": false, "Array": false, @@ -102,6 +102,7 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "FunctionExpression": "FunctionExpression", "Identifier": "Identifier", "IfStatement": "IfStatement", + "ImportAttribute": "ImportAttribute", "ImportDeclaration": "ImportDeclaration", "ImportDefaultSpecifier": "ImportDefaultSpecifier", "ImportExpression": "ImportExpression", @@ -236,6 +237,7 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "ExportAllDeclaration": [ "exported", "source", + "attributes", ], "ExportDefaultDeclaration": [ "declaration", @@ -244,6 +246,7 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "declaration", "specifiers", "source", + "attributes", ], "ExportSpecifier": [ "exported", @@ -284,15 +287,21 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "consequent", "alternate", ], + "ImportAttribute": [ + "key", + "value", + ], "ImportDeclaration": [ "specifiers", "source", + "attributes", ], "ImportDefaultSpecifier": [ "local", ], "ImportExpression": [ "source", + "options", ], "ImportNamespaceSpecifier": [ "local", @@ -454,7 +463,7 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "argument", ], }, - "latestEcmaVersion": 15, + "latestEcmaVersion": 16, "name": "espree", "parse": [Function], "supportedEcmaVersions": [ @@ -470,9 +479,10 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` 13, 14, 15, + 16, ], "tokenize": [Function], - "version": "9.6.1", + "version": "10.3.0", }, "parserOptions": { "ecmaVersion": "latest", @@ -483,6 +493,11 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "rules": { "accessor-pairs": [ 0, + { + "enforceForClassMembers": true, + "getWithoutSet": false, + "setWithoutGet": true, + }, ], "array-bracket-newline": [ 0, @@ -513,6 +528,7 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "camelcase": [ 2, { + "allow": [], "ignoreDestructuring": false, "ignoreGlobals": false, "ignoreImports": false, @@ -548,9 +564,13 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "consistent-return": [ 0, + { + "treatUndefinedAsUnspecified": false, + }, ], "consistent-this": [ 0, + "that", ], "constructor-super": [ 2, @@ -561,6 +581,7 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "default-case": [ 0, + {}, ], "default-case-last": [ 2, @@ -596,10 +617,15 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "func-names": [ 2, "as-needed", + {}, ], "func-style": [ 0, "expression", + { + "allowArrowFunctions": false, + "overrides": {}, + }, ], "getter-return": [ 2, @@ -609,6 +635,7 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "grouped-accessor-pairs": [ 2, + "anyOrder", ], "guard-for-in": [ 2, @@ -618,9 +645,22 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "id-length": [ 0, + { + "exceptionPatterns": [], + "exceptions": [], + "min": 2, + "properties": "always", + }, ], "id-match": [ 0, + "^.+$", + { + "classFields": false, + "ignoreDestructuring": false, + "onlyDeclarations": false, + "properties": false, + }, ], "import/consistent-type-specifier-style": [ 2, @@ -971,6 +1011,10 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-bitwise": [ 2, + { + "allow": [], + "int32Hint": false, + }, ], "no-caller": [ 2, @@ -1005,6 +1049,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-constant-condition": [ 2, + { + "checkLoops": "allExceptWhileTrue", + }, ], "no-constructor-return": [ 2, @@ -1041,6 +1088,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-duplicate-imports": [ 0, + { + "includeExports": false, + }, ], "no-else-return": [ 2, @@ -1050,6 +1100,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-empty": [ 2, + { + "allowEmptyCatch": false, + }, ], "no-empty-character-class": [ 2, @@ -1067,6 +1120,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-empty-pattern": [ 2, + { + "allowObjectPatternsAsParameters": false, + }, ], "no-empty-static-block": [ 2, @@ -1076,24 +1132,35 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-eval": [ 2, + { + "allowIndirect": false, + }, ], "no-ex-assign": [ 2, ], "no-extend-native": [ 2, + { + "exceptions": [], + }, ], "no-extra-bind": [ 2, ], "no-extra-boolean-cast": [ 2, + {}, ], "no-extra-label": [ 2, ], "no-fallthrough": [ 2, + { + "allowEmptyCase": false, + "reportUnusedFallthroughComment": false, + }, ], "no-func-assign": [ 2, @@ -1116,6 +1183,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-implicit-globals": [ 2, + { + "lexicalBindings": false, + }, ], "no-implied-eval": [ 2, @@ -1125,18 +1195,34 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-inline-comments": [ 0, + {}, ], "no-inner-declarations": [ 2, + "functions", + { + "blockScopedFunctions": "allow", + }, ], "no-invalid-regexp": [ 2, + {}, ], "no-invalid-this": [ 2, + { + "capIsConstructor": true, + }, ], "no-irregular-whitespace": [ 2, + { + "skipComments": false, + "skipJSXText": false, + "skipRegExps": false, + "skipStrings": true, + "skipTemplates": false, + }, ], "no-iterator": [ 2, @@ -1177,6 +1263,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-multi-assign": [ 2, + { + "ignoreNonDeclaration": false, + }, ], "no-multi-str": [ 2, @@ -1241,6 +1330,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-promise-executor-return": [ 2, + { + "allowVoid": false, + }, ], "no-proto": [ 2, @@ -1593,12 +1685,21 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-sequences": [ 2, + { + "allowInParentheses": true, + }, ], "no-setter-return": [ 2, ], "no-shadow": [ 0, + { + "allow": [], + "builtinGlobals": false, + "hoist": "functions", + "ignoreOnInitialization": false, + }, ], "no-shadow-restricted-names": [ 2, @@ -1620,6 +1721,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-undef": [ 0, + { + "typeof": false, + }, ], "no-undef-init": [ 2, @@ -1667,6 +1771,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-unsafe-negation": [ 2, + { + "enforceForOrderingRelations": false, + }, ], "no-unsafe-optional-chaining": [ 2, @@ -1699,6 +1806,12 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-use-before-define": [ 0, + { + "allowNamedExports": false, + "classes": true, + "functions": true, + "variables": true, + }, ], "no-useless-backreference": [ 2, @@ -1711,6 +1824,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-useless-computed-key": [ 2, + { + "enforceForClassMembers": true, + }, ], "no-useless-concat": [ 2, @@ -1737,6 +1853,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-void": [ 2, + { + "allowAsStatement": false, + }, ], "no-warning-comments": [ 0, @@ -1875,9 +1994,13 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "radix": [ 2, + "always", ], "require-atomic-updates": [ 0, + { + "allowProperties": false, + }, ], "require-await": [ 0, @@ -1891,6 +2014,7 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "sort-imports": [ 0, { + "allowSeparatedGroups": false, "ignoreCase": false, "ignoreDeclarationSort": false, "ignoreMemberSort": false, @@ -1906,12 +2030,18 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` 0, "asc", { + "allowLineSeparatedGroups": false, "caseSensitive": false, + "ignoreComputedKeys": false, + "minKeys": 2, "natural": true, }, ], "sort-vars": [ 0, + { + "ignoreCase": false, + }, ], "symbol-description": [ 2, @@ -2326,6 +2456,10 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "use-isnan": [ 2, + { + "enforceForIndexOf": false, + "enforceForSwitchCase": true, + }, ], "valid-typeof": [ 2, @@ -2338,6 +2472,11 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "yoda": [ 2, + "never", + { + "exceptRange": false, + "onlyEquality": false, + }, ], }, "settings": { diff --git a/tests/snapshot-test/flat/react/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/flat/react/__snapshots__/snapshot.test.js.snap index 5822159..69d7180 100644 --- a/tests/snapshot-test/flat/react/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/flat/react/__snapshots__/snapshot.test.js.snap @@ -3,7 +3,7 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` { "languageOptions": { - "ecmaVersion": "latest", + "ecmaVersion": 2025, "globals": { "AggregateError": false, "Array": false, @@ -309,7 +309,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, - "enforceForJSX": false, }, ], "@typescript-eslint/no-unused-vars": [ @@ -416,6 +415,11 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "accessor-pairs": [ 0, + { + "enforceForClassMembers": true, + "getWithoutSet": false, + "setWithoutGet": true, + }, ], "array-bracket-newline": [ 0, @@ -446,7 +450,10 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` "camelcase": [ 0, { + "allow": [], "ignoreDestructuring": false, + "ignoreGlobals": false, + "ignoreImports": false, "properties": "never", }, ], @@ -479,9 +486,13 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "consistent-return": [ 0, + { + "treatUndefinedAsUnspecified": false, + }, ], "consistent-this": [ 0, + "that", ], "constructor-super": [ 0, @@ -492,6 +503,7 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "default-case": [ 0, + {}, ], "default-case-last": [ 2, @@ -503,6 +515,7 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` 0, { "allowKeywords": true, + "allowPattern": "", }, ], "eqeqeq": [ @@ -526,10 +539,15 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` "func-names": [ 2, "as-needed", + {}, ], "func-style": [ 0, "expression", + { + "allowArrowFunctions": false, + "overrides": {}, + }, ], "getter-return": [ 0, @@ -539,6 +557,7 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "grouped-accessor-pairs": [ 2, + "anyOrder", ], "guard-for-in": [ 2, @@ -548,9 +567,22 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "id-length": [ 0, + { + "exceptionPatterns": [], + "exceptions": [], + "min": 2, + "properties": "always", + }, ], "id-match": [ 0, + "^.+$", + { + "classFields": false, + "ignoreDestructuring": false, + "onlyDeclarations": false, + "properties": false, + }, ], "import/consistent-type-specifier-style": [ 2, @@ -1342,6 +1374,10 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-bitwise": [ 2, + { + "allow": [], + "int32Hint": false, + }, ], "no-caller": [ 2, @@ -1376,6 +1412,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-constant-condition": [ 2, + { + "checkLoops": "allExceptWhileTrue", + }, ], "no-constructor-return": [ 2, @@ -1412,6 +1451,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-duplicate-imports": [ 0, + { + "includeExports": false, + }, ], "no-else-return": [ 2, @@ -1421,6 +1463,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-empty": [ 2, + { + "allowEmptyCatch": false, + }, ], "no-empty-character-class": [ 2, @@ -1438,6 +1483,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-empty-pattern": [ 2, + { + "allowObjectPatternsAsParameters": false, + }, ], "no-empty-static-block": [ 2, @@ -1447,24 +1495,35 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-eval": [ 2, + { + "allowIndirect": false, + }, ], "no-ex-assign": [ 2, ], "no-extend-native": [ 2, + { + "exceptions": [], + }, ], "no-extra-bind": [ 2, ], "no-extra-boolean-cast": [ 2, + {}, ], "no-extra-label": [ 2, ], "no-fallthrough": [ 2, + { + "allowEmptyCase": false, + "reportUnusedFallthroughComment": false, + }, ], "no-func-assign": [ 0, @@ -1487,6 +1546,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-implicit-globals": [ 2, + { + "lexicalBindings": false, + }, ], "no-implied-eval": [ 0, @@ -1496,18 +1558,34 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-inline-comments": [ 0, + {}, ], "no-inner-declarations": [ 2, + "functions", + { + "blockScopedFunctions": "allow", + }, ], "no-invalid-regexp": [ 2, + {}, ], "no-invalid-this": [ 2, + { + "capIsConstructor": true, + }, ], "no-irregular-whitespace": [ 2, + { + "skipComments": false, + "skipJSXText": false, + "skipRegExps": false, + "skipStrings": true, + "skipTemplates": false, + }, ], "no-iterator": [ 2, @@ -1548,6 +1626,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-multi-assign": [ 2, + { + "ignoreNonDeclaration": false, + }, ], "no-multi-str": [ 2, @@ -1615,6 +1696,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-promise-executor-return": [ 2, + { + "allowVoid": false, + }, ], "no-proto": [ 2, @@ -1624,6 +1708,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-redeclare": [ 0, + { + "builtinGlobals": true, + }, ], "no-regex-spaces": [ 2, @@ -1970,12 +2057,21 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-sequences": [ 2, + { + "allowInParentheses": true, + }, ], "no-setter-return": [ 0, ], "no-shadow": [ 0, + { + "allow": [], + "builtinGlobals": false, + "hoist": "functions", + "ignoreOnInitialization": false, + }, ], "no-shadow-restricted-names": [ 2, @@ -1997,6 +2093,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-undef": [ 0, + { + "typeof": false, + }, ], "no-undef-init": [ 2, @@ -2044,6 +2143,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-unsafe-negation": [ 0, + { + "enforceForOrderingRelations": false, + }, ], "no-unsafe-optional-chaining": [ 2, @@ -2057,6 +2159,7 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, + "enforceForJSX": false, }, ], "no-unused-labels": [ @@ -2075,6 +2178,12 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-use-before-define": [ 0, + { + "allowNamedExports": false, + "classes": true, + "functions": true, + "variables": true, + }, ], "no-useless-backreference": [ 2, @@ -2087,6 +2196,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-useless-computed-key": [ 2, + { + "enforceForClassMembers": true, + }, ], "no-useless-concat": [ 2, @@ -2113,6 +2225,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-void": [ 2, + { + "allowAsStatement": false, + }, ], "no-warning-comments": [ 0, @@ -2251,6 +2366,7 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "radix": [ 2, + "always", ], "react-hooks/exhaustive-deps": [ 2, @@ -2707,6 +2823,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "require-atomic-updates": [ 0, + { + "allowProperties": false, + }, ], "require-await": [ 0, @@ -2720,6 +2839,7 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` "sort-imports": [ 0, { + "allowSeparatedGroups": false, "ignoreCase": false, "ignoreDeclarationSort": false, "ignoreMemberSort": false, @@ -2735,12 +2855,18 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` 0, "asc", { + "allowLineSeparatedGroups": false, "caseSensitive": false, + "ignoreComputedKeys": false, + "minKeys": 2, "natural": true, }, ], "sort-vars": [ 0, + { + "ignoreCase": false, + }, ], "symbol-description": [ 2, @@ -3155,6 +3281,10 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "use-isnan": [ 2, + { + "enforceForIndexOf": false, + "enforceForSwitchCase": true, + }, ], "valid-typeof": [ 2, @@ -3167,6 +3297,11 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "yoda": [ 2, + "never", + { + "exceptRange": false, + "onlyEquality": false, + }, ], }, "settings": { diff --git a/tests/snapshot-test/flat/storybook/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/flat/storybook/__snapshots__/snapshot.test.js.snap index eeddc8b..29b6771 100644 --- a/tests/snapshot-test/flat/storybook/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/flat/storybook/__snapshots__/snapshot.test.js.snap @@ -3,7 +3,7 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` { "languageOptions": { - "ecmaVersion": "latest", + "ecmaVersion": 2025, "globals": { "AggregateError": false, "Array": false, @@ -309,7 +309,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, - "enforceForJSX": false, }, ], "@typescript-eslint/no-unused-vars": [ @@ -416,6 +415,11 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "accessor-pairs": [ 0, + { + "enforceForClassMembers": true, + "getWithoutSet": false, + "setWithoutGet": true, + }, ], "array-bracket-newline": [ 0, @@ -446,7 +450,10 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` "camelcase": [ 0, { + "allow": [], "ignoreDestructuring": false, + "ignoreGlobals": false, + "ignoreImports": false, "properties": "never", }, ], @@ -479,9 +486,13 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "consistent-return": [ 0, + { + "treatUndefinedAsUnspecified": false, + }, ], "consistent-this": [ 0, + "that", ], "constructor-super": [ 0, @@ -492,6 +503,7 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "default-case": [ 0, + {}, ], "default-case-last": [ 2, @@ -503,6 +515,7 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` 0, { "allowKeywords": true, + "allowPattern": "", }, ], "eqeqeq": [ @@ -526,10 +539,15 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` "func-names": [ 2, "as-needed", + {}, ], "func-style": [ 0, "expression", + { + "allowArrowFunctions": false, + "overrides": {}, + }, ], "getter-return": [ 0, @@ -539,6 +557,7 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "grouped-accessor-pairs": [ 2, + "anyOrder", ], "guard-for-in": [ 2, @@ -548,9 +567,22 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "id-length": [ 0, + { + "exceptionPatterns": [], + "exceptions": [], + "min": 2, + "properties": "always", + }, ], "id-match": [ 0, + "^.+$", + { + "classFields": false, + "ignoreDestructuring": false, + "onlyDeclarations": false, + "properties": false, + }, ], "import/consistent-type-specifier-style": [ 2, @@ -1099,6 +1131,10 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-bitwise": [ 2, + { + "allow": [], + "int32Hint": false, + }, ], "no-caller": [ 2, @@ -1133,6 +1169,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-constant-condition": [ 2, + { + "checkLoops": "allExceptWhileTrue", + }, ], "no-constructor-return": [ 2, @@ -1169,6 +1208,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-duplicate-imports": [ 0, + { + "includeExports": false, + }, ], "no-else-return": [ 2, @@ -1178,6 +1220,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-empty": [ 2, + { + "allowEmptyCatch": false, + }, ], "no-empty-character-class": [ 2, @@ -1195,6 +1240,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-empty-pattern": [ 2, + { + "allowObjectPatternsAsParameters": false, + }, ], "no-empty-static-block": [ 2, @@ -1204,24 +1252,35 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-eval": [ 2, + { + "allowIndirect": false, + }, ], "no-ex-assign": [ 2, ], "no-extend-native": [ 2, + { + "exceptions": [], + }, ], "no-extra-bind": [ 2, ], "no-extra-boolean-cast": [ 2, + {}, ], "no-extra-label": [ 2, ], "no-fallthrough": [ 2, + { + "allowEmptyCase": false, + "reportUnusedFallthroughComment": false, + }, ], "no-func-assign": [ 0, @@ -1244,6 +1303,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-implicit-globals": [ 2, + { + "lexicalBindings": false, + }, ], "no-implied-eval": [ 0, @@ -1253,18 +1315,34 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-inline-comments": [ 0, + {}, ], "no-inner-declarations": [ 2, + "functions", + { + "blockScopedFunctions": "allow", + }, ], "no-invalid-regexp": [ 2, + {}, ], "no-invalid-this": [ 2, + { + "capIsConstructor": true, + }, ], "no-irregular-whitespace": [ 2, + { + "skipComments": false, + "skipJSXText": false, + "skipRegExps": false, + "skipStrings": true, + "skipTemplates": false, + }, ], "no-iterator": [ 2, @@ -1305,6 +1383,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-multi-assign": [ 2, + { + "ignoreNonDeclaration": false, + }, ], "no-multi-str": [ 2, @@ -1372,6 +1453,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-promise-executor-return": [ 2, + { + "allowVoid": false, + }, ], "no-proto": [ 2, @@ -1381,6 +1465,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-redeclare": [ 0, + { + "builtinGlobals": true, + }, ], "no-regex-spaces": [ 2, @@ -1727,12 +1814,21 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-sequences": [ 2, + { + "allowInParentheses": true, + }, ], "no-setter-return": [ 0, ], "no-shadow": [ 0, + { + "allow": [], + "builtinGlobals": false, + "hoist": "functions", + "ignoreOnInitialization": false, + }, ], "no-shadow-restricted-names": [ 2, @@ -1754,6 +1850,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-undef": [ 0, + { + "typeof": false, + }, ], "no-undef-init": [ 2, @@ -1801,6 +1900,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-unsafe-negation": [ 0, + { + "enforceForOrderingRelations": false, + }, ], "no-unsafe-optional-chaining": [ 2, @@ -1814,6 +1916,7 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, + "enforceForJSX": false, }, ], "no-unused-labels": [ @@ -1832,6 +1935,12 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-use-before-define": [ 0, + { + "allowNamedExports": false, + "classes": true, + "functions": true, + "variables": true, + }, ], "no-useless-backreference": [ 2, @@ -1844,6 +1953,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-useless-computed-key": [ 2, + { + "enforceForClassMembers": true, + }, ], "no-useless-concat": [ 2, @@ -1870,6 +1982,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-void": [ 2, + { + "allowAsStatement": false, + }, ], "no-warning-comments": [ 0, @@ -2008,6 +2123,7 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "radix": [ 2, + "always", ], "react-hooks/exhaustive-deps": [ 2, @@ -2464,6 +2580,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "require-atomic-updates": [ 0, + { + "allowProperties": false, + }, ], "require-await": [ 0, @@ -2477,6 +2596,7 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` "sort-imports": [ 0, { + "allowSeparatedGroups": false, "ignoreCase": false, "ignoreDeclarationSort": false, "ignoreMemberSort": false, @@ -2492,12 +2612,18 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` 0, "asc", { + "allowLineSeparatedGroups": false, "caseSensitive": false, + "ignoreComputedKeys": false, + "minKeys": 2, "natural": true, }, ], "sort-vars": [ 0, + { + "ignoreCase": false, + }, ], "storybook/await-interactions": [ 2, @@ -2945,6 +3071,10 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "use-isnan": [ 2, + { + "enforceForIndexOf": false, + "enforceForSwitchCase": true, + }, ], "valid-typeof": [ 2, @@ -2957,6 +3087,11 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "yoda": [ 2, + "never", + { + "exceptRange": false, + "onlyEquality": false, + }, ], }, "settings": { From 8446b2d36388e1c210a5aadbda3c0f50ea107785 Mon Sep 17 00:00:00 2001 From: wakamsha Date: Sat, 7 Dec 2024 12:55:00 +0900 Subject: [PATCH 3/5] update snapshot --- configs/flat/storybook.mjs | 7 +- .../next/__snapshots__/snapshot.test.js.snap | 14 ++ .../node/__snapshots__/snapshot.test.js.snap | 14 ++ .../react/__snapshots__/snapshot.test.js.snap | 14 ++ .../__snapshots__/snapshot.test.js.snap | 14 ++ .../next/__snapshots__/snapshot.test.js.snap | 139 +-------------- .../node/__snapshots__/snapshot.test.js.snap | 145 +-------------- .../react/__snapshots__/snapshot.test.js.snap | 139 +-------------- .../__snapshots__/snapshot.test.js.snap | 168 +----------------- 9 files changed, 69 insertions(+), 585 deletions(-) diff --git a/configs/flat/storybook.mjs b/configs/flat/storybook.mjs index bca22d8..18fe583 100644 --- a/configs/flat/storybook.mjs +++ b/configs/flat/storybook.mjs @@ -1,7 +1,7 @@ // @ts-check // @ts-ignore import importPlugin from 'eslint-plugin-import'; -import * as storybook from 'eslint-plugin-storybook'; +import storybook from 'eslint-plugin-storybook'; import storybookRuleSetBase from '../../rules/storybook.js'; const storybookRuleSetStories = { @@ -11,8 +11,7 @@ const storybookRuleSetStories = { }, rules: { - ...storybook.configs.recommended.overrides[0].rules, - ...storybook.configs['csf-strict'].rules, + ...storybook.configs['flat/csf-strict'].rules, ...storybookRuleSetBase.rules, 'import/no-default-export': ['off'], }, @@ -24,7 +23,7 @@ const storybookRuleSetConfig = { import: importPlugin, }, rules: { - ...storybook.configs.recommended.overrides[1].rules, + ...storybook.configs['flat/recommended'].rules, 'import/no-default-export': ['off'], }, }; diff --git a/tests/snapshot-test/eslintrc/next/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/eslintrc/next/__snapshots__/snapshot.test.js.snap index 1e97dea..e2cb099 100644 --- a/tests/snapshot-test/eslintrc/next/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/eslintrc/next/__snapshots__/snapshot.test.js.snap @@ -290,6 +290,7 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, + "enforceForJSX": false, }, ], "@typescript-eslint/no-unused-vars": [ @@ -405,6 +406,8 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` 2, { "allowImplicit": true, + "allowVoid": false, + "checkForEach": false, }, ], "arrow-body-style": [ @@ -425,6 +428,8 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` 0, { "ignoreDestructuring": false, + "ignoreGlobals": false, + "ignoreImports": false, "properties": "never", }, ], @@ -447,6 +452,7 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` "class-methods-use-this": [ 2, { + "enforceForClassFields": true, "exceptMethods": [], }, ], @@ -1317,6 +1323,7 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` ], "newIsCap": true, "newIsCapExceptions": [], + "properties": true, }, ], "no-alert": [ @@ -1471,6 +1478,7 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` { "allow": [], "boolean": false, + "disallowTemplateShorthand": false, "number": true, "string": true, }, @@ -2000,6 +2008,11 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` "allow": [], "allowAfterSuper": false, "allowAfterThis": false, + "allowAfterThisConstructor": false, + "allowFunctionParams": true, + "allowInArrayDestructuring": true, + "allowInObjectDestructuring": true, + "enforceInClassFields": false, "enforceInMethodNames": true, }, ], @@ -2042,6 +2055,7 @@ exports[`should match ESLint configuration snapshot: next 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, + "enforceForJSX": false, }, ], "no-unused-labels": [ diff --git a/tests/snapshot-test/eslintrc/node/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/eslintrc/node/__snapshots__/snapshot.test.js.snap index e8b87c9..411803b 100644 --- a/tests/snapshot-test/eslintrc/node/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/eslintrc/node/__snapshots__/snapshot.test.js.snap @@ -14,6 +14,8 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` 2, { "allowImplicit": true, + "allowVoid": false, + "checkForEach": false, }, ], "arrow-body-style": [ @@ -34,6 +36,8 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` 2, { "ignoreDestructuring": false, + "ignoreGlobals": false, + "ignoreImports": false, "properties": "never", }, ], @@ -56,6 +60,7 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` "class-methods-use-this": [ 2, { + "enforceForClassFields": true, "exceptMethods": [], }, ], @@ -89,6 +94,7 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` 2, { "allowKeywords": true, + "allowPattern": "", }, ], "eqeqeq": [ @@ -470,6 +476,7 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` ], "newIsCap": true, "newIsCapExceptions": [], + "properties": true, }, ], "no-alert": [ @@ -624,6 +631,7 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` { "allow": [], "boolean": false, + "disallowTemplateShorthand": false, "number": true, "string": true, }, @@ -1147,6 +1155,11 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` "allow": [], "allowAfterSuper": false, "allowAfterThis": false, + "allowAfterThisConstructor": false, + "allowFunctionParams": true, + "allowInArrayDestructuring": true, + "allowInObjectDestructuring": true, + "enforceInClassFields": false, "enforceInMethodNames": true, }, ], @@ -1189,6 +1202,7 @@ exports[`should match ESLint configuration snapshot: node 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, + "enforceForJSX": false, }, ], "no-unused-labels": [ diff --git a/tests/snapshot-test/eslintrc/react/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/eslintrc/react/__snapshots__/snapshot.test.js.snap index 59b0614..a6d3fd1 100644 --- a/tests/snapshot-test/eslintrc/react/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/eslintrc/react/__snapshots__/snapshot.test.js.snap @@ -227,6 +227,7 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, + "enforceForJSX": false, }, ], "@typescript-eslint/no-unused-vars": [ @@ -342,6 +343,8 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` 2, { "allowImplicit": true, + "allowVoid": false, + "checkForEach": false, }, ], "arrow-body-style": [ @@ -362,6 +365,8 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` 0, { "ignoreDestructuring": false, + "ignoreGlobals": false, + "ignoreImports": false, "properties": "never", }, ], @@ -384,6 +389,7 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` "class-methods-use-this": [ 2, { + "enforceForClassFields": true, "exceptMethods": [], }, ], @@ -1254,6 +1260,7 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` ], "newIsCap": true, "newIsCapExceptions": [], + "properties": true, }, ], "no-alert": [ @@ -1408,6 +1415,7 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` { "allow": [], "boolean": false, + "disallowTemplateShorthand": false, "number": true, "string": true, }, @@ -1937,6 +1945,11 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` "allow": [], "allowAfterSuper": false, "allowAfterThis": false, + "allowAfterThisConstructor": false, + "allowFunctionParams": true, + "allowInArrayDestructuring": true, + "allowInObjectDestructuring": true, + "enforceInClassFields": false, "enforceInMethodNames": true, }, ], @@ -1979,6 +1992,7 @@ exports[`should match ESLint configuration snapshot: react 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, + "enforceForJSX": false, }, ], "no-unused-labels": [ diff --git a/tests/snapshot-test/eslintrc/storybook/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/eslintrc/storybook/__snapshots__/snapshot.test.js.snap index 439e379..5505acc 100644 --- a/tests/snapshot-test/eslintrc/storybook/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/eslintrc/storybook/__snapshots__/snapshot.test.js.snap @@ -227,6 +227,7 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, + "enforceForJSX": false, }, ], "@typescript-eslint/no-unused-vars": [ @@ -342,6 +343,8 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` 2, { "allowImplicit": true, + "allowVoid": false, + "checkForEach": false, }, ], "arrow-body-style": [ @@ -362,6 +365,8 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` 0, { "ignoreDestructuring": false, + "ignoreGlobals": false, + "ignoreImports": false, "properties": "never", }, ], @@ -384,6 +389,7 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` "class-methods-use-this": [ 2, { + "enforceForClassFields": true, "exceptMethods": [], }, ], @@ -1011,6 +1017,7 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` ], "newIsCap": true, "newIsCapExceptions": [], + "properties": true, }, ], "no-alert": [ @@ -1165,6 +1172,7 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` { "allow": [], "boolean": false, + "disallowTemplateShorthand": false, "number": true, "string": true, }, @@ -1694,6 +1702,11 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` "allow": [], "allowAfterSuper": false, "allowAfterThis": false, + "allowAfterThisConstructor": false, + "allowFunctionParams": true, + "allowInArrayDestructuring": true, + "allowInObjectDestructuring": true, + "enforceInClassFields": false, "enforceInMethodNames": true, }, ], @@ -1736,6 +1749,7 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, + "enforceForJSX": false, }, ], "no-unused-labels": [ diff --git a/tests/snapshot-test/flat/next/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/flat/next/__snapshots__/snapshot.test.js.snap index f284e4e..9b2236a 100644 --- a/tests/snapshot-test/flat/next/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/flat/next/__snapshots__/snapshot.test.js.snap @@ -3,7 +3,7 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` { "languageOptions": { - "ecmaVersion": 2025, + "ecmaVersion": "latest", "globals": { "AggregateError": false, "Array": false, @@ -372,6 +372,7 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, + "enforceForJSX": false, }, ], "@typescript-eslint/no-unused-vars": [ @@ -478,11 +479,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "accessor-pairs": [ 0, - { - "enforceForClassMembers": true, - "getWithoutSet": false, - "setWithoutGet": true, - }, ], "array-bracket-newline": [ 0, @@ -513,10 +509,7 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` "camelcase": [ 0, { - "allow": [], "ignoreDestructuring": false, - "ignoreGlobals": false, - "ignoreImports": false, "properties": "never", }, ], @@ -549,13 +542,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "consistent-return": [ 0, - { - "treatUndefinedAsUnspecified": false, - }, ], "consistent-this": [ 0, - "that", ], "constructor-super": [ 0, @@ -566,7 +555,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "default-case": [ 0, - {}, ], "default-case-last": [ 2, @@ -578,7 +566,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` 0, { "allowKeywords": true, - "allowPattern": "", }, ], "eqeqeq": [ @@ -602,15 +589,10 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` "func-names": [ 2, "as-needed", - {}, ], "func-style": [ 0, "expression", - { - "allowArrowFunctions": false, - "overrides": {}, - }, ], "getter-return": [ 0, @@ -620,7 +602,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "grouped-accessor-pairs": [ 2, - "anyOrder", ], "guard-for-in": [ 2, @@ -630,22 +611,9 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "id-length": [ 0, - { - "exceptionPatterns": [], - "exceptions": [], - "min": 2, - "properties": "always", - }, ], "id-match": [ 0, - "^.+$", - { - "classFields": false, - "ignoreDestructuring": false, - "onlyDeclarations": false, - "properties": false, - }, ], "import/consistent-type-specifier-style": [ 2, @@ -1437,10 +1405,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-bitwise": [ 2, - { - "allow": [], - "int32Hint": false, - }, ], "no-caller": [ 2, @@ -1475,9 +1439,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-constant-condition": [ 2, - { - "checkLoops": "allExceptWhileTrue", - }, ], "no-constructor-return": [ 2, @@ -1514,9 +1475,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-duplicate-imports": [ 0, - { - "includeExports": false, - }, ], "no-else-return": [ 2, @@ -1526,9 +1484,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-empty": [ 2, - { - "allowEmptyCatch": false, - }, ], "no-empty-character-class": [ 2, @@ -1546,9 +1501,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-empty-pattern": [ 2, - { - "allowObjectPatternsAsParameters": false, - }, ], "no-empty-static-block": [ 2, @@ -1558,35 +1510,24 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-eval": [ 2, - { - "allowIndirect": false, - }, ], "no-ex-assign": [ 2, ], "no-extend-native": [ 2, - { - "exceptions": [], - }, ], "no-extra-bind": [ 2, ], "no-extra-boolean-cast": [ 2, - {}, ], "no-extra-label": [ 2, ], "no-fallthrough": [ 2, - { - "allowEmptyCase": false, - "reportUnusedFallthroughComment": false, - }, ], "no-func-assign": [ 0, @@ -1609,9 +1550,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-implicit-globals": [ 2, - { - "lexicalBindings": false, - }, ], "no-implied-eval": [ 0, @@ -1621,34 +1559,18 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-inline-comments": [ 0, - {}, ], "no-inner-declarations": [ 2, - "functions", - { - "blockScopedFunctions": "allow", - }, ], "no-invalid-regexp": [ 2, - {}, ], "no-invalid-this": [ 2, - { - "capIsConstructor": true, - }, ], "no-irregular-whitespace": [ 2, - { - "skipComments": false, - "skipJSXText": false, - "skipRegExps": false, - "skipStrings": true, - "skipTemplates": false, - }, ], "no-iterator": [ 2, @@ -1689,9 +1611,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-multi-assign": [ 2, - { - "ignoreNonDeclaration": false, - }, ], "no-multi-str": [ 2, @@ -1759,9 +1678,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-promise-executor-return": [ 2, - { - "allowVoid": false, - }, ], "no-proto": [ 2, @@ -1771,9 +1687,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-redeclare": [ 0, - { - "builtinGlobals": true, - }, ], "no-regex-spaces": [ 2, @@ -2120,21 +2033,12 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-sequences": [ 2, - { - "allowInParentheses": true, - }, ], "no-setter-return": [ 0, ], "no-shadow": [ 0, - { - "allow": [], - "builtinGlobals": false, - "hoist": "functions", - "ignoreOnInitialization": false, - }, ], "no-shadow-restricted-names": [ 2, @@ -2156,9 +2060,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-undef": [ 0, - { - "typeof": false, - }, ], "no-undef-init": [ 2, @@ -2206,9 +2107,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-unsafe-negation": [ 0, - { - "enforceForOrderingRelations": false, - }, ], "no-unsafe-optional-chaining": [ 2, @@ -2222,7 +2120,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, - "enforceForJSX": false, }, ], "no-unused-labels": [ @@ -2241,12 +2138,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-use-before-define": [ 0, - { - "allowNamedExports": false, - "classes": true, - "functions": true, - "variables": true, - }, ], "no-useless-backreference": [ 2, @@ -2259,9 +2150,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-useless-computed-key": [ 2, - { - "enforceForClassMembers": true, - }, ], "no-useless-concat": [ 2, @@ -2288,9 +2176,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "no-void": [ 2, - { - "allowAsStatement": false, - }, ], "no-warning-comments": [ 0, @@ -2429,7 +2314,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "radix": [ 2, - "always", ], "react-hooks/exhaustive-deps": [ 2, @@ -2886,9 +2770,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "require-atomic-updates": [ 0, - { - "allowProperties": false, - }, ], "require-await": [ 0, @@ -2902,7 +2783,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` "sort-imports": [ 0, { - "allowSeparatedGroups": false, "ignoreCase": false, "ignoreDeclarationSort": false, "ignoreMemberSort": false, @@ -2918,18 +2798,12 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` 0, "asc", { - "allowLineSeparatedGroups": false, "caseSensitive": false, - "ignoreComputedKeys": false, - "minKeys": 2, "natural": true, }, ], "sort-vars": [ 0, - { - "ignoreCase": false, - }, ], "symbol-description": [ 2, @@ -3344,10 +3218,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "use-isnan": [ 2, - { - "enforceForIndexOf": false, - "enforceForSwitchCase": true, - }, ], "valid-typeof": [ 2, @@ -3360,11 +3230,6 @@ exports[`should match ESLint Flat Configuration snapshot: next 1`] = ` ], "yoda": [ 2, - "never", - { - "exceptRange": false, - "onlyEquality": false, - }, ], }, "settings": { diff --git a/tests/snapshot-test/flat/node/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/flat/node/__snapshots__/snapshot.test.js.snap index 65d7e46..900962b 100644 --- a/tests/snapshot-test/flat/node/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/flat/node/__snapshots__/snapshot.test.js.snap @@ -3,7 +3,7 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` { "languageOptions": { - "ecmaVersion": 2025, + "ecmaVersion": "latest", "globals": { "AggregateError": false, "Array": false, @@ -102,7 +102,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "FunctionExpression": "FunctionExpression", "Identifier": "Identifier", "IfStatement": "IfStatement", - "ImportAttribute": "ImportAttribute", "ImportDeclaration": "ImportDeclaration", "ImportDefaultSpecifier": "ImportDefaultSpecifier", "ImportExpression": "ImportExpression", @@ -237,7 +236,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "ExportAllDeclaration": [ "exported", "source", - "attributes", ], "ExportDefaultDeclaration": [ "declaration", @@ -246,7 +244,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "declaration", "specifiers", "source", - "attributes", ], "ExportSpecifier": [ "exported", @@ -287,21 +284,15 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "consequent", "alternate", ], - "ImportAttribute": [ - "key", - "value", - ], "ImportDeclaration": [ "specifiers", "source", - "attributes", ], "ImportDefaultSpecifier": [ "local", ], "ImportExpression": [ "source", - "options", ], "ImportNamespaceSpecifier": [ "local", @@ -463,7 +454,7 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "argument", ], }, - "latestEcmaVersion": 16, + "latestEcmaVersion": 15, "name": "espree", "parse": [Function], "supportedEcmaVersions": [ @@ -479,10 +470,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` 13, 14, 15, - 16, ], "tokenize": [Function], - "version": "10.3.0", + "version": "9.6.1", }, "parserOptions": { "ecmaVersion": "latest", @@ -493,11 +483,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "rules": { "accessor-pairs": [ 0, - { - "enforceForClassMembers": true, - "getWithoutSet": false, - "setWithoutGet": true, - }, ], "array-bracket-newline": [ 0, @@ -528,7 +513,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "camelcase": [ 2, { - "allow": [], "ignoreDestructuring": false, "ignoreGlobals": false, "ignoreImports": false, @@ -564,13 +548,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "consistent-return": [ 0, - { - "treatUndefinedAsUnspecified": false, - }, ], "consistent-this": [ 0, - "that", ], "constructor-super": [ 2, @@ -581,7 +561,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "default-case": [ 0, - {}, ], "default-case-last": [ 2, @@ -617,15 +596,10 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "func-names": [ 2, "as-needed", - {}, ], "func-style": [ 0, "expression", - { - "allowArrowFunctions": false, - "overrides": {}, - }, ], "getter-return": [ 2, @@ -635,7 +609,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "grouped-accessor-pairs": [ 2, - "anyOrder", ], "guard-for-in": [ 2, @@ -645,22 +618,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "id-length": [ 0, - { - "exceptionPatterns": [], - "exceptions": [], - "min": 2, - "properties": "always", - }, ], "id-match": [ 0, - "^.+$", - { - "classFields": false, - "ignoreDestructuring": false, - "onlyDeclarations": false, - "properties": false, - }, ], "import/consistent-type-specifier-style": [ 2, @@ -1011,10 +971,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-bitwise": [ 2, - { - "allow": [], - "int32Hint": false, - }, ], "no-caller": [ 2, @@ -1049,9 +1005,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-constant-condition": [ 2, - { - "checkLoops": "allExceptWhileTrue", - }, ], "no-constructor-return": [ 2, @@ -1088,9 +1041,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-duplicate-imports": [ 0, - { - "includeExports": false, - }, ], "no-else-return": [ 2, @@ -1100,9 +1050,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-empty": [ 2, - { - "allowEmptyCatch": false, - }, ], "no-empty-character-class": [ 2, @@ -1120,9 +1067,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-empty-pattern": [ 2, - { - "allowObjectPatternsAsParameters": false, - }, ], "no-empty-static-block": [ 2, @@ -1132,35 +1076,24 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-eval": [ 2, - { - "allowIndirect": false, - }, ], "no-ex-assign": [ 2, ], "no-extend-native": [ 2, - { - "exceptions": [], - }, ], "no-extra-bind": [ 2, ], "no-extra-boolean-cast": [ 2, - {}, ], "no-extra-label": [ 2, ], "no-fallthrough": [ 2, - { - "allowEmptyCase": false, - "reportUnusedFallthroughComment": false, - }, ], "no-func-assign": [ 2, @@ -1183,9 +1116,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-implicit-globals": [ 2, - { - "lexicalBindings": false, - }, ], "no-implied-eval": [ 2, @@ -1195,34 +1125,18 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-inline-comments": [ 0, - {}, ], "no-inner-declarations": [ 2, - "functions", - { - "blockScopedFunctions": "allow", - }, ], "no-invalid-regexp": [ 2, - {}, ], "no-invalid-this": [ 2, - { - "capIsConstructor": true, - }, ], "no-irregular-whitespace": [ 2, - { - "skipComments": false, - "skipJSXText": false, - "skipRegExps": false, - "skipStrings": true, - "skipTemplates": false, - }, ], "no-iterator": [ 2, @@ -1263,9 +1177,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-multi-assign": [ 2, - { - "ignoreNonDeclaration": false, - }, ], "no-multi-str": [ 2, @@ -1330,9 +1241,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-promise-executor-return": [ 2, - { - "allowVoid": false, - }, ], "no-proto": [ 2, @@ -1685,21 +1593,12 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-sequences": [ 2, - { - "allowInParentheses": true, - }, ], "no-setter-return": [ 2, ], "no-shadow": [ 0, - { - "allow": [], - "builtinGlobals": false, - "hoist": "functions", - "ignoreOnInitialization": false, - }, ], "no-shadow-restricted-names": [ 2, @@ -1721,9 +1620,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-undef": [ 0, - { - "typeof": false, - }, ], "no-undef-init": [ 2, @@ -1771,9 +1667,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-unsafe-negation": [ 2, - { - "enforceForOrderingRelations": false, - }, ], "no-unsafe-optional-chaining": [ 2, @@ -1806,12 +1699,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-use-before-define": [ 0, - { - "allowNamedExports": false, - "classes": true, - "functions": true, - "variables": true, - }, ], "no-useless-backreference": [ 2, @@ -1824,9 +1711,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-useless-computed-key": [ 2, - { - "enforceForClassMembers": true, - }, ], "no-useless-concat": [ 2, @@ -1853,9 +1737,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "no-void": [ 2, - { - "allowAsStatement": false, - }, ], "no-warning-comments": [ 0, @@ -1994,13 +1875,9 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "radix": [ 2, - "always", ], "require-atomic-updates": [ 0, - { - "allowProperties": false, - }, ], "require-await": [ 0, @@ -2014,7 +1891,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` "sort-imports": [ 0, { - "allowSeparatedGroups": false, "ignoreCase": false, "ignoreDeclarationSort": false, "ignoreMemberSort": false, @@ -2030,18 +1906,12 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` 0, "asc", { - "allowLineSeparatedGroups": false, "caseSensitive": false, - "ignoreComputedKeys": false, - "minKeys": 2, "natural": true, }, ], "sort-vars": [ 0, - { - "ignoreCase": false, - }, ], "symbol-description": [ 2, @@ -2456,10 +2326,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "use-isnan": [ 2, - { - "enforceForIndexOf": false, - "enforceForSwitchCase": true, - }, ], "valid-typeof": [ 2, @@ -2472,11 +2338,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = ` ], "yoda": [ 2, - "never", - { - "exceptRange": false, - "onlyEquality": false, - }, ], }, "settings": { diff --git a/tests/snapshot-test/flat/react/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/flat/react/__snapshots__/snapshot.test.js.snap index 69d7180..5822159 100644 --- a/tests/snapshot-test/flat/react/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/flat/react/__snapshots__/snapshot.test.js.snap @@ -3,7 +3,7 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` { "languageOptions": { - "ecmaVersion": 2025, + "ecmaVersion": "latest", "globals": { "AggregateError": false, "Array": false, @@ -309,6 +309,7 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, + "enforceForJSX": false, }, ], "@typescript-eslint/no-unused-vars": [ @@ -415,11 +416,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "accessor-pairs": [ 0, - { - "enforceForClassMembers": true, - "getWithoutSet": false, - "setWithoutGet": true, - }, ], "array-bracket-newline": [ 0, @@ -450,10 +446,7 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` "camelcase": [ 0, { - "allow": [], "ignoreDestructuring": false, - "ignoreGlobals": false, - "ignoreImports": false, "properties": "never", }, ], @@ -486,13 +479,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "consistent-return": [ 0, - { - "treatUndefinedAsUnspecified": false, - }, ], "consistent-this": [ 0, - "that", ], "constructor-super": [ 0, @@ -503,7 +492,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "default-case": [ 0, - {}, ], "default-case-last": [ 2, @@ -515,7 +503,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` 0, { "allowKeywords": true, - "allowPattern": "", }, ], "eqeqeq": [ @@ -539,15 +526,10 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` "func-names": [ 2, "as-needed", - {}, ], "func-style": [ 0, "expression", - { - "allowArrowFunctions": false, - "overrides": {}, - }, ], "getter-return": [ 0, @@ -557,7 +539,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "grouped-accessor-pairs": [ 2, - "anyOrder", ], "guard-for-in": [ 2, @@ -567,22 +548,9 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "id-length": [ 0, - { - "exceptionPatterns": [], - "exceptions": [], - "min": 2, - "properties": "always", - }, ], "id-match": [ 0, - "^.+$", - { - "classFields": false, - "ignoreDestructuring": false, - "onlyDeclarations": false, - "properties": false, - }, ], "import/consistent-type-specifier-style": [ 2, @@ -1374,10 +1342,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-bitwise": [ 2, - { - "allow": [], - "int32Hint": false, - }, ], "no-caller": [ 2, @@ -1412,9 +1376,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-constant-condition": [ 2, - { - "checkLoops": "allExceptWhileTrue", - }, ], "no-constructor-return": [ 2, @@ -1451,9 +1412,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-duplicate-imports": [ 0, - { - "includeExports": false, - }, ], "no-else-return": [ 2, @@ -1463,9 +1421,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-empty": [ 2, - { - "allowEmptyCatch": false, - }, ], "no-empty-character-class": [ 2, @@ -1483,9 +1438,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-empty-pattern": [ 2, - { - "allowObjectPatternsAsParameters": false, - }, ], "no-empty-static-block": [ 2, @@ -1495,35 +1447,24 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-eval": [ 2, - { - "allowIndirect": false, - }, ], "no-ex-assign": [ 2, ], "no-extend-native": [ 2, - { - "exceptions": [], - }, ], "no-extra-bind": [ 2, ], "no-extra-boolean-cast": [ 2, - {}, ], "no-extra-label": [ 2, ], "no-fallthrough": [ 2, - { - "allowEmptyCase": false, - "reportUnusedFallthroughComment": false, - }, ], "no-func-assign": [ 0, @@ -1546,9 +1487,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-implicit-globals": [ 2, - { - "lexicalBindings": false, - }, ], "no-implied-eval": [ 0, @@ -1558,34 +1496,18 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-inline-comments": [ 0, - {}, ], "no-inner-declarations": [ 2, - "functions", - { - "blockScopedFunctions": "allow", - }, ], "no-invalid-regexp": [ 2, - {}, ], "no-invalid-this": [ 2, - { - "capIsConstructor": true, - }, ], "no-irregular-whitespace": [ 2, - { - "skipComments": false, - "skipJSXText": false, - "skipRegExps": false, - "skipStrings": true, - "skipTemplates": false, - }, ], "no-iterator": [ 2, @@ -1626,9 +1548,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-multi-assign": [ 2, - { - "ignoreNonDeclaration": false, - }, ], "no-multi-str": [ 2, @@ -1696,9 +1615,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-promise-executor-return": [ 2, - { - "allowVoid": false, - }, ], "no-proto": [ 2, @@ -1708,9 +1624,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-redeclare": [ 0, - { - "builtinGlobals": true, - }, ], "no-regex-spaces": [ 2, @@ -2057,21 +1970,12 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-sequences": [ 2, - { - "allowInParentheses": true, - }, ], "no-setter-return": [ 0, ], "no-shadow": [ 0, - { - "allow": [], - "builtinGlobals": false, - "hoist": "functions", - "ignoreOnInitialization": false, - }, ], "no-shadow-restricted-names": [ 2, @@ -2093,9 +1997,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-undef": [ 0, - { - "typeof": false, - }, ], "no-undef-init": [ 2, @@ -2143,9 +2044,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-unsafe-negation": [ 0, - { - "enforceForOrderingRelations": false, - }, ], "no-unsafe-optional-chaining": [ 2, @@ -2159,7 +2057,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, - "enforceForJSX": false, }, ], "no-unused-labels": [ @@ -2178,12 +2075,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-use-before-define": [ 0, - { - "allowNamedExports": false, - "classes": true, - "functions": true, - "variables": true, - }, ], "no-useless-backreference": [ 2, @@ -2196,9 +2087,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-useless-computed-key": [ 2, - { - "enforceForClassMembers": true, - }, ], "no-useless-concat": [ 2, @@ -2225,9 +2113,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "no-void": [ 2, - { - "allowAsStatement": false, - }, ], "no-warning-comments": [ 0, @@ -2366,7 +2251,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "radix": [ 2, - "always", ], "react-hooks/exhaustive-deps": [ 2, @@ -2823,9 +2707,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "require-atomic-updates": [ 0, - { - "allowProperties": false, - }, ], "require-await": [ 0, @@ -2839,7 +2720,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` "sort-imports": [ 0, { - "allowSeparatedGroups": false, "ignoreCase": false, "ignoreDeclarationSort": false, "ignoreMemberSort": false, @@ -2855,18 +2735,12 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` 0, "asc", { - "allowLineSeparatedGroups": false, "caseSensitive": false, - "ignoreComputedKeys": false, - "minKeys": 2, "natural": true, }, ], "sort-vars": [ 0, - { - "ignoreCase": false, - }, ], "symbol-description": [ 2, @@ -3281,10 +3155,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "use-isnan": [ 2, - { - "enforceForIndexOf": false, - "enforceForSwitchCase": true, - }, ], "valid-typeof": [ 2, @@ -3297,11 +3167,6 @@ exports[`should match ESLint Configuration snapshot: react 1`] = ` ], "yoda": [ 2, - "never", - { - "exceptRange": false, - "onlyEquality": false, - }, ], }, "settings": { diff --git a/tests/snapshot-test/flat/storybook/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/flat/storybook/__snapshots__/snapshot.test.js.snap index 29b6771..7a15602 100644 --- a/tests/snapshot-test/flat/storybook/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/flat/storybook/__snapshots__/snapshot.test.js.snap @@ -3,7 +3,7 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` { "languageOptions": { - "ecmaVersion": 2025, + "ecmaVersion": "latest", "globals": { "AggregateError": false, "Array": false, @@ -309,6 +309,7 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, + "enforceForJSX": false, }, ], "@typescript-eslint/no-unused-vars": [ @@ -415,11 +416,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "accessor-pairs": [ 0, - { - "enforceForClassMembers": true, - "getWithoutSet": false, - "setWithoutGet": true, - }, ], "array-bracket-newline": [ 0, @@ -450,10 +446,7 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` "camelcase": [ 0, { - "allow": [], "ignoreDestructuring": false, - "ignoreGlobals": false, - "ignoreImports": false, "properties": "never", }, ], @@ -486,13 +479,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "consistent-return": [ 0, - { - "treatUndefinedAsUnspecified": false, - }, ], "consistent-this": [ 0, - "that", ], "constructor-super": [ 0, @@ -503,7 +492,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "default-case": [ 0, - {}, ], "default-case-last": [ 2, @@ -515,7 +503,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` 0, { "allowKeywords": true, - "allowPattern": "", }, ], "eqeqeq": [ @@ -539,15 +526,10 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` "func-names": [ 2, "as-needed", - {}, ], "func-style": [ 0, "expression", - { - "allowArrowFunctions": false, - "overrides": {}, - }, ], "getter-return": [ 0, @@ -557,7 +539,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "grouped-accessor-pairs": [ 2, - "anyOrder", ], "guard-for-in": [ 2, @@ -567,22 +548,9 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "id-length": [ 0, - { - "exceptionPatterns": [], - "exceptions": [], - "min": 2, - "properties": "always", - }, ], "id-match": [ 0, - "^.+$", - { - "classFields": false, - "ignoreDestructuring": false, - "onlyDeclarations": false, - "properties": false, - }, ], "import/consistent-type-specifier-style": [ 2, @@ -1131,10 +1099,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-bitwise": [ 2, - { - "allow": [], - "int32Hint": false, - }, ], "no-caller": [ 2, @@ -1169,9 +1133,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-constant-condition": [ 2, - { - "checkLoops": "allExceptWhileTrue", - }, ], "no-constructor-return": [ 2, @@ -1208,9 +1169,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-duplicate-imports": [ 0, - { - "includeExports": false, - }, ], "no-else-return": [ 2, @@ -1220,9 +1178,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-empty": [ 2, - { - "allowEmptyCatch": false, - }, ], "no-empty-character-class": [ 2, @@ -1240,9 +1195,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-empty-pattern": [ 2, - { - "allowObjectPatternsAsParameters": false, - }, ], "no-empty-static-block": [ 2, @@ -1252,35 +1204,24 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-eval": [ 2, - { - "allowIndirect": false, - }, ], "no-ex-assign": [ 2, ], "no-extend-native": [ 2, - { - "exceptions": [], - }, ], "no-extra-bind": [ 2, ], "no-extra-boolean-cast": [ 2, - {}, ], "no-extra-label": [ 2, ], "no-fallthrough": [ 2, - { - "allowEmptyCase": false, - "reportUnusedFallthroughComment": false, - }, ], "no-func-assign": [ 0, @@ -1303,9 +1244,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-implicit-globals": [ 2, - { - "lexicalBindings": false, - }, ], "no-implied-eval": [ 0, @@ -1315,34 +1253,18 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-inline-comments": [ 0, - {}, ], "no-inner-declarations": [ 2, - "functions", - { - "blockScopedFunctions": "allow", - }, ], "no-invalid-regexp": [ 2, - {}, ], "no-invalid-this": [ 2, - { - "capIsConstructor": true, - }, ], "no-irregular-whitespace": [ 2, - { - "skipComments": false, - "skipJSXText": false, - "skipRegExps": false, - "skipStrings": true, - "skipTemplates": false, - }, ], "no-iterator": [ 2, @@ -1383,9 +1305,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-multi-assign": [ 2, - { - "ignoreNonDeclaration": false, - }, ], "no-multi-str": [ 2, @@ -1453,9 +1372,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-promise-executor-return": [ 2, - { - "allowVoid": false, - }, ], "no-proto": [ 2, @@ -1465,9 +1381,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-redeclare": [ 0, - { - "builtinGlobals": true, - }, ], "no-regex-spaces": [ 2, @@ -1814,21 +1727,12 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-sequences": [ 2, - { - "allowInParentheses": true, - }, ], "no-setter-return": [ 0, ], "no-shadow": [ 0, - { - "allow": [], - "builtinGlobals": false, - "hoist": "functions", - "ignoreOnInitialization": false, - }, ], "no-shadow-restricted-names": [ 2, @@ -1850,9 +1754,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-undef": [ 0, - { - "typeof": false, - }, ], "no-undef-init": [ 2, @@ -1900,9 +1801,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-unsafe-negation": [ 0, - { - "enforceForOrderingRelations": false, - }, ], "no-unsafe-optional-chaining": [ 2, @@ -1916,7 +1814,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` "allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true, - "enforceForJSX": false, }, ], "no-unused-labels": [ @@ -1935,12 +1832,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-use-before-define": [ 0, - { - "allowNamedExports": false, - "classes": true, - "functions": true, - "variables": true, - }, ], "no-useless-backreference": [ 2, @@ -1953,9 +1844,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-useless-computed-key": [ 2, - { - "enforceForClassMembers": true, - }, ], "no-useless-concat": [ 2, @@ -1982,9 +1870,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "no-void": [ 2, - { - "allowAsStatement": false, - }, ], "no-warning-comments": [ 0, @@ -2123,13 +2008,12 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "radix": [ 2, - "always", ], "react-hooks/exhaustive-deps": [ 2, ], "react-hooks/rules-of-hooks": [ - 0, + 2, ], "react/boolean-prop-naming": [ 0, @@ -2580,9 +2464,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "require-atomic-updates": [ 0, - { - "allowProperties": false, - }, ], "require-await": [ 0, @@ -2596,7 +2477,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` "sort-imports": [ 0, { - "allowSeparatedGroups": false, "ignoreCase": false, "ignoreDeclarationSort": false, "ignoreMemberSort": false, @@ -2612,33 +2492,12 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` 0, "asc", { - "allowLineSeparatedGroups": false, "caseSensitive": false, - "ignoreComputedKeys": false, - "minKeys": 2, "natural": true, }, ], "sort-vars": [ 0, - { - "ignoreCase": false, - }, - ], - "storybook/await-interactions": [ - 2, - ], - "storybook/context-in-play-function": [ - 2, - ], - "storybook/default-exports": [ - 2, - ], - "storybook/hierarchy-separator": [ - 1, - ], - "storybook/no-redundant-story-name": [ - 1, ], "storybook/no-stories-of": [ 2, @@ -2646,18 +2505,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` "storybook/no-title-property-in-meta": [ 2, ], - "storybook/prefer-pascal-case": [ - 1, - ], - "storybook/story-exports": [ - 2, - ], - "storybook/use-storybook-expect": [ - 2, - ], - "storybook/use-storybook-testing-library": [ - 2, - ], "symbol-description": [ 2, ], @@ -3071,10 +2918,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "use-isnan": [ 2, - { - "enforceForIndexOf": false, - "enforceForSwitchCase": true, - }, ], "valid-typeof": [ 2, @@ -3087,11 +2930,6 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` ], "yoda": [ 2, - "never", - { - "exceptRange": false, - "onlyEquality": false, - }, ], }, "settings": { From 0a8f62d599a347dea182e9dca266f275973d7924 Mon Sep 17 00:00:00 2001 From: wakamsha Date: Sat, 7 Dec 2024 13:18:10 +0900 Subject: [PATCH 4/5] update snapshot --- configs/flat/storybook.mjs | 40 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/configs/flat/storybook.mjs b/configs/flat/storybook.mjs index 18fe583..253b969 100644 --- a/configs/flat/storybook.mjs +++ b/configs/flat/storybook.mjs @@ -2,40 +2,22 @@ // @ts-ignore import importPlugin from 'eslint-plugin-import'; import storybook from 'eslint-plugin-storybook'; -import storybookRuleSetBase from '../../rules/storybook.js'; - -const storybookRuleSetStories = { - plugins: { - storybook, - import: importPlugin, - }, - - rules: { - ...storybook.configs['flat/csf-strict'].rules, - ...storybookRuleSetBase.rules, - 'import/no-default-export': ['off'], - }, -}; - -const storybookRuleSetConfig = { - plugins: { - storybook, - import: importPlugin, - }, - rules: { - ...storybook.configs['flat/recommended'].rules, - 'import/no-default-export': ['off'], - }, -}; export default [ { - files: ['**/*.@(stories|story).@(ts|tsx|js|jsx|mjs|cjs)'], - ...storybookRuleSetStories, + plugins: { + storybook, + import: importPlugin, + }, }, + ...storybook.configs['flat/recommended'], + ...storybook.configs['flat/csf-strict'], + { - files: ['**/.storybook/**/*.@(ts|tsx|js|jsx|mjs|cjs)'], - ...storybookRuleSetConfig, + files: ['**/*.@(stories|story).@(ts|tsx|js|jsx|mjs|cjs)'], + rules: { + 'import/no-default-export': ['off'], + }, }, ]; From 8443a514bd1bcb2d919686b5c646c9ce9d9d9efd Mon Sep 17 00:00:00 2001 From: wakamsha Date: Sat, 7 Dec 2024 13:18:59 +0900 Subject: [PATCH 5/5] update snapshot --- .../__snapshots__/snapshot.test.js.snap | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/tests/snapshot-test/flat/storybook/__snapshots__/snapshot.test.js.snap b/tests/snapshot-test/flat/storybook/__snapshots__/snapshot.test.js.snap index 7a15602..456ca7d 100644 --- a/tests/snapshot-test/flat/storybook/__snapshots__/snapshot.test.js.snap +++ b/tests/snapshot-test/flat/storybook/__snapshots__/snapshot.test.js.snap @@ -2013,7 +2013,7 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` 2, ], "react-hooks/rules-of-hooks": [ - 2, + 0, ], "react/boolean-prop-naming": [ 0, @@ -2499,12 +2499,42 @@ exports[`should match ESLint Flat Configuration snapshot: storybook 1`] = ` "sort-vars": [ 0, ], + "storybook/await-interactions": [ + 2, + ], + "storybook/context-in-play-function": [ + 2, + ], + "storybook/csf-component": [ + 1, + ], + "storybook/default-exports": [ + 2, + ], + "storybook/hierarchy-separator": [ + 1, + ], + "storybook/no-redundant-story-name": [ + 1, + ], "storybook/no-stories-of": [ 2, ], "storybook/no-title-property-in-meta": [ 2, ], + "storybook/prefer-pascal-case": [ + 1, + ], + "storybook/story-exports": [ + 2, + ], + "storybook/use-storybook-expect": [ + 2, + ], + "storybook/use-storybook-testing-library": [ + 2, + ], "symbol-description": [ 2, ],