diff --git a/common/build/eslint-config-fluid/base.js b/common/build/eslint-config-fluid/base.js index 49af6f018cf8..f9245dd47a0a 100644 --- a/common/build/eslint-config-fluid/base.js +++ b/common/build/eslint-config-fluid/base.js @@ -41,12 +41,6 @@ module.exports = { plugins: ["import-x", "unicorn"], reportUnusedDisableDirectives: true, rules: { - // These rules were deprecated, then removed in `@typescript-eslint/eslint-plugin` v8. - // They are replaced by a set of more specific rules, which have been enabled in the list below. - // These explicit disable will need to be removed when this package is updated to v8+ of the plugin. - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/no-empty-interface": "off", - // Please keep entries alphabetized within a group // #region Fluid Custom Rules @@ -111,7 +105,7 @@ module.exports = { }, ], "@typescript-eslint/no-this-alias": "error", - "@typescript-eslint/no-throw-literal": "error", + "@typescript-eslint/only-throw-error": "error", "@typescript-eslint/no-unused-expressions": "error", "@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/no-unnecessary-qualifier": "error", @@ -158,6 +152,17 @@ module.exports = { ], "@typescript-eslint/unified-signatures": "error", "@typescript-eslint/no-wrapper-object-types": "error", + "@typescript-eslint/no-restricted-types": [ + "error", + { + types: { + null: { + message: "Avoid using null; prefer undefined instead.", + fixWith: "undefined", + }, + }, + }, + ], // #endregion diff --git a/common/build/eslint-config-fluid/package.json b/common/build/eslint-config-fluid/package.json index 0e12697a5f33..dfb6fcc3e770 100644 --- a/common/build/eslint-config-fluid/package.json +++ b/common/build/eslint-config-fluid/package.json @@ -33,8 +33,8 @@ "@rushstack/eslint-patch": "~1.12.0", "@rushstack/eslint-plugin": "~0.19.0", "@rushstack/eslint-plugin-security": "~0.11.0", - "@typescript-eslint/eslint-plugin": "~7.18.0", - "@typescript-eslint/parser": "~7.18.0", + "@typescript-eslint/eslint-plugin": "~8.18.2", + "@typescript-eslint/parser": "~8.18.2", "eslint-config-biome": "~2.1.3", "eslint-config-prettier": "~10.1.8", "eslint-import-resolver-typescript": "~4.4.4", @@ -65,6 +65,9 @@ ], "overrides": { "mocha>serialize-javascript@6.0.0": "^6.0.2" - } + }, + "onlyBuiltDependencies": [ + "unrs-resolver" + ] } } diff --git a/common/build/eslint-config-fluid/pnpm-lock.yaml b/common/build/eslint-config-fluid/pnpm-lock.yaml index 4a3605c7b5a3..4904bea09279 100644 --- a/common/build/eslint-config-fluid/pnpm-lock.yaml +++ b/common/build/eslint-config-fluid/pnpm-lock.yaml @@ -24,11 +24,11 @@ importers: specifier: ~0.11.0 version: 0.11.0(eslint@8.57.1)(typescript@5.4.5) '@typescript-eslint/eslint-plugin': - specifier: ~7.18.0 - version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5) + specifier: ~8.18.2 + version: 8.18.2(@typescript-eslint/parser@8.18.2(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5) '@typescript-eslint/parser': - specifier: ~7.18.0 - version: 7.18.0(eslint@8.57.1)(typescript@5.4.5) + specifier: ~8.18.2 + version: 8.18.2(eslint@8.57.1)(typescript@5.4.5) eslint-config-biome: specifier: ~2.1.3 version: 2.1.3 @@ -64,7 +64,7 @@ importers: version: 48.0.1(eslint@8.57.1) eslint-plugin-unused-imports: specifier: ~4.2.0 - version: 4.2.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1) + version: 4.2.0(@typescript-eslint/eslint-plugin@8.18.2(@typescript-eslint/parser@8.18.2(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1) devDependencies: '@fluid-tools/markdown-magic': specifier: file:../../../tools/markdown-magic @@ -276,16 +276,13 @@ packages: '@types/unist@2.0.10': resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==} - '@typescript-eslint/eslint-plugin@7.18.0': - resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/eslint-plugin@8.18.2': + resolution: {integrity: sha512-adig4SzPLjeQ0Tm+jvsozSGiCliI2ajeURDGHjZ2llnA+A67HihCQ+a3amtPhUakd1GlwHxSRvzOZktbEvhPPg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.8.0' '@typescript-eslint/parser@7.18.0': resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} @@ -297,28 +294,40 @@ packages: typescript: optional: true + '@typescript-eslint/parser@8.18.2': + resolution: {integrity: sha512-y7tcq4StgxQD4mDr9+Jb26dZ+HTZ/SkfqpXSiqeUXZHxOUyjWDKsmwKhJ0/tApR08DgOhrFAoAhyB80/p3ViuA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.8.0' + '@typescript-eslint/scope-manager@7.18.0': resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@8.18.2': + resolution: {integrity: sha512-YJFSfbd0CJjy14r/EvWapYgV4R5CHzptssoag2M7y3Ra7XNta6GPAJPPP5KGB9j14viYXyrzRO5GkX7CRfo8/g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.31.1': resolution: {integrity: sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@7.18.0': - resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/type-utils@8.18.2': + resolution: {integrity: sha512-AB/Wr1Lz31bzHfGm/jgbFR0VB0SML/hd2P1yxzKDM48YmP7vbyJNHRExUE/wZsQj2wUCvbWH8poNHFuxLqCTnA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.8.0' '@typescript-eslint/types@7.18.0': resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@8.18.2': + resolution: {integrity: sha512-Z/zblEPp8cIvmEn6+tPDIHUbRu/0z5lqZ+NvolL5SvXWT5rQy7+Nch83M0++XzO0XrWRFWECgOAyE8bsJTl1GQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.31.1': resolution: {integrity: sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -336,17 +345,24 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.18.2': + resolution: {integrity: sha512-WXAVt595HjpmlfH4crSdM/1bcsqh+1weFRWIa9XMTx/XHZ9TCKMcr725tLYqWOgzKdeDrqVHxFotrvWcEsk2Tg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.8.0' + '@typescript-eslint/typescript-estree@8.31.1': resolution: {integrity: sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/utils@7.18.0': - resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/utils@8.18.2': + resolution: {integrity: sha512-Cr4A0H7DtVIPkauj4sTSXVl+VBWewE9/o40KcF3TV9aqDEOWoXF3/+oRXNby3DYzZeCATvbdksYsGZzplwnK/Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.8.0' '@typescript-eslint/utils@8.31.1': resolution: {integrity: sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==} @@ -359,6 +375,10 @@ packages: resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@8.18.2': + resolution: {integrity: sha512-zORcwn4C3trOWiCqFQP1x6G3xTRyZ1LYydnj51cRnJ6hxBlr/cKPckk+PKPUw/fXmvfKTcw7bwY3w9izgx5jZw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.31.1': resolution: {integrity: sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2561,20 +2581,19 @@ snapshots: '@types/unist@2.0.10': {} - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@8.18.2(@typescript-eslint/parser@8.18.2(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.4.5) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/parser': 8.18.2(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 8.18.2 + '@typescript-eslint/type-utils': 8.18.2(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/utils': 8.18.2(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 8.18.2 eslint: 8.57.1 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 ts-api-utils: 1.4.3(typescript@5.4.5) - optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: - supports-color @@ -2592,30 +2611,48 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@8.18.2(eslint@8.57.1)(typescript@5.4.5)': + dependencies: + '@typescript-eslint/scope-manager': 8.18.2 + '@typescript-eslint/types': 8.18.2 + '@typescript-eslint/typescript-estree': 8.18.2(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 8.18.2 + debug: 4.4.1 + eslint: 8.57.1 + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/scope-manager@7.18.0': dependencies: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/scope-manager@8.18.2': + dependencies: + '@typescript-eslint/types': 8.18.2 + '@typescript-eslint/visitor-keys': 8.18.2 + '@typescript-eslint/scope-manager@8.31.1': dependencies: '@typescript-eslint/types': 8.31.1 '@typescript-eslint/visitor-keys': 8.31.1 - '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.4.5)': + '@typescript-eslint/type-utils@8.18.2(eslint@8.57.1)(typescript@5.4.5)': dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 8.18.2(typescript@5.4.5) + '@typescript-eslint/utils': 8.18.2(eslint@8.57.1)(typescript@5.4.5) debug: 4.4.1 eslint: 8.57.1 ts-api-utils: 1.4.3(typescript@5.4.5) - optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: - supports-color '@typescript-eslint/types@7.18.0': {} + '@typescript-eslint/types@8.18.2': {} + '@typescript-eslint/types@8.31.1': {} '@typescript-eslint/types@8.42.0': {} @@ -2635,6 +2672,20 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.18.2(typescript@5.4.5)': + dependencies: + '@typescript-eslint/types': 8.18.2 + '@typescript-eslint/visitor-keys': 8.18.2 + debug: 4.4.1 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.2 + ts-api-utils: 1.4.3(typescript@5.4.5) + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/typescript-estree@8.31.1(typescript@5.4.5)': dependencies: '@typescript-eslint/types': 8.31.1 @@ -2649,16 +2700,16 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.4.5)': + '@typescript-eslint/utils@8.18.2(eslint@8.57.1)(typescript@5.4.5)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.4.5) + '@typescript-eslint/scope-manager': 8.18.2 + '@typescript-eslint/types': 8.18.2 + '@typescript-eslint/typescript-estree': 8.18.2(typescript@5.4.5) eslint: 8.57.1 + typescript: 5.4.5 transitivePeerDependencies: - supports-color - - typescript '@typescript-eslint/utils@8.31.1(eslint@8.57.1)(typescript@5.4.5)': dependencies: @@ -2676,6 +2727,11 @@ snapshots: '@typescript-eslint/types': 7.18.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.18.2': + dependencies: + '@typescript-eslint/types': 8.18.2 + eslint-visitor-keys: 4.2.1 + '@typescript-eslint/visitor-keys@8.31.1': dependencies: '@typescript-eslint/types': 8.31.1 @@ -3367,11 +3423,11 @@ snapshots: semver: 7.7.2 strip-indent: 3.0.0 - eslint-plugin-unused-imports@4.2.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1): + eslint-plugin-unused-imports@4.2.0(@typescript-eslint/eslint-plugin@8.18.2(@typescript-eslint/parser@8.18.2(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1): dependencies: eslint: 8.57.1 optionalDependencies: - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 8.18.2(@typescript-eslint/parser@8.18.2(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5) eslint-scope@7.2.2: dependencies: diff --git a/common/build/eslint-config-fluid/printed-configs/default.json b/common/build/eslint-config-fluid/printed-configs/default.json index c42f683dbc7d..30fdd5cdcf94 100644 --- a/common/build/eslint-config-fluid/printed-configs/default.json +++ b/common/build/eslint-config-fluid/printed-configs/default.json @@ -617,9 +617,6 @@ "@typescript-eslint/ban-tslint-comment": [ "error" ], - "@typescript-eslint/ban-types": [ - "off" - ], "@typescript-eslint/block-spacing": [ "off" ], @@ -720,6 +717,9 @@ "@typescript-eslint/no-array-constructor": [ "error" ], + "@typescript-eslint/no-array-delete": [ + "error" + ], "@typescript-eslint/no-base-to-string": [ "error" ], @@ -738,9 +738,6 @@ "@typescript-eslint/no-empty-function": [ "off" ], - "@typescript-eslint/no-empty-interface": [ - "off" - ], "@typescript-eslint/no-empty-object-type": [ "error" ], @@ -780,9 +777,6 @@ "@typescript-eslint/no-invalid-this": [ "off" ], - "@typescript-eslint/no-loss-of-precision": [ - "error" - ], "@typescript-eslint/no-magic-numbers": [ "off" ], @@ -837,6 +831,17 @@ ] } ], + "@typescript-eslint/no-restricted-types": [ + "error", + { + "types": { + "null": { + "message": "Avoid using null; prefer undefined instead.", + "fixWith": "undefined" + } + } + } + ], "@typescript-eslint/no-shadow": [ "error", { @@ -847,9 +852,6 @@ "@typescript-eslint/no-this-alias": [ "error" ], - "@typescript-eslint/no-throw-literal": [ - "error" - ], "@typescript-eslint/no-unnecessary-qualifier": [ "error" ], @@ -886,6 +888,9 @@ "@typescript-eslint/no-unsafe-return": [ "error" ], + "@typescript-eslint/no-unsafe-unary-minus": [ + "error" + ], "@typescript-eslint/no-unused-expressions": [ "error" ], @@ -907,9 +912,15 @@ "@typescript-eslint/object-curly-spacing": [ "off" ], + "@typescript-eslint/only-throw-error": [ + "error" + ], "@typescript-eslint/prefer-as-const": [ "error" ], + "@typescript-eslint/prefer-find": [ + "error" + ], "@typescript-eslint/prefer-for-of": [ "error" ], @@ -928,9 +939,15 @@ "@typescript-eslint/prefer-optional-chain": [ "error" ], + "@typescript-eslint/prefer-promise-reject-errors": [ + "error" + ], "@typescript-eslint/prefer-readonly": [ "error" ], + "@typescript-eslint/prefer-regexp-exec": [ + "error" + ], "@typescript-eslint/prefer-string-starts-ends-with": [ "error" ], @@ -1345,7 +1362,7 @@ "error" ], "no-class-assign": [ - "error" + "off" ], "no-comma-dangle": [ "off" @@ -1450,7 +1467,7 @@ "error" ], "no-loss-of-precision": [ - "off" + "error" ], "no-magic-numbers": [ "off" diff --git a/common/build/eslint-config-fluid/printed-configs/minimal.json b/common/build/eslint-config-fluid/printed-configs/minimal.json index a81755cd7e01..d3d252bf13c2 100644 --- a/common/build/eslint-config-fluid/printed-configs/minimal.json +++ b/common/build/eslint-config-fluid/printed-configs/minimal.json @@ -617,9 +617,6 @@ "@typescript-eslint/ban-tslint-comment": [ "error" ], - "@typescript-eslint/ban-types": [ - "off" - ], "@typescript-eslint/block-spacing": [ "off" ], @@ -707,6 +704,9 @@ "@typescript-eslint/no-array-constructor": [ "error" ], + "@typescript-eslint/no-array-delete": [ + "error" + ], "@typescript-eslint/no-base-to-string": [ "error" ], @@ -725,9 +725,6 @@ "@typescript-eslint/no-empty-function": [ "off" ], - "@typescript-eslint/no-empty-interface": [ - "off" - ], "@typescript-eslint/no-empty-object-type": [ "error" ], @@ -761,9 +758,6 @@ "@typescript-eslint/no-invalid-this": [ "off" ], - "@typescript-eslint/no-loss-of-precision": [ - "error" - ], "@typescript-eslint/no-magic-numbers": [ "off" ], @@ -818,6 +812,17 @@ ] } ], + "@typescript-eslint/no-restricted-types": [ + "error", + { + "types": { + "null": { + "message": "Avoid using null; prefer undefined instead.", + "fixWith": "undefined" + } + } + } + ], "@typescript-eslint/no-shadow": [ "error", { @@ -828,9 +833,6 @@ "@typescript-eslint/no-this-alias": [ "error" ], - "@typescript-eslint/no-throw-literal": [ - "error" - ], "@typescript-eslint/no-unnecessary-qualifier": [ "error" ], @@ -867,6 +869,9 @@ "@typescript-eslint/no-unsafe-return": [ "error" ], + "@typescript-eslint/no-unsafe-unary-minus": [ + "error" + ], "@typescript-eslint/no-unused-expressions": [ "error" ], @@ -888,9 +893,15 @@ "@typescript-eslint/object-curly-spacing": [ "off" ], + "@typescript-eslint/only-throw-error": [ + "error" + ], "@typescript-eslint/prefer-as-const": [ "error" ], + "@typescript-eslint/prefer-find": [ + "error" + ], "@typescript-eslint/prefer-for-of": [ "error" ], @@ -909,9 +920,15 @@ "@typescript-eslint/prefer-optional-chain": [ "error" ], + "@typescript-eslint/prefer-promise-reject-errors": [ + "error" + ], "@typescript-eslint/prefer-readonly": [ "error" ], + "@typescript-eslint/prefer-regexp-exec": [ + "error" + ], "@typescript-eslint/prefer-string-starts-ends-with": [ "error" ], @@ -1312,7 +1329,7 @@ "error" ], "no-class-assign": [ - "error" + "off" ], "no-comma-dangle": [ "off" @@ -1417,7 +1434,7 @@ "error" ], "no-loss-of-precision": [ - "off" + "error" ], "no-magic-numbers": [ "off" diff --git a/common/build/eslint-config-fluid/printed-configs/react.json b/common/build/eslint-config-fluid/printed-configs/react.json index 4a84304af8ce..e024a54e6e42 100644 --- a/common/build/eslint-config-fluid/printed-configs/react.json +++ b/common/build/eslint-config-fluid/printed-configs/react.json @@ -619,9 +619,6 @@ "@typescript-eslint/ban-tslint-comment": [ "error" ], - "@typescript-eslint/ban-types": [ - "off" - ], "@typescript-eslint/block-spacing": [ "off" ], @@ -722,6 +719,9 @@ "@typescript-eslint/no-array-constructor": [ "error" ], + "@typescript-eslint/no-array-delete": [ + "error" + ], "@typescript-eslint/no-base-to-string": [ "error" ], @@ -740,9 +740,6 @@ "@typescript-eslint/no-empty-function": [ "off" ], - "@typescript-eslint/no-empty-interface": [ - "off" - ], "@typescript-eslint/no-empty-object-type": [ "error" ], @@ -782,9 +779,6 @@ "@typescript-eslint/no-invalid-this": [ "off" ], - "@typescript-eslint/no-loss-of-precision": [ - "error" - ], "@typescript-eslint/no-magic-numbers": [ "off" ], @@ -839,6 +833,17 @@ ] } ], + "@typescript-eslint/no-restricted-types": [ + "error", + { + "types": { + "null": { + "message": "Avoid using null; prefer undefined instead.", + "fixWith": "undefined" + } + } + } + ], "@typescript-eslint/no-shadow": [ "error", { @@ -849,9 +854,6 @@ "@typescript-eslint/no-this-alias": [ "error" ], - "@typescript-eslint/no-throw-literal": [ - "error" - ], "@typescript-eslint/no-unnecessary-qualifier": [ "error" ], @@ -888,6 +890,9 @@ "@typescript-eslint/no-unsafe-return": [ "error" ], + "@typescript-eslint/no-unsafe-unary-minus": [ + "error" + ], "@typescript-eslint/no-unused-expressions": [ "error" ], @@ -909,9 +914,15 @@ "@typescript-eslint/object-curly-spacing": [ "off" ], + "@typescript-eslint/only-throw-error": [ + "error" + ], "@typescript-eslint/prefer-as-const": [ "error" ], + "@typescript-eslint/prefer-find": [ + "error" + ], "@typescript-eslint/prefer-for-of": [ "error" ], @@ -930,9 +941,15 @@ "@typescript-eslint/prefer-optional-chain": [ "error" ], + "@typescript-eslint/prefer-promise-reject-errors": [ + "error" + ], "@typescript-eslint/prefer-readonly": [ "error" ], + "@typescript-eslint/prefer-regexp-exec": [ + "error" + ], "@typescript-eslint/prefer-string-starts-ends-with": [ "error" ], @@ -1347,7 +1364,7 @@ "error" ], "no-class-assign": [ - "error" + "off" ], "no-comma-dangle": [ "off" @@ -1452,7 +1469,7 @@ "error" ], "no-loss-of-precision": [ - "off" + "error" ], "no-magic-numbers": [ "off" diff --git a/common/build/eslint-config-fluid/printed-configs/recommended.json b/common/build/eslint-config-fluid/printed-configs/recommended.json index c42f683dbc7d..30fdd5cdcf94 100644 --- a/common/build/eslint-config-fluid/printed-configs/recommended.json +++ b/common/build/eslint-config-fluid/printed-configs/recommended.json @@ -617,9 +617,6 @@ "@typescript-eslint/ban-tslint-comment": [ "error" ], - "@typescript-eslint/ban-types": [ - "off" - ], "@typescript-eslint/block-spacing": [ "off" ], @@ -720,6 +717,9 @@ "@typescript-eslint/no-array-constructor": [ "error" ], + "@typescript-eslint/no-array-delete": [ + "error" + ], "@typescript-eslint/no-base-to-string": [ "error" ], @@ -738,9 +738,6 @@ "@typescript-eslint/no-empty-function": [ "off" ], - "@typescript-eslint/no-empty-interface": [ - "off" - ], "@typescript-eslint/no-empty-object-type": [ "error" ], @@ -780,9 +777,6 @@ "@typescript-eslint/no-invalid-this": [ "off" ], - "@typescript-eslint/no-loss-of-precision": [ - "error" - ], "@typescript-eslint/no-magic-numbers": [ "off" ], @@ -837,6 +831,17 @@ ] } ], + "@typescript-eslint/no-restricted-types": [ + "error", + { + "types": { + "null": { + "message": "Avoid using null; prefer undefined instead.", + "fixWith": "undefined" + } + } + } + ], "@typescript-eslint/no-shadow": [ "error", { @@ -847,9 +852,6 @@ "@typescript-eslint/no-this-alias": [ "error" ], - "@typescript-eslint/no-throw-literal": [ - "error" - ], "@typescript-eslint/no-unnecessary-qualifier": [ "error" ], @@ -886,6 +888,9 @@ "@typescript-eslint/no-unsafe-return": [ "error" ], + "@typescript-eslint/no-unsafe-unary-minus": [ + "error" + ], "@typescript-eslint/no-unused-expressions": [ "error" ], @@ -907,9 +912,15 @@ "@typescript-eslint/object-curly-spacing": [ "off" ], + "@typescript-eslint/only-throw-error": [ + "error" + ], "@typescript-eslint/prefer-as-const": [ "error" ], + "@typescript-eslint/prefer-find": [ + "error" + ], "@typescript-eslint/prefer-for-of": [ "error" ], @@ -928,9 +939,15 @@ "@typescript-eslint/prefer-optional-chain": [ "error" ], + "@typescript-eslint/prefer-promise-reject-errors": [ + "error" + ], "@typescript-eslint/prefer-readonly": [ "error" ], + "@typescript-eslint/prefer-regexp-exec": [ + "error" + ], "@typescript-eslint/prefer-string-starts-ends-with": [ "error" ], @@ -1345,7 +1362,7 @@ "error" ], "no-class-assign": [ - "error" + "off" ], "no-comma-dangle": [ "off" @@ -1450,7 +1467,7 @@ "error" ], "no-loss-of-precision": [ - "off" + "error" ], "no-magic-numbers": [ "off" diff --git a/common/build/eslint-config-fluid/printed-configs/strict-biome.json b/common/build/eslint-config-fluid/printed-configs/strict-biome.json index 403ac0a11557..45a36ccbf609 100644 --- a/common/build/eslint-config-fluid/printed-configs/strict-biome.json +++ b/common/build/eslint-config-fluid/printed-configs/strict-biome.json @@ -754,6 +754,9 @@ "@typescript-eslint/no-array-constructor": [ "off" ], + "@typescript-eslint/no-array-delete": [ + "error" + ], "@typescript-eslint/no-base-to-string": [ "error" ], @@ -880,6 +883,17 @@ ] } ], + "@typescript-eslint/no-restricted-types": [ + "error", + { + "types": { + "null": { + "message": "Avoid using null; prefer undefined instead.", + "fixWith": "undefined" + } + } + } + ], "@typescript-eslint/no-shadow": [ "error", { @@ -890,9 +904,6 @@ "@typescript-eslint/no-this-alias": [ "off" ], - "@typescript-eslint/no-throw-literal": [ - "error" - ], "@typescript-eslint/no-unnecessary-qualifier": [ "error" ], @@ -929,6 +940,9 @@ "@typescript-eslint/no-unsafe-return": [ "error" ], + "@typescript-eslint/no-unsafe-unary-minus": [ + "error" + ], "@typescript-eslint/no-unused-expressions": [ "error" ], @@ -959,9 +973,15 @@ "@typescript-eslint/object-curly-spacing": [ "off" ], + "@typescript-eslint/only-throw-error": [ + "error" + ], "@typescript-eslint/prefer-as-const": [ "error" ], + "@typescript-eslint/prefer-find": [ + "error" + ], "@typescript-eslint/prefer-for-of": [ "error" ], @@ -983,9 +1003,15 @@ "@typescript-eslint/prefer-optional-chain": [ "off" ], + "@typescript-eslint/prefer-promise-reject-errors": [ + "error" + ], "@typescript-eslint/prefer-readonly": [ "error" ], + "@typescript-eslint/prefer-regexp-exec": [ + "error" + ], "@typescript-eslint/prefer-string-starts-ends-with": [ "error" ], diff --git a/common/build/eslint-config-fluid/printed-configs/strict.json b/common/build/eslint-config-fluid/printed-configs/strict.json index a73b22262417..459239534a28 100644 --- a/common/build/eslint-config-fluid/printed-configs/strict.json +++ b/common/build/eslint-config-fluid/printed-configs/strict.json @@ -617,9 +617,6 @@ "@typescript-eslint/ban-tslint-comment": [ "error" ], - "@typescript-eslint/ban-types": [ - "off" - ], "@typescript-eslint/block-spacing": [ "off" ], @@ -730,6 +727,9 @@ "@typescript-eslint/no-array-constructor": [ "error" ], + "@typescript-eslint/no-array-delete": [ + "error" + ], "@typescript-eslint/no-base-to-string": [ "error" ], @@ -748,9 +748,6 @@ "@typescript-eslint/no-empty-function": [ "off" ], - "@typescript-eslint/no-empty-interface": [ - "off" - ], "@typescript-eslint/no-empty-object-type": [ "error" ], @@ -790,9 +787,6 @@ "@typescript-eslint/no-invalid-this": [ "off" ], - "@typescript-eslint/no-loss-of-precision": [ - "error" - ], "@typescript-eslint/no-magic-numbers": [ "off" ], @@ -847,6 +841,17 @@ ] } ], + "@typescript-eslint/no-restricted-types": [ + "error", + { + "types": { + "null": { + "message": "Avoid using null; prefer undefined instead.", + "fixWith": "undefined" + } + } + } + ], "@typescript-eslint/no-shadow": [ "error", { @@ -857,9 +862,6 @@ "@typescript-eslint/no-this-alias": [ "error" ], - "@typescript-eslint/no-throw-literal": [ - "error" - ], "@typescript-eslint/no-unnecessary-qualifier": [ "error" ], @@ -896,6 +898,9 @@ "@typescript-eslint/no-unsafe-return": [ "error" ], + "@typescript-eslint/no-unsafe-unary-minus": [ + "error" + ], "@typescript-eslint/no-unused-expressions": [ "error" ], @@ -917,9 +922,15 @@ "@typescript-eslint/object-curly-spacing": [ "off" ], + "@typescript-eslint/only-throw-error": [ + "error" + ], "@typescript-eslint/prefer-as-const": [ "error" ], + "@typescript-eslint/prefer-find": [ + "error" + ], "@typescript-eslint/prefer-for-of": [ "error" ], @@ -938,9 +949,15 @@ "@typescript-eslint/prefer-optional-chain": [ "error" ], + "@typescript-eslint/prefer-promise-reject-errors": [ + "error" + ], "@typescript-eslint/prefer-readonly": [ "error" ], + "@typescript-eslint/prefer-regexp-exec": [ + "error" + ], "@typescript-eslint/prefer-string-starts-ends-with": [ "error" ], @@ -1384,7 +1401,7 @@ "error" ], "no-class-assign": [ - "error" + "off" ], "no-comma-dangle": [ "off" @@ -1489,7 +1506,7 @@ "error" ], "no-loss-of-precision": [ - "off" + "error" ], "no-magic-numbers": [ "off" diff --git a/common/build/eslint-config-fluid/printed-configs/test.json b/common/build/eslint-config-fluid/printed-configs/test.json index 51019cca88bd..df010cd329ef 100644 --- a/common/build/eslint-config-fluid/printed-configs/test.json +++ b/common/build/eslint-config-fluid/printed-configs/test.json @@ -617,9 +617,6 @@ "@typescript-eslint/ban-tslint-comment": [ "error" ], - "@typescript-eslint/ban-types": [ - "off" - ], "@typescript-eslint/block-spacing": [ "off" ], @@ -720,6 +717,9 @@ "@typescript-eslint/no-array-constructor": [ "error" ], + "@typescript-eslint/no-array-delete": [ + "error" + ], "@typescript-eslint/no-base-to-string": [ "error" ], @@ -738,9 +738,6 @@ "@typescript-eslint/no-empty-function": [ "off" ], - "@typescript-eslint/no-empty-interface": [ - "off" - ], "@typescript-eslint/no-empty-object-type": [ "error" ], @@ -780,9 +777,6 @@ "@typescript-eslint/no-invalid-this": [ "off" ], - "@typescript-eslint/no-loss-of-precision": [ - "error" - ], "@typescript-eslint/no-magic-numbers": [ "off" ], @@ -828,6 +822,17 @@ ] } ], + "@typescript-eslint/no-restricted-types": [ + "error", + { + "types": { + "null": { + "message": "Avoid using null; prefer undefined instead.", + "fixWith": "undefined" + } + } + } + ], "@typescript-eslint/no-shadow": [ "error", { @@ -838,9 +843,6 @@ "@typescript-eslint/no-this-alias": [ "error" ], - "@typescript-eslint/no-throw-literal": [ - "error" - ], "@typescript-eslint/no-unnecessary-qualifier": [ "error" ], @@ -877,6 +879,9 @@ "@typescript-eslint/no-unsafe-return": [ "error" ], + "@typescript-eslint/no-unsafe-unary-minus": [ + "error" + ], "@typescript-eslint/no-unused-expressions": [ "error" ], @@ -898,9 +903,15 @@ "@typescript-eslint/object-curly-spacing": [ "off" ], + "@typescript-eslint/only-throw-error": [ + "error" + ], "@typescript-eslint/prefer-as-const": [ "error" ], + "@typescript-eslint/prefer-find": [ + "error" + ], "@typescript-eslint/prefer-for-of": [ "error" ], @@ -919,9 +930,15 @@ "@typescript-eslint/prefer-optional-chain": [ "error" ], + "@typescript-eslint/prefer-promise-reject-errors": [ + "error" + ], "@typescript-eslint/prefer-readonly": [ "error" ], + "@typescript-eslint/prefer-regexp-exec": [ + "error" + ], "@typescript-eslint/prefer-string-starts-ends-with": [ "error" ], @@ -1341,7 +1358,7 @@ "error" ], "no-class-assign": [ - "error" + "off" ], "no-comma-dangle": [ "off" @@ -1446,7 +1463,7 @@ "error" ], "no-loss-of-precision": [ - "off" + "error" ], "no-magic-numbers": [ "off"