diff --git a/package.json b/package.json
index 225fcb9..f8017bc 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
],
"repository": {
"type": "git",
- "url": "https://github.com/jimmy-guzman/eslint-config.git"
+ "url": "git+https://github.com/jimmy-guzman/eslint-config.git"
},
"license": "MIT",
"sideEffects": false,
@@ -50,8 +50,10 @@
"dependencies": {
"@eslint/js": "^8.57.0",
"@tanstack/eslint-plugin-query": "^5.59.7",
- "@typescript-eslint/utils": "^7.6.0",
- "@typescript-eslint/parser": "^7.6.0",
+ "@types/eslint": "8.56.10",
+ "@types/eslint__js": "8.42.3",
+ "@typescript-eslint/utils": "^8.12.2",
+ "@typescript-eslint/parser": "^8.12.2",
"astro-eslint-parser": "^1.0.3",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
@@ -68,7 +70,7 @@
"eslint-plugin-testing-library": "^6.4.0",
"globals": "^15.11.0",
"local-pkg": "0.5.0",
- "typescript-eslint": "^7.6.0"
+ "typescript-eslint": "^8.12.2"
},
"devDependencies": {
"@commitlint/config-conventional": "19.5.0",
@@ -82,8 +84,6 @@
"@tanstack/react-query": "5.59.16",
"@testing-library/dom": "10.4.0",
"@testing-library/react": "16.0.1",
- "@types/eslint": "8.56.10",
- "@types/eslint__js": "8.42.3",
"@types/node": "22.8.4",
"@types/react": "18.3.12",
"@vitest/coverage-v8": "2.1.4",
@@ -102,7 +102,7 @@
"react-dom": "18.3.1",
"semantic-release": "24.2.0",
"tsx": "4.19.2",
- "typescript": "5.4.5",
+ "typescript": "5.6.3",
"vitest": "2.1.4"
},
"peerDependencies": {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 1749695..a6aa6d6 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -13,31 +13,37 @@ importers:
version: 8.57.0
'@tanstack/eslint-plugin-query':
specifier: ^5.59.7
- version: 5.59.7(eslint@8.57.0)(typescript@5.4.5)
+ version: 5.59.7(eslint@8.57.0)(typescript@5.6.3)
+ '@types/eslint':
+ specifier: 8.56.10
+ version: 8.56.10
+ '@types/eslint__js':
+ specifier: 8.42.3
+ version: 8.42.3
'@typescript-eslint/parser':
- specifier: ^7.6.0
- version: 7.6.0(eslint@8.57.0)(typescript@5.4.5)
+ specifier: ^8.12.2
+ version: 8.12.2(eslint@8.57.0)(typescript@5.6.3)
'@typescript-eslint/utils':
- specifier: ^7.6.0
- version: 7.6.0(eslint@8.57.0)(typescript@5.4.5)
+ specifier: ^8.12.2
+ version: 8.12.2(eslint@8.57.0)(typescript@5.6.3)
astro-eslint-parser:
specifier: ^1.0.3
- version: 1.0.3(typescript@5.4.5)
+ version: 1.0.3(typescript@5.6.3)
eslint-config-prettier:
specifier: ^9.1.0
version: 9.1.0(eslint@8.57.0)
eslint-import-resolver-typescript:
specifier: ^3.6.3
- version: 3.6.3(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import-x@4.4.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)
+ version: 3.6.3(@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3))(eslint-plugin-import-x@4.4.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)
eslint-plugin-astro:
specifier: ^1.3.0
- version: 1.3.0(eslint@8.57.0)(typescript@5.4.5)
+ version: 1.3.0(eslint@8.57.0)(typescript@5.6.3)
eslint-plugin-import-x:
specifier: ^4.4.0
- version: 4.4.0(eslint@8.57.0)(typescript@5.4.5)
+ version: 4.4.0(eslint@8.57.0)(typescript@5.6.3)
eslint-plugin-jest:
specifier: ^28.8.3
- version: 28.8.3(@typescript-eslint/eslint-plugin@7.6.0(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)
+ version: 28.8.3(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)(typescript@5.6.3)
eslint-plugin-jest-dom:
specifier: ^5.4.0
version: 5.4.0(@testing-library/dom@10.4.0)(eslint@8.57.0)
@@ -61,7 +67,7 @@ importers:
version: 12.1.1(eslint@8.57.0)
eslint-plugin-testing-library:
specifier: ^6.4.0
- version: 6.4.0(eslint@8.57.0)(typescript@5.4.5)
+ version: 6.4.0(eslint@8.57.0)(typescript@5.6.3)
globals:
specifier: ^15.11.0
version: 15.11.0
@@ -69,8 +75,8 @@ importers:
specifier: 0.5.0
version: 0.5.0
typescript-eslint:
- specifier: ^7.6.0
- version: 7.6.0(eslint@8.57.0)(typescript@5.4.5)
+ specifier: ^8.12.2
+ version: 8.12.2(eslint@8.57.0)(typescript@5.6.3)
devDependencies:
'@commitlint/config-conventional':
specifier: 19.5.0
@@ -83,19 +89,19 @@ importers:
version: 1.1.0(prettier@3.3.3)
'@semantic-release/changelog':
specifier: 6.0.3
- version: 6.0.3(semantic-release@24.2.0(typescript@5.4.5))
+ version: 6.0.3(semantic-release@24.2.0(typescript@5.6.3))
'@semantic-release/commit-analyzer':
specifier: 13.0.0
- version: 13.0.0(semantic-release@24.2.0(typescript@5.4.5))
+ version: 13.0.0(semantic-release@24.2.0(typescript@5.6.3))
'@semantic-release/git':
specifier: 10.0.1
- version: 10.0.1(semantic-release@24.2.0(typescript@5.4.5))
+ version: 10.0.1(semantic-release@24.2.0(typescript@5.6.3))
'@semantic-release/npm':
specifier: 12.0.1
- version: 12.0.1(semantic-release@24.2.0(typescript@5.4.5))
+ version: 12.0.1(semantic-release@24.2.0(typescript@5.6.3))
'@semantic-release/release-notes-generator':
specifier: 14.0.1
- version: 14.0.1(semantic-release@24.2.0(typescript@5.4.5))
+ version: 14.0.1(semantic-release@24.2.0(typescript@5.6.3))
'@tanstack/react-query':
specifier: 5.59.16
version: 5.59.16(react@18.3.1)
@@ -105,12 +111,6 @@ importers:
'@testing-library/react':
specifier: 16.0.1
version: 16.0.1(@testing-library/dom@10.4.0)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- '@types/eslint':
- specifier: 8.56.10
- version: 8.56.10
- '@types/eslint__js':
- specifier: 8.42.3
- version: 8.42.3
'@types/node':
specifier: 22.8.4
version: 22.8.4
@@ -122,13 +122,13 @@ importers:
version: 2.1.4(vitest@2.1.4(@types/node@22.8.4))
astro:
specifier: 4.16.7
- version: 4.16.7(@types/node@22.8.4)(rollup@4.24.3)(typescript@5.4.5)
+ version: 4.16.7(@types/node@22.8.4)(rollup@4.24.3)(typescript@5.6.3)
clean-pkg-json:
specifier: 1.2.0
version: 1.2.0
commitlint:
specifier: 19.5.0
- version: 19.5.0(@types/node@22.8.4)(typescript@5.4.5)
+ version: 19.5.0(@types/node@22.8.4)(typescript@5.6.3)
eslint:
specifier: 8.57.0
version: 8.57.0
@@ -149,7 +149,7 @@ importers:
version: 1.8.2
pkgroll:
specifier: 2.5.1
- version: 2.5.1(typescript@5.4.5)
+ version: 2.5.1(typescript@5.6.3)
prettier:
specifier: 3.3.3
version: 3.3.3
@@ -161,13 +161,13 @@ importers:
version: 18.3.1(react@18.3.1)
semantic-release:
specifier: 24.2.0
- version: 24.2.0(typescript@5.4.5)
+ version: 24.2.0(typescript@5.6.3)
tsx:
specifier: 4.19.2
version: 4.19.2
typescript:
- specifier: 5.4.5
- version: 5.4.5
+ specifier: 5.6.3
+ version: 5.6.3
vitest:
specifier: 2.1.4
version: 2.1.4(@types/node@22.8.4)
@@ -1414,22 +1414,22 @@ packages:
'@types/unist@3.0.2':
resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==}
- '@typescript-eslint/eslint-plugin@7.6.0':
- resolution: {integrity: sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A==}
- engines: {node: ^18.18.0 || >=20.0.0}
+ '@typescript-eslint/eslint-plugin@8.12.2':
+ resolution: {integrity: sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
- '@typescript-eslint/parser': ^7.0.0
- eslint: ^8.56.0
+ '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0
+ eslint: ^8.57.0 || ^9.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
- '@typescript-eslint/parser@7.6.0':
- resolution: {integrity: sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg==}
- engines: {node: ^18.18.0 || >=20.0.0}
+ '@typescript-eslint/parser@8.12.2':
+ resolution: {integrity: sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
- eslint: ^8.56.0
+ eslint: ^8.57.0 || ^9.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
@@ -1439,19 +1439,14 @@ packages:
resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- '@typescript-eslint/scope-manager@7.6.0':
- resolution: {integrity: sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w==}
- engines: {node: ^18.18.0 || >=20.0.0}
-
'@typescript-eslint/scope-manager@8.12.2':
resolution: {integrity: sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- '@typescript-eslint/type-utils@7.6.0':
- resolution: {integrity: sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw==}
- engines: {node: ^18.18.0 || >=20.0.0}
+ '@typescript-eslint/type-utils@8.12.2':
+ resolution: {integrity: sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
- eslint: ^8.56.0
typescript: '*'
peerDependenciesMeta:
typescript:
@@ -1461,10 +1456,6 @@ packages:
resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- '@typescript-eslint/types@7.6.0':
- resolution: {integrity: sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ==}
- engines: {node: ^18.18.0 || >=20.0.0}
-
'@typescript-eslint/types@8.12.2':
resolution: {integrity: sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -1478,15 +1469,6 @@ packages:
typescript:
optional: true
- '@typescript-eslint/typescript-estree@7.6.0':
- resolution: {integrity: sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw==}
- engines: {node: ^18.18.0 || >=20.0.0}
- peerDependencies:
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
-
'@typescript-eslint/typescript-estree@8.12.2':
resolution: {integrity: sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -1502,12 +1484,6 @@ packages:
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
- '@typescript-eslint/utils@7.6.0':
- resolution: {integrity: sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA==}
- engines: {node: ^18.18.0 || >=20.0.0}
- peerDependencies:
- eslint: ^8.56.0
-
'@typescript-eslint/utils@8.12.2':
resolution: {integrity: sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -1518,10 +1494,6 @@ packages:
resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- '@typescript-eslint/visitor-keys@7.6.0':
- resolution: {integrity: sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw==}
- engines: {node: ^18.18.0 || >=20.0.0}
-
'@typescript-eslint/visitor-keys@8.12.2':
resolution: {integrity: sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -2689,10 +2661,6 @@ packages:
resolution: {integrity: sha512-yeyNSjdbyVaWurlwCpcA6XNBrHTMIeDdj0/hnvX/OLJ9ekOXYbLsLinH/MucQyGvNnXhidTdNhTtJaffL2sMfw==}
engines: {node: '>=18'}
- globalthis@1.0.3:
- resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==}
- engines: {node: '>= 0.4'}
-
globalthis@1.0.4:
resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==}
engines: {node: '>= 0.4'}
@@ -4636,18 +4604,17 @@ packages:
resolution: {integrity: sha512-8WbVAQAUlENo1q3c3zZYuy5k9VzBQvp8AX9WOtbvyWlLM1v5JaSRmjubLjzHF4JFtptjH/5c/i95yaElvcjC0A==}
engines: {node: '>= 0.4'}
- typescript-eslint@7.6.0:
- resolution: {integrity: sha512-LY6vH6F1l5jpGqRtU+uK4+mOecIb4Cd4kaz1hAiJrgnNiHUA8wiw8BkJyYS+MRLM69F1QuSKwtGlQqnGl1Rc6w==}
- engines: {node: ^18.18.0 || >=20.0.0}
+ typescript-eslint@8.12.2:
+ resolution: {integrity: sha512-UbuVUWSrHVR03q9CWx+JDHeO6B/Hr9p4U5lRH++5tq/EbFq1faYZe50ZSBePptgfIKLEti0aPQ3hFgnPVcd8ZQ==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
- eslint: ^8.56.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
- typescript@5.4.5:
- resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==}
+ typescript@5.6.3:
+ resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==}
engines: {node: '>=14.17'}
hasBin: true
@@ -5142,11 +5109,11 @@ snapshots:
'@colors/colors@1.5.0':
optional: true
- '@commitlint/cli@19.5.0(@types/node@22.8.4)(typescript@5.4.5)':
+ '@commitlint/cli@19.5.0(@types/node@22.8.4)(typescript@5.6.3)':
dependencies:
'@commitlint/format': 19.5.0
'@commitlint/lint': 19.5.0
- '@commitlint/load': 19.5.0(@types/node@22.8.4)(typescript@5.4.5)
+ '@commitlint/load': 19.5.0(@types/node@22.8.4)(typescript@5.6.3)
'@commitlint/read': 19.5.0
'@commitlint/types': 19.5.0
tinyexec: 0.3.1
@@ -5193,15 +5160,15 @@ snapshots:
'@commitlint/rules': 19.5.0
'@commitlint/types': 19.5.0
- '@commitlint/load@19.5.0(@types/node@22.8.4)(typescript@5.4.5)':
+ '@commitlint/load@19.5.0(@types/node@22.8.4)(typescript@5.6.3)':
dependencies:
'@commitlint/config-validator': 19.5.0
'@commitlint/execute-rule': 19.5.0
'@commitlint/resolve-extends': 19.5.0
'@commitlint/types': 19.5.0
chalk: 5.3.0
- cosmiconfig: 9.0.0(typescript@5.4.5)
- cosmiconfig-typescript-loader: 5.0.0(@types/node@22.8.4)(cosmiconfig@9.0.0(typescript@5.4.5))(typescript@5.4.5)
+ cosmiconfig: 9.0.0(typescript@5.6.3)
+ cosmiconfig-typescript-loader: 5.0.0(@types/node@22.8.4)(cosmiconfig@9.0.0(typescript@5.6.3))(typescript@5.6.3)
lodash.isplainobject: 4.0.6
lodash.merge: 4.6.2
lodash.uniq: 4.5.0
@@ -5882,15 +5849,15 @@ snapshots:
'@sec-ant/readable-stream@0.4.1': {}
- '@semantic-release/changelog@6.0.3(semantic-release@24.2.0(typescript@5.4.5))':
+ '@semantic-release/changelog@6.0.3(semantic-release@24.2.0(typescript@5.6.3))':
dependencies:
'@semantic-release/error': 3.0.0
aggregate-error: 3.1.0
fs-extra: 11.2.0
lodash: 4.17.21
- semantic-release: 24.2.0(typescript@5.4.5)
+ semantic-release: 24.2.0(typescript@5.6.3)
- '@semantic-release/commit-analyzer@13.0.0(semantic-release@24.2.0(typescript@5.4.5))':
+ '@semantic-release/commit-analyzer@13.0.0(semantic-release@24.2.0(typescript@5.6.3))':
dependencies:
conventional-changelog-angular: 8.0.0
conventional-changelog-writer: 8.0.0
@@ -5900,7 +5867,7 @@ snapshots:
import-from-esm: 1.3.4
lodash-es: 4.17.21
micromatch: 4.0.8
- semantic-release: 24.2.0(typescript@5.4.5)
+ semantic-release: 24.2.0(typescript@5.6.3)
transitivePeerDependencies:
- supports-color
@@ -5908,7 +5875,7 @@ snapshots:
'@semantic-release/error@4.0.0': {}
- '@semantic-release/git@10.0.1(semantic-release@24.2.0(typescript@5.4.5))':
+ '@semantic-release/git@10.0.1(semantic-release@24.2.0(typescript@5.6.3))':
dependencies:
'@semantic-release/error': 3.0.0
aggregate-error: 3.1.0
@@ -5918,11 +5885,11 @@ snapshots:
lodash: 4.17.21
micromatch: 4.0.8
p-reduce: 2.1.0
- semantic-release: 24.2.0(typescript@5.4.5)
+ semantic-release: 24.2.0(typescript@5.6.3)
transitivePeerDependencies:
- supports-color
- '@semantic-release/github@11.0.0(semantic-release@24.2.0(typescript@5.4.5))':
+ '@semantic-release/github@11.0.0(semantic-release@24.2.0(typescript@5.6.3))':
dependencies:
'@octokit/core': 6.1.2
'@octokit/plugin-paginate-rest': 11.3.0(@octokit/core@6.1.2)
@@ -5939,12 +5906,12 @@ snapshots:
lodash-es: 4.17.21
mime: 4.0.3
p-filter: 4.1.0
- semantic-release: 24.2.0(typescript@5.4.5)
+ semantic-release: 24.2.0(typescript@5.6.3)
url-join: 5.0.0
transitivePeerDependencies:
- supports-color
- '@semantic-release/npm@12.0.1(semantic-release@24.2.0(typescript@5.4.5))':
+ '@semantic-release/npm@12.0.1(semantic-release@24.2.0(typescript@5.6.3))':
dependencies:
'@semantic-release/error': 4.0.0
aggregate-error: 5.0.0
@@ -5957,11 +5924,11 @@ snapshots:
rc: 1.2.8
read-pkg: 9.0.1
registry-auth-token: 5.0.2
- semantic-release: 24.2.0(typescript@5.4.5)
+ semantic-release: 24.2.0(typescript@5.6.3)
semver: 7.6.3
tempy: 3.1.0
- '@semantic-release/release-notes-generator@14.0.1(semantic-release@24.2.0(typescript@5.4.5))':
+ '@semantic-release/release-notes-generator@14.0.1(semantic-release@24.2.0(typescript@5.6.3))':
dependencies:
conventional-changelog-angular: 8.0.0
conventional-changelog-writer: 8.0.0
@@ -5973,7 +5940,7 @@ snapshots:
into-stream: 7.0.0
lodash-es: 4.17.21
read-package-up: 11.0.0
- semantic-release: 24.2.0(typescript@5.4.5)
+ semantic-release: 24.2.0(typescript@5.6.3)
transitivePeerDependencies:
- supports-color
@@ -6010,9 +5977,9 @@ snapshots:
'@sindresorhus/merge-streams@4.0.0': {}
- '@tanstack/eslint-plugin-query@5.59.7(eslint@8.57.0)(typescript@5.4.5)':
+ '@tanstack/eslint-plugin-query@5.59.7(eslint@8.57.0)(typescript@5.6.3)':
dependencies:
- '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.4.5)
+ '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.6.3)
eslint: 8.57.0
transitivePeerDependencies:
- supports-color
@@ -6124,36 +6091,34 @@ snapshots:
'@types/unist@3.0.2': {}
- '@typescript-eslint/eslint-plugin@7.6.0(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)':
+ '@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)(typescript@5.6.3)':
dependencies:
'@eslint-community/regexpp': 4.10.1
- '@typescript-eslint/parser': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
- '@typescript-eslint/scope-manager': 7.6.0
- '@typescript-eslint/type-utils': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
- '@typescript-eslint/utils': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
- '@typescript-eslint/visitor-keys': 7.6.0
- debug: 4.3.7
+ '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.6.3)
+ '@typescript-eslint/scope-manager': 8.12.2
+ '@typescript-eslint/type-utils': 8.12.2(eslint@8.57.0)(typescript@5.6.3)
+ '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.6.3)
+ '@typescript-eslint/visitor-keys': 8.12.2
eslint: 8.57.0
graphemer: 1.4.0
ignore: 5.3.1
natural-compare: 1.4.0
- semver: 7.6.3
- ts-api-utils: 1.3.0(typescript@5.4.5)
+ ts-api-utils: 1.3.0(typescript@5.6.3)
optionalDependencies:
- typescript: 5.4.5
+ typescript: 5.6.3
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5)':
+ '@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3)':
dependencies:
- '@typescript-eslint/scope-manager': 7.6.0
- '@typescript-eslint/types': 7.6.0
- '@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5)
- '@typescript-eslint/visitor-keys': 7.6.0
+ '@typescript-eslint/scope-manager': 8.12.2
+ '@typescript-eslint/types': 8.12.2
+ '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3)
+ '@typescript-eslint/visitor-keys': 8.12.2
debug: 4.3.7
eslint: 8.57.0
optionalDependencies:
- typescript: 5.4.5
+ typescript: 5.6.3
transitivePeerDependencies:
- supports-color
@@ -6162,35 +6127,28 @@ snapshots:
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/visitor-keys': 5.62.0
- '@typescript-eslint/scope-manager@7.6.0':
- dependencies:
- '@typescript-eslint/types': 7.6.0
- '@typescript-eslint/visitor-keys': 7.6.0
-
'@typescript-eslint/scope-manager@8.12.2':
dependencies:
'@typescript-eslint/types': 8.12.2
'@typescript-eslint/visitor-keys': 8.12.2
- '@typescript-eslint/type-utils@7.6.0(eslint@8.57.0)(typescript@5.4.5)':
+ '@typescript-eslint/type-utils@8.12.2(eslint@8.57.0)(typescript@5.6.3)':
dependencies:
- '@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5)
- '@typescript-eslint/utils': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
+ '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3)
+ '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.6.3)
debug: 4.3.7
- eslint: 8.57.0
- ts-api-utils: 1.3.0(typescript@5.4.5)
+ ts-api-utils: 1.3.0(typescript@5.6.3)
optionalDependencies:
- typescript: 5.4.5
+ typescript: 5.6.3
transitivePeerDependencies:
+ - eslint
- supports-color
'@typescript-eslint/types@5.62.0': {}
- '@typescript-eslint/types@7.6.0': {}
-
'@typescript-eslint/types@8.12.2': {}
- '@typescript-eslint/typescript-estree@5.62.0(typescript@5.4.5)':
+ '@typescript-eslint/typescript-estree@5.62.0(typescript@5.6.3)':
dependencies:
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/visitor-keys': 5.62.0
@@ -6198,28 +6156,13 @@ snapshots:
globby: 11.1.0
is-glob: 4.0.3
semver: 7.6.3
- tsutils: 3.21.0(typescript@5.4.5)
- optionalDependencies:
- typescript: 5.4.5
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/typescript-estree@7.6.0(typescript@5.4.5)':
- dependencies:
- '@typescript-eslint/types': 7.6.0
- '@typescript-eslint/visitor-keys': 7.6.0
- debug: 4.3.7
- globby: 11.1.0
- is-glob: 4.0.3
- minimatch: 9.0.5
- semver: 7.6.3
- ts-api-utils: 1.3.0(typescript@5.4.5)
+ tsutils: 3.21.0(typescript@5.6.3)
optionalDependencies:
- typescript: 5.4.5
+ typescript: 5.6.3
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/typescript-estree@8.12.2(typescript@5.4.5)':
+ '@typescript-eslint/typescript-estree@8.12.2(typescript@5.6.3)':
dependencies:
'@typescript-eslint/types': 8.12.2
'@typescript-eslint/visitor-keys': 8.12.2
@@ -6228,20 +6171,20 @@ snapshots:
is-glob: 4.0.3
minimatch: 9.0.5
semver: 7.6.3
- ts-api-utils: 1.3.0(typescript@5.4.5)
+ ts-api-utils: 1.3.0(typescript@5.6.3)
optionalDependencies:
- typescript: 5.4.5
+ typescript: 5.6.3
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.4.5)':
+ '@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.6.3)':
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
'@types/json-schema': 7.0.15
'@types/semver': 7.5.8
'@typescript-eslint/scope-manager': 5.62.0
'@typescript-eslint/types': 5.62.0
- '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.5)
+ '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.6.3)
eslint: 8.57.0
eslint-scope: 5.1.1
semver: 7.6.3
@@ -6249,26 +6192,12 @@ snapshots:
- supports-color
- typescript
- '@typescript-eslint/utils@7.6.0(eslint@8.57.0)(typescript@5.4.5)':
- dependencies:
- '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
- '@types/json-schema': 7.0.15
- '@types/semver': 7.5.8
- '@typescript-eslint/scope-manager': 7.6.0
- '@typescript-eslint/types': 7.6.0
- '@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5)
- eslint: 8.57.0
- semver: 7.6.3
- transitivePeerDependencies:
- - supports-color
- - typescript
-
- '@typescript-eslint/utils@8.12.2(eslint@8.57.0)(typescript@5.4.5)':
+ '@typescript-eslint/utils@8.12.2(eslint@8.57.0)(typescript@5.6.3)':
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
'@typescript-eslint/scope-manager': 8.12.2
'@typescript-eslint/types': 8.12.2
- '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.4.5)
+ '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3)
eslint: 8.57.0
transitivePeerDependencies:
- supports-color
@@ -6279,11 +6208,6 @@ snapshots:
'@typescript-eslint/types': 5.62.0
eslint-visitor-keys: 3.4.3
- '@typescript-eslint/visitor-keys@7.6.0':
- dependencies:
- '@typescript-eslint/types': 7.6.0
- eslint-visitor-keys: 3.4.3
-
'@typescript-eslint/visitor-keys@8.12.2':
dependencies:
'@typescript-eslint/types': 8.12.2
@@ -6503,12 +6427,12 @@ snapshots:
ast-types-flow@0.0.8: {}
- astro-eslint-parser@1.0.3(typescript@5.4.5):
+ astro-eslint-parser@1.0.3(typescript@5.6.3):
dependencies:
'@astrojs/compiler': 2.10.3
'@typescript-eslint/scope-manager': 8.12.2
'@typescript-eslint/types': 8.12.2
- '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.4.5)
+ '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3)
astrojs-compiler-sync: 1.0.0(@astrojs/compiler@2.10.3)
debug: 4.3.7
entities: 4.5.0
@@ -6522,7 +6446,7 @@ snapshots:
- supports-color
- typescript
- astro@4.16.7(@types/node@22.8.4)(rollup@4.24.3)(typescript@5.4.5):
+ astro@4.16.7(@types/node@22.8.4)(rollup@4.24.3)(typescript@5.6.3):
dependencies:
'@astrojs/compiler': 2.10.3
'@astrojs/internal-helpers': 0.4.1
@@ -6575,7 +6499,7 @@ snapshots:
semver: 7.6.3
shiki: 1.22.2
tinyexec: 0.3.1
- tsconfck: 3.1.4(typescript@5.4.5)
+ tsconfck: 3.1.4(typescript@5.6.3)
unist-util-visit: 5.0.0
vfile: 6.0.3
vite: 5.4.10(@types/node@22.8.4)
@@ -6585,7 +6509,7 @@ snapshots:
yargs-parser: 21.1.1
zod: 3.23.8
zod-to-json-schema: 3.23.5(zod@3.23.8)
- zod-to-ts: 1.2.0(typescript@5.4.5)(zod@3.23.8)
+ zod-to-ts: 1.2.0(typescript@5.6.3)(zod@3.23.8)
optionalDependencies:
sharp: 0.33.4
transitivePeerDependencies:
@@ -6796,9 +6720,9 @@ snapshots:
commander@11.1.0: {}
- commitlint@19.5.0(@types/node@22.8.4)(typescript@5.4.5):
+ commitlint@19.5.0(@types/node@22.8.4)(typescript@5.6.3):
dependencies:
- '@commitlint/cli': 19.5.0(@types/node@22.8.4)(typescript@5.4.5)
+ '@commitlint/cli': 19.5.0(@types/node@22.8.4)(typescript@5.6.3)
'@commitlint/types': 19.5.0
transitivePeerDependencies:
- '@types/node'
@@ -6867,21 +6791,21 @@ snapshots:
core-util-is@1.0.3: {}
- cosmiconfig-typescript-loader@5.0.0(@types/node@22.8.4)(cosmiconfig@9.0.0(typescript@5.4.5))(typescript@5.4.5):
+ cosmiconfig-typescript-loader@5.0.0(@types/node@22.8.4)(cosmiconfig@9.0.0(typescript@5.6.3))(typescript@5.6.3):
dependencies:
'@types/node': 22.8.4
- cosmiconfig: 9.0.0(typescript@5.4.5)
+ cosmiconfig: 9.0.0(typescript@5.6.3)
jiti: 1.21.6
- typescript: 5.4.5
+ typescript: 5.6.3
- cosmiconfig@9.0.0(typescript@5.4.5):
+ cosmiconfig@9.0.0(typescript@5.6.3):
dependencies:
env-paths: 2.2.1
import-fresh: 3.3.0
js-yaml: 4.1.0
parse-json: 5.2.0
optionalDependencies:
- typescript: 5.4.5
+ typescript: 5.6.3
cross-spawn@7.0.3:
dependencies:
@@ -7063,7 +6987,7 @@ snapshots:
function.prototype.name: 1.1.6
get-intrinsic: 1.2.4
get-symbol-description: 1.0.2
- globalthis: 1.0.3
+ globalthis: 1.0.4
gopd: 1.0.1
has-property-descriptors: 1.0.2
has-proto: 1.0.3
@@ -7245,41 +7169,41 @@ snapshots:
transitivePeerDependencies:
- supports-color
- eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import-x@4.4.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0):
+ eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3))(eslint-plugin-import-x@4.4.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0):
dependencies:
'@nolyfill/is-core-module': 1.0.39
debug: 4.3.7
enhanced-resolve: 5.16.0
eslint: 8.57.0
- eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import-x@4.4.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0)
+ eslint-module-utils: 2.8.1(@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3))(eslint-plugin-import-x@4.4.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0)
fast-glob: 3.3.2
get-tsconfig: 4.7.5
is-bun-module: 1.2.1
is-glob: 4.0.3
optionalDependencies:
- eslint-plugin-import-x: 4.4.0(eslint@8.57.0)(typescript@5.4.5)
+ eslint-plugin-import-x: 4.4.0(eslint@8.57.0)(typescript@5.6.3)
transitivePeerDependencies:
- '@typescript-eslint/parser'
- eslint-import-resolver-node
- eslint-import-resolver-webpack
- supports-color
- eslint-module-utils@2.8.1(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import-x@4.4.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0):
+ eslint-module-utils@2.8.1(@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3))(eslint-plugin-import-x@4.4.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0):
dependencies:
debug: 3.2.7
optionalDependencies:
- '@typescript-eslint/parser': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
+ '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.6.3)
eslint: 8.57.0
- eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import-x@4.4.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)
+ eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3))(eslint-plugin-import-x@4.4.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)
transitivePeerDependencies:
- supports-color
- eslint-plugin-astro@1.3.0(eslint@8.57.0)(typescript@5.4.5):
+ eslint-plugin-astro@1.3.0(eslint@8.57.0)(typescript@5.6.3):
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
'@jridgewell/sourcemap-codec': 1.5.0
'@typescript-eslint/types': 8.12.2
- astro-eslint-parser: 1.0.3(typescript@5.4.5)
+ astro-eslint-parser: 1.0.3(typescript@5.6.3)
eslint: 8.57.0
eslint-compat-utils: 0.5.0(eslint@8.57.0)
globals: 15.11.0
@@ -7289,9 +7213,9 @@ snapshots:
- supports-color
- typescript
- eslint-plugin-import-x@4.4.0(eslint@8.57.0)(typescript@5.4.5):
+ eslint-plugin-import-x@4.4.0(eslint@8.57.0)(typescript@5.6.3):
dependencies:
- '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.4.5)
+ '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.6.3)
debug: 4.3.7
doctrine: 3.0.0
eslint: 8.57.0
@@ -7314,12 +7238,12 @@ snapshots:
optionalDependencies:
'@testing-library/dom': 10.4.0
- eslint-plugin-jest@28.8.3(@typescript-eslint/eslint-plugin@7.6.0(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5):
+ eslint-plugin-jest@28.8.3(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)(typescript@5.6.3):
dependencies:
- '@typescript-eslint/utils': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
+ '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.6.3)
eslint: 8.57.0
optionalDependencies:
- '@typescript-eslint/eslint-plugin': 7.6.0(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)
+ '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)(typescript@5.6.3)
transitivePeerDependencies:
- supports-color
- typescript
@@ -7381,9 +7305,9 @@ snapshots:
dependencies:
eslint: 8.57.0
- eslint-plugin-testing-library@6.4.0(eslint@8.57.0)(typescript@5.4.5):
+ eslint-plugin-testing-library@6.4.0(eslint@8.57.0)(typescript@5.6.3):
dependencies:
- '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.4.5)
+ '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.6.3)
eslint: 8.57.0
transitivePeerDependencies:
- supports-color
@@ -7754,10 +7678,6 @@ snapshots:
globals@15.11.0: {}
- globalthis@1.0.3:
- dependencies:
- define-properties: 1.2.1
-
globalthis@1.0.4:
dependencies:
define-properties: 1.2.1
@@ -9103,7 +9023,7 @@ snapshots:
mlly: 1.7.2
pathe: 1.1.2
- pkgroll@2.5.1(typescript@5.4.5):
+ pkgroll@2.5.1(typescript@5.6.3):
dependencies:
'@rollup/plugin-alias': 5.1.0(rollup@4.24.3)
'@rollup/plugin-commonjs': 26.0.3(rollup@4.24.3)
@@ -9116,7 +9036,7 @@ snapshots:
magic-string: 0.30.12
rollup: 4.24.3
optionalDependencies:
- typescript: 5.4.5
+ typescript: 5.6.3
possible-typed-array-names@1.0.0: {}
@@ -9242,7 +9162,7 @@ snapshots:
es-abstract: 1.23.3
es-errors: 1.3.0
get-intrinsic: 1.2.4
- globalthis: 1.0.3
+ globalthis: 1.0.4
which-builtin-type: 1.1.3
regenerator-runtime@0.14.1: {}
@@ -9446,15 +9366,15 @@ snapshots:
extend-shallow: 2.0.1
kind-of: 6.0.3
- semantic-release@24.2.0(typescript@5.4.5):
+ semantic-release@24.2.0(typescript@5.6.3):
dependencies:
- '@semantic-release/commit-analyzer': 13.0.0(semantic-release@24.2.0(typescript@5.4.5))
+ '@semantic-release/commit-analyzer': 13.0.0(semantic-release@24.2.0(typescript@5.6.3))
'@semantic-release/error': 4.0.0
- '@semantic-release/github': 11.0.0(semantic-release@24.2.0(typescript@5.4.5))
- '@semantic-release/npm': 12.0.1(semantic-release@24.2.0(typescript@5.4.5))
- '@semantic-release/release-notes-generator': 14.0.1(semantic-release@24.2.0(typescript@5.4.5))
+ '@semantic-release/github': 11.0.0(semantic-release@24.2.0(typescript@5.6.3))
+ '@semantic-release/npm': 12.0.1(semantic-release@24.2.0(typescript@5.6.3))
+ '@semantic-release/release-notes-generator': 14.0.1(semantic-release@24.2.0(typescript@5.6.3))
aggregate-error: 5.0.0
- cosmiconfig: 9.0.0(typescript@5.4.5)
+ cosmiconfig: 9.0.0(typescript@5.6.3)
debug: 4.3.7
env-ci: 11.0.0
execa: 9.2.0
@@ -9815,22 +9735,22 @@ snapshots:
trough@2.2.0: {}
- ts-api-utils@1.3.0(typescript@5.4.5):
+ ts-api-utils@1.3.0(typescript@5.6.3):
dependencies:
- typescript: 5.4.5
+ typescript: 5.6.3
- tsconfck@3.1.4(typescript@5.4.5):
+ tsconfck@3.1.4(typescript@5.6.3):
optionalDependencies:
- typescript: 5.4.5
+ typescript: 5.6.3
tslib@1.14.1: {}
tslib@2.6.3: {}
- tsutils@3.21.0(typescript@5.4.5):
+ tsutils@3.21.0(typescript@5.6.3):
dependencies:
tslib: 1.14.1
- typescript: 5.4.5
+ typescript: 5.6.3
tsx@4.19.2:
dependencies:
@@ -9892,18 +9812,18 @@ snapshots:
typed-array-buffer: 1.0.2
typed-array-byte-offset: 1.0.2
- typescript-eslint@7.6.0(eslint@8.57.0)(typescript@5.4.5):
+ typescript-eslint@8.12.2(eslint@8.57.0)(typescript@5.6.3):
dependencies:
- '@typescript-eslint/eslint-plugin': 7.6.0(@typescript-eslint/parser@7.6.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)
- '@typescript-eslint/parser': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
- '@typescript-eslint/utils': 7.6.0(eslint@8.57.0)(typescript@5.4.5)
- eslint: 8.57.0
+ '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0)(typescript@5.6.3)
+ '@typescript-eslint/parser': 8.12.2(eslint@8.57.0)(typescript@5.6.3)
+ '@typescript-eslint/utils': 8.12.2(eslint@8.57.0)(typescript@5.6.3)
optionalDependencies:
- typescript: 5.4.5
+ typescript: 5.6.3
transitivePeerDependencies:
+ - eslint
- supports-color
- typescript@5.4.5: {}
+ typescript@5.6.3: {}
ufo@1.5.4: {}
@@ -10221,9 +10141,9 @@ snapshots:
dependencies:
zod: 3.23.8
- zod-to-ts@1.2.0(typescript@5.4.5)(zod@3.23.8):
+ zod-to-ts@1.2.0(typescript@5.6.3)(zod@3.23.8):
dependencies:
- typescript: 5.4.5
+ typescript: 5.6.3
zod: 3.23.8
zod@3.23.8: {}
diff --git a/src/configs/__snapshots__/react.spec.ts.snap b/src/configs/__snapshots__/react.spec.ts.snap
index 4312298..9e023db 100644
--- a/src/configs/__snapshots__/react.spec.ts.snap
+++ b/src/configs/__snapshots__/react.spec.ts.snap
@@ -9518,26 +9518,12 @@ exports[`reactConfig > should create config w/ @tanstack/query rules 1`] = `
"name": "jimmy.codes/react/query",
"plugins": {
"@tanstack/query": {
- "default": {
- "configs": {
- "flat/recommended": [
- {
- "plugins": {
- "@tanstack/query": [Circular],
- },
- "rules": {
- "@tanstack/query/exhaustive-deps": "error",
- "@tanstack/query/infinite-query-property-order": "error",
- "@tanstack/query/no-rest-destructuring": "warn",
- "@tanstack/query/no-unstable-deps": "error",
- "@tanstack/query/stable-query-client": "error",
- },
+ "configs": {
+ "flat/recommended": [
+ {
+ "plugins": {
+ "@tanstack/query": [Circular],
},
- ],
- "recommended": {
- "plugins": [
- "@tanstack/query",
- ],
"rules": {
"@tanstack/query/exhaustive-deps": "error",
"@tanstack/query/infinite-query-property-order": "error",
@@ -9546,99 +9532,111 @@ exports[`reactConfig > should create config w/ @tanstack/query rules 1`] = `
"@tanstack/query/stable-query-client": "error",
},
},
+ ],
+ "recommended": {
+ "plugins": [
+ "@tanstack/query",
+ ],
+ "rules": {
+ "@tanstack/query/exhaustive-deps": "error",
+ "@tanstack/query/infinite-query-property-order": "error",
+ "@tanstack/query/no-rest-destructuring": "warn",
+ "@tanstack/query/no-unstable-deps": "error",
+ "@tanstack/query/stable-query-client": "error",
+ },
},
- "meta": {
- "name": "@tanstack/eslint-plugin-query",
- },
- "rules": {
- "exhaustive-deps": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Exhaustive deps rule for useQuery",
- "recommended": "error",
- "url": "https://tanstack.com/query/latest/docs/eslint/exhaustive-deps",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "fixTo": "Fix to {{result}}",
- "missingDeps": "The following dependencies are missing in your queryKey: {{deps}}",
- },
- "schema": [],
- "type": "problem",
+ },
+ "meta": {
+ "name": "@tanstack/eslint-plugin-query",
+ },
+ "rules": {
+ "exhaustive-deps": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Exhaustive deps rule for useQuery",
+ "recommended": "error",
+ "url": "https://tanstack.com/query/latest/docs/eslint/exhaustive-deps",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "fixTo": "Fix to {{result}}",
+ "missingDeps": "The following dependencies are missing in your queryKey: {{deps}}",
},
+ "schema": [],
+ "type": "problem",
},
- "infinite-query-property-order": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Ensure correct order of inference sensitive properties for infinite queries",
- "recommended": "error",
- "url": "https://tanstack.com/query/latest/docs/eslint/infinite-query-property-order",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "invalidOrder": "Invalid order of properties for \`{{function}}\`.",
- },
- "schema": [],
- "type": "problem",
+ },
+ "infinite-query-property-order": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Ensure correct order of inference sensitive properties for infinite queries",
+ "recommended": "error",
+ "url": "https://tanstack.com/query/latest/docs/eslint/infinite-query-property-order",
},
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "invalidOrder": "Invalid order of properties for \`{{function}}\`.",
+ },
+ "schema": [],
+ "type": "problem",
},
- "no-rest-destructuring": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallows rest destructuring in queries",
- "recommended": "warn",
- "url": "https://tanstack.com/query/latest/docs/eslint/no-rest-destructuring",
- },
- "messages": {
- "objectRestDestructure": "Object rest destructuring on a query will observe all changes to the query, leading to excessive re-renders.",
- },
- "schema": [],
- "type": "problem",
+ },
+ "no-rest-destructuring": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallows rest destructuring in queries",
+ "recommended": "warn",
+ "url": "https://tanstack.com/query/latest/docs/eslint/no-rest-destructuring",
+ },
+ "messages": {
+ "objectRestDestructure": "Object rest destructuring on a query will observe all changes to the query, leading to excessive re-renders.",
},
+ "schema": [],
+ "type": "problem",
},
- "no-unstable-deps": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow putting the result of query hooks directly in a React hook dependency array",
- "recommended": "error",
- "url": "https://tanstack.com/query/latest/docs/eslint/no-unstable-deps",
- },
- "messages": {
- "noUnstableDeps": "The result of {{queryHook}} is not referentially stable, so don't pass it directly into the dependencies array of {{reactHook}}. Instead, destructure the return value of {{queryHook}} and pass the destructured values into the dependency array of {{reactHook}}.",
- },
- "schema": [],
- "type": "problem",
+ },
+ "no-unstable-deps": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow putting the result of query hooks directly in a React hook dependency array",
+ "recommended": "error",
+ "url": "https://tanstack.com/query/latest/docs/eslint/no-unstable-deps",
},
+ "messages": {
+ "noUnstableDeps": "The result of {{queryHook}} is not referentially stable, so don't pass it directly into the dependencies array of {{reactHook}}. Instead, destructure the return value of {{queryHook}} and pass the destructured values into the dependency array of {{reactHook}}.",
+ },
+ "schema": [],
+ "type": "problem",
},
- "stable-query-client": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Makes sure that QueryClient is stable",
- "recommended": "error",
- "url": "https://tanstack.com/query/latest/docs/eslint/stable-query-client",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "fixTo": "Fix to {{result}}",
- "unstable": "QueryClient is not stable. It should be either extracted from the component or wrapped in React.useState.
+ },
+ "stable-query-client": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Makes sure that QueryClient is stable",
+ "recommended": "error",
+ "url": "https://tanstack.com/query/latest/docs/eslint/stable-query-client",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "fixTo": "Fix to {{result}}",
+ "unstable": "QueryClient is not stable. It should be either extracted from the component or wrapped in React.useState.
See https://tkdodo.eu/blog/react-query-fa-qs#2-the-queryclient-is-not-stable",
- },
- "schema": [],
- "type": "problem",
},
+ "schema": [],
+ "type": "problem",
},
},
},
diff --git a/src/configs/__snapshots__/typescript.spec.ts.snap b/src/configs/__snapshots__/typescript.spec.ts.snap
index b815e2d..da85452 100644
--- a/src/configs/__snapshots__/typescript.spec.ts.snap
+++ b/src/configs/__snapshots__/typescript.spec.ts.snap
@@ -7,7 +7,7 @@ exports[`typescriptConfig > should create config 1`] = `
"parser": {
"meta": {
"name": "typescript-eslint/parser",
- "version": "7.6.0",
+ "version": "8.12.2",
},
"parseForESLint": [Function],
},
@@ -28,7 +28,6 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/ban-tslint-comment": "error",
- "@typescript-eslint/ban-types": "error",
"@typescript-eslint/class-literal-property-style": "error",
"@typescript-eslint/class-methods-use-this": "error",
"@typescript-eslint/consistent-generic-constructors": "error",
@@ -53,12 +52,13 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
+ "@typescript-eslint/no-deprecated": "error",
"@typescript-eslint/no-dupe-class-members": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-empty-function": "error",
- "@typescript-eslint/no-empty-interface": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extraneous-class": "error",
@@ -70,7 +70,6 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-invalid-this": "error",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-loop-func": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-magic-numbers": "error",
"@typescript-eslint/no-meaningless-void-operator": "error",
"@typescript-eslint/no-misused-new": "error",
@@ -84,19 +83,24 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-redundant-type-constituents": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-restricted-imports": "error",
+ "@typescript-eslint/no-restricted-types": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/no-unsafe-unary-minus": "error",
@@ -105,8 +109,7 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-useless-empty-export": "error",
- "@typescript-eslint/no-useless-template-literals": "error",
- "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
"@typescript-eslint/only-throw-error": "error",
"@typescript-eslint/parameter-properties": "error",
@@ -128,14 +131,12 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-return-this-type": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
- "@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "error",
"@typescript-eslint/return-await": "error",
- "@typescript-eslint/sort-type-constituents": "error",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/triple-slash-reference": "error",
@@ -155,7 +156,6 @@ exports[`typescriptConfig > should create config 1`] = `
"no-implied-eval": "off",
"no-invalid-this": "off",
"no-loop-func": "off",
- "no-loss-of-precision": "off",
"no-magic-numbers": "off",
"no-redeclare": "off",
"no-restricted-imports": "off",
@@ -184,6 +184,7 @@ exports[`typescriptConfig > should create config 1`] = `
"parserOptions": {
"program": null,
"project": false,
+ "projectService": false,
},
"rules": {
"@typescript-eslint/await-thenable": "off",
@@ -194,6 +195,7 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-array-delete": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
+ "@typescript-eslint/no-deprecated": "off",
"@typescript-eslint/no-duplicate-type-constituents": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-for-in-array": "off",
@@ -202,12 +204,13 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-mixed-enums": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
- "@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-qualifier": "off",
+ "@typescript-eslint/no-unnecessary-template-expression": "off",
"@typescript-eslint/no-unnecessary-type-arguments": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
+ "@typescript-eslint/no-unnecessary-type-parameters": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
@@ -215,7 +218,6 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-unary-minus": "off",
- "@typescript-eslint/no-useless-template-literals": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/only-throw-error": "off",
"@typescript-eslint/prefer-destructuring": "off",
@@ -260,6 +262,7 @@ exports[`typescriptConfig > should create config 1`] = `
"no-dupe-keys": "off",
"no-func-assign": "off",
"no-import-assign": "off",
+ "no-new-native-nonconstructor": "off",
"no-new-symbol": "off",
"no-obj-calls": "off",
"no-redeclare": "off",
@@ -283,24 +286,27 @@ exports[`typescriptConfig > should create config 1`] = `
],
"rules": {
"@typescript-eslint/ban-ts-comment": "error",
- "@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
+ "@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/triple-slash-reference": "error",
"no-array-constructor": "off",
- "no-loss-of-precision": "off",
+ "no-unused-expressions": "off",
"no-unused-vars": "off",
},
},
@@ -312,22 +318,23 @@ exports[`typescriptConfig > should create config 1`] = `
"rules": {
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
- "@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-array-constructor": "error",
+ "@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
@@ -336,11 +343,17 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
+ "@typescript-eslint/only-throw-error": "error",
"@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "error",
@@ -348,8 +361,10 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/unbound-method": "error",
"no-array-constructor": "off",
"no-implied-eval": "off",
- "no-loss-of-precision": "off",
+ "no-throw-literal": "off",
+ "no-unused-expressions": "off",
"no-unused-vars": "off",
+ "prefer-promise-reject-errors": "off",
"require-await": "off",
},
},
@@ -361,22 +376,23 @@ exports[`typescriptConfig > should create config 1`] = `
"rules": {
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
- "@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-array-constructor": "error",
+ "@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
@@ -385,11 +401,17 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
+ "@typescript-eslint/only-throw-error": "error",
"@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "error",
@@ -397,8 +419,10 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/unbound-method": "error",
"no-array-constructor": "off",
"no-implied-eval": "off",
- "no-loss-of-precision": "off",
+ "no-throw-literal": "off",
+ "no-unused-expressions": "off",
"no-unused-vars": "off",
+ "prefer-promise-reject-errors": "off",
"require-await": "off",
},
},
@@ -409,6 +433,7 @@ exports[`typescriptConfig > should create config 1`] = `
],
"rules": {
"@typescript-eslint/await-thenable": "error",
+ "@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-floating-promises": "error",
@@ -423,11 +448,16 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-unsafe-enum-comparison": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/only-throw-error": "error",
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "error",
"@typescript-eslint/unbound-method": "error",
"no-implied-eval": "off",
+ "no-throw-literal": "off",
+ "prefer-promise-reject-errors": "off",
"require-await": "off",
},
},
@@ -443,33 +473,35 @@ exports[`typescriptConfig > should create config 1`] = `
"minimumDescriptionLength": 10,
},
],
- "@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-dynamic-delete": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-invalid-void-type": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
+ "@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-useless-constructor": "error",
- "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-literal-enum-member": "error",
- "@typescript-eslint/prefer-ts-expect-error": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/unified-signatures": "error",
"no-array-constructor": "off",
- "no-loss-of-precision": "off",
+ "no-unused-expressions": "off",
"no-unused-vars": "off",
"no-useless-constructor": "off",
},
@@ -487,14 +519,15 @@ exports[`typescriptConfig > should create config 1`] = `
"minimumDescriptionLength": 10,
},
],
- "@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
+ "@typescript-eslint/no-deprecated": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-dynamic-delete": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extraneous-class": "error",
@@ -502,7 +535,6 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-invalid-void-type": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-meaningless-void-operator": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
@@ -512,31 +544,35 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-useless-constructor": "error",
- "@typescript-eslint/no-useless-template-literals": "error",
- "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/only-throw-error": "error",
"@typescript-eslint/prefer-as-const": "error",
- "@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-literal-enum-member": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-return-this-type": "error",
- "@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": [
"error",
@@ -559,14 +595,19 @@ exports[`typescriptConfig > should create config 1`] = `
"allowRegExp": false,
},
],
+ "@typescript-eslint/return-await": [
+ "error",
+ "error-handling-correctness-only",
+ ],
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
"no-array-constructor": "off",
"no-implied-eval": "off",
- "no-loss-of-precision": "off",
+ "no-return-await": "off",
"no-throw-literal": "off",
+ "no-unused-expressions": "off",
"no-unused-vars": "off",
"no-useless-constructor": "off",
"prefer-promise-reject-errors": "off",
@@ -583,6 +624,7 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
+ "@typescript-eslint/no-deprecated": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
@@ -593,17 +635,18 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/no-redundant-type-constituents": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
- "@typescript-eslint/no-useless-template-literals": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
"@typescript-eslint/only-throw-error": "error",
- "@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-return-this-type": "error",
@@ -629,9 +672,14 @@ exports[`typescriptConfig > should create config 1`] = `
"allowRegExp": false,
},
],
+ "@typescript-eslint/return-await": [
+ "error",
+ "error-handling-correctness-only",
+ ],
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
"no-implied-eval": "off",
+ "no-return-await": "off",
"no-throw-literal": "off",
"prefer-promise-reject-errors": "off",
"require-await": "off",
@@ -653,11 +701,9 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-empty-function": "error",
- "@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
- "@typescript-eslint/prefer-namespace-keyword": "error",
"no-empty-function": "off",
},
},
@@ -678,14 +724,15 @@ exports[`typescriptConfig > should create config 1`] = `
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-empty-function": "error",
- "@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
+ "@typescript-eslint/prefer-find": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
- "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
+ "@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"dot-notation": "off",
"no-empty-function": "off",
@@ -699,8 +746,11 @@ exports[`typescriptConfig > should create config 1`] = `
"rules": {
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
+ "@typescript-eslint/prefer-find": "error",
+ "@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
+ "@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"dot-notation": "off",
},
@@ -708,7 +758,7 @@ exports[`typescriptConfig > should create config 1`] = `
},
"meta": {
"name": "@typescript-eslint/eslint-plugin",
- "version": "7.6.0",
+ "version": "8.12.2",
},
"rules": {
"adjacent-overload-signatures": {
@@ -743,7 +793,9 @@ exports[`typescriptConfig > should create config 1`] = `
"fixable": "code",
"messages": {
"errorStringArray": "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}[]' instead.",
+ "errorStringArrayReadonly": "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}' instead.",
"errorStringArraySimple": "Array type using '{{className}}<{{type}}>' is forbidden for simple types. Use '{{readonlyPrefix}}{{type}}[]' instead.",
+ "errorStringArraySimpleReadonly": "Array type using '{{className}}<{{type}}>' is forbidden for simple types. Use '{{readonlyPrefix}}{{type}}' instead.",
"errorStringGeneric": "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden. Use '{{className}}<{{type}}>' instead.",
"errorStringGenericSimple": "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden for non-simple types. Use '{{className}}<{{type}}>' instead.",
},
@@ -789,6 +841,8 @@ exports[`typescriptConfig > should create config 1`] = `
"hasSuggestions": true,
"messages": {
"await": "Unexpected \`await\` of a non-Promise (non-"Thenable") value.",
+ "convertToOrdinaryFor": "Convert to an ordinary \`for...of\` loop.",
+ "forAwaitOfNonThenable": "Unexpected \`for await...of\` of a value that is not async iterable.",
"removeAwait": "Remove unnecessary \`await\`.",
},
"schema": [],
@@ -858,6 +912,7 @@ exports[`typescriptConfig > should create config 1`] = `
"properties": {
"minimumDescriptionLength": {
"default": 3,
+ "description": "A minimum character length for descriptions when \`allow-with-description\` is enabled.",
"type": "number",
},
"ts-check": {
@@ -896,173 +951,6 @@ exports[`typescriptConfig > should create config 1`] = `
"type": "suggestion",
},
},
- "ban-types": {
- "create": [Function],
- "defaultOptions": [
- {},
- ],
- "meta": {
- "docs": {
- "description": "Disallow certain types",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/ban-types",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "bannedTypeMessage": "Don't use \`{{name}}\` as a type.{{customMessage}}",
- "bannedTypeReplacement": "Replace \`{{name}}\` with \`{{replacement}}\`.",
- },
- "schema": [
- {
- "$defs": {
- "banConfig": {
- "oneOf": [
- {
- "description": "Bans the type with the default message",
- "type": "null",
- },
- {
- "description": "Un-bans the type (useful when paired with \`extendDefaults\`)",
- "enum": [
- false,
- ],
- "type": "boolean",
- },
- {
- "description": "Bans the type with the default message",
- "enum": [
- true,
- ],
- "type": "boolean",
- },
- {
- "description": "Bans the type with a custom message",
- "type": "string",
- },
- {
- "additionalProperties": false,
- "description": "Bans a type",
- "properties": {
- "fixWith": {
- "description": "Type to autofix replace with. Note that autofixers can be applied automatically - so you need to be careful with this option.",
- "type": "string",
- },
- "message": {
- "description": "Custom error message",
- "type": "string",
- },
- "suggest": {
- "additionalItems": false,
- "description": "Types to suggest replacing with.",
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- },
- "type": "object",
- },
- ],
- },
- },
- "additionalProperties": false,
- "properties": {
- "extendDefaults": {
- "type": "boolean",
- },
- "types": {
- "additionalProperties": {
- "$ref": "#/items/0/$defs/banConfig",
- },
- "type": "object",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "block-spacing": {
- "create": [Function],
- "defaultOptions": [
- "always",
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Disallow or enforce spaces inside of blocks after opening block and before closing block",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/block-spacing",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "extra": "Unexpected space(s) {{location}} '{{token}}'.",
- "missing": "Requires a space {{location}} '{{token}}'.",
- },
- "replacedBy": [
- "@stylistic/ts/block-spacing",
- ],
- "schema": [
- {
- "enum": [
- "always",
- "never",
- ],
- },
- ],
- "type": "layout",
- },
- },
- "brace-style": {
- "create": [Function],
- "defaultOptions": [
- "1tbs",
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce consistent brace style for blocks",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/brace-style",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "blockSameLine": "Statement inside of curly braces should be on next line.",
- "nextLineClose": "Closing curly brace does not appear on the same line as the subsequent block.",
- "nextLineOpen": "Opening curly brace does not appear on the same line as controlling statement.",
- "sameLineClose": "Closing curly brace appears on the same line as the subsequent block.",
- "sameLineOpen": "Opening curly brace appears on the same line as controlling statement.",
- "singleLineClose": "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",
- },
- "replacedBy": [
- "@stylistic/ts/brace-style",
- ],
- "schema": [
- {
- "enum": [
- "1tbs",
- "stroustrup",
- "allman",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "allowSingleLine": {
- "default": false,
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
"class-literal-property-style": {
"create": [Function],
"defaultOptions": [
@@ -1083,6 +971,7 @@ exports[`typescriptConfig > should create config 1`] = `
},
"schema": [
{
+ "description": "Which literal class member syntax to prefer.",
"enum": [
"fields",
"getters",
@@ -1119,18 +1008,18 @@ exports[`typescriptConfig > should create config 1`] = `
"properties": {
"enforceForClassFields": {
"default": true,
- "description": "Enforces that functions used as instance field initializers utilize \`this\`",
+ "description": "Enforces that functions used as instance field initializers utilize \`this\`.",
"type": "boolean",
},
"exceptMethods": {
- "description": "Allows specified method names to be ignored with this rule",
+ "description": "Allows specified method names to be ignored with this rule.",
"items": {
"type": "string",
},
"type": "array",
},
"ignoreClassesThatImplementAnInterface": {
- "description": "Ignore classes that specifically implement some interface",
+ "description": "Makes the rule ignore class members that are defined within a class that \`implements\` a type",
"oneOf": [
{
"description": "Ignore all classes that implement an interface",
@@ -1156,182 +1045,54 @@ exports[`typescriptConfig > should create config 1`] = `
"type": "suggestion",
},
},
- "comma-dangle": {
+ "consistent-generic-constructors": {
"create": [Function],
"defaultOptions": [
- "never",
+ "constructor",
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Require or disallow trailing commas",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/comma-dangle",
+ "description": "Enforce specifying generic type arguments on type annotation or constructor name of a constructor call",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/consistent-generic-constructors",
},
"fixable": "code",
- "hasSuggestions": undefined,
"messages": {
- "missing": "Missing trailing comma.",
- "unexpected": "Unexpected trailing comma.",
+ "preferConstructor": "The generic type arguments should be specified as part of the constructor type arguments.",
+ "preferTypeAnnotation": "The generic type arguments should be specified as part of the type annotation.",
},
- "replacedBy": [
- "@stylistic/ts/comma-dangle",
- ],
- "schema": {
- "$defs": {
- "value": {
- "enum": [
- "always-multiline",
- "always",
- "never",
- "only-multiline",
- ],
- "type": "string",
- },
- "valueWithIgnore": {
- "enum": [
- "always-multiline",
- "always",
- "never",
- "only-multiline",
- "ignore",
- ],
- "type": "string",
- },
+ "schema": [
+ {
+ "description": "Which constructor call syntax to prefer.",
+ "enum": [
+ "type-annotation",
+ "constructor",
+ ],
+ "type": "string",
},
- "additionalItems": false,
- "items": [
- {
- "oneOf": [
- {
- "$ref": "#/$defs/value",
- },
- {
- "additionalProperties": false,
- "properties": {
- "arrays": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "enums": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "exports": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "functions": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "generics": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "imports": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "objects": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "tuples": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "array",
- },
- "type": "layout",
+ ],
+ "type": "suggestion",
},
},
- "comma-spacing": {
+ "consistent-indexed-object-style": {
"create": [Function],
"defaultOptions": [
- {
- "after": true,
- "before": false,
- },
+ "record",
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Enforce consistent spacing before and after commas",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/comma-spacing",
+ "description": "Require or disallow the \`Record\` type",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/consistent-indexed-object-style",
},
- "fixable": "whitespace",
+ "fixable": "code",
"messages": {
- "missing": "A space is required {{loc}} ','.",
- "unexpected": "There should be no space {{loc}} ','.",
- },
- "replacedBy": [
- "@stylistic/ts/comma-spacing",
- ],
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "after": {
- "default": true,
- "type": "boolean",
- },
- "before": {
- "default": false,
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
- "consistent-generic-constructors": {
- "create": [Function],
- "defaultOptions": [
- "constructor",
- ],
- "meta": {
- "docs": {
- "description": "Enforce specifying generic type arguments on type annotation or constructor name of a constructor call",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/consistent-generic-constructors",
- },
- "fixable": "code",
- "messages": {
- "preferConstructor": "The generic type arguments should be specified as part of the constructor type arguments.",
- "preferTypeAnnotation": "The generic type arguments should be specified as part of the type annotation.",
- },
- "schema": [
- {
- "enum": [
- "type-annotation",
- "constructor",
- ],
- "type": "string",
- },
- ],
- "type": "suggestion",
- },
- },
- "consistent-indexed-object-style": {
- "create": [Function],
- "defaultOptions": [
- "record",
- ],
- "meta": {
- "docs": {
- "description": "Require or disallow the \`Record\` type",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/consistent-indexed-object-style",
- },
- "fixable": "code",
- "messages": {
- "preferIndexSignature": "An index signature is preferred over a record.",
- "preferRecord": "A record is preferred over an index signature.",
+ "preferIndexSignature": "An index signature is preferred over a record.",
+ "preferRecord": "A record is preferred over an index signature.",
},
"schema": [
{
+ "description": "Which indexed object syntax to prefer.",
"enum": [
"record",
"index-signature",
@@ -1408,6 +1169,7 @@ exports[`typescriptConfig > should create config 1`] = `
"additionalProperties": false,
"properties": {
"assertionStyle": {
+ "description": "The expected assertion style to enforce.",
"enum": [
"never",
],
@@ -1423,6 +1185,7 @@ exports[`typescriptConfig > should create config 1`] = `
"additionalProperties": false,
"properties": {
"assertionStyle": {
+ "description": "The expected assertion style to enforce.",
"enum": [
"as",
"angle-bracket",
@@ -1430,6 +1193,7 @@ exports[`typescriptConfig > should create config 1`] = `
"type": "string",
},
"objectLiteralTypeAssertions": {
+ "description": "Whether to always prefer type declarations for object literals used as variable initializers, rather than type assertions.",
"enum": [
"allow",
"allow-as-parameter",
@@ -1467,6 +1231,7 @@ exports[`typescriptConfig > should create config 1`] = `
},
"schema": [
{
+ "description": "Which type definition syntax to prefer.",
"enum": [
"interface",
"type",
@@ -1501,6 +1266,7 @@ exports[`typescriptConfig > should create config 1`] = `
"additionalProperties": false,
"properties": {
"fixMixedExportsWithInlineTypeSpecifier": {
+ "description": "Whether the rule will autofix "mixed" export cases using TS inline type specifiers.",
"type": "boolean",
},
},
@@ -1536,9 +1302,11 @@ exports[`typescriptConfig > should create config 1`] = `
"additionalProperties": false,
"properties": {
"disallowTypeAnnotations": {
+ "description": "Whether to disallow type imports in type annotations (\`import()\`).",
"type": "boolean",
},
"fixStyle": {
+ "description": "The expected type modifier to be added when an import is detected as used only in the type position.",
"enum": [
"separate-type-imports",
"inline-type-imports",
@@ -1546,6 +1314,7 @@ exports[`typescriptConfig > should create config 1`] = `
"type": "string",
},
"prefer": {
+ "description": "The expected import kind for type-only imports.",
"enum": [
"type-imports",
"no-type-imports",
@@ -1606,22 +1375,27 @@ exports[`typescriptConfig > should create config 1`] = `
"properties": {
"allowIndexSignaturePropertyAccess": {
"default": false,
+ "description": "Whether to allow accessing properties matching an index signature with array notation.",
"type": "boolean",
},
"allowKeywords": {
"default": true,
+ "description": "Whether to allow keywords such as ["class"]\`.",
"type": "boolean",
},
"allowPattern": {
"default": "",
+ "description": "Regular expression of names to allow.",
"type": "string",
},
"allowPrivateClassPropertyAccess": {
"default": false,
+ "description": "Whether to allow accessing class members marked as \`private\` with array notation.",
"type": "boolean",
},
"allowProtectedClassPropertyAccess": {
"default": false,
+ "description": "Whether to allow accessing class members marked as \`protected\` with array notation.",
"type": "boolean",
},
},
@@ -1751,8 +1525,10 @@ exports[`typescriptConfig > should create config 1`] = `
"properties": {
"accessibility": {
"$ref": "#/items/0/$defs/accessibilityLevel",
+ "description": "Which accessibility modifier is required to exist or not exist.",
},
"ignoredMethodNames": {
+ "description": "Specific method names that may be ignored.",
"items": {
"type": "string",
},
@@ -1760,6 +1536,7 @@ exports[`typescriptConfig > should create config 1`] = `
},
"overrides": {
"additionalProperties": false,
+ "description": "Changes to required accessibility modifiers for specific kinds of class members.",
"properties": {
"accessors": {
"$ref": "#/items/0/$defs/accessibilityLevel",
@@ -1845,37 +1622,30 @@ You must still type the parameters of the function.",
"type": "problem",
},
},
- "func-call-spacing": {
+ "init-declarations": {
"create": [Function],
"defaultOptions": [
- "never",
- {},
+ "always",
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Require or disallow spacing between function identifiers and their invocations",
+ "description": "Require or disallow initialization in variable declarations",
"extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/func-call-spacing",
+ "url": "https://typescript-eslint.io/rules/init-declarations",
},
- "fixable": "whitespace",
+ "hasSuggestions": undefined,
"messages": {
- "missing": "Missing space between function name and paren.",
- "unexpectedNewline": "Unexpected newline between function name and paren.",
- "unexpectedWhitespace": "Unexpected whitespace between function name and paren.",
+ "initialized": "Variable '{{idName}}' should be initialized on declaration.",
+ "notInitialized": "Variable '{{idName}}' should not be initialized on declaration.",
},
- "replacedBy": [
- "@stylistic/ts/func-call-spacing",
- ],
"schema": {
"anyOf": [
{
"items": [
{
"enum": [
- "never",
+ "always",
],
- "type": "string",
},
],
"maxItems": 1,
@@ -1886,14 +1656,13 @@ You must still type the parameters of the function.",
"items": [
{
"enum": [
- "always",
+ "never",
],
- "type": "string",
},
{
"additionalProperties": false,
"properties": {
- "allowNewlines": {
+ "ignoreForLoopInit": {
"type": "boolean",
},
},
@@ -1906,2462 +1675,1618 @@ You must still type the parameters of the function.",
},
],
},
- "type": "layout",
+ "type": "suggestion",
},
},
- "indent": {
+ "max-params": {
"create": [Function],
"defaultOptions": [
- 4,
{
- "SwitchCase": 1,
- "flatTernaryExpressions": false,
- "ignoredNodes": [],
+ "countVoidThis": false,
+ "max": 3,
},
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Enforce consistent indentation",
+ "description": "Enforce a maximum number of parameters in function definitions",
"extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/indent",
+ "url": "https://typescript-eslint.io/rules/max-params",
},
- "fixable": "whitespace",
- "hasSuggestions": undefined,
"messages": {
- "wrongIndentation": "Expected indentation of {{expected}} but found {{actual}}.",
+ "exceed": "{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}.",
},
- "replacedBy": [
- "@stylistic/ts/indent",
- ],
"schema": [
- {
- "oneOf": [
- {
- "enum": [
- "tab",
- ],
- },
- {
- "minimum": 0,
- "type": "integer",
- },
- ],
- },
{
"additionalProperties": false,
"properties": {
- "ArrayExpression": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "CallExpression": {
- "additionalProperties": false,
- "properties": {
- "arguments": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- },
- "type": "object",
- },
- "FunctionDeclaration": {
- "additionalProperties": false,
- "properties": {
- "body": {
- "minimum": 0,
- "type": "integer",
- },
- "parameters": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- },
- "type": "object",
- },
- "FunctionExpression": {
- "additionalProperties": false,
- "properties": {
- "body": {
- "minimum": 0,
- "type": "integer",
- },
- "parameters": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- },
- "type": "object",
- },
- "ImportDeclaration": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "MemberExpression": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "off",
- ],
- },
- ],
- },
- "ObjectExpression": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "StaticBlock": {
- "additionalProperties": false,
- "properties": {
- "body": {
- "minimum": 0,
- "type": "integer",
- },
- },
- "type": "object",
+ "countVoidThis": {
+ "description": "Whether to count a \`this\` declaration when the type is \`void\`.",
+ "type": "boolean",
},
- "SwitchCase": {
- "default": 0,
+ "max": {
+ "description": "A maximum number of parameters in function definitions.",
"minimum": 0,
"type": "integer",
},
- "VariableDeclarator": {
- "oneOf": [
- {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "const": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "let": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "var": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- },
- "type": "object",
- },
- ],
- },
- "flatTernaryExpressions": {
- "default": false,
- "type": "boolean",
- },
- "ignoreComments": {
- "default": false,
- "type": "boolean",
- },
- "ignoredNodes": {
- "items": {
- "not": {
- "pattern": ":exit$",
- },
- "type": "string",
- },
- "type": "array",
- },
- "offsetTernaryExpressions": {
- "default": false,
- "type": "boolean",
- },
- "outerIIFEBody": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "off",
- ],
- },
- ],
+ "maximum": {
+ "description": "(deprecated) A maximum number of parameters in function definitions.",
+ "minimum": 0,
+ "type": "integer",
},
},
"type": "object",
},
],
- "type": "layout",
- },
- },
- "init-declarations": {
- "create": [Function],
- "defaultOptions": [
- "always",
- ],
- "meta": {
- "docs": {
- "description": "Require or disallow initialization in variable declarations",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/init-declarations",
- },
- "hasSuggestions": undefined,
- "messages": {
- "initialized": "Variable '{{idName}}' should be initialized on declaration.",
- "notInitialized": "Variable '{{idName}}' should not be initialized on declaration.",
- },
- "schema": {
- "anyOf": [
- {
- "items": [
- {
- "enum": [
- "always",
- ],
- },
- ],
- "maxItems": 1,
- "minItems": 0,
- "type": "array",
- },
- {
- "items": [
- {
- "enum": [
- "never",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "ignoreForLoopInit": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "maxItems": 2,
- "minItems": 0,
- "type": "array",
- },
- ],
- },
"type": "suggestion",
},
},
- "key-spacing": {
+ "member-ordering": {
"create": [Function],
"defaultOptions": [
- {},
+ {
+ "default": {
+ "memberTypes": [
+ "signature",
+ "call-signature",
+ "public-static-field",
+ "protected-static-field",
+ "private-static-field",
+ "#private-static-field",
+ "public-decorated-field",
+ "protected-decorated-field",
+ "private-decorated-field",
+ "public-instance-field",
+ "protected-instance-field",
+ "private-instance-field",
+ "#private-instance-field",
+ "public-abstract-field",
+ "protected-abstract-field",
+ "public-field",
+ "protected-field",
+ "private-field",
+ "#private-field",
+ "static-field",
+ "instance-field",
+ "abstract-field",
+ "decorated-field",
+ "field",
+ "static-initialization",
+ "public-constructor",
+ "protected-constructor",
+ "private-constructor",
+ "constructor",
+ "public-static-accessor",
+ "protected-static-accessor",
+ "private-static-accessor",
+ "#private-static-accessor",
+ "public-decorated-accessor",
+ "protected-decorated-accessor",
+ "private-decorated-accessor",
+ "public-instance-accessor",
+ "protected-instance-accessor",
+ "private-instance-accessor",
+ "#private-instance-accessor",
+ "public-abstract-accessor",
+ "protected-abstract-accessor",
+ "public-accessor",
+ "protected-accessor",
+ "private-accessor",
+ "#private-accessor",
+ "static-accessor",
+ "instance-accessor",
+ "abstract-accessor",
+ "decorated-accessor",
+ "accessor",
+ "public-static-get",
+ "protected-static-get",
+ "private-static-get",
+ "#private-static-get",
+ "public-decorated-get",
+ "protected-decorated-get",
+ "private-decorated-get",
+ "public-instance-get",
+ "protected-instance-get",
+ "private-instance-get",
+ "#private-instance-get",
+ "public-abstract-get",
+ "protected-abstract-get",
+ "public-get",
+ "protected-get",
+ "private-get",
+ "#private-get",
+ "static-get",
+ "instance-get",
+ "abstract-get",
+ "decorated-get",
+ "get",
+ "public-static-set",
+ "protected-static-set",
+ "private-static-set",
+ "#private-static-set",
+ "public-decorated-set",
+ "protected-decorated-set",
+ "private-decorated-set",
+ "public-instance-set",
+ "protected-instance-set",
+ "private-instance-set",
+ "#private-instance-set",
+ "public-abstract-set",
+ "protected-abstract-set",
+ "public-set",
+ "protected-set",
+ "private-set",
+ "#private-set",
+ "static-set",
+ "instance-set",
+ "abstract-set",
+ "decorated-set",
+ "set",
+ "public-static-method",
+ "protected-static-method",
+ "private-static-method",
+ "#private-static-method",
+ "public-decorated-method",
+ "protected-decorated-method",
+ "private-decorated-method",
+ "public-instance-method",
+ "protected-instance-method",
+ "private-instance-method",
+ "#private-instance-method",
+ "public-abstract-method",
+ "protected-abstract-method",
+ "public-method",
+ "protected-method",
+ "private-method",
+ "#private-method",
+ "static-method",
+ "instance-method",
+ "abstract-method",
+ "decorated-method",
+ "method",
+ ],
+ },
+ },
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Enforce consistent spacing between property names and type annotations in types and interfaces",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/key-spacing",
+ "description": "Require a consistent member declaration order",
+ "url": "https://typescript-eslint.io/rules/member-ordering",
},
- "fixable": "whitespace",
- "hasSuggestions": undefined,
"messages": {
- "extraKey": "Extra space after {{computed}}key '{{key}}'.",
- "extraValue": "Extra space before value for {{computed}}key '{{key}}'.",
- "missingKey": "Missing space after {{computed}}key '{{key}}'.",
- "missingValue": "Missing space before value for {{computed}}key '{{key}}'.",
+ "incorrectGroupOrder": "Member {{name}} should be declared before all {{rank}} definitions.",
+ "incorrectOrder": "Member {{member}} should be declared before member {{beforeMember}}.",
+ "incorrectRequiredMembersOrder": "Member {{member}} should be declared after all {{optionalOrRequired}} members.",
},
- "replacedBy": [
- "@stylistic/ts/key-spacing",
- ],
"schema": [
{
- "anyOf": [
- {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "align": {
- "anyOf": [
- {
- "enum": [
- "colon",
- "value",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- "on": {
- "enum": [
- "colon",
- "value",
- ],
- },
- },
- "type": "object",
- },
- ],
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- },
- "type": "object",
- },
- {
- "additionalProperties": false,
- "properties": {
- "multiLine": {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "align": {
- "anyOf": [
- {
- "enum": [
- "colon",
- "value",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- "on": {
- "enum": [
- "colon",
- "value",
- ],
- },
- },
- "type": "object",
- },
- ],
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- },
- "type": "object",
- },
- "singleLine": {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- },
- "type": "object",
- },
- },
- "type": "object",
+ "$defs": {
+ "allItems": {
+ "enum": [
+ "readonly-signature",
+ "signature",
+ "readonly-field",
+ "public-readonly-field",
+ "public-decorated-readonly-field",
+ "decorated-readonly-field",
+ "static-readonly-field",
+ "public-static-readonly-field",
+ "instance-readonly-field",
+ "public-instance-readonly-field",
+ "abstract-readonly-field",
+ "public-abstract-readonly-field",
+ "protected-readonly-field",
+ "protected-decorated-readonly-field",
+ "protected-static-readonly-field",
+ "protected-instance-readonly-field",
+ "protected-abstract-readonly-field",
+ "private-readonly-field",
+ "private-decorated-readonly-field",
+ "private-static-readonly-field",
+ "private-instance-readonly-field",
+ "#private-readonly-field",
+ "#private-static-readonly-field",
+ "#private-instance-readonly-field",
+ "field",
+ "public-field",
+ "public-decorated-field",
+ "decorated-field",
+ "static-field",
+ "public-static-field",
+ "instance-field",
+ "public-instance-field",
+ "abstract-field",
+ "public-abstract-field",
+ "protected-field",
+ "protected-decorated-field",
+ "protected-static-field",
+ "protected-instance-field",
+ "protected-abstract-field",
+ "private-field",
+ "private-decorated-field",
+ "private-static-field",
+ "private-instance-field",
+ "#private-field",
+ "#private-static-field",
+ "#private-instance-field",
+ "method",
+ "public-method",
+ "public-decorated-method",
+ "decorated-method",
+ "static-method",
+ "public-static-method",
+ "instance-method",
+ "public-instance-method",
+ "abstract-method",
+ "public-abstract-method",
+ "protected-method",
+ "protected-decorated-method",
+ "protected-static-method",
+ "protected-instance-method",
+ "protected-abstract-method",
+ "private-method",
+ "private-decorated-method",
+ "private-static-method",
+ "private-instance-method",
+ "#private-method",
+ "#private-static-method",
+ "#private-instance-method",
+ "call-signature",
+ "constructor",
+ "public-constructor",
+ "protected-constructor",
+ "private-constructor",
+ "accessor",
+ "public-accessor",
+ "public-decorated-accessor",
+ "decorated-accessor",
+ "static-accessor",
+ "public-static-accessor",
+ "instance-accessor",
+ "public-instance-accessor",
+ "abstract-accessor",
+ "public-abstract-accessor",
+ "protected-accessor",
+ "protected-decorated-accessor",
+ "protected-static-accessor",
+ "protected-instance-accessor",
+ "protected-abstract-accessor",
+ "private-accessor",
+ "private-decorated-accessor",
+ "private-static-accessor",
+ "private-instance-accessor",
+ "#private-accessor",
+ "#private-static-accessor",
+ "#private-instance-accessor",
+ "get",
+ "public-get",
+ "public-decorated-get",
+ "decorated-get",
+ "static-get",
+ "public-static-get",
+ "instance-get",
+ "public-instance-get",
+ "abstract-get",
+ "public-abstract-get",
+ "protected-get",
+ "protected-decorated-get",
+ "protected-static-get",
+ "protected-instance-get",
+ "protected-abstract-get",
+ "private-get",
+ "private-decorated-get",
+ "private-static-get",
+ "private-instance-get",
+ "#private-get",
+ "#private-static-get",
+ "#private-instance-get",
+ "set",
+ "public-set",
+ "public-decorated-set",
+ "decorated-set",
+ "static-set",
+ "public-static-set",
+ "instance-set",
+ "public-instance-set",
+ "abstract-set",
+ "public-abstract-set",
+ "protected-set",
+ "protected-decorated-set",
+ "protected-static-set",
+ "protected-instance-set",
+ "protected-abstract-set",
+ "private-set",
+ "private-decorated-set",
+ "private-static-set",
+ "private-instance-set",
+ "#private-set",
+ "#private-static-set",
+ "#private-instance-set",
+ "static-initialization",
+ "static-static-initialization",
+ "public-static-static-initialization",
+ "instance-static-initialization",
+ "public-instance-static-initialization",
+ "abstract-static-initialization",
+ "public-abstract-static-initialization",
+ "protected-static-static-initialization",
+ "protected-instance-static-initialization",
+ "protected-abstract-static-initialization",
+ "private-static-static-initialization",
+ "private-instance-static-initialization",
+ "#private-static-static-initialization",
+ "#private-instance-static-initialization",
+ ],
+ "type": "string",
},
- {
- "additionalProperties": false,
- "properties": {
- "align": {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- "on": {
- "enum": [
- "colon",
- "value",
- ],
- },
- },
- "type": "object",
+ "baseConfig": {
+ "oneOf": [
+ {
+ "enum": [
+ "never",
+ ],
+ "type": "string",
},
- "multiLine": {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
+ {
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/items/0/$defs/allItems",
+ },
+ {
+ "items": {
+ "$ref": "#/items/0/$defs/allItems",
+ },
+ "type": "array",
+ },
+ ],
},
- "type": "object",
+ "type": "array",
},
- "singleLine": {
+ {
"additionalProperties": false,
"properties": {
- "afterColon": {
- "type": "boolean",
+ "memberTypes": {
+ "oneOf": [
+ {
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/items/0/$defs/allItems",
+ },
+ {
+ "items": {
+ "$ref": "#/items/0/$defs/allItems",
+ },
+ "type": "array",
+ },
+ ],
+ },
+ "type": "array",
+ },
+ {
+ "enum": [
+ "never",
+ ],
+ "type": "string",
+ },
+ ],
},
- "beforeColon": {
- "type": "boolean",
+ "optionalityOrder": {
+ "$ref": "#/items/0/$defs/optionalityOrderOptions",
},
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
+ "order": {
+ "$ref": "#/items/0/$defs/orderOptions",
},
},
"type": "object",
},
- },
- "type": "object",
+ ],
},
- ],
- },
- ],
- "type": "layout",
- },
- },
- "keyword-spacing": {
- "create": [Function],
- "defaultOptions": [
- {},
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce consistent spacing before and after keywords",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/keyword-spacing",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "expectedAfter": "Expected space(s) after "{{value}}".",
- "expectedBefore": "Expected space(s) before "{{value}}".",
- "unexpectedAfter": "Unexpected space(s) after "{{value}}".",
- "unexpectedBefore": "Unexpected space(s) before "{{value}}".",
- },
- "replacedBy": [
- "@stylistic/ts/keyword-spacing",
- ],
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "after": {
- "default": true,
- "type": "boolean",
+ "optionalityOrderOptions": {
+ "enum": [
+ "optional-first",
+ "required-first",
+ ],
+ "type": "string",
},
- "before": {
- "default": true,
- "type": "boolean",
+ "orderOptions": {
+ "enum": [
+ "alphabetically",
+ "alphabetically-case-insensitive",
+ "as-written",
+ "natural",
+ "natural-case-insensitive",
+ ],
+ "type": "string",
},
- "overrides": {
- "additionalProperties": false,
- "properties": {
- "abstract": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "as": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "typeItems": {
+ "enum": [
+ "readonly-signature",
+ "signature",
+ "readonly-field",
+ "field",
+ "method",
+ "constructor",
+ ],
+ "type": "string",
+ },
+ "typesConfig": {
+ "oneOf": [
+ {
+ "enum": [
+ "never",
+ ],
+ "type": "string",
},
- "async": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ {
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/items/0/$defs/typeItems",
+ },
+ {
+ "items": {
+ "$ref": "#/items/0/$defs/typeItems",
+ },
+ "type": "array",
+ },
+ ],
},
- "type": "object",
+ "type": "array",
},
- "await": {
+ {
"additionalProperties": false,
"properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
+ "memberTypes": {
+ "oneOf": [
+ {
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/items/0/$defs/typeItems",
+ },
+ {
+ "items": {
+ "$ref": "#/items/0/$defs/typeItems",
+ },
+ "type": "array",
+ },
+ ],
+ },
+ "type": "array",
+ },
+ {
+ "enum": [
+ "never",
+ ],
+ "type": "string",
+ },
+ ],
},
- },
- "type": "object",
- },
- "boolean": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "optionalityOrder": {
+ "$ref": "#/items/0/$defs/optionalityOrderOptions",
},
- "before": {
- "type": "boolean",
+ "order": {
+ "$ref": "#/items/0/$defs/orderOptions",
},
},
"type": "object",
},
- "break": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ ],
+ },
+ },
+ "additionalProperties": false,
+ "properties": {
+ "classExpressions": {
+ "$ref": "#/items/0/$defs/baseConfig",
+ },
+ "classes": {
+ "$ref": "#/items/0/$defs/baseConfig",
+ },
+ "default": {
+ "$ref": "#/items/0/$defs/baseConfig",
+ },
+ "interfaces": {
+ "$ref": "#/items/0/$defs/typesConfig",
+ },
+ "typeLiterals": {
+ "$ref": "#/items/0/$defs/typesConfig",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "method-signature-style": {
+ "create": [Function],
+ "defaultOptions": [
+ "property",
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce using a particular method signature syntax",
+ "url": "https://typescript-eslint.io/rules/method-signature-style",
+ },
+ "fixable": "code",
+ "messages": {
+ "errorMethod": "Shorthand method signature is forbidden. Use a function property instead.",
+ "errorProperty": "Function property signature is forbidden. Use a method shorthand instead.",
+ },
+ "schema": [
+ {
+ "enum": [
+ "property",
+ "method",
+ ],
+ "type": "string",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "naming-convention": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "format": [
+ "camelCase",
+ ],
+ "leadingUnderscore": "allow",
+ "selector": "default",
+ "trailingUnderscore": "allow",
+ },
+ {
+ "format": [
+ "camelCase",
+ "PascalCase",
+ ],
+ "selector": "import",
+ },
+ {
+ "format": [
+ "camelCase",
+ "UPPER_CASE",
+ ],
+ "leadingUnderscore": "allow",
+ "selector": "variable",
+ "trailingUnderscore": "allow",
+ },
+ {
+ "format": [
+ "PascalCase",
+ ],
+ "selector": "typeLike",
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce naming conventions for everything across a codebase",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/naming-convention",
+ },
+ "messages": {
+ "doesNotMatchFormat": "{{type}} name \`{{name}}\` must match one of the following formats: {{formats}}",
+ "doesNotMatchFormatTrimmed": "{{type}} name \`{{name}}\` trimmed as \`{{processedName}}\` must match one of the following formats: {{formats}}",
+ "missingAffix": "{{type}} name \`{{name}}\` must have one of the following {{position}}es: {{affixes}}",
+ "missingUnderscore": "{{type}} name \`{{name}}\` must have {{count}} {{position}} underscore(s).",
+ "satisfyCustom": "{{type}} name \`{{name}}\` must {{regexMatch}} the RegExp: {{regex}}",
+ "unexpectedUnderscore": "{{type}} name \`{{name}}\` must not have a {{position}} underscore.",
+ },
+ "schema": {
+ "$defs": {
+ "formatOptionsConfig": {
+ "oneOf": [
+ {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/predefinedFormats",
},
- "byte": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "type": "array",
+ },
+ {
+ "type": "null",
+ },
+ ],
+ },
+ "matchRegexConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "match": {
+ "type": "boolean",
+ },
+ "regex": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "match",
+ "regex",
+ ],
+ "type": "object",
+ },
+ "predefinedFormats": {
+ "enum": [
+ "camelCase",
+ "strictCamelCase",
+ "PascalCase",
+ "StrictPascalCase",
+ "snake_case",
+ "UPPER_CASE",
+ ],
+ "type": "string",
+ },
+ "prefixSuffixConfig": {
+ "additionalItems": false,
+ "items": {
+ "minLength": 1,
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "typeModifiers": {
+ "enum": [
+ "boolean",
+ "string",
+ "number",
+ "function",
+ "array",
+ ],
+ "type": "string",
+ },
+ "underscoreOptions": {
+ "enum": [
+ "forbid",
+ "allow",
+ "require",
+ "requireDouble",
+ "allowDouble",
+ "allowSingleOrDouble",
+ ],
+ "type": "string",
+ },
+ },
+ "additionalItems": false,
+ "items": {
+ "oneOf": [
+ {
+ "additionalProperties": false,
+ "description": "Multiple selectors in one config",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "case": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "failureMessage": {
+ "type": "string",
},
- "catch": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
+ ],
},
- "char": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "class": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "const": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "const",
+ "readonly",
+ "static",
+ "public",
+ "protected",
+ "private",
+ "#private",
+ "abstract",
+ "destructured",
+ "global",
+ "exported",
+ "unused",
+ "requiresQuotes",
+ "override",
+ "async",
+ "default",
+ "namespace",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "continue": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "debugger": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "selector": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "default",
+ "variableLike",
+ "memberLike",
+ "typeLike",
+ "method",
+ "property",
+ "accessor",
+ "variable",
+ "function",
+ "parameter",
+ "parameterProperty",
+ "classicAccessor",
+ "enumMember",
+ "classMethod",
+ "objectLiteralMethod",
+ "typeMethod",
+ "classProperty",
+ "objectLiteralProperty",
+ "typeProperty",
+ "autoAccessor",
+ "class",
+ "interface",
+ "typeAlias",
+ "enum",
+ "typeParameter",
+ "import",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "default": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
},
- "type": "object",
+ "type": "array",
},
- "delete": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'default'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
+ ],
},
- "do": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "double": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "else": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "const",
+ "readonly",
+ "static",
+ "public",
+ "protected",
+ "private",
+ "#private",
+ "abstract",
+ "destructured",
+ "global",
+ "exported",
+ "unused",
+ "requiresQuotes",
+ "override",
+ "async",
+ "default",
+ "namespace",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "enum": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "export": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "selector": {
+ "enum": [
+ "default",
+ ],
+ "type": "string",
},
- "extends": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "false": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "final": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'variableLike'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "finally": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "failureMessage": {
+ "type": "string",
},
- "float": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
+ ],
},
- "for": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "from": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "function": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "unused",
+ "async",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "get": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "goto": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "selector": {
+ "enum": [
+ "variableLike",
+ ],
+ "type": "string",
},
- "if": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "implements": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "import": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'variable'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "in": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
+ ],
},
- "instanceof": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "int": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "interface": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "const",
+ "destructured",
+ "exported",
+ "global",
+ "unused",
+ "async",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "let": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "long": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "selector": {
+ "enum": [
+ "variable",
+ ],
+ "type": "string",
},
- "native": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "new": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "null": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
},
- "type": "object",
+ "type": "array",
},
- "of": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'function'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "package": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "failureMessage": {
+ "type": "string",
},
- "private": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
+ ],
},
- "protected": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "public": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "return": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "exported",
+ "global",
+ "unused",
+ "async",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "set": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "short": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "selector": {
+ "enum": [
+ "function",
+ ],
+ "type": "string",
},
- "static": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "super": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "switch": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'parameter'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "synchronized": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
+ ],
},
- "this": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "throw": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "throws": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "destructured",
+ "unused",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "transient": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "true": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "selector": {
+ "enum": [
+ "parameter",
+ ],
+ "type": "string",
},
- "try": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "type": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "typeof": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
},
- "type": "object",
+ "type": "array",
},
- "var": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'memberLike'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "void": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "failureMessage": {
+ "type": "string",
},
- "volatile": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
+ ],
},
- "while": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "with": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "yield": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "private",
+ "#private",
+ "protected",
+ "public",
+ "readonly",
+ "requiresQuotes",
+ "static",
+ "override",
+ "async",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "memberLike",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
},
+ "required": [
+ "selector",
+ "format",
+ ],
"type": "object",
},
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
- "lines-around-comment": {
- "create": [Function],
- "defaultOptions": [
- {
- "beforeBlockComment": true,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require empty lines around comments",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/lines-around-comment",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "after": "Expected line after comment.",
- "before": "Expected line before comment.",
- },
- "replacedBy": [
- "@stylistic/ts/lines-around-comment",
- ],
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "afterBlockComment": {
- "default": false,
- "type": "boolean",
- },
- "afterLineComment": {
- "default": false,
- "type": "boolean",
- },
- "allowArrayEnd": {
- "type": "boolean",
- },
- "allowArrayStart": {
- "type": "boolean",
- },
- "allowBlockEnd": {
- "default": false,
- "type": "boolean",
- },
- "allowBlockStart": {
- "default": false,
- "type": "boolean",
- },
- "allowClassEnd": {
- "type": "boolean",
- },
- "allowClassStart": {
- "type": "boolean",
- },
- "allowEnumEnd": {
- "type": "boolean",
- },
- "allowEnumStart": {
- "type": "boolean",
- },
- "allowInterfaceEnd": {
- "type": "boolean",
- },
- "allowInterfaceStart": {
- "type": "boolean",
- },
- "allowModuleEnd": {
- "type": "boolean",
- },
- "allowModuleStart": {
- "type": "boolean",
- },
- "allowObjectEnd": {
- "type": "boolean",
- },
- "allowObjectStart": {
- "type": "boolean",
- },
- "allowTypeEnd": {
- "type": "boolean",
- },
- "allowTypeStart": {
- "type": "boolean",
- },
- "applyDefaultIgnorePatterns": {
- "type": "boolean",
- },
- "beforeBlockComment": {
- "default": true,
- "type": "boolean",
- },
- "beforeLineComment": {
- "default": false,
- "type": "boolean",
- },
- "ignorePattern": {
- "type": "string",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
- "lines-between-class-members": {
- "create": [Function],
- "defaultOptions": [
- "always",
- {
- "exceptAfterOverload": true,
- "exceptAfterSingleLine": false,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require or disallow an empty line between class members",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/lines-between-class-members",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "always": "Expected blank line between class members.",
- "never": "Unexpected blank line between class members.",
- },
- "replacedBy": [
- "@stylistic/ts/lines-between-class-members",
- ],
- "schema": [
- {
- "anyOf": [
{
"additionalProperties": false,
+ "description": "Selector 'classProperty'",
"properties": {
- "enforce": {
- "items": {
- "additionalProperties": false,
- "properties": {
- "blankLine": {
- "enum": [
- "always",
- "never",
- ],
- },
- "next": {
- "enum": [
- "method",
- "field",
- "*",
- ],
- },
- "prev": {
- "enum": [
- "method",
- "field",
- "*",
- ],
- },
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "required": [
- "blankLine",
- "prev",
- "next",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "private",
+ "#private",
+ "protected",
+ "public",
+ "readonly",
+ "requiresQuotes",
+ "static",
+ "override",
],
- "type": "object",
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "classProperty",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
},
- "minItems": 1,
"type": "array",
},
},
"required": [
- "enforce",
+ "selector",
+ "format",
],
"type": "object",
},
{
- "enum": [
- "always",
- "never",
- ],
- },
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "exceptAfterOverload": {
- "default": true,
- "type": "boolean",
- },
- "exceptAfterSingleLine": {
- "default": false,
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
- "max-params": {
- "create": [Function],
- "defaultOptions": [
- {
- "countVoidThis": false,
- "max": 3,
- },
- ],
- "meta": {
- "docs": {
- "description": "Enforce a maximum number of parameters in function definitions",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/max-params",
- },
- "messages": {
- "exceed": "{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "countVoidThis": {
- "type": "boolean",
- },
- "max": {
- "minimum": 0,
- "type": "integer",
- },
- "maximum": {
- "minimum": 0,
- "type": "integer",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "member-delimiter-style": {
- "create": [Function],
- "defaultOptions": [
- {
- "multiline": {
- "delimiter": "semi",
- "requireLast": true,
- },
- "multilineDetection": "brackets",
- "singleline": {
- "delimiter": "semi",
- "requireLast": false,
- },
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require a specific member delimiter style for interfaces and type literals",
- "url": "https://typescript-eslint.io/rules/member-delimiter-style",
- },
- "fixable": "whitespace",
- "messages": {
- "expectedComma": "Expected a comma.",
- "expectedSemi": "Expected a semicolon.",
- "unexpectedComma": "Unexpected separator (,).",
- "unexpectedSemi": "Unexpected separator (;).",
- },
- "replacedBy": [
- "@stylistic/ts/member-delimiter-style",
- ],
- "schema": [
- {
- "$defs": {
- "delimiterConfig": {
"additionalProperties": false,
+ "description": "Selector 'objectLiteralProperty'",
"properties": {
- "multiline": {
- "additionalProperties": false,
- "properties": {
- "delimiter": {
- "$ref": "#/items/0/$defs/multiLineOption",
- },
- "requireLast": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "singleline": {
- "additionalProperties": false,
- "properties": {
- "delimiter": {
- "$ref": "#/items/0/$defs/singleLineOption",
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "requireLast": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
- },
- },
- "type": "object",
- },
- "multiLineOption": {
- "enum": [
- "none",
- "semi",
- "comma",
- ],
- "type": "string",
- },
- "singleLineOption": {
- "enum": [
- "semi",
- "comma",
- ],
- "type": "string",
- },
- },
- "additionalProperties": false,
- "properties": {
- "multiline": {
- "additionalProperties": false,
- "properties": {
- "delimiter": {
- "$ref": "#/items/0/$defs/multiLineOption",
- },
- "requireLast": {
- "type": "boolean",
+ ],
},
- },
- "type": "object",
- },
- "multilineDetection": {
- "enum": [
- "brackets",
- "last-member",
- ],
- "type": "string",
- },
- "overrides": {
- "additionalProperties": false,
- "properties": {
- "interface": {
- "$ref": "#/items/0/$defs/delimiterConfig",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "typeLiteral": {
- "$ref": "#/items/0/$defs/delimiterConfig",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "public",
+ "requiresQuotes",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "objectLiteralProperty",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
+ },
+ "type": "array",
},
},
+ "required": [
+ "selector",
+ "format",
+ ],
"type": "object",
},
- "singleline": {
+ {
"additionalProperties": false,
+ "description": "Selector 'typeProperty'",
"properties": {
- "delimiter": {
- "$ref": "#/items/0/$defs/singleLineOption",
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "requireLast": {
- "type": "boolean",
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "public",
+ "readonly",
+ "requiresQuotes",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "typeProperty",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
+ },
+ "type": "array",
},
},
+ "required": [
+ "selector",
+ "format",
+ ],
"type": "object",
},
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
- "member-ordering": {
- "create": [Function],
- "defaultOptions": [
- {
- "default": {
- "memberTypes": [
- "signature",
- "call-signature",
- "public-static-field",
- "protected-static-field",
- "private-static-field",
- "#private-static-field",
- "public-decorated-field",
- "protected-decorated-field",
- "private-decorated-field",
- "public-instance-field",
- "protected-instance-field",
- "private-instance-field",
- "#private-instance-field",
- "public-abstract-field",
- "protected-abstract-field",
- "public-field",
- "protected-field",
- "private-field",
- "#private-field",
- "static-field",
- "instance-field",
- "abstract-field",
- "decorated-field",
- "field",
- "static-initialization",
- "public-constructor",
- "protected-constructor",
- "private-constructor",
- "constructor",
- "public-static-accessor",
- "protected-static-accessor",
- "private-static-accessor",
- "#private-static-accessor",
- "public-decorated-accessor",
- "protected-decorated-accessor",
- "private-decorated-accessor",
- "public-instance-accessor",
- "protected-instance-accessor",
- "private-instance-accessor",
- "#private-instance-accessor",
- "public-abstract-accessor",
- "protected-abstract-accessor",
- "public-accessor",
- "protected-accessor",
- "private-accessor",
- "#private-accessor",
- "static-accessor",
- "instance-accessor",
- "abstract-accessor",
- "decorated-accessor",
- "accessor",
- "public-static-get",
- "protected-static-get",
- "private-static-get",
- "#private-static-get",
- "public-decorated-get",
- "protected-decorated-get",
- "private-decorated-get",
- "public-instance-get",
- "protected-instance-get",
- "private-instance-get",
- "#private-instance-get",
- "public-abstract-get",
- "protected-abstract-get",
- "public-get",
- "protected-get",
- "private-get",
- "#private-get",
- "static-get",
- "instance-get",
- "abstract-get",
- "decorated-get",
- "get",
- "public-static-set",
- "protected-static-set",
- "private-static-set",
- "#private-static-set",
- "public-decorated-set",
- "protected-decorated-set",
- "private-decorated-set",
- "public-instance-set",
- "protected-instance-set",
- "private-instance-set",
- "#private-instance-set",
- "public-abstract-set",
- "protected-abstract-set",
- "public-set",
- "protected-set",
- "private-set",
- "#private-set",
- "static-set",
- "instance-set",
- "abstract-set",
- "decorated-set",
- "set",
- "public-static-method",
- "protected-static-method",
- "private-static-method",
- "#private-static-method",
- "public-decorated-method",
- "protected-decorated-method",
- "private-decorated-method",
- "public-instance-method",
- "protected-instance-method",
- "private-instance-method",
- "#private-instance-method",
- "public-abstract-method",
- "protected-abstract-method",
- "public-method",
- "protected-method",
- "private-method",
- "#private-method",
- "static-method",
- "instance-method",
- "abstract-method",
- "decorated-method",
- "method",
- ],
- },
- },
- ],
- "meta": {
- "docs": {
- "description": "Require a consistent member declaration order",
- "url": "https://typescript-eslint.io/rules/member-ordering",
- },
- "messages": {
- "incorrectGroupOrder": "Member {{name}} should be declared before all {{rank}} definitions.",
- "incorrectOrder": "Member {{member}} should be declared before member {{beforeMember}}.",
- "incorrectRequiredMembersOrder": "Member {{member}} should be declared after all {{optionalOrRequired}} members.",
- },
- "schema": [
- {
- "$defs": {
- "allItems": {
- "enum": [
- "readonly-signature",
- "signature",
- "readonly-field",
- "public-readonly-field",
- "public-decorated-readonly-field",
- "decorated-readonly-field",
- "static-readonly-field",
- "public-static-readonly-field",
- "instance-readonly-field",
- "public-instance-readonly-field",
- "abstract-readonly-field",
- "public-abstract-readonly-field",
- "protected-readonly-field",
- "protected-decorated-readonly-field",
- "protected-static-readonly-field",
- "protected-instance-readonly-field",
- "protected-abstract-readonly-field",
- "private-readonly-field",
- "private-decorated-readonly-field",
- "private-static-readonly-field",
- "private-instance-readonly-field",
- "#private-readonly-field",
- "#private-static-readonly-field",
- "#private-instance-readonly-field",
- "field",
- "public-field",
- "public-decorated-field",
- "decorated-field",
- "static-field",
- "public-static-field",
- "instance-field",
- "public-instance-field",
- "abstract-field",
- "public-abstract-field",
- "protected-field",
- "protected-decorated-field",
- "protected-static-field",
- "protected-instance-field",
- "protected-abstract-field",
- "private-field",
- "private-decorated-field",
- "private-static-field",
- "private-instance-field",
- "#private-field",
- "#private-static-field",
- "#private-instance-field",
- "method",
- "public-method",
- "public-decorated-method",
- "decorated-method",
- "static-method",
- "public-static-method",
- "instance-method",
- "public-instance-method",
- "abstract-method",
- "public-abstract-method",
- "protected-method",
- "protected-decorated-method",
- "protected-static-method",
- "protected-instance-method",
- "protected-abstract-method",
- "private-method",
- "private-decorated-method",
- "private-static-method",
- "private-instance-method",
- "#private-method",
- "#private-static-method",
- "#private-instance-method",
- "call-signature",
- "constructor",
- "public-constructor",
- "protected-constructor",
- "private-constructor",
- "accessor",
- "public-accessor",
- "public-decorated-accessor",
- "decorated-accessor",
- "static-accessor",
- "public-static-accessor",
- "instance-accessor",
- "public-instance-accessor",
- "abstract-accessor",
- "public-abstract-accessor",
- "protected-accessor",
- "protected-decorated-accessor",
- "protected-static-accessor",
- "protected-instance-accessor",
- "protected-abstract-accessor",
- "private-accessor",
- "private-decorated-accessor",
- "private-static-accessor",
- "private-instance-accessor",
- "#private-accessor",
- "#private-static-accessor",
- "#private-instance-accessor",
- "get",
- "public-get",
- "public-decorated-get",
- "decorated-get",
- "static-get",
- "public-static-get",
- "instance-get",
- "public-instance-get",
- "abstract-get",
- "public-abstract-get",
- "protected-get",
- "protected-decorated-get",
- "protected-static-get",
- "protected-instance-get",
- "protected-abstract-get",
- "private-get",
- "private-decorated-get",
- "private-static-get",
- "private-instance-get",
- "#private-get",
- "#private-static-get",
- "#private-instance-get",
- "set",
- "public-set",
- "public-decorated-set",
- "decorated-set",
- "static-set",
- "public-static-set",
- "instance-set",
- "public-instance-set",
- "abstract-set",
- "public-abstract-set",
- "protected-set",
- "protected-decorated-set",
- "protected-static-set",
- "protected-instance-set",
- "protected-abstract-set",
- "private-set",
- "private-decorated-set",
- "private-static-set",
- "private-instance-set",
- "#private-set",
- "#private-static-set",
- "#private-instance-set",
- "static-initialization",
- "static-static-initialization",
- "public-static-static-initialization",
- "instance-static-initialization",
- "public-instance-static-initialization",
- "abstract-static-initialization",
- "public-abstract-static-initialization",
- "protected-static-static-initialization",
- "protected-instance-static-initialization",
- "protected-abstract-static-initialization",
- "private-static-static-initialization",
- "private-instance-static-initialization",
- "#private-static-static-initialization",
- "#private-instance-static-initialization",
- ],
- "type": "string",
- },
- "baseConfig": {
- "oneOf": [
- {
- "enum": [
- "never",
- ],
+ {
+ "additionalProperties": false,
+ "description": "Selector 'parameterProperty'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
"type": "string",
},
- {
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
"items": {
- "oneOf": [
- {
- "$ref": "#/items/0/$defs/allItems",
- },
- {
- "items": {
- "$ref": "#/items/0/$defs/allItems",
- },
- "type": "array",
- },
+ "enum": [
+ "private",
+ "protected",
+ "public",
+ "readonly",
],
+ "type": "string",
},
"type": "array",
},
- {
- "additionalProperties": false,
- "properties": {
- "memberTypes": {
- "oneOf": [
- {
- "items": {
- "oneOf": [
- {
- "$ref": "#/items/0/$defs/allItems",
- },
- {
- "items": {
- "$ref": "#/items/0/$defs/allItems",
- },
- "type": "array",
- },
- ],
- },
- "type": "array",
- },
- {
- "enum": [
- "never",
- ],
- "type": "string",
- },
- ],
- },
- "optionalityOrder": {
- "$ref": "#/items/0/$defs/optionalityOrderOptions",
- },
- "order": {
- "$ref": "#/items/0/$defs/orderOptions",
- },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "parameterProperty",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
},
- "type": "object",
+ "type": "array",
},
+ },
+ "required": [
+ "selector",
+ "format",
],
+ "type": "object",
},
- "optionalityOrderOptions": {
- "enum": [
- "optional-first",
- "required-first",
- ],
- "type": "string",
- },
- "orderOptions": {
- "enum": [
- "alphabetically",
- "alphabetically-case-insensitive",
- "as-written",
- "natural",
- "natural-case-insensitive",
- ],
- "type": "string",
- },
- "typeItems": {
- "enum": [
- "readonly-signature",
- "signature",
- "readonly-field",
- "field",
- "method",
- "constructor",
- ],
- "type": "string",
- },
- "typesConfig": {
- "oneOf": [
- {
+ {
+ "additionalProperties": false,
+ "description": "Selector 'property'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "private",
+ "#private",
+ "protected",
+ "public",
+ "readonly",
+ "requiresQuotes",
+ "static",
+ "override",
+ "async",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
"enum": [
- "never",
+ "property",
],
"type": "string",
},
- {
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
"items": {
- "oneOf": [
- {
- "$ref": "#/items/0/$defs/typeItems",
- },
- {
- "items": {
- "$ref": "#/items/0/$defs/typeItems",
- },
- "type": "array",
- },
- ],
+ "$ref": "#/$defs/typeModifiers",
},
"type": "array",
},
- {
- "additionalProperties": false,
- "properties": {
- "memberTypes": {
- "oneOf": [
- {
- "items": {
- "oneOf": [
- {
- "$ref": "#/items/0/$defs/typeItems",
- },
- {
- "items": {
- "$ref": "#/items/0/$defs/typeItems",
- },
- "type": "array",
- },
- ],
- },
- "type": "array",
- },
- {
- "enum": [
- "never",
- ],
- "type": "string",
- },
- ],
- },
- "optionalityOrder": {
- "$ref": "#/items/0/$defs/optionalityOrderOptions",
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'classMethod'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "order": {
- "$ref": "#/items/0/$defs/orderOptions",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "private",
+ "#private",
+ "protected",
+ "public",
+ "requiresQuotes",
+ "static",
+ "override",
+ "async",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "classMethod",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
],
+ "type": "object",
},
- },
- "additionalProperties": false,
- "properties": {
- "classExpressions": {
- "$ref": "#/items/0/$defs/baseConfig",
- },
- "classes": {
- "$ref": "#/items/0/$defs/baseConfig",
- },
- "default": {
- "$ref": "#/items/0/$defs/baseConfig",
- },
- "interfaces": {
- "$ref": "#/items/0/$defs/typesConfig",
- },
- "typeLiterals": {
- "$ref": "#/items/0/$defs/typesConfig",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "method-signature-style": {
- "create": [Function],
- "defaultOptions": [
- "property",
- ],
- "meta": {
- "docs": {
- "description": "Enforce using a particular method signature syntax",
- "url": "https://typescript-eslint.io/rules/method-signature-style",
- },
- "fixable": "code",
- "messages": {
- "errorMethod": "Shorthand method signature is forbidden. Use a function property instead.",
- "errorProperty": "Function property signature is forbidden. Use a method shorthand instead.",
- },
- "schema": [
- {
- "enum": [
- "property",
- "method",
- ],
- "type": "string",
- },
- ],
- "type": "suggestion",
- },
- },
- "naming-convention": {
- "create": [Function],
- "defaultOptions": [
- {
- "format": [
- "camelCase",
- ],
- "leadingUnderscore": "allow",
- "selector": "default",
- "trailingUnderscore": "allow",
- },
- {
- "format": [
- "camelCase",
- "PascalCase",
- ],
- "selector": "import",
- },
- {
- "format": [
- "camelCase",
- "UPPER_CASE",
- ],
- "leadingUnderscore": "allow",
- "selector": "variable",
- "trailingUnderscore": "allow",
- },
- {
- "format": [
- "PascalCase",
- ],
- "selector": "typeLike",
- },
- ],
- "meta": {
- "docs": {
- "description": "Enforce naming conventions for everything across a codebase",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/naming-convention",
- },
- "messages": {
- "doesNotMatchFormat": "{{type}} name \`{{name}}\` must match one of the following formats: {{formats}}",
- "doesNotMatchFormatTrimmed": "{{type}} name \`{{name}}\` trimmed as \`{{processedName}}\` must match one of the following formats: {{formats}}",
- "missingAffix": "{{type}} name \`{{name}}\` must have one of the following {{position}}es: {{affixes}}",
- "missingUnderscore": "{{type}} name \`{{name}}\` must have {{count}} {{position}} underscore(s).",
- "satisfyCustom": "{{type}} name \`{{name}}\` must {{regexMatch}} the RegExp: {{regex}}",
- "unexpectedUnderscore": "{{type}} name \`{{name}}\` must not have a {{position}} underscore.",
- },
- "schema": {
- "$defs": {
- "formatOptionsConfig": {
- "oneOf": [
- {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/predefinedFormats",
- },
- "type": "array",
- },
- {
- "type": "null",
- },
- ],
- },
- "matchRegexConfig": {
- "additionalProperties": false,
- "properties": {
- "match": {
- "type": "boolean",
- },
- "regex": {
- "type": "string",
- },
- },
- "required": [
- "match",
- "regex",
- ],
- "type": "object",
- },
- "predefinedFormats": {
- "enum": [
- "camelCase",
- "strictCamelCase",
- "PascalCase",
- "StrictPascalCase",
- "snake_case",
- "UPPER_CASE",
- ],
- "type": "string",
- },
- "prefixSuffixConfig": {
- "additionalItems": false,
- "items": {
- "minLength": 1,
- "type": "string",
- },
- "type": "array",
- },
- "typeModifiers": {
- "enum": [
- "boolean",
- "string",
- "number",
- "function",
- "array",
- ],
- "type": "string",
- },
- "underscoreOptions": {
- "enum": [
- "forbid",
- "allow",
- "require",
- "requireDouble",
- "allowDouble",
- "allowSingleOrDouble",
- ],
- "type": "string",
- },
- },
- "additionalItems": false,
- "items": {
- "oneOf": [
{
"additionalProperties": false,
- "description": "Multiple selectors in one config",
+ "description": "Selector 'objectLiteralMethod'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -4390,23 +3315,9 @@ You must still type the parameters of the function.",
"additionalItems": false,
"items": {
"enum": [
- "const",
- "readonly",
- "static",
"public",
- "protected",
- "private",
- "#private",
- "abstract",
- "destructured",
- "global",
- "exported",
- "unused",
"requiresQuotes",
- "override",
"async",
- "default",
- "namespace",
],
"type": "string",
},
@@ -4416,39 +3327,10 @@ You must still type the parameters of the function.",
"$ref": "#/$defs/prefixSuffixConfig",
},
"selector": {
- "additionalItems": false,
- "items": {
- "enum": [
- "default",
- "variableLike",
- "memberLike",
- "typeLike",
- "method",
- "property",
- "accessor",
- "variable",
- "function",
- "parameter",
- "parameterProperty",
- "classicAccessor",
- "enumMember",
- "classMethod",
- "objectLiteralMethod",
- "typeMethod",
- "classProperty",
- "objectLiteralProperty",
- "typeProperty",
- "autoAccessor",
- "class",
- "interface",
- "typeAlias",
- "enum",
- "typeParameter",
- "import",
- ],
- "type": "string",
- },
- "type": "array",
+ "enum": [
+ "objectLiteralMethod",
+ ],
+ "type": "string",
},
"suffix": {
"$ref": "#/$defs/prefixSuffixConfig",
@@ -4456,13 +3338,6 @@ You must still type the parameters of the function.",
"trailingUnderscore": {
"$ref": "#/$defs/underscoreOptions",
},
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
},
"required": [
"selector",
@@ -4472,7 +3347,7 @@ You must still type the parameters of the function.",
},
{
"additionalProperties": false,
- "description": "Selector 'default'",
+ "description": "Selector 'typeMethod'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -4501,23 +3376,8 @@ You must still type the parameters of the function.",
"additionalItems": false,
"items": {
"enum": [
- "const",
- "readonly",
- "static",
"public",
- "protected",
- "private",
- "#private",
- "abstract",
- "destructured",
- "global",
- "exported",
- "unused",
"requiresQuotes",
- "override",
- "async",
- "default",
- "namespace",
],
"type": "string",
},
@@ -4528,7 +3388,7 @@ You must still type the parameters of the function.",
},
"selector": {
"enum": [
- "default",
+ "typeMethod",
],
"type": "string",
},
@@ -4547,7 +3407,7 @@ You must still type the parameters of the function.",
},
{
"additionalProperties": false,
- "description": "Selector 'variableLike'",
+ "description": "Selector 'method'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -4576,7 +3436,14 @@ You must still type the parameters of the function.",
"additionalItems": false,
"items": {
"enum": [
- "unused",
+ "abstract",
+ "private",
+ "#private",
+ "protected",
+ "public",
+ "requiresQuotes",
+ "static",
+ "override",
"async",
],
"type": "string",
@@ -4588,7 +3455,7 @@ You must still type the parameters of the function.",
},
"selector": {
"enum": [
- "variableLike",
+ "method",
],
"type": "string",
},
@@ -4607,7 +3474,7 @@ You must still type the parameters of the function.",
},
{
"additionalProperties": false,
- "description": "Selector 'variable'",
+ "description": "Selector 'classicAccessor'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -4636,12 +3503,13 @@ You must still type the parameters of the function.",
"additionalItems": false,
"items": {
"enum": [
- "const",
- "destructured",
- "exported",
- "global",
- "unused",
- "async",
+ "abstract",
+ "private",
+ "protected",
+ "public",
+ "requiresQuotes",
+ "static",
+ "override",
],
"type": "string",
},
@@ -4652,7 +3520,7 @@ You must still type the parameters of the function.",
},
"selector": {
"enum": [
- "variable",
+ "classicAccessor",
],
"type": "string",
},
@@ -4678,7 +3546,7 @@ You must still type the parameters of the function.",
},
{
"additionalProperties": false,
- "description": "Selector 'function'",
+ "description": "Selector 'autoAccessor'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -4707,10 +3575,13 @@ You must still type the parameters of the function.",
"additionalItems": false,
"items": {
"enum": [
- "exported",
- "global",
- "unused",
- "async",
+ "abstract",
+ "private",
+ "protected",
+ "public",
+ "requiresQuotes",
+ "static",
+ "override",
],
"type": "string",
},
@@ -4721,67 +3592,7 @@ You must still type the parameters of the function.",
},
"selector": {
"enum": [
- "function",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'parameter'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "destructured",
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "parameter",
+ "autoAccessor",
],
"type": "string",
},
@@ -4807,75 +3618,7 @@ You must still type the parameters of the function.",
},
{
"additionalProperties": false,
- "description": "Selector 'memberLike'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "private",
- "#private",
- "protected",
- "public",
- "readonly",
- "requiresQuotes",
- "static",
- "override",
- "async",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "memberLike",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'classProperty'",
+ "description": "Selector 'accessor'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -4906,10 +3649,8 @@ You must still type the parameters of the function.",
"enum": [
"abstract",
"private",
- "#private",
"protected",
"public",
- "readonly",
"requiresQuotes",
"static",
"override",
@@ -4923,7 +3664,7 @@ You must still type the parameters of the function.",
},
"selector": {
"enum": [
- "classProperty",
+ "accessor",
],
"type": "string",
},
@@ -4949,7 +3690,7 @@ You must still type the parameters of the function.",
},
{
"additionalProperties": false,
- "description": "Selector 'objectLiteralProperty'",
+ "description": "Selector 'enumMember'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -4978,7 +3719,6 @@ You must still type the parameters of the function.",
"additionalItems": false,
"items": {
"enum": [
- "public",
"requiresQuotes",
],
"type": "string",
@@ -4990,7 +3730,7 @@ You must still type the parameters of the function.",
},
"selector": {
"enum": [
- "objectLiteralProperty",
+ "enumMember",
],
"type": "string",
},
@@ -5000,13 +3740,6 @@ You must still type the parameters of the function.",
"trailingUnderscore": {
"$ref": "#/$defs/underscoreOptions",
},
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
},
"required": [
"selector",
@@ -5016,7 +3749,7 @@ You must still type the parameters of the function.",
},
{
"additionalProperties": false,
- "description": "Selector 'typeProperty'",
+ "description": "Selector 'typeLike'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -5045,9 +3778,9 @@ You must still type the parameters of the function.",
"additionalItems": false,
"items": {
"enum": [
- "public",
- "readonly",
- "requiresQuotes",
+ "abstract",
+ "exported",
+ "unused",
],
"type": "string",
},
@@ -5058,7 +3791,7 @@ You must still type the parameters of the function.",
},
"selector": {
"enum": [
- "typeProperty",
+ "typeLike",
],
"type": "string",
},
@@ -5068,13 +3801,6 @@ You must still type the parameters of the function.",
"trailingUnderscore": {
"$ref": "#/$defs/underscoreOptions",
},
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
},
"required": [
"selector",
@@ -5084,7 +3810,7 @@ You must still type the parameters of the function.",
},
{
"additionalProperties": false,
- "description": "Selector 'parameterProperty'",
+ "description": "Selector 'class'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -5113,10 +3839,9 @@ You must still type the parameters of the function.",
"additionalItems": false,
"items": {
"enum": [
- "private",
- "protected",
- "public",
- "readonly",
+ "abstract",
+ "exported",
+ "unused",
],
"type": "string",
},
@@ -5127,7 +3852,7 @@ You must still type the parameters of the function.",
},
"selector": {
"enum": [
- "parameterProperty",
+ "class",
],
"type": "string",
},
@@ -5137,13 +3862,6 @@ You must still type the parameters of the function.",
"trailingUnderscore": {
"$ref": "#/$defs/underscoreOptions",
},
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
},
"required": [
"selector",
@@ -5153,7 +3871,7 @@ You must still type the parameters of the function.",
},
{
"additionalProperties": false,
- "description": "Selector 'property'",
+ "description": "Selector 'interface'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -5182,16 +3900,8 @@ You must still type the parameters of the function.",
"additionalItems": false,
"items": {
"enum": [
- "abstract",
- "private",
- "#private",
- "protected",
- "public",
- "readonly",
- "requiresQuotes",
- "static",
- "override",
- "async",
+ "exported",
+ "unused",
],
"type": "string",
},
@@ -5202,7 +3912,7 @@ You must still type the parameters of the function.",
},
"selector": {
"enum": [
- "property",
+ "interface",
],
"type": "string",
},
@@ -5212,13 +3922,6 @@ You must still type the parameters of the function.",
"trailingUnderscore": {
"$ref": "#/$defs/underscoreOptions",
},
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
},
"required": [
"selector",
@@ -5228,7 +3931,7 @@ You must still type the parameters of the function.",
},
{
"additionalProperties": false,
- "description": "Selector 'classMethod'",
+ "description": "Selector 'typeAlias'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -5257,15 +3960,8 @@ You must still type the parameters of the function.",
"additionalItems": false,
"items": {
"enum": [
- "abstract",
- "private",
- "#private",
- "protected",
- "public",
- "requiresQuotes",
- "static",
- "override",
- "async",
+ "exported",
+ "unused",
],
"type": "string",
},
@@ -5276,7 +3972,7 @@ You must still type the parameters of the function.",
},
"selector": {
"enum": [
- "classMethod",
+ "typeAlias",
],
"type": "string",
},
@@ -5295,7 +3991,7 @@ You must still type the parameters of the function.",
},
{
"additionalProperties": false,
- "description": "Selector 'objectLiteralMethod'",
+ "description": "Selector 'enum'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -5324,9 +4020,8 @@ You must still type the parameters of the function.",
"additionalItems": false,
"items": {
"enum": [
- "public",
- "requiresQuotes",
- "async",
+ "exported",
+ "unused",
],
"type": "string",
},
@@ -5337,7 +4032,7 @@ You must still type the parameters of the function.",
},
"selector": {
"enum": [
- "objectLiteralMethod",
+ "enum",
],
"type": "string",
},
@@ -5356,7 +4051,7 @@ You must still type the parameters of the function.",
},
{
"additionalProperties": false,
- "description": "Selector 'typeMethod'",
+ "description": "Selector 'typeParameter'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -5385,8 +4080,7 @@ You must still type the parameters of the function.",
"additionalItems": false,
"items": {
"enum": [
- "public",
- "requiresQuotes",
+ "unused",
],
"type": "string",
},
@@ -5397,7 +4091,7 @@ You must still type the parameters of the function.",
},
"selector": {
"enum": [
- "typeMethod",
+ "typeParameter",
],
"type": "string",
},
@@ -5416,7 +4110,7 @@ You must still type the parameters of the function.",
},
{
"additionalProperties": false,
- "description": "Selector 'method'",
+ "description": "Selector 'import'",
"properties": {
"custom": {
"$ref": "#/$defs/matchRegexConfig",
@@ -5445,15 +4139,8 @@ You must still type the parameters of the function.",
"additionalItems": false,
"items": {
"enum": [
- "abstract",
- "private",
- "#private",
- "protected",
- "public",
- "requiresQuotes",
- "static",
- "override",
- "async",
+ "default",
+ "namespace",
],
"type": "string",
},
@@ -5464,7 +4151,7 @@ You must still type the parameters of the function.",
},
"selector": {
"enum": [
- "method",
+ "import",
],
"type": "string",
},
@@ -5481,777 +4168,410 @@ You must still type the parameters of the function.",
],
"type": "object",
},
- {
- "additionalProperties": false,
- "description": "Selector 'classicAccessor'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "private",
- "protected",
- "public",
- "requiresQuotes",
- "static",
- "override",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "classicAccessor",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'autoAccessor'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "private",
- "protected",
- "public",
- "requiresQuotes",
- "static",
- "override",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "autoAccessor",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
+ ],
+ },
+ "type": "array",
+ },
+ "type": "suggestion",
+ },
+ },
+ "no-array-constructor": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow generic \`Array\` constructors",
+ "extendsBaseRule": true,
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-array-constructor",
+ },
+ "fixable": "code",
+ "messages": {
+ "useLiteral": "The array literal notation [] is preferable.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "no-array-delete": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow using the \`delete\` operator on array values",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-array-delete",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "noArrayDelete": "Using the \`delete\` operator with an array expression is unsafe.",
+ "useSplice": "Use \`array.splice()\` instead.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-base-to-string": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "ignoredTypeNames": [
+ "Error",
+ "RegExp",
+ "URL",
+ "URLSearchParams",
+ ],
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require \`.toString()\` and \`.toLocaleString()\` to only be called on objects which provide useful information when stringified",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-base-to-string",
+ },
+ "messages": {
+ "baseToString": "'{{name}}' {{certainty}} use Object's default stringification format ('[object Object]') when stringified.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "ignoredTypeNames": {
+ "description": "Stringified regular expressions of type names to ignore.",
+ "items": {
+ "type": "string",
},
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
+ "type": "array",
},
- {
- "additionalProperties": false,
- "description": "Selector 'accessor'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "private",
- "protected",
- "public",
- "requiresQuotes",
- "static",
- "override",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "accessor",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'enumMember'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "requiresQuotes",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "enumMember",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-confusing-non-null-assertion": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow non-null assertion in locations that may be confusing",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/no-confusing-non-null-assertion",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "confusingAssign": "Confusing combination of non-null assertion and assignment like \`a! = b\`, which looks very similar to \`a != b\`.",
+ "confusingEqual": "Confusing combination of non-null assertion and equality test like \`a! == b\`, which looks very similar to \`a !== b\`.",
+ "confusingOperator": "Confusing combination of non-null assertion and \`{{operator}}\` operator like \`a! {{operator}} b\`, which might be misinterpreted as \`!(a {{operator}} b)\`.",
+ "notNeedInAssign": "Remove unnecessary non-null assertion (!) in assignment left-hand side.",
+ "notNeedInEqualTest": "Remove unnecessary non-null assertion (!) in equality test.",
+ "notNeedInOperator": "Remove possibly unnecessary non-null assertion (!) in the left operand of the \`{{operator}}\` operator.",
+ "wrapUpLeft": "Wrap the left-hand side in parentheses to avoid confusion with "{{operator}}" operator.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-confusing-void-expression": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "ignoreArrowShorthand": false,
+ "ignoreVoidOperator": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require expressions of type void to appear in statement position",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-confusing-void-expression",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "invalidVoidExpr": "Placing a void expression inside another expression is forbidden. Move it to its own statement instead.",
+ "invalidVoidExprArrow": "Returning a void expression from an arrow function shorthand is forbidden. Please add braces to the arrow function.",
+ "invalidVoidExprArrowWrapVoid": "Void expressions returned from an arrow function shorthand must be marked explicitly with the \`void\` operator.",
+ "invalidVoidExprReturn": "Returning a void expression from a function is forbidden. Please move it before the \`return\` statement.",
+ "invalidVoidExprReturnLast": "Returning a void expression from a function is forbidden. Please remove the \`return\` statement.",
+ "invalidVoidExprReturnWrapVoid": "Void expressions returned from a function must be marked explicitly with the \`void\` operator.",
+ "invalidVoidExprWrapVoid": "Void expressions used inside another expression must be moved to its own statement or marked explicitly with the \`void\` operator.",
+ "voidExprWrapVoid": "Mark with an explicit \`void\` operator.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "ignoreArrowShorthand": {
+ "description": "Whether to ignore "shorthand" \`() =>\` arrow functions: those without \`{ ... }\` braces.",
+ "type": "boolean",
},
- {
- "additionalProperties": false,
- "description": "Selector 'typeLike'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "exported",
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "typeLike",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
+ "ignoreVoidOperator": {
+ "description": "Whether to ignore returns that start with the \`void\` operator.",
+ "type": "boolean",
},
- {
- "additionalProperties": false,
- "description": "Selector 'class'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "exported",
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "class",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
+ },
+ "type": "object",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "no-deprecated": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow using code marked as \`@deprecated\`",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-deprecated",
+ },
+ "messages": {
+ "deprecated": "\`{{name}}\` is deprecated.",
+ "deprecatedWithReason": "\`{{name}}\` is deprecated. {{reason}}",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-dupe-class-members": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow duplicate class members",
+ "extendsBaseRule": true,
+ "url": "https://typescript-eslint.io/rules/no-dupe-class-members",
+ },
+ "hasSuggestions": undefined,
+ "messages": {
+ "unexpected": "Duplicate name '{{name}}'.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-duplicate-enum-values": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow duplicate enum member values",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-duplicate-enum-values",
+ },
+ "hasSuggestions": false,
+ "messages": {
+ "duplicateValue": "Duplicate enum member value {{value}}.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-duplicate-type-constituents": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "ignoreIntersections": false,
+ "ignoreUnions": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow duplicate constituents of union or intersection types",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-duplicate-type-constituents",
+ },
+ "fixable": "code",
+ "messages": {
+ "duplicate": "{{type}} type constituent is duplicated with {{previous}}.",
+ "unnecessary": "Explicit undefined is unnecessary on an optional parameter.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "ignoreIntersections": {
+ "description": "Whether to ignore \`&\` intersections.",
+ "type": "boolean",
},
- {
- "additionalProperties": false,
- "description": "Selector 'interface'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "exported",
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "interface",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
+ "ignoreUnions": {
+ "description": "Whether to ignore \`|\` unions.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-dynamic-delete": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow using the \`delete\` operator on computed key expressions",
+ "recommended": "strict",
+ "url": "https://typescript-eslint.io/rules/no-dynamic-delete",
+ },
+ "fixable": "code",
+ "messages": {
+ "dynamicDelete": "Do not delete dynamically computed property keys.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "no-empty-function": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allow": [],
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow empty functions",
+ "extendsBaseRule": true,
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/no-empty-function",
+ },
+ "hasSuggestions": undefined,
+ "messages": {
+ "unexpected": "Unexpected empty {{name}}.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allow": {
+ "description": "Locations and kinds of functions that are allowed to be empty.",
+ "items": {
+ "enum": [
+ "functions",
+ "arrowFunctions",
+ "generatorFunctions",
+ "methods",
+ "generatorMethods",
+ "getters",
+ "setters",
+ "constructors",
+ "private-constructors",
+ "protected-constructors",
+ "asyncFunctions",
+ "asyncMethods",
+ "decoratedFunctions",
+ "overrideMethods",
+ ],
+ "type": "string",
},
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
+ "type": "array",
+ "uniqueItems": true,
},
- {
- "additionalProperties": false,
- "description": "Selector 'typeAlias'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "exported",
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "typeAlias",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'enum'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "exported",
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "enum",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'typeParameter'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "typeParameter",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'import'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "default",
- "namespace",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "import",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- ],
+ },
+ "type": "object",
},
- "type": "array",
- },
+ ],
"type": "suggestion",
},
},
- "no-array-constructor": {
+ "no-empty-interface": {
"create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow generic \`Array\` constructors",
- "extendsBaseRule": true,
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-array-constructor",
- },
- "fixable": "code",
- "messages": {
- "useLiteral": "The array literal notation [] is preferable.",
+ "defaultOptions": [
+ {
+ "allowSingleExtends": false,
},
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-array-delete": {
- "create": [Function],
- "defaultOptions": [],
+ ],
"meta": {
+ "deprecated": true,
"docs": {
- "description": "Disallow using the \`delete\` operator on array values",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-array-delete",
+ "description": "Disallow the declaration of empty interfaces",
+ "url": "https://typescript-eslint.io/rules/no-empty-interface",
},
+ "fixable": "code",
"hasSuggestions": true,
"messages": {
- "noArrayDelete": "Using the \`delete\` operator with an array expression is unsafe.",
- "useSplice": "Use \`array.splice()\` instead.",
+ "noEmpty": "An empty interface is equivalent to \`{}\`.",
+ "noEmptyWithSuper": "An interface declaring no members is equivalent to its supertype.",
},
- "schema": [],
- "type": "problem",
+ "replacedBy": [
+ "@typescript-eslint/no-empty-object-type",
+ ],
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowSingleExtends": {
+ "description": "Whether to allow empty interfaces that extend a single other interface.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
},
},
- "no-base-to-string": {
+ "no-empty-object-type": {
"create": [Function],
"defaultOptions": [
{
- "ignoredTypeNames": [
- "Error",
- "RegExp",
- "URL",
- "URLSearchParams",
- ],
+ "allowInterfaces": "never",
+ "allowObjectTypes": "never",
},
],
"meta": {
"docs": {
- "description": "Require \`.toString()\` to only be called on objects which provide useful information when stringified",
+ "description": "Disallow accidentally using the "empty object" type",
"recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-base-to-string",
+ "url": "https://typescript-eslint.io/rules/no-empty-object-type",
},
+ "hasSuggestions": true,
"messages": {
- "baseToString": "'{{name}}' {{certainty}} evaluate to '[object Object]' when stringified.",
+ "noEmptyInterface": "An empty interface declaration allows any non-nullish value, including literals like \`0\` and \`""\`.
+- If that's what you want, disable this lint rule with an inline comment or configure the '{{ option }}' rule option.
+- If you want a type meaning "any object", you probably want \`object\` instead.
+- If you want a type meaning "any value", you probably want \`unknown\` instead.",
+ "noEmptyInterfaceWithSuper": "An interface declaring no members is equivalent to its supertype.",
+ "noEmptyObject": "The \`{}\` ("empty object") type allows any non-nullish value, including literals like \`0\` and \`""\`.
+- If that's what you want, disable this lint rule with an inline comment or configure the '{{ option }}' rule option.
+- If you want a type meaning "any object", you probably want \`object\` instead.
+- If you want a type meaning "any value", you probably want \`unknown\` instead.",
+ "replaceEmptyInterface": "Replace empty interface with \`{{replacement}}\`.",
+ "replaceEmptyInterfaceWithSuper": "Replace empty interface with a type alias.",
+ "replaceEmptyObjectType": "Replace \`{}\` with \`{{replacement}}\`.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
- "ignoredTypeNames": {
- "items": {
- "type": "string",
- },
- "type": "array",
+ "allowInterfaces": {
+ "description": "Whether to allow empty interfaces.",
+ "enum": [
+ "always",
+ "never",
+ "with-single-extends",
+ ],
+ "type": "string",
+ },
+ "allowObjectTypes": {
+ "description": "Whether to allow empty object type literals.",
+ "enum": [
+ "always",
+ "never",
+ ],
+ "type": "string",
+ },
+ "allowWithName": {
+ "description": "A stringified regular expression to allow interfaces and object type aliases with the configured name.",
+ "type": "string",
},
},
"type": "object",
@@ -6260,234 +4580,102 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
- "no-confusing-non-null-assertion": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow non-null assertion in locations that may be confusing",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/no-confusing-non-null-assertion",
- },
- "hasSuggestions": true,
- "messages": {
- "confusingAssign": "Confusing combinations of non-null assertion and equal test like "a! = b", which looks very similar to not equal "a != b".",
- "confusingEqual": "Confusing combinations of non-null assertion and equal test like "a! == b", which looks very similar to not equal "a !== b".",
- "notNeedInAssign": "Unnecessary non-null assertion (!) in assignment left hand.",
- "notNeedInEqualTest": "Unnecessary non-null assertion (!) in equal test.",
- "wrapUpLeft": "Wrap up left hand to avoid putting non-null assertion "!" and "=" together.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-confusing-void-expression": {
+ "no-explicit-any": {
"create": [Function],
"defaultOptions": [
{
- "ignoreArrowShorthand": false,
- "ignoreVoidOperator": false,
+ "fixToUnknown": false,
+ "ignoreRestArgs": false,
},
],
"meta": {
"docs": {
- "description": "Require expressions of type void to appear in statement position",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-confusing-void-expression",
+ "description": "Disallow the \`any\` type",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-explicit-any",
},
"fixable": "code",
"hasSuggestions": true,
"messages": {
- "invalidVoidExpr": "Placing a void expression inside another expression is forbidden. Move it to its own statement instead.",
- "invalidVoidExprArrow": "Returning a void expression from an arrow function shorthand is forbidden. Please add braces to the arrow function.",
- "invalidVoidExprArrowWrapVoid": "Void expressions returned from an arrow function shorthand must be marked explicitly with the \`void\` operator.",
- "invalidVoidExprReturn": "Returning a void expression from a function is forbidden. Please move it before the \`return\` statement.",
- "invalidVoidExprReturnLast": "Returning a void expression from a function is forbidden. Please remove the \`return\` statement.",
- "invalidVoidExprReturnWrapVoid": "Void expressions returned from a function must be marked explicitly with the \`void\` operator.",
- "invalidVoidExprWrapVoid": "Void expressions used inside another expression must be moved to its own statement or marked explicitly with the \`void\` operator.",
- "voidExprWrapVoid": "Mark with an explicit \`void\` operator.",
+ "suggestNever": "Use \`never\` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.",
+ "suggestUnknown": "Use \`unknown\` instead, this will force you to explicitly, and safely assert the type is correct.",
+ "unexpectedAny": "Unexpected any. Specify a different type.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
- "ignoreArrowShorthand": {
+ "fixToUnknown": {
+ "description": "Whether to enable auto-fixing in which the \`any\` type is converted to the \`unknown\` type.",
"type": "boolean",
},
- "ignoreVoidOperator": {
+ "ignoreRestArgs": {
+ "description": "Whether to ignore rest parameter arrays.",
"type": "boolean",
},
},
"type": "object",
},
],
- "type": "problem",
- },
- },
- "no-dupe-class-members": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow duplicate class members",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-dupe-class-members",
- },
- "hasSuggestions": undefined,
- "messages": {
- "unexpected": "Duplicate name '{{name}}'.",
- },
- "schema": [],
- "type": "problem",
+ "type": "suggestion",
},
},
- "no-duplicate-enum-values": {
+ "no-extra-non-null-assertion": {
"create": [Function],
"defaultOptions": [],
"meta": {
"docs": {
- "description": "Disallow duplicate enum member values",
+ "description": "Disallow extra non-null assertions",
"recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-duplicate-enum-values",
+ "url": "https://typescript-eslint.io/rules/no-extra-non-null-assertion",
},
- "hasSuggestions": false,
+ "fixable": "code",
"messages": {
- "duplicateValue": "Duplicate enum member value {{value}}.",
+ "noExtraNonNullAssertion": "Forbidden extra non-null assertion.",
},
"schema": [],
"type": "problem",
},
},
- "no-duplicate-type-constituents": {
+ "no-extraneous-class": {
"create": [Function],
"defaultOptions": [
{
- "ignoreIntersections": false,
- "ignoreUnions": false,
+ "allowConstructorOnly": false,
+ "allowEmpty": false,
+ "allowStaticOnly": false,
+ "allowWithDecorator": false,
},
],
"meta": {
"docs": {
- "description": "Disallow duplicate constituents of union or intersection types",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-duplicate-type-constituents",
+ "description": "Disallow classes used as namespaces",
+ "recommended": "strict",
+ "url": "https://typescript-eslint.io/rules/no-extraneous-class",
},
- "fixable": "code",
"messages": {
- "duplicate": "{{type}} type constituent is duplicated with {{previous}}.",
+ "empty": "Unexpected empty class.",
+ "onlyConstructor": "Unexpected class with only a constructor.",
+ "onlyStatic": "Unexpected class with only static properties.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
- "ignoreIntersections": {
+ "allowConstructorOnly": {
+ "description": "Whether to allow extraneous classes that contain only a constructor.",
"type": "boolean",
},
- "ignoreUnions": {
+ "allowEmpty": {
+ "description": "Whether to allow extraneous classes that have no body (i.e. are empty).",
"type": "boolean",
},
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-dynamic-delete": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow using the \`delete\` operator on computed key expressions",
- "recommended": "strict",
- "url": "https://typescript-eslint.io/rules/no-dynamic-delete",
- },
- "fixable": "code",
- "messages": {
- "dynamicDelete": "Do not delete dynamically computed property keys.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-empty-function": {
- "create": [Function],
- "defaultOptions": [
- {
- "allow": [],
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow empty functions",
- "extendsBaseRule": true,
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/no-empty-function",
- },
- "hasSuggestions": undefined,
- "messages": {
- "unexpected": "Unexpected empty {{name}}.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allow": {
- "items": {
- "enum": [
- "functions",
- "arrowFunctions",
- "generatorFunctions",
- "methods",
- "generatorMethods",
- "getters",
- "setters",
- "constructors",
- "private-constructors",
- "protected-constructors",
- "asyncFunctions",
- "asyncMethods",
- "decoratedFunctions",
- "overrideMethods",
- ],
- "type": "string",
- },
- "type": "array",
- "uniqueItems": true,
+ "allowStaticOnly": {
+ "description": "Whether to allow extraneous classes that only contain static members.",
+ "type": "boolean",
},
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-empty-interface": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowSingleExtends": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow the declaration of empty interfaces",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/no-empty-interface",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "noEmpty": "An empty interface is equivalent to \`{}\`.",
- "noEmptyWithSuper": "An interface declaring no members is equivalent to its supertype.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowSingleExtends": {
+ "allowWithDecorator": {
+ "description": "Whether to allow extraneous classes that include a decorator.",
"type": "boolean",
},
},
@@ -6497,301 +4685,311 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
- "no-explicit-any": {
+ "no-floating-promises": {
"create": [Function],
"defaultOptions": [
{
- "fixToUnknown": false,
- "ignoreRestArgs": false,
+ "allowForKnownSafeCalls": [],
+ "allowForKnownSafePromises": [],
+ "checkThenables": false,
+ "ignoreIIFE": false,
+ "ignoreVoid": true,
},
],
"meta": {
"docs": {
- "description": "Disallow the \`any\` type",
+ "description": "Require Promise-like statements to be handled appropriately",
"recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-explicit-any",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-floating-promises",
},
- "fixable": "code",
"hasSuggestions": true,
"messages": {
- "suggestNever": "Use \`never\` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.",
- "suggestUnknown": "Use \`unknown\` instead, this will force you to explicitly, and safely assert the type is correct.",
- "unexpectedAny": "Unexpected any. Specify a different type.",
+ "floating": "Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler.",
+ "floatingFixAwait": "Add await operator.",
+ "floatingFixVoid": "Add void operator to ignore.",
+ "floatingPromiseArray": "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar.",
+ "floatingPromiseArrayVoid": "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the \`void\` operator.",
+ "floatingUselessRejectionHandler": "Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler. A rejection handler that is not a function will be ignored.",
+ "floatingUselessRejectionHandlerVoid": "Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the \`void\` operator. A rejection handler that is not a function will be ignored.",
+ "floatingVoid": "Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the \`void\` operator.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
- "fixToUnknown": {
- "description": "Whether to enable auto-fixing in which the \`any\` type is converted to the \`unknown\` type.",
- "type": "boolean",
- },
- "ignoreRestArgs": {
- "description": "Whether to ignore rest parameter arrays.",
- "type": "boolean",
- },
+ "allowForKnownSafeCalls": {
+ "description": "Type specifiers of functions whose calls are safe to float.",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "file",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "path": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "lib",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "package",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "package": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ "package",
+ ],
+ "type": "object",
+ },
+ ],
+ },
+ "type": "array",
+ },
+ "allowForKnownSafePromises": {
+ "description": "Type specifiers that are known to be safe to float.",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "file",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "path": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "lib",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "package",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "package": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ "package",
+ ],
+ "type": "object",
+ },
+ ],
+ },
+ "type": "array",
+ },
+ "checkThenables": {
+ "description": "Whether to check all "Thenable"s, not just the built-in Promise type.",
+ "type": "boolean",
+ },
+ "ignoreIIFE": {
+ "description": "Whether to ignore async IIFEs (Immediately Invoked Function Expressions).",
+ "type": "boolean",
+ },
+ "ignoreVoid": {
+ "description": "Whether to ignore \`void\` expressions.",
+ "type": "boolean",
+ },
},
"type": "object",
},
],
- "type": "suggestion",
+ "type": "problem",
},
},
- "no-extra-non-null-assertion": {
+ "no-for-in-array": {
"create": [Function],
"defaultOptions": [],
"meta": {
"docs": {
- "description": "Disallow extra non-null assertions",
+ "description": "Disallow iterating over an array with a for-in loop",
"recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-extra-non-null-assertion",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-for-in-array",
},
- "fixable": "code",
"messages": {
- "noExtraNonNullAssertion": "Forbidden extra non-null assertion.",
+ "forInViolation": "For-in loops over arrays skips holes, returns indices as strings, and may visit the prototype chain or other enumerable properties. Use a more robust iteration method such as for-of or array.forEach instead.",
},
"schema": [],
"type": "problem",
},
},
- "no-extra-parens": {
+ "no-implied-eval": {
"create": [Function],
- "defaultOptions": [
- "all",
- ],
+ "defaultOptions": [],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Disallow unnecessary parentheses",
+ "description": "Disallow the use of \`eval()\`-like methods",
"extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-extra-parens",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-implied-eval",
},
- "fixable": "code",
- "hasSuggestions": undefined,
"messages": {
- "unexpected": "Unnecessary parentheses around expression.",
- },
- "replacedBy": [
- "@stylistic/ts/no-extra-parens",
- ],
- "schema": {
- "anyOf": [
- {
- "items": [
- {
- "enum": [
- "functions",
- ],
- },
- ],
- "maxItems": 1,
- "minItems": 0,
- "type": "array",
- },
- {
- "items": [
- {
- "enum": [
- "all",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "allowParensAfterCommentPattern": {
- "type": "string",
- },
- "conditionalAssign": {
- "type": "boolean",
- },
- "enforceForArrowConditionals": {
- "type": "boolean",
- },
- "enforceForFunctionPrototypeMethods": {
- "type": "boolean",
- },
- "enforceForNewInMemberExpressions": {
- "type": "boolean",
- },
- "enforceForSequenceExpressions": {
- "type": "boolean",
- },
- "ignoreJSX": {
- "enum": [
- "none",
- "all",
- "single-line",
- "multi-line",
- ],
- },
- "nestedBinaryExpressions": {
- "type": "boolean",
- },
- "returnAssign": {
- "type": "boolean",
- },
- "ternaryOperandBinaryExpressions": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "maxItems": 2,
- "minItems": 0,
- "type": "array",
- },
- ],
- },
- "type": "layout",
- },
- },
- "no-extra-semi": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Disallow unnecessary semicolons",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-extra-semi",
- },
- "fixable": "code",
- "hasSuggestions": undefined,
- "messages": {
- "unexpected": "Unnecessary semicolon.",
- },
- "replacedBy": [
- "@stylistic/ts/no-extra-semi",
- ],
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-extraneous-class": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowConstructorOnly": false,
- "allowEmpty": false,
- "allowStaticOnly": false,
- "allowWithDecorator": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow classes used as namespaces",
- "recommended": "strict",
- "url": "https://typescript-eslint.io/rules/no-extraneous-class",
- },
- "messages": {
- "empty": "Unexpected empty class.",
- "onlyConstructor": "Unexpected class with only a constructor.",
- "onlyStatic": "Unexpected class with only static properties.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowConstructorOnly": {
- "description": "Whether to allow extraneous classes that contain only a constructor.",
- "type": "boolean",
- },
- "allowEmpty": {
- "description": "Whether to allow extraneous classes that have no body (i.e. are empty).",
- "type": "boolean",
- },
- "allowStaticOnly": {
- "description": "Whether to allow extraneous classes that only contain static members.",
- "type": "boolean",
- },
- "allowWithDecorator": {
- "description": "Whether to allow extraneous classes that include a decorator.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-floating-promises": {
- "create": [Function],
- "defaultOptions": [
- {
- "ignoreIIFE": false,
- "ignoreVoid": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Require Promise-like statements to be handled appropriately",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-floating-promises",
- },
- "hasSuggestions": true,
- "messages": {
- "floating": "Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler.",
- "floatingFixAwait": "Add await operator.",
- "floatingFixVoid": "Add void operator to ignore.",
- "floatingPromiseArray": "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar.",
- "floatingPromiseArrayVoid": "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the \`void\` operator.",
- "floatingUselessRejectionHandler": "Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler. A rejection handler that is not a function will be ignored.",
- "floatingUselessRejectionHandlerVoid": "Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the \`void\` operator. A rejection handler that is not a function will be ignored.",
- "floatingVoid": "Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the \`void\` operator.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "ignoreIIFE": {
- "description": "Whether to ignore async IIFEs (Immediately Invoked Function Expressions).",
- "type": "boolean",
- },
- "ignoreVoid": {
- "description": "Whether to ignore \`void\` expressions.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "no-for-in-array": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow iterating over an array with a for-in loop",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-for-in-array",
- },
- "messages": {
- "forInViolation": "For-in loops over arrays skips holes, returns indices as strings, and may visit the prototype chain or other enumerable properties. Use a more robust iteration method such as for-of or array.forEach instead.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-implied-eval": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow the use of \`eval()\`-like methods",
- "extendsBaseRule": true,
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-implied-eval",
- },
- "messages": {
- "noFunctionConstructor": "Implied eval. Do not use the Function constructor to create functions.",
- "noImpliedEvalError": "Implied eval. Consider passing a function.",
+ "noFunctionConstructor": "Implied eval. Do not use the Function constructor to create functions.",
+ "noImpliedEvalError": "Implied eval. Consider passing a function.",
},
"schema": [],
"type": "suggestion",
@@ -6836,9 +5034,11 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"ignoreParameters": {
+ "description": "Whether to ignore function parameters.",
"type": "boolean",
},
"ignoreProperties": {
+ "description": "Whether to ignore class properties.",
"type": "boolean",
},
},
@@ -6907,14 +5107,18 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"allowAsThisParameter": {
+ "description": "Whether a \`this\` parameter of a function may be \`void\`.",
"type": "boolean",
},
"allowInGenericTypeArguments": {
+ "description": "Whether \`void\` can be used as a valid value for generic type parameters.",
"oneOf": [
{
+ "description": "Whether \`void\` can be used as a valid value for all generic type parameters.",
"type": "boolean",
},
{
+ "description": "Allowlist of types that may accept \`void\` as a generic type parameter.",
"items": {
"type": "string",
},
@@ -6951,10 +5155,10 @@ You must still type the parameters of the function.",
"create": [Function],
"defaultOptions": [],
"meta": {
+ "deprecated": true,
"docs": {
"description": "Disallow literal numbers that lose precision",
"extendsBaseRule": true,
- "recommended": "recommended",
"url": "https://typescript-eslint.io/rules/no-loss-of-precision",
},
"hasSuggestions": undefined,
@@ -6976,6 +5180,7 @@ You must still type the parameters of the function.",
"ignoreEnums": false,
"ignoreNumericLiteralTypes": false,
"ignoreReadonlyClassProperties": false,
+ "ignoreTypeIndexes": false,
},
],
"meta": {
@@ -7028,15 +5233,19 @@ You must still type the parameters of the function.",
"type": "boolean",
},
"ignoreEnums": {
+ "description": "Whether enums used in TypeScript are considered okay.",
"type": "boolean",
},
"ignoreNumericLiteralTypes": {
+ "description": "Whether numbers used in TypeScript numeric literal types are considered okay.",
"type": "boolean",
},
"ignoreReadonlyClassProperties": {
+ "description": "Whether \`readonly\` class properties are considered okay.",
"type": "boolean",
},
"ignoreTypeIndexes": {
+ "description": "Whether numbers used to index types are okay.",
"type": "boolean",
},
},
@@ -7072,6 +5281,7 @@ You must still type the parameters of the function.",
"properties": {
"checkNever": {
"default": false,
+ "description": "Whether to suggest removing \`void\` when the argument has type \`never\`.",
"type": "boolean",
},
},
@@ -7116,9 +5326,11 @@ You must still type the parameters of the function.",
},
"messages": {
"conditional": "Expected non-Promise value in a boolean conditional.",
+ "predicate": "Expected a non-Promise value to be returned.",
"spread": "Expected a non-Promise value to be spreaded in an object.",
"voidReturnArgument": "Promise returned in function argument where a void return was expected.",
"voidReturnAttribute": "Promise-returning function provided to attribute where a void return was expected.",
+ "voidReturnInheritedMethod": "Promise-returning method provided where a void return was expected by extended/implemented type '{{ heritageTypeName }}'.",
"voidReturnProperty": "Promise-returning function provided to property where a void return was expected.",
"voidReturnReturnValue": "Promise-returning function provided to return value where a void return was expected.",
"voidReturnVariable": "Promise-returning function provided to variable where a void return was expected.",
@@ -7128,32 +5340,46 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"checksConditionals": {
+ "description": "Whether to warn when a Promise is provided to conditional statements.",
"type": "boolean",
},
"checksSpreads": {
+ "description": "Whether to warn when \`...\` spreading a \`Promise\`.",
"type": "boolean",
},
"checksVoidReturn": {
+ "description": "Whether to warn when a Promise is returned from a function typed as returning \`void\`.",
"oneOf": [
{
+ "description": "Whether to disable checking all asynchronous functions.",
"type": "boolean",
},
{
"additionalProperties": false,
+ "description": "Which forms of functions may have checking disabled.",
"properties": {
"arguments": {
+ "description": "Disables checking an asynchronous function passed as argument where the parameter type expects a function that returns \`void\`.",
"type": "boolean",
},
"attributes": {
+ "description": "Disables checking an asynchronous function passed as a JSX attribute expected to be a function that returns \`void\`.",
+ "type": "boolean",
+ },
+ "inheritedMethods": {
+ "description": "Disables checking an asynchronous method in a type that extends or implements another type expecting that method to return \`void\`.",
"type": "boolean",
},
"properties": {
+ "description": "Disables checking an asynchronous function passed as an object property expected to be a function that returns \`void\`.",
"type": "boolean",
},
"returns": {
+ "description": "Disables checking an asynchronous function returned in a function whose return type is a function that returns \`void\`.",
"type": "boolean",
},
"variables": {
+ "description": "Disables checking an asynchronous function used as a variable whose return type is a function that returns \`void\`.",
"type": "boolean",
},
},
@@ -7299,9 +5525,11 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"builtinGlobals": {
+ "description": "Whether to report shadowing of built-in global variables.",
"type": "boolean",
},
"ignoreDeclarationMerge": {
+ "description": "Whether to ignore declaration merges between certain TypeScript declaration types.",
"type": "boolean",
},
},
@@ -7322,6 +5550,7 @@ You must still type the parameters of the function.",
"url": "https://typescript-eslint.io/rules/no-redundant-type-constituents",
},
"messages": {
+ "errorTypeOverrides": "'{{typeName}}' is an 'error' type that acts as 'any' and overrides all other types in this {{container}} type.",
"literalOverridden": "{{literal}} is overridden by {{primitive}} in this union type.",
"overridden": "'{{typeName}}' is overridden by other types in this {{container}} type.",
"overrides": "'{{typeName}}' overrides all other types in this {{container}} type.",
@@ -7336,11 +5565,13 @@ You must still type the parameters of the function.",
"defaultOptions": [
{
"allow": [],
+ "allowAsImport": false,
},
],
"meta": {
"docs": {
"description": "Disallow invocation of \`require()\`",
+ "recommended": "recommended",
"url": "https://typescript-eslint.io/rules/no-require-imports",
},
"messages": {
@@ -7357,6 +5588,10 @@ You must still type the parameters of the function.",
},
"type": "array",
},
+ "allowAsImport": {
+ "description": "Allows \`require\` statements in import declarations.",
+ "type": "boolean",
+ },
},
"type": "object",
},
@@ -7402,7 +5637,7 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"allowTypeImports": {
- "description": "Disallow value imports, but allow type-only imports.",
+ "description": "Whether to allow type-only imports for a path.",
"type": "boolean",
},
"importNames": {
@@ -7445,7 +5680,7 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"allowTypeImports": {
- "description": "Disallow value imports, but allow type-only imports.",
+ "description": "Whether to allow type-only imports for a path.",
"type": "boolean",
},
"importNames": {
@@ -7486,7 +5721,7 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"allowTypeImports": {
- "description": "Disallow value imports, but allow type-only imports.",
+ "description": "Whether to allow type-only imports for a path.",
"type": "boolean",
},
"caseSensitive": {
@@ -7537,98 +5772,137 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
- "no-shadow": {
+ "no-restricted-types": {
"create": [Function],
"defaultOptions": [
- {
- "allow": [],
- "builtinGlobals": false,
- "hoist": "functions",
- "ignoreFunctionTypeParameterNameValueShadow": true,
- "ignoreOnInitialization": false,
- "ignoreTypeValueShadow": true,
- },
+ {},
],
"meta": {
"docs": {
- "description": "Disallow variable declarations from shadowing variables declared in the outer scope",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-shadow",
+ "description": "Disallow certain types",
+ "url": "https://typescript-eslint.io/rules/no-restricted-types",
},
+ "fixable": "code",
+ "hasSuggestions": true,
"messages": {
- "noShadow": "'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",
- "noShadowGlobal": "'{{name}}' is already a global variable.",
+ "bannedTypeMessage": "Don't use \`{{name}}\` as a type.{{customMessage}}",
+ "bannedTypeReplacement": "Replace \`{{name}}\` with \`{{replacement}}\`.",
},
"schema": [
{
- "additionalProperties": false,
- "properties": {
- "allow": {
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- "builtinGlobals": {
- "type": "boolean",
- },
- "hoist": {
- "enum": [
- "all",
- "functions",
- "never",
- ],
- "type": "string",
- },
- "ignoreFunctionTypeParameterNameValueShadow": {
- "type": "boolean",
- },
- "ignoreOnInitialization": {
- "type": "boolean",
- },
- "ignoreTypeValueShadow": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
+ "$defs": {
+ "banConfig": {
+ "oneOf": [
+ {
+ "description": "Bans the type with the default message.",
+ "enum": [
+ true,
+ ],
+ "type": "boolean",
+ },
+ {
+ "description": "Bans the type with a custom message.",
+ "type": "string",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Bans a type.",
+ "properties": {
+ "fixWith": {
+ "description": "Type to autofix replace with. Note that autofixers can be applied automatically - so you need to be careful with this option.",
+ "type": "string",
+ },
+ "message": {
+ "description": "Custom error message.",
+ "type": "string",
+ },
+ "suggest": {
+ "description": "Types to suggest replacing with.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ },
+ },
+ "additionalProperties": false,
+ "properties": {
+ "types": {
+ "additionalProperties": {
+ "$ref": "#/items/0/$defs/banConfig",
+ },
+ "description": "An object whose keys are the types you want to ban, and the values are error messages.",
+ "type": "object",
+ },
+ },
+ "type": "object",
+ },
+ ],
"type": "suggestion",
},
},
- "no-this-alias": {
+ "no-shadow": {
"create": [Function],
"defaultOptions": [
{
- "allowDestructuring": true,
- "allowedNames": [],
+ "allow": [],
+ "builtinGlobals": false,
+ "hoist": "functions",
+ "ignoreFunctionTypeParameterNameValueShadow": true,
+ "ignoreOnInitialization": false,
+ "ignoreTypeValueShadow": true,
},
],
"meta": {
"docs": {
- "description": "Disallow aliasing \`this\`",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-this-alias",
+ "description": "Disallow variable declarations from shadowing variables declared in the outer scope",
+ "extendsBaseRule": true,
+ "url": "https://typescript-eslint.io/rules/no-shadow",
},
"messages": {
- "thisAssignment": "Unexpected aliasing of 'this' to local variable.",
- "thisDestructure": "Unexpected aliasing of members of 'this' to local variables.",
+ "noShadow": "'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",
+ "noShadowGlobal": "'{{name}}' is already a global variable.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
- "allowDestructuring": {
- "description": "Whether to ignore destructurings, such as \`const { props, state } = this\`.",
- "type": "boolean",
- },
- "allowedNames": {
- "description": "Names to ignore, such as ["self"] for \`const self = this;\`.",
+ "allow": {
+ "description": "Identifier names for which shadowing is allowed.",
"items": {
"type": "string",
},
"type": "array",
},
+ "builtinGlobals": {
+ "description": "Whether to report shadowing of built-in global variables.",
+ "type": "boolean",
+ },
+ "hoist": {
+ "description": "Whether to report shadowing before outer functions or variables are defined.",
+ "enum": [
+ "all",
+ "functions",
+ "never",
+ ],
+ "type": "string",
+ },
+ "ignoreFunctionTypeParameterNameValueShadow": {
+ "description": "Whether to ignore function parameters named the same as a variable.",
+ "type": "boolean",
+ },
+ "ignoreOnInitialization": {
+ "description": "Whether to ignore the variable initializers when the shadowed variable is presumably still unitialized.",
+ "type": "boolean",
+ },
+ "ignoreTypeValueShadow": {
+ "description": "Whether to ignore types named the same as a variable.",
+ "type": "boolean",
+ },
},
"type": "object",
},
@@ -7636,44 +5910,44 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
- "no-throw-literal": {
+ "no-this-alias": {
"create": [Function],
"defaultOptions": [
{
- "allowThrowingAny": true,
- "allowThrowingUnknown": true,
+ "allowDestructuring": true,
+ "allowedNames": [],
},
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Disallow throwing literals as exceptions",
- "extendsBaseRule": true,
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-throw-literal",
+ "description": "Disallow aliasing \`this\`",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-this-alias",
},
"messages": {
- "object": "Expected an error object to be thrown.",
- "undef": "Do not throw undefined.",
+ "thisAssignment": "Unexpected aliasing of 'this' to local variable.",
+ "thisDestructure": "Unexpected aliasing of members of 'this' to local variables.",
},
- "replacedBy": [
- "@typescript-eslint/only-throw-error",
- ],
"schema": [
{
"additionalProperties": false,
"properties": {
- "allowThrowingAny": {
+ "allowDestructuring": {
+ "description": "Whether to ignore destructurings, such as \`const { props, state } = this\`.",
"type": "boolean",
},
- "allowThrowingUnknown": {
- "type": "boolean",
+ "allowedNames": {
+ "description": "Names to ignore, such as ["self"] for \`const self = this;\`.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
},
},
"type": "object",
},
],
- "type": "problem",
+ "type": "suggestion",
},
},
"no-type-alias": {
@@ -7810,6 +6084,7 @@ You must still type the parameters of the function.",
{
"allowConstantLoopConditions": false,
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false,
+ "checkTypePredicates": false,
},
],
"meta": {
@@ -7832,6 +6107,7 @@ You must still type the parameters of the function.",
"neverOptionalChain": "Unnecessary optional chain on a non-nullish value.",
"noOverlapBooleanExpression": "Unnecessary conditional, the types have no overlap.",
"noStrictNullCheck": "This rule requires the \`strictNullChecks\` compiler option to be turned on to function correctly.",
+ "typeGuardAlreadyIsType": "Unnecessary conditional, expression already has the type being checked by the {{typeGuardOrAssertionFunction}}.",
},
"schema": [
{
@@ -7845,6 +6121,10 @@ You must still type the parameters of the function.",
"description": "Whether to not error when running with a tsconfig that has strictNullChecks turned.",
"type": "boolean",
},
+ "checkTypePredicates": {
+ "description": "Whether to check the asserted argument of a type predicate function for unnecessary conditions",
+ "type": "boolean",
+ },
},
"type": "object",
},
@@ -7852,6 +6132,21 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
+ "no-unnecessary-parameter-property-assignment": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow unnecessary assignment of constructor property parameter",
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment",
+ },
+ "messages": {
+ "unnecessaryAssign": "This assignment is unnecessary since it is already assigned by a parameter property.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
"no-unnecessary-qualifier": {
"create": [Function],
"defaultOptions": [],
@@ -7869,6 +6164,24 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
+ "no-unnecessary-template-expression": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow unnecessary template expressions",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-template-expression",
+ },
+ "fixable": "code",
+ "messages": {
+ "noUnnecessaryTemplateExpression": "Template literal expression is unnecessary and can be simplified.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
"no-unnecessary-type-arguments": {
"create": [Function],
"defaultOptions": [],
@@ -7940,6 +6253,25 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
+ "no-unnecessary-type-parameters": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow type parameters that aren't used multiple times",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-type-parameters",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "replaceUsagesWithConstraint": "Replace all usages of type parameter with its constraint.",
+ "sole": "Type parameter {{name}} is {{uses}} in the {{descriptor}} signature.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
"no-unsafe-argument": {
"create": [Function],
"defaultOptions": [],
@@ -7951,10 +6283,10 @@ You must still type the parameters of the function.",
"url": "https://typescript-eslint.io/rules/no-unsafe-argument",
},
"messages": {
- "unsafeArgument": "Unsafe argument of type \`{{sender}}\` assigned to a parameter of type \`{{receiver}}\`.",
- "unsafeArraySpread": "Unsafe spread of an \`any\` array type.",
- "unsafeSpread": "Unsafe spread of an \`any\` type.",
- "unsafeTupleSpread": "Unsafe spread of a tuple type. The argument is of type \`{{sender}}\` and is assigned to a parameter of type \`{{receiver}}\`.",
+ "unsafeArgument": "Unsafe argument of type {{sender}} assigned to a parameter of type {{receiver}}.",
+ "unsafeArraySpread": "Unsafe spread of an {{sender}} array type.",
+ "unsafeSpread": "Unsafe spread of an {{sender}} type.",
+ "unsafeTupleSpread": "Unsafe spread of a tuple type. The argument is {{sender}} and is assigned to a parameter of type {{receiver}}.",
},
"schema": [],
"type": "problem",
@@ -7971,12 +6303,12 @@ You must still type the parameters of the function.",
"url": "https://typescript-eslint.io/rules/no-unsafe-assignment",
},
"messages": {
- "anyAssignment": "Unsafe assignment of an \`any\` value.",
- "anyAssignmentThis": "Unsafe assignment of an \`any\` value. \`this\` is typed as \`any\`.
+ "anyAssignment": "Unsafe assignment of an {{sender}} value.",
+ "anyAssignmentThis": "Unsafe assignment of an {{sender}} value. \`this\` is typed as \`any\`.
You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
- "unsafeArrayPattern": "Unsafe array destructuring of an \`any\` array value.",
- "unsafeArrayPatternFromTuple": "Unsafe array destructuring of a tuple element with an \`any\` value.",
- "unsafeArraySpread": "Unsafe spread of an \`any\` value in an array.",
+ "unsafeArrayPattern": "Unsafe array destructuring of an {{sender}} array value.",
+ "unsafeArrayPatternFromTuple": "Unsafe array destructuring of a tuple element with an {{sender}} value.",
+ "unsafeArraySpread": "Unsafe spread of an {{sender}} value in an array.",
"unsafeAssignment": "Unsafe assignment of type {{sender}} to a variable of type {{receiver}}.",
},
"schema": [],
@@ -7994,11 +6326,11 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"url": "https://typescript-eslint.io/rules/no-unsafe-call",
},
"messages": {
- "unsafeCall": "Unsafe call of an \`any\` typed value.",
- "unsafeCallThis": "Unsafe call of an \`any\` typed value. \`this\` is typed as \`any\`.
+ "unsafeCall": "Unsafe call of a(n) {{type}} typed value.",
+ "unsafeCallThis": "Unsafe call of a(n) {{type}} typed value. \`this\` is typed as {{type}}.
You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
- "unsafeNew": "Unsafe construction of an any type value.",
- "unsafeTemplateTag": "Unsafe any typed template tag.",
+ "unsafeNew": "Unsafe construction of a(n) {{type}} typed value.",
+ "unsafeTemplateTag": "Unsafe use of a(n) {{type}} typed template tag.",
},
"schema": [],
"type": "problem",
@@ -8041,6 +6373,24 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "suggestion",
},
},
+ "no-unsafe-function-type": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow using the unsafe built-in Function type",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-unsafe-function-type",
+ },
+ "fixable": "code",
+ "messages": {
+ "bannedFunctionType": "The \`Function\` type accepts any function-like value.
+Prefer explicitly defining any function parameters and return type.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
"no-unsafe-member-access": {
"create": [Function],
"defaultOptions": [],
@@ -8052,8 +6402,8 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"url": "https://typescript-eslint.io/rules/no-unsafe-member-access",
},
"messages": {
- "unsafeComputedMemberAccess": "Computed name {{property}} resolves to an any value.",
- "unsafeMemberExpression": "Unsafe member access {{property}} on an \`any\` value.",
+ "unsafeComputedMemberAccess": "Computed name {{property}} resolves to an {{type}} value.",
+ "unsafeMemberExpression": "Unsafe member access {{property}} on an {{type}} value.",
"unsafeThisMemberExpression": "Unsafe member access {{property}} on an \`any\` value. \`this\` is typed as \`any\`.
You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
},
@@ -8072,9 +6422,9 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"url": "https://typescript-eslint.io/rules/no-unsafe-return",
},
"messages": {
- "unsafeReturn": "Unsafe return of an \`{{type}}\` typed value.",
+ "unsafeReturn": "Unsafe return of a value of type {{type}}.",
"unsafeReturnAssignment": "Unsafe return of type \`{{sender}}\` from function with return type \`{{receiver}}\`.",
- "unsafeReturnThis": "Unsafe return of an \`{{type}}\` typed value. \`this\` is typed as \`any\`.
+ "unsafeReturnThis": "Unsafe return of a value of type \`{{type}}\`. \`this\` is typed as \`any\`.
You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
},
"schema": [],
@@ -8087,6 +6437,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"meta": {
"docs": {
"description": "Require unary negation to take a number",
+ "recommended": "recommended",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/no-unsafe-unary-minus",
},
@@ -8110,6 +6461,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"docs": {
"description": "Disallow unused expressions",
"extendsBaseRule": true,
+ "recommended": "recommended",
"url": "https://typescript-eslint.io/rules/no-unused-expressions",
},
"hasSuggestions": undefined,
@@ -8157,6 +6509,8 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
},
"messages": {
"unusedVar": "'{{varName}}' is {{action}} but never used{{additional}}.",
+ "usedIgnoredVar": "'{{varName}}' is marked as ignored but is used{{additional}}.",
+ "usedOnlyAsType": "'{{varName}}' is {{action}} but only used as a type{{additional}}.",
},
"schema": [
{
@@ -8172,6 +6526,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"args": {
+ "description": "Whether to check all, some, or no arguments.",
"enum": [
"all",
"after-used",
@@ -8180,9 +6535,11 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "string",
},
"argsIgnorePattern": {
+ "description": "Regular expressions of argument names to not check for usage.",
"type": "string",
},
"caughtErrors": {
+ "description": "Whether to check catch block arguments.",
"enum": [
"all",
"none",
@@ -8190,15 +6547,27 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "string",
},
"caughtErrorsIgnorePattern": {
+ "description": "Regular expressions of catch block argument names to not check for usage.",
"type": "string",
},
"destructuredArrayIgnorePattern": {
+ "description": "Regular expressions of destructured array variable names to not check for usage.",
"type": "string",
},
+ "ignoreClassWithStaticInitBlock": {
+ "description": "Whether to ignore classes with at least one static initialization block.",
+ "type": "boolean",
+ },
"ignoreRestSiblings": {
+ "description": "Whether to ignore sibling properties in \`...\` destructurings.",
+ "type": "boolean",
+ },
+ "reportUsedIgnorePattern": {
+ "description": "Whether to report variables that match any of the valid ignore pattern options if they have been used.",
"type": "boolean",
},
"vars": {
+ "description": "Whether to check all variables or only locally-declared variables.",
"enum": [
"all",
"local",
@@ -8206,6 +6575,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "string",
},
"varsIgnorePattern": {
+ "description": "Regular expressions of variable names to not check for usage.",
"type": "string",
},
},
@@ -8252,24 +6622,31 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"allowNamedExports": {
+ "description": "Whether to ignore named exports.",
"type": "boolean",
},
"classes": {
+ "description": "Whether to ignore references to class declarations.",
"type": "boolean",
},
"enums": {
+ "description": "Whether to check references to enums.",
"type": "boolean",
},
"functions": {
+ "description": "Whether to ignore references to function declarations.",
"type": "boolean",
},
"ignoreTypeReferences": {
+ "description": "Whether to ignore type references, such as in type annotations and assertions.",
"type": "boolean",
},
"typedefs": {
+ "description": "Whether to check references to types.",
"type": "boolean",
},
"variables": {
+ "description": "Whether to ignore references to variables.",
"type": "boolean",
},
},
@@ -8316,24 +6693,6 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "suggestion",
},
},
- "no-useless-template-literals": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow unnecessary template literals",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-useless-template-literals",
- },
- "fixable": "code",
- "messages": {
- "noUselessTemplateLiteral": "Template literal expression is unnecessary and can be simplified.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
"no-var-requires": {
"create": [Function],
"defaultOptions": [
@@ -8342,14 +6701,17 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
},
],
"meta": {
+ "deprecated": true,
"docs": {
"description": "Disallow \`require\` statements except in import statements",
- "recommended": "recommended",
"url": "https://typescript-eslint.io/rules/no-var-requires",
},
"messages": {
"noVarReqs": "Require statement not part of import statement.",
},
+ "replacedBy": [
+ "@typescript-eslint/no-require-imports",
+ ],
"schema": [
{
"additionalProperties": false,
@@ -8368,67 +6730,39 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "problem",
},
},
- "non-nullable-type-assertion-style": {
+ "no-wrapper-object-types": {
"create": [Function],
"defaultOptions": [],
"meta": {
"docs": {
- "description": "Enforce non-null assertions over explicit type casts",
- "recommended": "stylistic",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/non-nullable-type-assertion-style",
+ "description": "Disallow using confusing built-in primitive class wrappers",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-wrapper-object-types",
},
"fixable": "code",
"messages": {
- "preferNonNullAssertion": "Use a ! assertion to more succinctly remove null and undefined from the type.",
+ "bannedClassType": "Prefer using the primitive \`{{preferred}}\` as a type name, rather than the upper-cased \`{{typeName}}\`.",
},
"schema": [],
- "type": "suggestion",
+ "type": "problem",
},
},
- "object-curly-spacing": {
+ "non-nullable-type-assertion-style": {
"create": [Function],
- "defaultOptions": [
- "never",
- ],
+ "defaultOptions": [],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Enforce consistent spacing inside braces",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/object-curly-spacing",
+ "description": "Enforce non-null assertions over explicit type casts",
+ "recommended": "stylistic",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/non-nullable-type-assertion-style",
},
- "fixable": "whitespace",
+ "fixable": "code",
"messages": {
- "requireSpaceAfter": "A space is required after '{{token}}'.",
- "requireSpaceBefore": "A space is required before '{{token}}'.",
- "unexpectedSpaceAfter": "There should be no space after '{{token}}'.",
- "unexpectedSpaceBefore": "There should be no space before '{{token}}'.",
+ "preferNonNullAssertion": "Use a ! assertion to more succinctly remove null and undefined from the type.",
},
- "replacedBy": [
- "@stylistic/ts/object-curly-spacing",
- ],
- "schema": [
- {
- "enum": [
- "always",
- "never",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "arraysInObjects": {
- "type": "boolean",
- },
- "objectsInObjects": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
+ "schema": [],
+ "type": "suggestion",
},
},
"only-throw-error": {
@@ -8443,7 +6777,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"docs": {
"description": "Disallow throwing non-\`Error\` values as exceptions",
"extendsBaseRule": "no-throw-literal",
- "recommended": "strict",
+ "recommended": "recommended",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/only-throw-error",
},
@@ -8456,9 +6790,11 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"allowThrowingAny": {
+ "description": "Whether to always allow throwing values typed as \`any\`.",
"type": "boolean",
},
"allowThrowingUnknown": {
+ "description": "Whether to always allow throwing values typed as \`unknown\`.",
"type": "boolean",
},
},
@@ -8468,170 +6804,14 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "problem",
},
},
- "padding-line-between-statements": {
+ "parameter-properties": {
"create": [Function],
- "defaultOptions": [],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require or disallow padding lines between statements",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/padding-line-between-statements",
- },
- "fixable": "whitespace",
- "hasSuggestions": false,
- "messages": {
- "expectedBlankLine": "Expected blank line before this statement.",
- "unexpectedBlankLine": "Unexpected blank line before this statement.",
- },
- "replacedBy": [
- "@stylistic/ts/padding-line-between-statements",
- ],
- "schema": {
- "$defs": {
- "paddingType": {
- "enum": [
- "any",
- "never",
- "always",
- ],
- "type": "string",
- },
- "statementType": {
- "anyOf": [
- {
- "enum": [
- "*",
- "block-like",
- "exports",
- "require",
- "directive",
- "expression",
- "iife",
- "multiline-block-like",
- "multiline-expression",
- "multiline-const",
- "multiline-let",
- "multiline-var",
- "singleline-const",
- "singleline-let",
- "singleline-var",
- "block",
- "empty",
- "function",
- "break",
- "case",
- "class",
- "const",
- "continue",
- "debugger",
- "default",
- "do",
- "export",
- "for",
- "if",
- "import",
- "let",
- "return",
- "switch",
- "throw",
- "try",
- "var",
- "while",
- "with",
- "interface",
- "type",
- ],
- "type": "string",
- },
- {
- "additionalItems": false,
- "items": {
- "enum": [
- "*",
- "block-like",
- "exports",
- "require",
- "directive",
- "expression",
- "iife",
- "multiline-block-like",
- "multiline-expression",
- "multiline-const",
- "multiline-let",
- "multiline-var",
- "singleline-const",
- "singleline-let",
- "singleline-var",
- "block",
- "empty",
- "function",
- "break",
- "case",
- "class",
- "const",
- "continue",
- "debugger",
- "default",
- "do",
- "export",
- "for",
- "if",
- "import",
- "let",
- "return",
- "switch",
- "throw",
- "try",
- "var",
- "while",
- "with",
- "interface",
- "type",
- ],
- "type": "string",
- },
- "minItems": 1,
- "type": "array",
- "uniqueItems": true,
- },
- ],
- },
- },
- "additionalItems": false,
- "items": {
- "additionalProperties": false,
- "properties": {
- "blankLine": {
- "$ref": "#/$defs/paddingType",
- },
- "next": {
- "$ref": "#/$defs/statementType",
- },
- "prev": {
- "$ref": "#/$defs/statementType",
- },
- },
- "required": [
- "blankLine",
- "prev",
- "next",
- ],
- "type": "object",
- },
- "type": "array",
- },
- "type": "layout",
- },
- },
- "parameter-properties": {
- "create": [Function],
- "defaultOptions": [
- {
- "allow": [],
- "prefer": "class-property",
- },
- ],
+ "defaultOptions": [
+ {
+ "allow": [],
+ "prefer": "class-property",
+ },
+ ],
"meta": {
"docs": {
"description": "Require or disallow parameter properties in class constructors",
@@ -8660,12 +6840,14 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"allow": {
+ "description": "Whether to allow certain kinds of properties to be ignored.",
"items": {
"$ref": "#/items/0/$defs/modifier",
},
"type": "array",
},
"prefer": {
+ "description": "Whether to prefer class properties or parameter properties.",
"enum": [
"class-property",
"parameter-property",
@@ -8776,9 +6958,11 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
{
"properties": {
"enforceForDeclarationWithTypeAnnotation": {
+ "description": "Whether to enforce destructuring on variable declarations with type annotations.",
"type": "boolean",
},
"enforceForRenamedProperties": {
+ "description": "Whether to enforce destructuring that use a different variable name than the property name.",
"type": "boolean",
},
},
@@ -8811,6 +6995,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"meta": {
"docs": {
"description": "Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result",
+ "recommended": "stylistic",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/prefer-find",
},
@@ -8863,7 +7048,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"meta": {
"docs": {
"description": "Enforce \`includes\` method over \`indexOf\` method",
- "recommended": "strict",
+ "recommended": "stylistic",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/prefer-includes",
},
@@ -8891,13 +7076,15 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"url": "https://typescript-eslint.io/rules/prefer-literal-enum-member",
},
"messages": {
- "notLiteral": "Explicit enum value must only be a literal value (string, number, boolean, etc).",
+ "notLiteral": "Explicit enum value must only be a literal value (string or number).",
+ "notLiteralOrBitwiseExpression": "Explicit enum value must only be a literal value (string or number) or a bitwise expression.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
"allowBitwiseExpressions": {
+ "description": "Whether to allow using bitwise expressions in enum initializers.",
"type": "boolean",
},
},
@@ -8913,7 +7100,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"meta": {
"docs": {
"description": "Require using \`namespace\` keyword over \`module\` keyword to declare custom TypeScript modules",
- "recommended": "stylistic",
+ "recommended": "recommended",
"url": "https://typescript-eslint.io/rules/prefer-namespace-keyword",
},
"fixable": "code",
@@ -8929,7 +7116,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"defaultOptions": [
{
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false,
- "ignoreConditionalTests": false,
+ "ignoreConditionalTests": true,
"ignoreMixedLogicalExpressions": false,
"ignorePrimitives": {
"bigint": false,
@@ -8950,43 +7137,53 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"hasSuggestions": true,
"messages": {
"noStrictNullCheck": "This rule requires the \`strictNullChecks\` compiler option to be turned on to function correctly.",
- "preferNullishOverOr": "Prefer using nullish coalescing operator (\`??\`) instead of a logical or (\`||\`), as it is a safer operator.",
- "preferNullishOverTernary": "Prefer using nullish coalescing operator (\`??\`) instead of a ternary expression, as it is simpler to read.",
- "suggestNullish": "Fix to nullish coalescing operator (\`??\`).",
+ "preferNullishOverOr": "Prefer using nullish coalescing operator (\`??{{ equals }}\`) instead of a logical {{ description }} (\`||{{ equals }}\`), as it is a safer operator.",
+ "preferNullishOverTernary": "Prefer using nullish coalescing operator (\`??{{ equals }}\`) instead of a ternary expression, as it is simpler to read.",
+ "suggestNullish": "Fix to nullish coalescing operator (\`??{{ equals }}\`).",
},
"schema": [
{
"additionalProperties": false,
"properties": {
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": {
+ "description": "Unless this is set to \`true\`, the rule will error on every file whose \`tsconfig.json\` does _not_ have the \`strictNullChecks\` compiler option (or \`strict\`) set to \`true\`.",
"type": "boolean",
},
"ignoreConditionalTests": {
+ "description": "Whether to ignore cases that are located within a conditional test.",
"type": "boolean",
},
"ignoreMixedLogicalExpressions": {
+ "description": "Whether to ignore any logical or expressions that are part of a mixed logical expression (with \`&&\`).",
"type": "boolean",
},
"ignorePrimitives": {
+ "description": "Whether to ignore all (\`true\`) or some (an object with properties) primitive types.",
"oneOf": [
{
+ "description": "Which primitives types may be ignored.",
"properties": {
"bigint": {
+ "description": "Ignore bigint primitive types.",
"type": "boolean",
},
"boolean": {
+ "description": "Ignore boolean primitive types.",
"type": "boolean",
},
"number": {
+ "description": "Ignore number primitive types.",
"type": "boolean",
},
"string": {
+ "description": "Ignore string primitive types.",
"type": "boolean",
},
},
"type": "object",
},
{
+ "description": "Ignore all primitive types.",
"enum": [
true,
],
@@ -8995,6 +7192,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
],
},
"ignoreTernaryTests": {
+ "description": "Whether to ignore any ternary expressions that could be simplified by using the nullish coalescing operator.",
"type": "boolean",
},
},
@@ -9085,7 +7283,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"docs": {
"description": "Require using Error objects as Promise rejection reasons",
"extendsBaseRule": true,
- "recommended": "strict",
+ "recommended": "recommended",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/prefer-promise-reject-errors",
},
@@ -9097,6 +7295,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"allowEmptyReject": {
+ "description": "Whether to allow calls to \`Promise.reject()\` with no arguments.",
"type": "boolean",
},
},
@@ -9128,6 +7327,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"onlyInlineLambdas": {
+ "description": "Whether to restrict checking only to members immediately assigned a lambda value.",
"type": "boolean",
},
},
@@ -9161,6 +7361,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"allow": {
+ "description": "An array of type specifiers to ignore.",
"items": {
"oneOf": [
{
@@ -9271,12 +7472,15 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "array",
},
"checkParameterProperties": {
+ "description": "Whether to check class parameter properties.",
"type": "boolean",
},
"ignoreInferredTypes": {
+ "description": "Whether to ignore parameters which don't explicitly specify a type.",
"type": "boolean",
},
"treatMethodsAsReadonly": {
+ "description": "Whether to treat all mutable methods as though they are readonly.",
"type": "boolean",
},
},
@@ -9310,6 +7514,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"meta": {
"docs": {
"description": "Enforce \`RegExp#exec\` over \`String#match\` if no global flag is provided",
+ "recommended": "stylistic",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/prefer-regexp-exec",
},
@@ -9381,15 +7586,18 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"create": [Function],
"defaultOptions": [],
"meta": {
+ "deprecated": true,
"docs": {
"description": "Enforce using \`@ts-expect-error\` over \`@ts-ignore\`",
- "recommended": "strict",
"url": "https://typescript-eslint.io/rules/prefer-ts-expect-error",
},
"fixable": "code",
"messages": {
"preferExpectErrorComment": "Use "@ts-expect-error" to ensure an error is actually being suppressed.",
},
+ "replacedBy": [
+ "@typescript-eslint/ban-ts-comment",
+ ],
"schema": [],
"type": "problem",
},
@@ -9432,15 +7640,19 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "array",
},
"checkArrowFunctions": {
+ "description": "Whether to check arrow functions.",
"type": "boolean",
},
"checkFunctionDeclarations": {
+ "description": "Whether to check standalone function declarations.",
"type": "boolean",
},
"checkFunctionExpressions": {
+ "description": "Whether to check inline function expressions",
"type": "boolean",
},
"checkMethodDeclarations": {
+ "description": "Whether to check methods on classes and object literals.",
"type": "boolean",
},
},
@@ -9450,63 +7662,6 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "suggestion",
},
},
- "quotes": {
- "create": [Function],
- "defaultOptions": [
- "double",
- {
- "allowTemplateLiterals": false,
- "avoidEscape": false,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce the consistent use of either backticks, double, or single quotes",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/quotes",
- },
- "fixable": "code",
- "hasSuggestions": undefined,
- "messages": {
- "wrongQuotes": "Strings must use {{description}}.",
- },
- "replacedBy": [
- "@stylistic/ts/quotes",
- ],
- "schema": [
- {
- "enum": [
- "single",
- "double",
- "backtick",
- ],
- },
- {
- "anyOf": [
- {
- "enum": [
- "avoid-escape",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "allowTemplateLiterals": {
- "type": "boolean",
- },
- "avoidEscape": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "layout",
- },
- },
"require-array-sort-compare": {
"create": [Function],
"defaultOptions": [
@@ -9543,14 +7698,16 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"defaultOptions": [],
"meta": {
"docs": {
- "description": "Disallow async functions which have no \`await\` expression",
+ "description": "Disallow async functions which do not return promises and have no \`await\` expression",
"extendsBaseRule": true,
"recommended": "recommended",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/require-await",
},
+ "hasSuggestions": true,
"messages": {
"missingAwait": "{{name}} has no 'await' expression.",
+ "removeAsync": "Remove 'async'.",
},
"schema": [],
"type": "suggestion",
@@ -9630,6 +7787,16 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"create": [Function],
"defaultOptions": [
{
+ "allow": [
+ {
+ "from": "lib",
+ "name": [
+ "Error",
+ "URL",
+ "URLSearchParams",
+ ],
+ },
+ ],
"allowAny": true,
"allowBoolean": true,
"allowNullish": true,
@@ -9663,6 +7830,117 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
{
"additionalProperties": false,
"properties": {
+ "allow": {
+ "description": "Types to allow in template expressions.",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "file",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "path": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "lib",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "package",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "package": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ "package",
+ ],
+ "type": "object",
+ },
+ ],
+ },
+ "type": "array",
+ },
"allowAny": {
"description": "Whether to allow \`any\` typed values in template expressions.",
"type": "boolean",
@@ -9705,8 +7983,13 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
],
"meta": {
"docs": {
- "description": "Enforce consistent returning of awaited values",
+ "description": "Enforce consistent awaiting of returned promises",
"extendsBaseRule": "no-return-await",
+ "recommended": {
+ "strict": [
+ "error-handling-correctness-only",
+ ],
+ },
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/return-await",
},
@@ -9714,15 +7997,42 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"hasSuggestions": true,
"messages": {
"disallowedPromiseAwait": "Returning an awaited promise is not allowed in this context.",
+ "disallowedPromiseAwaitSuggestion": "Remove \`await\` before the expression. Use caution as this may impact control flow.",
"nonPromiseAwait": "Returning an awaited value that is not a promise is not allowed.",
"requiredPromiseAwait": "Returning an awaited promise is required in this context.",
+ "requiredPromiseAwaitSuggestion": "Add \`await\` before the expression. Use caution as this may impact control flow.",
},
"schema": [
{
- "enum": [
- "in-try-catch",
- "always",
- "never",
+ "oneOf": [
+ {
+ "description": "Requires that all returned promises be awaited.",
+ "enum": [
+ "always",
+ ],
+ "type": "string",
+ },
+ {
+ "description": "In error-handling contexts, the rule enforces that returned promises must be awaited. In ordinary contexts, the rule does not enforce any particular behavior around whether returned promises are awaited.",
+ "enum": [
+ "error-handling-correctness-only",
+ ],
+ "type": "string",
+ },
+ {
+ "description": "In error-handling contexts, the rule enforces that returned promises must be awaited. In ordinary contexts, the rule enforces that returned promises _must not_ be awaited.",
+ "enum": [
+ "in-try-catch",
+ ],
+ "type": "string",
+ },
+ {
+ "description": "Disallows awaiting any returned promises.",
+ "enum": [
+ "never",
+ ],
+ "type": "string",
+ },
],
"type": "string",
},
@@ -9730,91 +8040,11 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "problem",
},
},
- "semi": {
- "create": [Function],
- "defaultOptions": [
- "always",
- {
- "beforeStatementContinuationChars": "any",
- "omitLastInOneLineBlock": false,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require or disallow semicolons instead of ASI",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/semi",
- },
- "fixable": "code",
- "hasSuggestions": undefined,
- "messages": {
- "extraSemi": "Extra semicolon.",
- "missingSemi": "Missing semicolon.",
- },
- "replacedBy": [
- "@stylistic/ts/semi",
- ],
- "schema": {
- "anyOf": [
- {
- "items": [
- {
- "enum": [
- "never",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "beforeStatementContinuationChars": {
- "enum": [
- "always",
- "any",
- "never",
- ],
- },
- },
- "type": "object",
- },
- ],
- "maxItems": 2,
- "minItems": 0,
- "type": "array",
- },
- {
- "items": [
- {
- "enum": [
- "always",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "omitLastInOneLineBlock": {
- "type": "boolean",
- },
- "omitLastInOneLineClassBody": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "maxItems": 2,
- "minItems": 0,
- "type": "array",
- },
- ],
- },
- "type": "layout",
- },
- },
"sort-type-constituents": {
"create": [Function],
"defaultOptions": [
{
+ "caseSensitive": false,
"checkIntersections": true,
"checkUnions": true,
"groupOrder": [
@@ -9834,6 +8064,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
},
],
"meta": {
+ "deprecated": true,
"docs": {
"description": "Enforce constituents of a type union/intersection to be sorted alphabetically",
"url": "https://typescript-eslint.io/rules/sort-type-constituents",
@@ -9845,16 +8076,24 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"notSortedNamed": "{{type}} type {{name}} constituents must be sorted.",
"suggestFix": "Sort constituents of type (removes all comments).",
},
+ "replacedBy": [
+ "perfectionist/sort-intersection-types",
+ "perfectionist/sort-union-types",
+ ],
"schema": [
{
"additionalProperties": false,
"properties": {
+ "caseSensitive": {
+ "description": "Whether to sort using case sensitive string comparisons.",
+ "type": "boolean",
+ },
"checkIntersections": {
- "description": "Whether to check intersection types.",
+ "description": "Whether to check intersection types (\`&\`).",
"type": "boolean",
},
"checkUnions": {
- "description": "Whether to check union types.",
+ "description": "Whether to check union types (\`|\`).",
"type": "boolean",
},
"groupOrder": {
@@ -9885,172 +8124,6 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "suggestion",
},
},
- "space-before-blocks": {
- "create": [Function],
- "defaultOptions": [
- "always",
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce consistent spacing before blocks",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/space-before-blocks",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "missingSpace": "Missing space before opening brace.",
- "unexpectedSpace": "Unexpected space before opening brace.",
- },
- "replacedBy": [
- "@stylistic/ts/space-before-blocks",
- ],
- "schema": [
- {
- "oneOf": [
- {
- "enum": [
- "always",
- "never",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "classes": {
- "enum": [
- "always",
- "never",
- "off",
- ],
- },
- "functions": {
- "enum": [
- "always",
- "never",
- "off",
- ],
- },
- "keywords": {
- "enum": [
- "always",
- "never",
- "off",
- ],
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "layout",
- },
- },
- "space-before-function-paren": {
- "create": [Function],
- "defaultOptions": [
- "always",
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce consistent spacing before function parenthesis",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/space-before-function-paren",
- },
- "fixable": "whitespace",
- "messages": {
- "missing": "Missing space before function parentheses.",
- "unexpected": "Unexpected space before function parentheses.",
- },
- "replacedBy": [
- "@stylistic/ts/space-before-function-paren",
- ],
- "schema": [
- {
- "oneOf": [
- {
- "enum": [
- "always",
- "never",
- ],
- "type": "string",
- },
- {
- "additionalProperties": false,
- "properties": {
- "anonymous": {
- "enum": [
- "always",
- "never",
- "ignore",
- ],
- "type": "string",
- },
- "asyncArrow": {
- "enum": [
- "always",
- "never",
- "ignore",
- ],
- "type": "string",
- },
- "named": {
- "enum": [
- "always",
- "never",
- "ignore",
- ],
- "type": "string",
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "layout",
- },
- },
- "space-infix-ops": {
- "create": [Function],
- "defaultOptions": [
- {
- "int32Hint": false,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require spacing around infix operators",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/space-infix-ops",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "missingSpace": "Operator '{{operator}}' must be spaced.",
- },
- "replacedBy": [
- "@stylistic/ts/space-infix-ops",
- ],
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "int32Hint": {
- "default": false,
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
"strict-boolean-expressions": {
"create": [Function],
"defaultOptions": [
@@ -10104,30 +8177,39 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"allowAny": {
+ "description": "Whether to allow \`any\`s in a boolean context.",
"type": "boolean",
},
"allowNullableBoolean": {
+ "description": "Whether to allow nullable \`boolean\`s in a boolean context.",
"type": "boolean",
},
"allowNullableEnum": {
+ "description": "Whether to allow nullable \`enum\`s in a boolean context.",
"type": "boolean",
},
"allowNullableNumber": {
+ "description": "Whether to allow nullable \`number\`s in a boolean context.",
"type": "boolean",
},
"allowNullableObject": {
+ "description": "Whether to allow nullable \`object\`s, \`symbol\`s, and functions in a boolean context.",
"type": "boolean",
},
"allowNullableString": {
+ "description": "Whether to allow nullable \`string\`s in a boolean context.",
"type": "boolean",
},
"allowNumber": {
+ "description": "Whether to allow \`number\`s in a boolean context.",
"type": "boolean",
},
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": {
+ "description": "Unless this is set to \`true\`, the rule will error on every file whose \`tsconfig.json\` does _not_ have the \`strictNullChecks\` compiler option (or \`strict\`) set to \`true\`.",
"type": "boolean",
},
"allowString": {
+ "description": "Whether to allow \`string\`s in a boolean context.",
"type": "boolean",
},
},
@@ -10142,6 +8224,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"defaultOptions": [
{
"allowDefaultCaseForExhaustiveSwitch": true,
+ "considerDefaultExhaustiveForUnions": false,
"requireDefaultForNonUnion": false,
},
],
@@ -10165,6 +8248,10 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"description": "If 'true', allow 'default' cases on switch statements with exhaustive cases.",
"type": "boolean",
},
+ "considerDefaultExhaustiveForUnions": {
+ "description": "If 'true', the 'default' clause is used to determine whether the switch statement is exhaustive for union type",
+ "type": "boolean",
+ },
"requireDefaultForNonUnion": {
"description": "If 'true', require a 'default' clause for switches on non-union types.",
"type": "boolean",
@@ -10199,6 +8286,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"lib": {
+ "description": "What to enforce for \`/// \` references.",
"enum": [
"always",
"never",
@@ -10206,6 +8294,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "string",
},
"path": {
+ "description": "What to enforce for \`/// \` references.",
"enum": [
"always",
"never",
@@ -10213,6 +8302,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "string",
},
"types": {
+ "description": "What to enforce for \`/// \` references.",
"enum": [
"always",
"never",
@@ -10227,83 +8317,6 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "suggestion",
},
},
- "type-annotation-spacing": {
- "create": [Function],
- "defaultOptions": [
- {},
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require consistent spacing around type annotations",
- "url": "https://typescript-eslint.io/rules/type-annotation-spacing",
- },
- "fixable": "whitespace",
- "messages": {
- "expectedSpaceAfter": "Expected a space after the '{{type}}'.",
- "expectedSpaceBefore": "Expected a space before the '{{type}}'.",
- "unexpectedSpaceAfter": "Unexpected space after the '{{type}}'.",
- "unexpectedSpaceBefore": "Unexpected space before the '{{type}}'.",
- "unexpectedSpaceBetween": "Unexpected space between the '{{previousToken}}' and the '{{type}}'.",
- },
- "replacedBy": [
- "@stylistic/ts/type-annotation-spacing",
- ],
- "schema": [
- {
- "$defs": {
- "spacingConfig": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- },
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- "overrides": {
- "additionalProperties": false,
- "properties": {
- "arrow": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "colon": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "parameter": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "property": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "returnType": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "variable": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- },
- "type": "object",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
"typedef": {
"create": [Function],
"defaultOptions": [
@@ -10332,27 +8345,35 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"arrayDestructuring": {
+ "description": "Whether to enforce type annotations on variables declared using array destructuring.",
"type": "boolean",
},
"arrowParameter": {
+ "description": "Whether to enforce type annotations for parameters of arrow functions.",
"type": "boolean",
},
"memberVariableDeclaration": {
+ "description": "Whether to enforce type annotations on member variables of classes.",
"type": "boolean",
},
"objectDestructuring": {
+ "description": "Whether to enforce type annotations on variables declared using object destructuring.",
"type": "boolean",
},
"parameter": {
+ "description": "Whether to enforce type annotations for parameters of functions and methods.",
"type": "boolean",
},
"propertyDeclaration": {
+ "description": "Whether to enforce type annotations for properties of interfaces and types.",
"type": "boolean",
},
"variableDeclaration": {
+ "description": "Whether to enforce type annotations for variable declarations, excluding array and object destructuring.",
"type": "boolean",
},
"variableDeclarationIgnoreFunction": {
+ "description": "Whether to ignore variable declarations for non-arrow and arrow functions.",
"type": "boolean",
},
},
@@ -10434,7 +8455,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"defaultOptions": [],
"meta": {
"docs": {
- "description": "Enforce typing arguments in \`.catch()\` callbacks as \`unknown\`",
+ "description": "Enforce typing arguments in Promise rejection callbacks as \`unknown\`",
"recommended": "strict",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable",
@@ -10442,12 +8463,11 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"fixable": "code",
"hasSuggestions": true,
"messages": {
- "addUnknownRestTypeAnnotationSuggestion": "Add an explicit \`: [unknown]\` type annotation to the catch rest variable.",
- "addUnknownTypeAnnotationSuggestion": "Add an explicit \`: unknown\` type annotation to the catch variable.",
- "useUnknown": "Prefer the safe \`: unknown\` for a catch callback variable.",
- "useUnknownArrayDestructuringPattern": "Prefer the safe \`: unknown\` for a catch callback variable. The thrown error may not be iterable.",
- "useUnknownObjectDestructuringPattern": "Prefer the safe \`: unknown\` for a catch callback variable. The thrown error may be nullable, or may not have the expected shape.",
- "useUnknownSpreadArgs": "Prefer the safe \`: unknown\` for a catch callback variable. The argument list may contain a handler that does not use \`unknown\` for the catch callback variable.",
+ "addUnknownRestTypeAnnotationSuggestion": "Add an explicit \`: [unknown]\` type annotation to the rejection callback rest variable.",
+ "addUnknownTypeAnnotationSuggestion": "Add an explicit \`: unknown\` type annotation to the rejection callback variable.",
+ "useUnknown": "Prefer the safe \`: unknown\` for a \`{{method}}\`{{append}} callback variable.",
+ "useUnknownArrayDestructuringPattern": "Prefer the safe \`: unknown\` for a \`{{method}}\`{{append}} callback variable. The thrown error may not be iterable.",
+ "useUnknownObjectDestructuringPattern": "Prefer the safe \`: unknown\` for a \`{{method}}\`{{append}} callback variable. The thrown error may be nullable, or may not have the expected shape.",
"wrongRestTypeAnnotationSuggestion": "Change existing type annotation to \`: [unknown]\`.",
"wrongTypeAnnotationSuggestion": "Change existing type annotation to \`: unknown\`.",
},
@@ -10476,6 +8496,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"no-dupe-keys": "off",
"no-func-assign": "off",
"no-import-assign": "off",
+ "no-new-native-nonconstructor": "off",
"no-new-symbol": "off",
"no-obj-calls": "off",
"no-redeclare": "off",
@@ -10500,14 +8521,15 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"minimumDescriptionLength": 10,
},
],
- "@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
+ "@typescript-eslint/no-deprecated": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-dynamic-delete": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extraneous-class": "error",
@@ -10515,7 +8537,6 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-invalid-void-type": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-meaningless-void-operator": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
@@ -10525,31 +8546,35 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-useless-constructor": "error",
- "@typescript-eslint/no-useless-template-literals": "error",
- "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/only-throw-error": "error",
"@typescript-eslint/prefer-as-const": "error",
- "@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-literal-enum-member": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-return-this-type": "error",
- "@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": [
"error",
@@ -10572,14 +8597,19 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"allowRegExp": false,
},
],
+ "@typescript-eslint/return-await": [
+ "error",
+ "error-handling-correctness-only",
+ ],
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
"no-array-constructor": "off",
"no-implied-eval": "off",
- "no-loss-of-precision": "off",
+ "no-return-await": "off",
"no-throw-literal": "off",
+ "no-unused-expressions": "off",
"no-unused-vars": "off",
"no-useless-constructor": "off",
"prefer-promise-reject-errors": "off",
@@ -10591,13 +8621,13 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"parser": {
"meta": {
"name": "typescript-eslint/parser",
- "version": "7.6.0",
+ "version": "8.12.2",
},
"parseForESLint": [Function],
},
"sourceType": "module",
},
- "name": "typescript-eslint/base",
+ "name": "jimmy.codes/typescript__typescript-eslint/base",
"plugins": {
"@typescript-eslint": {
"configs": {
@@ -10612,7 +8642,6 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/ban-tslint-comment": "error",
- "@typescript-eslint/ban-types": "error",
"@typescript-eslint/class-literal-property-style": "error",
"@typescript-eslint/class-methods-use-this": "error",
"@typescript-eslint/consistent-generic-constructors": "error",
@@ -10637,12 +8666,13 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
+ "@typescript-eslint/no-deprecated": "error",
"@typescript-eslint/no-dupe-class-members": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-empty-function": "error",
- "@typescript-eslint/no-empty-interface": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extraneous-class": "error",
@@ -10654,7 +8684,6 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-invalid-this": "error",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-loop-func": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-magic-numbers": "error",
"@typescript-eslint/no-meaningless-void-operator": "error",
"@typescript-eslint/no-misused-new": "error",
@@ -10668,19 +8697,24 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-redundant-type-constituents": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-restricted-imports": "error",
+ "@typescript-eslint/no-restricted-types": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/no-unsafe-unary-minus": "error",
@@ -10689,8 +8723,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-useless-empty-export": "error",
- "@typescript-eslint/no-useless-template-literals": "error",
- "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
"@typescript-eslint/only-throw-error": "error",
"@typescript-eslint/parameter-properties": "error",
@@ -10712,14 +8745,12 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-return-this-type": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
- "@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "error",
"@typescript-eslint/return-await": "error",
- "@typescript-eslint/sort-type-constituents": "error",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/triple-slash-reference": "error",
@@ -10739,7 +8770,6 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"no-implied-eval": "off",
"no-invalid-this": "off",
"no-loop-func": "off",
- "no-loss-of-precision": "off",
"no-magic-numbers": "off",
"no-redeclare": "off",
"no-restricted-imports": "off",
@@ -10768,6 +8798,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"parserOptions": {
"program": null,
"project": false,
+ "projectService": false,
},
"rules": {
"@typescript-eslint/await-thenable": "off",
@@ -10778,6 +8809,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-array-delete": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
+ "@typescript-eslint/no-deprecated": "off",
"@typescript-eslint/no-duplicate-type-constituents": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-for-in-array": "off",
@@ -10786,12 +8818,13 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-mixed-enums": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
- "@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-qualifier": "off",
+ "@typescript-eslint/no-unnecessary-template-expression": "off",
"@typescript-eslint/no-unnecessary-type-arguments": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
+ "@typescript-eslint/no-unnecessary-type-parameters": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
@@ -10799,7 +8832,6 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-unary-minus": "off",
- "@typescript-eslint/no-useless-template-literals": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/only-throw-error": "off",
"@typescript-eslint/prefer-destructuring": "off",
@@ -10844,6 +8876,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"no-dupe-keys": "off",
"no-func-assign": "off",
"no-import-assign": "off",
+ "no-new-native-nonconstructor": "off",
"no-new-symbol": "off",
"no-obj-calls": "off",
"no-redeclare": "off",
@@ -10867,24 +8900,27 @@ If your function does not access \`this\`, you can annotate it with \`this: void
],
"rules": {
"@typescript-eslint/ban-ts-comment": "error",
- "@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
+ "@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/triple-slash-reference": "error",
"no-array-constructor": "off",
- "no-loss-of-precision": "off",
+ "no-unused-expressions": "off",
"no-unused-vars": "off",
},
},
@@ -10896,22 +8932,23 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"rules": {
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
- "@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-array-constructor": "error",
+ "@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
@@ -10920,11 +8957,17 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
+ "@typescript-eslint/only-throw-error": "error",
"@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "error",
@@ -10932,8 +8975,10 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/unbound-method": "error",
"no-array-constructor": "off",
"no-implied-eval": "off",
- "no-loss-of-precision": "off",
+ "no-throw-literal": "off",
+ "no-unused-expressions": "off",
"no-unused-vars": "off",
+ "prefer-promise-reject-errors": "off",
"require-await": "off",
},
},
@@ -10945,22 +8990,23 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"rules": {
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
- "@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-array-constructor": "error",
+ "@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
@@ -10969,11 +9015,17 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
+ "@typescript-eslint/only-throw-error": "error",
"@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "error",
@@ -10981,8 +9033,10 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/unbound-method": "error",
"no-array-constructor": "off",
"no-implied-eval": "off",
- "no-loss-of-precision": "off",
+ "no-throw-literal": "off",
+ "no-unused-expressions": "off",
"no-unused-vars": "off",
+ "prefer-promise-reject-errors": "off",
"require-await": "off",
},
},
@@ -10993,6 +9047,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
],
"rules": {
"@typescript-eslint/await-thenable": "error",
+ "@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-floating-promises": "error",
@@ -11007,11 +9062,16 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-unsafe-enum-comparison": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/only-throw-error": "error",
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "error",
"@typescript-eslint/unbound-method": "error",
"no-implied-eval": "off",
+ "no-throw-literal": "off",
+ "prefer-promise-reject-errors": "off",
"require-await": "off",
},
},
@@ -11027,33 +9087,35 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"minimumDescriptionLength": 10,
},
],
- "@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-dynamic-delete": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-invalid-void-type": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
+ "@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-useless-constructor": "error",
- "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-literal-enum-member": "error",
- "@typescript-eslint/prefer-ts-expect-error": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/unified-signatures": "error",
"no-array-constructor": "off",
- "no-loss-of-precision": "off",
+ "no-unused-expressions": "off",
"no-unused-vars": "off",
"no-useless-constructor": "off",
},
@@ -11071,14 +9133,15 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"minimumDescriptionLength": 10,
},
],
- "@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
+ "@typescript-eslint/no-deprecated": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-dynamic-delete": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extraneous-class": "error",
@@ -11086,7 +9149,6 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-invalid-void-type": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-meaningless-void-operator": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
@@ -11096,31 +9158,35 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-useless-constructor": "error",
- "@typescript-eslint/no-useless-template-literals": "error",
- "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/only-throw-error": "error",
"@typescript-eslint/prefer-as-const": "error",
- "@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-literal-enum-member": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-return-this-type": "error",
- "@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": [
"error",
@@ -11143,14 +9209,19 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"allowRegExp": false,
},
],
+ "@typescript-eslint/return-await": [
+ "error",
+ "error-handling-correctness-only",
+ ],
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
"no-array-constructor": "off",
"no-implied-eval": "off",
- "no-loss-of-precision": "off",
+ "no-return-await": "off",
"no-throw-literal": "off",
+ "no-unused-expressions": "off",
"no-unused-vars": "off",
"no-useless-constructor": "off",
"prefer-promise-reject-errors": "off",
@@ -11167,6 +9238,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
+ "@typescript-eslint/no-deprecated": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
@@ -11177,17 +9249,18 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-redundant-type-constituents": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
- "@typescript-eslint/no-useless-template-literals": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
"@typescript-eslint/only-throw-error": "error",
- "@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-return-this-type": "error",
@@ -11213,9 +9286,14 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"allowRegExp": false,
},
],
+ "@typescript-eslint/return-await": [
+ "error",
+ "error-handling-correctness-only",
+ ],
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
"no-implied-eval": "off",
+ "no-return-await": "off",
"no-throw-literal": "off",
"prefer-promise-reject-errors": "off",
"require-await": "off",
@@ -11237,11 +9315,9 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-empty-function": "error",
- "@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
- "@typescript-eslint/prefer-namespace-keyword": "error",
"no-empty-function": "off",
},
},
@@ -11262,14 +9338,15 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-empty-function": "error",
- "@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
+ "@typescript-eslint/prefer-find": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
- "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
+ "@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"dot-notation": "off",
"no-empty-function": "off",
@@ -11283,8 +9360,11 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"rules": {
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
+ "@typescript-eslint/prefer-find": "error",
+ "@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
+ "@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"dot-notation": "off",
},
@@ -11292,7 +9372,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
},
"meta": {
"name": "@typescript-eslint/eslint-plugin",
- "version": "7.6.0",
+ "version": "8.12.2",
},
"rules": {
"adjacent-overload-signatures": {
@@ -11327,7 +9407,9 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"fixable": "code",
"messages": {
"errorStringArray": "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}[]' instead.",
+ "errorStringArrayReadonly": "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}' instead.",
"errorStringArraySimple": "Array type using '{{className}}<{{type}}>' is forbidden for simple types. Use '{{readonlyPrefix}}{{type}}[]' instead.",
+ "errorStringArraySimpleReadonly": "Array type using '{{className}}<{{type}}>' is forbidden for simple types. Use '{{readonlyPrefix}}{{type}}' instead.",
"errorStringGeneric": "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden. Use '{{className}}<{{type}}>' instead.",
"errorStringGenericSimple": "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden for non-simple types. Use '{{className}}<{{type}}>' instead.",
},
@@ -11373,6 +9455,8 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"hasSuggestions": true,
"messages": {
"await": "Unexpected \`await\` of a non-Promise (non-"Thenable") value.",
+ "convertToOrdinaryFor": "Convert to an ordinary \`for...of\` loop.",
+ "forAwaitOfNonThenable": "Unexpected \`for await...of\` of a value that is not async iterable.",
"removeAwait": "Remove unnecessary \`await\`.",
},
"schema": [],
@@ -11442,6 +9526,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"properties": {
"minimumDescriptionLength": {
"default": 3,
+ "description": "A minimum character length for descriptions when \`allow-with-description\` is enabled.",
"type": "number",
},
"ts-check": {
@@ -11480,173 +9565,6 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"type": "suggestion",
},
},
- "ban-types": {
- "create": [Function],
- "defaultOptions": [
- {},
- ],
- "meta": {
- "docs": {
- "description": "Disallow certain types",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/ban-types",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "bannedTypeMessage": "Don't use \`{{name}}\` as a type.{{customMessage}}",
- "bannedTypeReplacement": "Replace \`{{name}}\` with \`{{replacement}}\`.",
- },
- "schema": [
- {
- "$defs": {
- "banConfig": {
- "oneOf": [
- {
- "description": "Bans the type with the default message",
- "type": "null",
- },
- {
- "description": "Un-bans the type (useful when paired with \`extendDefaults\`)",
- "enum": [
- false,
- ],
- "type": "boolean",
- },
- {
- "description": "Bans the type with the default message",
- "enum": [
- true,
- ],
- "type": "boolean",
- },
- {
- "description": "Bans the type with a custom message",
- "type": "string",
- },
- {
- "additionalProperties": false,
- "description": "Bans a type",
- "properties": {
- "fixWith": {
- "description": "Type to autofix replace with. Note that autofixers can be applied automatically - so you need to be careful with this option.",
- "type": "string",
- },
- "message": {
- "description": "Custom error message",
- "type": "string",
- },
- "suggest": {
- "additionalItems": false,
- "description": "Types to suggest replacing with.",
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- },
- "type": "object",
- },
- ],
- },
- },
- "additionalProperties": false,
- "properties": {
- "extendDefaults": {
- "type": "boolean",
- },
- "types": {
- "additionalProperties": {
- "$ref": "#/items/0/$defs/banConfig",
- },
- "type": "object",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "block-spacing": {
- "create": [Function],
- "defaultOptions": [
- "always",
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Disallow or enforce spaces inside of blocks after opening block and before closing block",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/block-spacing",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "extra": "Unexpected space(s) {{location}} '{{token}}'.",
- "missing": "Requires a space {{location}} '{{token}}'.",
- },
- "replacedBy": [
- "@stylistic/ts/block-spacing",
- ],
- "schema": [
- {
- "enum": [
- "always",
- "never",
- ],
- },
- ],
- "type": "layout",
- },
- },
- "brace-style": {
- "create": [Function],
- "defaultOptions": [
- "1tbs",
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce consistent brace style for blocks",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/brace-style",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "blockSameLine": "Statement inside of curly braces should be on next line.",
- "nextLineClose": "Closing curly brace does not appear on the same line as the subsequent block.",
- "nextLineOpen": "Opening curly brace does not appear on the same line as controlling statement.",
- "sameLineClose": "Closing curly brace appears on the same line as the subsequent block.",
- "sameLineOpen": "Opening curly brace appears on the same line as controlling statement.",
- "singleLineClose": "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",
- },
- "replacedBy": [
- "@stylistic/ts/brace-style",
- ],
- "schema": [
- {
- "enum": [
- "1tbs",
- "stroustrup",
- "allman",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "allowSingleLine": {
- "default": false,
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
"class-literal-property-style": {
"create": [Function],
"defaultOptions": [
@@ -11667,6 +9585,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
},
"schema": [
{
+ "description": "Which literal class member syntax to prefer.",
"enum": [
"fields",
"getters",
@@ -11703,18 +9622,18 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"properties": {
"enforceForClassFields": {
"default": true,
- "description": "Enforces that functions used as instance field initializers utilize \`this\`",
+ "description": "Enforces that functions used as instance field initializers utilize \`this\`.",
"type": "boolean",
},
"exceptMethods": {
- "description": "Allows specified method names to be ignored with this rule",
+ "description": "Allows specified method names to be ignored with this rule.",
"items": {
"type": "string",
},
"type": "array",
},
"ignoreClassesThatImplementAnInterface": {
- "description": "Ignore classes that specifically implement some interface",
+ "description": "Makes the rule ignore class members that are defined within a class that \`implements\` a type",
"oneOf": [
{
"description": "Ignore all classes that implement an interface",
@@ -11740,182 +9659,54 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"type": "suggestion",
},
},
- "comma-dangle": {
+ "consistent-generic-constructors": {
"create": [Function],
"defaultOptions": [
- "never",
+ "constructor",
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Require or disallow trailing commas",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/comma-dangle",
+ "description": "Enforce specifying generic type arguments on type annotation or constructor name of a constructor call",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/consistent-generic-constructors",
},
"fixable": "code",
- "hasSuggestions": undefined,
"messages": {
- "missing": "Missing trailing comma.",
- "unexpected": "Unexpected trailing comma.",
+ "preferConstructor": "The generic type arguments should be specified as part of the constructor type arguments.",
+ "preferTypeAnnotation": "The generic type arguments should be specified as part of the type annotation.",
},
- "replacedBy": [
- "@stylistic/ts/comma-dangle",
- ],
- "schema": {
- "$defs": {
- "value": {
- "enum": [
- "always-multiline",
- "always",
- "never",
- "only-multiline",
- ],
- "type": "string",
- },
- "valueWithIgnore": {
- "enum": [
- "always-multiline",
- "always",
- "never",
- "only-multiline",
- "ignore",
- ],
- "type": "string",
- },
+ "schema": [
+ {
+ "description": "Which constructor call syntax to prefer.",
+ "enum": [
+ "type-annotation",
+ "constructor",
+ ],
+ "type": "string",
},
- "additionalItems": false,
- "items": [
- {
- "oneOf": [
- {
- "$ref": "#/$defs/value",
- },
- {
- "additionalProperties": false,
- "properties": {
- "arrays": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "enums": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "exports": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "functions": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "generics": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "imports": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "objects": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "tuples": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "array",
- },
- "type": "layout",
+ ],
+ "type": "suggestion",
},
},
- "comma-spacing": {
+ "consistent-indexed-object-style": {
"create": [Function],
"defaultOptions": [
- {
- "after": true,
- "before": false,
- },
+ "record",
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Enforce consistent spacing before and after commas",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/comma-spacing",
+ "description": "Require or disallow the \`Record\` type",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/consistent-indexed-object-style",
},
- "fixable": "whitespace",
+ "fixable": "code",
"messages": {
- "missing": "A space is required {{loc}} ','.",
- "unexpected": "There should be no space {{loc}} ','.",
- },
- "replacedBy": [
- "@stylistic/ts/comma-spacing",
- ],
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "after": {
- "default": true,
- "type": "boolean",
- },
- "before": {
- "default": false,
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
- "consistent-generic-constructors": {
- "create": [Function],
- "defaultOptions": [
- "constructor",
- ],
- "meta": {
- "docs": {
- "description": "Enforce specifying generic type arguments on type annotation or constructor name of a constructor call",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/consistent-generic-constructors",
- },
- "fixable": "code",
- "messages": {
- "preferConstructor": "The generic type arguments should be specified as part of the constructor type arguments.",
- "preferTypeAnnotation": "The generic type arguments should be specified as part of the type annotation.",
- },
- "schema": [
- {
- "enum": [
- "type-annotation",
- "constructor",
- ],
- "type": "string",
- },
- ],
- "type": "suggestion",
- },
- },
- "consistent-indexed-object-style": {
- "create": [Function],
- "defaultOptions": [
- "record",
- ],
- "meta": {
- "docs": {
- "description": "Require or disallow the \`Record\` type",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/consistent-indexed-object-style",
- },
- "fixable": "code",
- "messages": {
- "preferIndexSignature": "An index signature is preferred over a record.",
- "preferRecord": "A record is preferred over an index signature.",
+ "preferIndexSignature": "An index signature is preferred over a record.",
+ "preferRecord": "A record is preferred over an index signature.",
},
"schema": [
{
+ "description": "Which indexed object syntax to prefer.",
"enum": [
"record",
"index-signature",
@@ -11992,6 +9783,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"additionalProperties": false,
"properties": {
"assertionStyle": {
+ "description": "The expected assertion style to enforce.",
"enum": [
"never",
],
@@ -12007,6 +9799,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"additionalProperties": false,
"properties": {
"assertionStyle": {
+ "description": "The expected assertion style to enforce.",
"enum": [
"as",
"angle-bracket",
@@ -12014,6 +9807,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"type": "string",
},
"objectLiteralTypeAssertions": {
+ "description": "Whether to always prefer type declarations for object literals used as variable initializers, rather than type assertions.",
"enum": [
"allow",
"allow-as-parameter",
@@ -12051,6 +9845,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
},
"schema": [
{
+ "description": "Which type definition syntax to prefer.",
"enum": [
"interface",
"type",
@@ -12085,6 +9880,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"additionalProperties": false,
"properties": {
"fixMixedExportsWithInlineTypeSpecifier": {
+ "description": "Whether the rule will autofix "mixed" export cases using TS inline type specifiers.",
"type": "boolean",
},
},
@@ -12120,9 +9916,11 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"additionalProperties": false,
"properties": {
"disallowTypeAnnotations": {
+ "description": "Whether to disallow type imports in type annotations (\`import()\`).",
"type": "boolean",
},
"fixStyle": {
+ "description": "The expected type modifier to be added when an import is detected as used only in the type position.",
"enum": [
"separate-type-imports",
"inline-type-imports",
@@ -12130,6 +9928,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"type": "string",
},
"prefer": {
+ "description": "The expected import kind for type-only imports.",
"enum": [
"type-imports",
"no-type-imports",
@@ -12190,22 +9989,27 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"properties": {
"allowIndexSignaturePropertyAccess": {
"default": false,
+ "description": "Whether to allow accessing properties matching an index signature with array notation.",
"type": "boolean",
},
"allowKeywords": {
"default": true,
+ "description": "Whether to allow keywords such as ["class"]\`.",
"type": "boolean",
},
"allowPattern": {
"default": "",
+ "description": "Regular expression of names to allow.",
"type": "string",
},
"allowPrivateClassPropertyAccess": {
"default": false,
+ "description": "Whether to allow accessing class members marked as \`private\` with array notation.",
"type": "boolean",
},
"allowProtectedClassPropertyAccess": {
"default": false,
+ "description": "Whether to allow accessing class members marked as \`protected\` with array notation.",
"type": "boolean",
},
},
@@ -12335,8 +10139,10 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"properties": {
"accessibility": {
"$ref": "#/items/0/$defs/accessibilityLevel",
+ "description": "Which accessibility modifier is required to exist or not exist.",
},
"ignoredMethodNames": {
+ "description": "Specific method names that may be ignored.",
"items": {
"type": "string",
},
@@ -12344,6 +10150,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
},
"overrides": {
"additionalProperties": false,
+ "description": "Changes to required accessibility modifiers for specific kinds of class members.",
"properties": {
"accessors": {
"$ref": "#/items/0/$defs/accessibilityLevel",
@@ -12429,37 +10236,30 @@ You must still type the parameters of the function.",
"type": "problem",
},
},
- "func-call-spacing": {
+ "init-declarations": {
"create": [Function],
"defaultOptions": [
- "never",
- {},
+ "always",
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Require or disallow spacing between function identifiers and their invocations",
+ "description": "Require or disallow initialization in variable declarations",
"extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/func-call-spacing",
+ "url": "https://typescript-eslint.io/rules/init-declarations",
},
- "fixable": "whitespace",
+ "hasSuggestions": undefined,
"messages": {
- "missing": "Missing space between function name and paren.",
- "unexpectedNewline": "Unexpected newline between function name and paren.",
- "unexpectedWhitespace": "Unexpected whitespace between function name and paren.",
+ "initialized": "Variable '{{idName}}' should be initialized on declaration.",
+ "notInitialized": "Variable '{{idName}}' should not be initialized on declaration.",
},
- "replacedBy": [
- "@stylistic/ts/func-call-spacing",
- ],
"schema": {
"anyOf": [
{
"items": [
{
"enum": [
- "never",
+ "always",
],
- "type": "string",
},
],
"maxItems": 1,
@@ -12470,14 +10270,13 @@ You must still type the parameters of the function.",
"items": [
{
"enum": [
- "always",
+ "never",
],
- "type": "string",
},
{
"additionalProperties": false,
"properties": {
- "allowNewlines": {
+ "ignoreForLoopInit": {
"type": "boolean",
},
},
@@ -12490,10053 +10289,2805 @@ You must still type the parameters of the function.",
},
],
},
- "type": "layout",
+ "type": "suggestion",
},
},
- "indent": {
+ "max-params": {
"create": [Function],
"defaultOptions": [
- 4,
{
- "SwitchCase": 1,
- "flatTernaryExpressions": false,
- "ignoredNodes": [],
+ "countVoidThis": false,
+ "max": 3,
},
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Enforce consistent indentation",
+ "description": "Enforce a maximum number of parameters in function definitions",
"extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/indent",
+ "url": "https://typescript-eslint.io/rules/max-params",
},
- "fixable": "whitespace",
- "hasSuggestions": undefined,
"messages": {
- "wrongIndentation": "Expected indentation of {{expected}} but found {{actual}}.",
+ "exceed": "{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}.",
},
- "replacedBy": [
- "@stylistic/ts/indent",
- ],
"schema": [
- {
- "oneOf": [
- {
- "enum": [
- "tab",
- ],
- },
- {
- "minimum": 0,
- "type": "integer",
- },
- ],
- },
{
"additionalProperties": false,
"properties": {
- "ArrayExpression": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "CallExpression": {
- "additionalProperties": false,
- "properties": {
- "arguments": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- },
- "type": "object",
- },
- "FunctionDeclaration": {
- "additionalProperties": false,
- "properties": {
- "body": {
- "minimum": 0,
- "type": "integer",
- },
- "parameters": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- },
- "type": "object",
- },
- "FunctionExpression": {
- "additionalProperties": false,
- "properties": {
- "body": {
- "minimum": 0,
- "type": "integer",
- },
- "parameters": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- },
- "type": "object",
- },
- "ImportDeclaration": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "MemberExpression": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "off",
- ],
- },
- ],
- },
- "ObjectExpression": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "StaticBlock": {
- "additionalProperties": false,
- "properties": {
- "body": {
- "minimum": 0,
- "type": "integer",
- },
- },
- "type": "object",
+ "countVoidThis": {
+ "description": "Whether to count a \`this\` declaration when the type is \`void\`.",
+ "type": "boolean",
},
- "SwitchCase": {
- "default": 0,
+ "max": {
+ "description": "A maximum number of parameters in function definitions.",
"minimum": 0,
"type": "integer",
},
- "VariableDeclarator": {
- "oneOf": [
- {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "const": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "let": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "var": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- },
- "type": "object",
- },
- ],
- },
- "flatTernaryExpressions": {
- "default": false,
- "type": "boolean",
- },
- "ignoreComments": {
- "default": false,
- "type": "boolean",
- },
- "ignoredNodes": {
- "items": {
- "not": {
- "pattern": ":exit$",
- },
- "type": "string",
- },
- "type": "array",
- },
- "offsetTernaryExpressions": {
- "default": false,
- "type": "boolean",
- },
- "outerIIFEBody": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "off",
- ],
- },
- ],
+ "maximum": {
+ "description": "(deprecated) A maximum number of parameters in function definitions.",
+ "minimum": 0,
+ "type": "integer",
},
},
"type": "object",
},
],
- "type": "layout",
- },
- },
- "init-declarations": {
- "create": [Function],
- "defaultOptions": [
- "always",
- ],
- "meta": {
- "docs": {
- "description": "Require or disallow initialization in variable declarations",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/init-declarations",
- },
- "hasSuggestions": undefined,
- "messages": {
- "initialized": "Variable '{{idName}}' should be initialized on declaration.",
- "notInitialized": "Variable '{{idName}}' should not be initialized on declaration.",
- },
- "schema": {
- "anyOf": [
- {
- "items": [
- {
- "enum": [
- "always",
- ],
- },
- ],
- "maxItems": 1,
- "minItems": 0,
- "type": "array",
- },
- {
- "items": [
- {
- "enum": [
- "never",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "ignoreForLoopInit": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "maxItems": 2,
- "minItems": 0,
- "type": "array",
- },
- ],
- },
"type": "suggestion",
},
},
- "key-spacing": {
+ "member-ordering": {
"create": [Function],
"defaultOptions": [
- {},
+ {
+ "default": {
+ "memberTypes": [
+ "signature",
+ "call-signature",
+ "public-static-field",
+ "protected-static-field",
+ "private-static-field",
+ "#private-static-field",
+ "public-decorated-field",
+ "protected-decorated-field",
+ "private-decorated-field",
+ "public-instance-field",
+ "protected-instance-field",
+ "private-instance-field",
+ "#private-instance-field",
+ "public-abstract-field",
+ "protected-abstract-field",
+ "public-field",
+ "protected-field",
+ "private-field",
+ "#private-field",
+ "static-field",
+ "instance-field",
+ "abstract-field",
+ "decorated-field",
+ "field",
+ "static-initialization",
+ "public-constructor",
+ "protected-constructor",
+ "private-constructor",
+ "constructor",
+ "public-static-accessor",
+ "protected-static-accessor",
+ "private-static-accessor",
+ "#private-static-accessor",
+ "public-decorated-accessor",
+ "protected-decorated-accessor",
+ "private-decorated-accessor",
+ "public-instance-accessor",
+ "protected-instance-accessor",
+ "private-instance-accessor",
+ "#private-instance-accessor",
+ "public-abstract-accessor",
+ "protected-abstract-accessor",
+ "public-accessor",
+ "protected-accessor",
+ "private-accessor",
+ "#private-accessor",
+ "static-accessor",
+ "instance-accessor",
+ "abstract-accessor",
+ "decorated-accessor",
+ "accessor",
+ "public-static-get",
+ "protected-static-get",
+ "private-static-get",
+ "#private-static-get",
+ "public-decorated-get",
+ "protected-decorated-get",
+ "private-decorated-get",
+ "public-instance-get",
+ "protected-instance-get",
+ "private-instance-get",
+ "#private-instance-get",
+ "public-abstract-get",
+ "protected-abstract-get",
+ "public-get",
+ "protected-get",
+ "private-get",
+ "#private-get",
+ "static-get",
+ "instance-get",
+ "abstract-get",
+ "decorated-get",
+ "get",
+ "public-static-set",
+ "protected-static-set",
+ "private-static-set",
+ "#private-static-set",
+ "public-decorated-set",
+ "protected-decorated-set",
+ "private-decorated-set",
+ "public-instance-set",
+ "protected-instance-set",
+ "private-instance-set",
+ "#private-instance-set",
+ "public-abstract-set",
+ "protected-abstract-set",
+ "public-set",
+ "protected-set",
+ "private-set",
+ "#private-set",
+ "static-set",
+ "instance-set",
+ "abstract-set",
+ "decorated-set",
+ "set",
+ "public-static-method",
+ "protected-static-method",
+ "private-static-method",
+ "#private-static-method",
+ "public-decorated-method",
+ "protected-decorated-method",
+ "private-decorated-method",
+ "public-instance-method",
+ "protected-instance-method",
+ "private-instance-method",
+ "#private-instance-method",
+ "public-abstract-method",
+ "protected-abstract-method",
+ "public-method",
+ "protected-method",
+ "private-method",
+ "#private-method",
+ "static-method",
+ "instance-method",
+ "abstract-method",
+ "decorated-method",
+ "method",
+ ],
+ },
+ },
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Enforce consistent spacing between property names and type annotations in types and interfaces",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/key-spacing",
+ "description": "Require a consistent member declaration order",
+ "url": "https://typescript-eslint.io/rules/member-ordering",
},
- "fixable": "whitespace",
- "hasSuggestions": undefined,
"messages": {
- "extraKey": "Extra space after {{computed}}key '{{key}}'.",
- "extraValue": "Extra space before value for {{computed}}key '{{key}}'.",
- "missingKey": "Missing space after {{computed}}key '{{key}}'.",
- "missingValue": "Missing space before value for {{computed}}key '{{key}}'.",
+ "incorrectGroupOrder": "Member {{name}} should be declared before all {{rank}} definitions.",
+ "incorrectOrder": "Member {{member}} should be declared before member {{beforeMember}}.",
+ "incorrectRequiredMembersOrder": "Member {{member}} should be declared after all {{optionalOrRequired}} members.",
},
- "replacedBy": [
- "@stylistic/ts/key-spacing",
- ],
"schema": [
{
- "anyOf": [
- {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "align": {
- "anyOf": [
- {
- "enum": [
- "colon",
- "value",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- "on": {
- "enum": [
- "colon",
- "value",
- ],
- },
- },
- "type": "object",
- },
- ],
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- },
- "type": "object",
- },
- {
- "additionalProperties": false,
- "properties": {
- "multiLine": {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "align": {
- "anyOf": [
- {
- "enum": [
- "colon",
- "value",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- "on": {
- "enum": [
- "colon",
- "value",
- ],
- },
- },
- "type": "object",
- },
- ],
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- },
- "type": "object",
- },
- "singleLine": {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- },
- "type": "object",
- },
- },
- "type": "object",
+ "$defs": {
+ "allItems": {
+ "enum": [
+ "readonly-signature",
+ "signature",
+ "readonly-field",
+ "public-readonly-field",
+ "public-decorated-readonly-field",
+ "decorated-readonly-field",
+ "static-readonly-field",
+ "public-static-readonly-field",
+ "instance-readonly-field",
+ "public-instance-readonly-field",
+ "abstract-readonly-field",
+ "public-abstract-readonly-field",
+ "protected-readonly-field",
+ "protected-decorated-readonly-field",
+ "protected-static-readonly-field",
+ "protected-instance-readonly-field",
+ "protected-abstract-readonly-field",
+ "private-readonly-field",
+ "private-decorated-readonly-field",
+ "private-static-readonly-field",
+ "private-instance-readonly-field",
+ "#private-readonly-field",
+ "#private-static-readonly-field",
+ "#private-instance-readonly-field",
+ "field",
+ "public-field",
+ "public-decorated-field",
+ "decorated-field",
+ "static-field",
+ "public-static-field",
+ "instance-field",
+ "public-instance-field",
+ "abstract-field",
+ "public-abstract-field",
+ "protected-field",
+ "protected-decorated-field",
+ "protected-static-field",
+ "protected-instance-field",
+ "protected-abstract-field",
+ "private-field",
+ "private-decorated-field",
+ "private-static-field",
+ "private-instance-field",
+ "#private-field",
+ "#private-static-field",
+ "#private-instance-field",
+ "method",
+ "public-method",
+ "public-decorated-method",
+ "decorated-method",
+ "static-method",
+ "public-static-method",
+ "instance-method",
+ "public-instance-method",
+ "abstract-method",
+ "public-abstract-method",
+ "protected-method",
+ "protected-decorated-method",
+ "protected-static-method",
+ "protected-instance-method",
+ "protected-abstract-method",
+ "private-method",
+ "private-decorated-method",
+ "private-static-method",
+ "private-instance-method",
+ "#private-method",
+ "#private-static-method",
+ "#private-instance-method",
+ "call-signature",
+ "constructor",
+ "public-constructor",
+ "protected-constructor",
+ "private-constructor",
+ "accessor",
+ "public-accessor",
+ "public-decorated-accessor",
+ "decorated-accessor",
+ "static-accessor",
+ "public-static-accessor",
+ "instance-accessor",
+ "public-instance-accessor",
+ "abstract-accessor",
+ "public-abstract-accessor",
+ "protected-accessor",
+ "protected-decorated-accessor",
+ "protected-static-accessor",
+ "protected-instance-accessor",
+ "protected-abstract-accessor",
+ "private-accessor",
+ "private-decorated-accessor",
+ "private-static-accessor",
+ "private-instance-accessor",
+ "#private-accessor",
+ "#private-static-accessor",
+ "#private-instance-accessor",
+ "get",
+ "public-get",
+ "public-decorated-get",
+ "decorated-get",
+ "static-get",
+ "public-static-get",
+ "instance-get",
+ "public-instance-get",
+ "abstract-get",
+ "public-abstract-get",
+ "protected-get",
+ "protected-decorated-get",
+ "protected-static-get",
+ "protected-instance-get",
+ "protected-abstract-get",
+ "private-get",
+ "private-decorated-get",
+ "private-static-get",
+ "private-instance-get",
+ "#private-get",
+ "#private-static-get",
+ "#private-instance-get",
+ "set",
+ "public-set",
+ "public-decorated-set",
+ "decorated-set",
+ "static-set",
+ "public-static-set",
+ "instance-set",
+ "public-instance-set",
+ "abstract-set",
+ "public-abstract-set",
+ "protected-set",
+ "protected-decorated-set",
+ "protected-static-set",
+ "protected-instance-set",
+ "protected-abstract-set",
+ "private-set",
+ "private-decorated-set",
+ "private-static-set",
+ "private-instance-set",
+ "#private-set",
+ "#private-static-set",
+ "#private-instance-set",
+ "static-initialization",
+ "static-static-initialization",
+ "public-static-static-initialization",
+ "instance-static-initialization",
+ "public-instance-static-initialization",
+ "abstract-static-initialization",
+ "public-abstract-static-initialization",
+ "protected-static-static-initialization",
+ "protected-instance-static-initialization",
+ "protected-abstract-static-initialization",
+ "private-static-static-initialization",
+ "private-instance-static-initialization",
+ "#private-static-static-initialization",
+ "#private-instance-static-initialization",
+ ],
+ "type": "string",
},
- {
- "additionalProperties": false,
- "properties": {
- "align": {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- "on": {
- "enum": [
- "colon",
- "value",
- ],
- },
- },
- "type": "object",
+ "baseConfig": {
+ "oneOf": [
+ {
+ "enum": [
+ "never",
+ ],
+ "type": "string",
},
- "multiLine": {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
+ {
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/items/0/$defs/allItems",
+ },
+ {
+ "items": {
+ "$ref": "#/items/0/$defs/allItems",
+ },
+ "type": "array",
+ },
+ ],
},
- "type": "object",
+ "type": "array",
},
- "singleLine": {
+ {
"additionalProperties": false,
"properties": {
- "afterColon": {
- "type": "boolean",
+ "memberTypes": {
+ "oneOf": [
+ {
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/items/0/$defs/allItems",
+ },
+ {
+ "items": {
+ "$ref": "#/items/0/$defs/allItems",
+ },
+ "type": "array",
+ },
+ ],
+ },
+ "type": "array",
+ },
+ {
+ "enum": [
+ "never",
+ ],
+ "type": "string",
+ },
+ ],
},
- "beforeColon": {
- "type": "boolean",
+ "optionalityOrder": {
+ "$ref": "#/items/0/$defs/optionalityOrderOptions",
},
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
+ "order": {
+ "$ref": "#/items/0/$defs/orderOptions",
},
},
"type": "object",
},
- },
- "type": "object",
+ ],
},
- ],
- },
- ],
- "type": "layout",
- },
- },
- "keyword-spacing": {
- "create": [Function],
- "defaultOptions": [
- {},
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce consistent spacing before and after keywords",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/keyword-spacing",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "expectedAfter": "Expected space(s) after "{{value}}".",
- "expectedBefore": "Expected space(s) before "{{value}}".",
- "unexpectedAfter": "Unexpected space(s) after "{{value}}".",
- "unexpectedBefore": "Unexpected space(s) before "{{value}}".",
- },
- "replacedBy": [
- "@stylistic/ts/keyword-spacing",
- ],
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "after": {
- "default": true,
- "type": "boolean",
+ "optionalityOrderOptions": {
+ "enum": [
+ "optional-first",
+ "required-first",
+ ],
+ "type": "string",
},
- "before": {
- "default": true,
- "type": "boolean",
+ "orderOptions": {
+ "enum": [
+ "alphabetically",
+ "alphabetically-case-insensitive",
+ "as-written",
+ "natural",
+ "natural-case-insensitive",
+ ],
+ "type": "string",
},
- "overrides": {
- "additionalProperties": false,
- "properties": {
- "abstract": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "as": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "typeItems": {
+ "enum": [
+ "readonly-signature",
+ "signature",
+ "readonly-field",
+ "field",
+ "method",
+ "constructor",
+ ],
+ "type": "string",
+ },
+ "typesConfig": {
+ "oneOf": [
+ {
+ "enum": [
+ "never",
+ ],
+ "type": "string",
},
- "async": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ {
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/items/0/$defs/typeItems",
+ },
+ {
+ "items": {
+ "$ref": "#/items/0/$defs/typeItems",
+ },
+ "type": "array",
+ },
+ ],
},
- "type": "object",
+ "type": "array",
},
- "await": {
+ {
"additionalProperties": false,
"properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
+ "memberTypes": {
+ "oneOf": [
+ {
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/items/0/$defs/typeItems",
+ },
+ {
+ "items": {
+ "$ref": "#/items/0/$defs/typeItems",
+ },
+ "type": "array",
+ },
+ ],
+ },
+ "type": "array",
+ },
+ {
+ "enum": [
+ "never",
+ ],
+ "type": "string",
+ },
+ ],
},
- },
- "type": "object",
- },
- "boolean": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "optionalityOrder": {
+ "$ref": "#/items/0/$defs/optionalityOrderOptions",
},
- "before": {
- "type": "boolean",
+ "order": {
+ "$ref": "#/items/0/$defs/orderOptions",
},
},
"type": "object",
},
- "break": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ ],
+ },
+ },
+ "additionalProperties": false,
+ "properties": {
+ "classExpressions": {
+ "$ref": "#/items/0/$defs/baseConfig",
+ },
+ "classes": {
+ "$ref": "#/items/0/$defs/baseConfig",
+ },
+ "default": {
+ "$ref": "#/items/0/$defs/baseConfig",
+ },
+ "interfaces": {
+ "$ref": "#/items/0/$defs/typesConfig",
+ },
+ "typeLiterals": {
+ "$ref": "#/items/0/$defs/typesConfig",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "method-signature-style": {
+ "create": [Function],
+ "defaultOptions": [
+ "property",
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce using a particular method signature syntax",
+ "url": "https://typescript-eslint.io/rules/method-signature-style",
+ },
+ "fixable": "code",
+ "messages": {
+ "errorMethod": "Shorthand method signature is forbidden. Use a function property instead.",
+ "errorProperty": "Function property signature is forbidden. Use a method shorthand instead.",
+ },
+ "schema": [
+ {
+ "enum": [
+ "property",
+ "method",
+ ],
+ "type": "string",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "naming-convention": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "format": [
+ "camelCase",
+ ],
+ "leadingUnderscore": "allow",
+ "selector": "default",
+ "trailingUnderscore": "allow",
+ },
+ {
+ "format": [
+ "camelCase",
+ "PascalCase",
+ ],
+ "selector": "import",
+ },
+ {
+ "format": [
+ "camelCase",
+ "UPPER_CASE",
+ ],
+ "leadingUnderscore": "allow",
+ "selector": "variable",
+ "trailingUnderscore": "allow",
+ },
+ {
+ "format": [
+ "PascalCase",
+ ],
+ "selector": "typeLike",
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce naming conventions for everything across a codebase",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/naming-convention",
+ },
+ "messages": {
+ "doesNotMatchFormat": "{{type}} name \`{{name}}\` must match one of the following formats: {{formats}}",
+ "doesNotMatchFormatTrimmed": "{{type}} name \`{{name}}\` trimmed as \`{{processedName}}\` must match one of the following formats: {{formats}}",
+ "missingAffix": "{{type}} name \`{{name}}\` must have one of the following {{position}}es: {{affixes}}",
+ "missingUnderscore": "{{type}} name \`{{name}}\` must have {{count}} {{position}} underscore(s).",
+ "satisfyCustom": "{{type}} name \`{{name}}\` must {{regexMatch}} the RegExp: {{regex}}",
+ "unexpectedUnderscore": "{{type}} name \`{{name}}\` must not have a {{position}} underscore.",
+ },
+ "schema": {
+ "$defs": {
+ "formatOptionsConfig": {
+ "oneOf": [
+ {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/predefinedFormats",
},
- "byte": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "type": "array",
+ },
+ {
+ "type": "null",
+ },
+ ],
+ },
+ "matchRegexConfig": {
+ "additionalProperties": false,
+ "properties": {
+ "match": {
+ "type": "boolean",
+ },
+ "regex": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "match",
+ "regex",
+ ],
+ "type": "object",
+ },
+ "predefinedFormats": {
+ "enum": [
+ "camelCase",
+ "strictCamelCase",
+ "PascalCase",
+ "StrictPascalCase",
+ "snake_case",
+ "UPPER_CASE",
+ ],
+ "type": "string",
+ },
+ "prefixSuffixConfig": {
+ "additionalItems": false,
+ "items": {
+ "minLength": 1,
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "typeModifiers": {
+ "enum": [
+ "boolean",
+ "string",
+ "number",
+ "function",
+ "array",
+ ],
+ "type": "string",
+ },
+ "underscoreOptions": {
+ "enum": [
+ "forbid",
+ "allow",
+ "require",
+ "requireDouble",
+ "allowDouble",
+ "allowSingleOrDouble",
+ ],
+ "type": "string",
+ },
+ },
+ "additionalItems": false,
+ "items": {
+ "oneOf": [
+ {
+ "additionalProperties": false,
+ "description": "Multiple selectors in one config",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "case": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "failureMessage": {
+ "type": "string",
},
- "catch": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
+ ],
},
- "char": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "class": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "const": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "const",
+ "readonly",
+ "static",
+ "public",
+ "protected",
+ "private",
+ "#private",
+ "abstract",
+ "destructured",
+ "global",
+ "exported",
+ "unused",
+ "requiresQuotes",
+ "override",
+ "async",
+ "default",
+ "namespace",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "continue": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "debugger": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "selector": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "default",
+ "variableLike",
+ "memberLike",
+ "typeLike",
+ "method",
+ "property",
+ "accessor",
+ "variable",
+ "function",
+ "parameter",
+ "parameterProperty",
+ "classicAccessor",
+ "enumMember",
+ "classMethod",
+ "objectLiteralMethod",
+ "typeMethod",
+ "classProperty",
+ "objectLiteralProperty",
+ "typeProperty",
+ "autoAccessor",
+ "class",
+ "interface",
+ "typeAlias",
+ "enum",
+ "typeParameter",
+ "import",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "default": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "delete": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "do": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
},
- "type": "object",
+ "type": "array",
},
- "double": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'default'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "else": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "enum": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "failureMessage": {
+ "type": "string",
},
- "export": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
+ ],
},
- "extends": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "false": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "final": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "const",
+ "readonly",
+ "static",
+ "public",
+ "protected",
+ "private",
+ "#private",
+ "abstract",
+ "destructured",
+ "global",
+ "exported",
+ "unused",
+ "requiresQuotes",
+ "override",
+ "async",
+ "default",
+ "namespace",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "finally": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "float": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "selector": {
+ "enum": [
+ "default",
+ ],
+ "type": "string",
},
- "for": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "from": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "function": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'variableLike'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "get": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "failureMessage": {
+ "type": "string",
},
- "goto": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
+ ],
},
- "if": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "implements": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "import": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "unused",
+ "async",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "in": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "instanceof": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "selector": {
+ "enum": [
+ "variableLike",
+ ],
+ "type": "string",
},
- "int": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "interface": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "let": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'variable'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "long": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "failureMessage": {
+ "type": "string",
},
- "native": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
+ ],
},
- "new": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "null": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "of": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "const",
+ "destructured",
+ "exported",
+ "global",
+ "unused",
+ "async",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "package": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "private": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "selector": {
+ "enum": [
+ "variable",
+ ],
+ "type": "string",
},
- "protected": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "public": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "return": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
},
- "type": "object",
+ "type": "array",
},
- "set": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'function'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "short": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "failureMessage": {
+ "type": "string",
},
- "static": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
+ ],
},
- "super": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "switch": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "synchronized": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "exported",
+ "global",
+ "unused",
+ "async",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "this": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "throw": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "selector": {
+ "enum": [
+ "function",
+ ],
+ "type": "string",
},
- "throws": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "transient": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "true": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'parameter'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "try": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "failureMessage": {
+ "type": "string",
},
- "type": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
- },
- "type": "object",
+ ],
},
- "typeof": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
},
- "var": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- "void": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "destructured",
+ "unused",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- "volatile": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "while": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "selector": {
+ "enum": [
+ "parameter",
+ ],
+ "type": "string",
},
- "with": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "yield": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- },
- "type": "object",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
- "lines-around-comment": {
- "create": [Function],
- "defaultOptions": [
- {
- "beforeBlockComment": true,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require empty lines around comments",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/lines-around-comment",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "after": "Expected line after comment.",
- "before": "Expected line before comment.",
- },
- "replacedBy": [
- "@stylistic/ts/lines-around-comment",
- ],
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "afterBlockComment": {
- "default": false,
- "type": "boolean",
- },
- "afterLineComment": {
- "default": false,
- "type": "boolean",
- },
- "allowArrayEnd": {
- "type": "boolean",
- },
- "allowArrayStart": {
- "type": "boolean",
- },
- "allowBlockEnd": {
- "default": false,
- "type": "boolean",
- },
- "allowBlockStart": {
- "default": false,
- "type": "boolean",
- },
- "allowClassEnd": {
- "type": "boolean",
- },
- "allowClassStart": {
- "type": "boolean",
- },
- "allowEnumEnd": {
- "type": "boolean",
- },
- "allowEnumStart": {
- "type": "boolean",
- },
- "allowInterfaceEnd": {
- "type": "boolean",
- },
- "allowInterfaceStart": {
- "type": "boolean",
- },
- "allowModuleEnd": {
- "type": "boolean",
- },
- "allowModuleStart": {
- "type": "boolean",
- },
- "allowObjectEnd": {
- "type": "boolean",
- },
- "allowObjectStart": {
- "type": "boolean",
- },
- "allowTypeEnd": {
- "type": "boolean",
- },
- "allowTypeStart": {
- "type": "boolean",
- },
- "applyDefaultIgnorePatterns": {
- "type": "boolean",
- },
- "beforeBlockComment": {
- "default": true,
- "type": "boolean",
- },
- "beforeLineComment": {
- "default": false,
- "type": "boolean",
- },
- "ignorePattern": {
- "type": "string",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
- "lines-between-class-members": {
- "create": [Function],
- "defaultOptions": [
- "always",
- {
- "exceptAfterOverload": true,
- "exceptAfterSingleLine": false,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require or disallow an empty line between class members",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/lines-between-class-members",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "always": "Expected blank line between class members.",
- "never": "Unexpected blank line between class members.",
- },
- "replacedBy": [
- "@stylistic/ts/lines-between-class-members",
- ],
- "schema": [
- {
- "anyOf": [
- {
- "additionalProperties": false,
- "properties": {
- "enforce": {
+ "types": {
+ "additionalItems": false,
"items": {
- "additionalProperties": false,
- "properties": {
- "blankLine": {
- "enum": [
- "always",
- "never",
- ],
- },
- "next": {
- "enum": [
- "method",
- "field",
- "*",
- ],
- },
- "prev": {
- "enum": [
- "method",
- "field",
- "*",
- ],
- },
- },
- "required": [
- "blankLine",
- "prev",
- "next",
- ],
- "type": "object",
+ "$ref": "#/$defs/typeModifiers",
},
- "minItems": 1,
"type": "array",
},
},
"required": [
- "enforce",
+ "selector",
+ "format",
],
"type": "object",
},
{
- "enum": [
- "always",
- "never",
- ],
- },
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "exceptAfterOverload": {
- "default": true,
- "type": "boolean",
- },
- "exceptAfterSingleLine": {
- "default": false,
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
- "max-params": {
- "create": [Function],
- "defaultOptions": [
- {
- "countVoidThis": false,
- "max": 3,
- },
- ],
- "meta": {
- "docs": {
- "description": "Enforce a maximum number of parameters in function definitions",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/max-params",
- },
- "messages": {
- "exceed": "{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "countVoidThis": {
- "type": "boolean",
- },
- "max": {
- "minimum": 0,
- "type": "integer",
- },
- "maximum": {
- "minimum": 0,
- "type": "integer",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "member-delimiter-style": {
- "create": [Function],
- "defaultOptions": [
- {
- "multiline": {
- "delimiter": "semi",
- "requireLast": true,
- },
- "multilineDetection": "brackets",
- "singleline": {
- "delimiter": "semi",
- "requireLast": false,
- },
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require a specific member delimiter style for interfaces and type literals",
- "url": "https://typescript-eslint.io/rules/member-delimiter-style",
- },
- "fixable": "whitespace",
- "messages": {
- "expectedComma": "Expected a comma.",
- "expectedSemi": "Expected a semicolon.",
- "unexpectedComma": "Unexpected separator (,).",
- "unexpectedSemi": "Unexpected separator (;).",
- },
- "replacedBy": [
- "@stylistic/ts/member-delimiter-style",
- ],
- "schema": [
- {
- "$defs": {
- "delimiterConfig": {
"additionalProperties": false,
+ "description": "Selector 'memberLike'",
"properties": {
- "multiline": {
- "additionalProperties": false,
- "properties": {
- "delimiter": {
- "$ref": "#/items/0/$defs/multiLineOption",
- },
- "requireLast": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "singleline": {
- "additionalProperties": false,
- "properties": {
- "delimiter": {
- "$ref": "#/items/0/$defs/singleLineOption",
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
},
- "requireLast": {
- "type": "boolean",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "private",
+ "#private",
+ "protected",
+ "public",
+ "readonly",
+ "requiresQuotes",
+ "static",
+ "override",
+ "async",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
},
- },
- "type": "object",
- },
- "multiLineOption": {
- "enum": [
- "none",
- "semi",
- "comma",
- ],
- "type": "string",
- },
- "singleLineOption": {
- "enum": [
- "semi",
- "comma",
- ],
- "type": "string",
- },
- },
- "additionalProperties": false,
- "properties": {
- "multiline": {
- "additionalProperties": false,
- "properties": {
- "delimiter": {
- "$ref": "#/items/0/$defs/multiLineOption",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
},
- "requireLast": {
- "type": "boolean",
+ "selector": {
+ "enum": [
+ "memberLike",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
},
- "type": "object",
- },
- "multilineDetection": {
- "enum": [
- "brackets",
- "last-member",
+ "required": [
+ "selector",
+ "format",
],
- "type": "string",
+ "type": "object",
},
- "overrides": {
+ {
"additionalProperties": false,
+ "description": "Selector 'classProperty'",
"properties": {
- "interface": {
- "$ref": "#/items/0/$defs/delimiterConfig",
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "private",
+ "#private",
+ "protected",
+ "public",
+ "readonly",
+ "requiresQuotes",
+ "static",
+ "override",
+ ],
+ "type": "string",
+ },
+ "type": "array",
},
- "typeLiteral": {
- "$ref": "#/items/0/$defs/delimiterConfig",
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "classProperty",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
+ },
+ "type": "array",
},
},
+ "required": [
+ "selector",
+ "format",
+ ],
"type": "object",
},
- "singleline": {
+ {
"additionalProperties": false,
+ "description": "Selector 'objectLiteralProperty'",
"properties": {
- "delimiter": {
- "$ref": "#/items/0/$defs/singleLineOption",
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- "requireLast": {
- "type": "boolean",
+ "failureMessage": {
+ "type": "string",
},
- },
- "type": "object",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
- "member-ordering": {
- "create": [Function],
- "defaultOptions": [
- {
- "default": {
- "memberTypes": [
- "signature",
- "call-signature",
- "public-static-field",
- "protected-static-field",
- "private-static-field",
- "#private-static-field",
- "public-decorated-field",
- "protected-decorated-field",
- "private-decorated-field",
- "public-instance-field",
- "protected-instance-field",
- "private-instance-field",
- "#private-instance-field",
- "public-abstract-field",
- "protected-abstract-field",
- "public-field",
- "protected-field",
- "private-field",
- "#private-field",
- "static-field",
- "instance-field",
- "abstract-field",
- "decorated-field",
- "field",
- "static-initialization",
- "public-constructor",
- "protected-constructor",
- "private-constructor",
- "constructor",
- "public-static-accessor",
- "protected-static-accessor",
- "private-static-accessor",
- "#private-static-accessor",
- "public-decorated-accessor",
- "protected-decorated-accessor",
- "private-decorated-accessor",
- "public-instance-accessor",
- "protected-instance-accessor",
- "private-instance-accessor",
- "#private-instance-accessor",
- "public-abstract-accessor",
- "protected-abstract-accessor",
- "public-accessor",
- "protected-accessor",
- "private-accessor",
- "#private-accessor",
- "static-accessor",
- "instance-accessor",
- "abstract-accessor",
- "decorated-accessor",
- "accessor",
- "public-static-get",
- "protected-static-get",
- "private-static-get",
- "#private-static-get",
- "public-decorated-get",
- "protected-decorated-get",
- "private-decorated-get",
- "public-instance-get",
- "protected-instance-get",
- "private-instance-get",
- "#private-instance-get",
- "public-abstract-get",
- "protected-abstract-get",
- "public-get",
- "protected-get",
- "private-get",
- "#private-get",
- "static-get",
- "instance-get",
- "abstract-get",
- "decorated-get",
- "get",
- "public-static-set",
- "protected-static-set",
- "private-static-set",
- "#private-static-set",
- "public-decorated-set",
- "protected-decorated-set",
- "private-decorated-set",
- "public-instance-set",
- "protected-instance-set",
- "private-instance-set",
- "#private-instance-set",
- "public-abstract-set",
- "protected-abstract-set",
- "public-set",
- "protected-set",
- "private-set",
- "#private-set",
- "static-set",
- "instance-set",
- "abstract-set",
- "decorated-set",
- "set",
- "public-static-method",
- "protected-static-method",
- "private-static-method",
- "#private-static-method",
- "public-decorated-method",
- "protected-decorated-method",
- "private-decorated-method",
- "public-instance-method",
- "protected-instance-method",
- "private-instance-method",
- "#private-instance-method",
- "public-abstract-method",
- "protected-abstract-method",
- "public-method",
- "protected-method",
- "private-method",
- "#private-method",
- "static-method",
- "instance-method",
- "abstract-method",
- "decorated-method",
- "method",
- ],
- },
- },
- ],
- "meta": {
- "docs": {
- "description": "Require a consistent member declaration order",
- "url": "https://typescript-eslint.io/rules/member-ordering",
- },
- "messages": {
- "incorrectGroupOrder": "Member {{name}} should be declared before all {{rank}} definitions.",
- "incorrectOrder": "Member {{member}} should be declared before member {{beforeMember}}.",
- "incorrectRequiredMembersOrder": "Member {{member}} should be declared after all {{optionalOrRequired}} members.",
- },
- "schema": [
- {
- "$defs": {
- "allItems": {
- "enum": [
- "readonly-signature",
- "signature",
- "readonly-field",
- "public-readonly-field",
- "public-decorated-readonly-field",
- "decorated-readonly-field",
- "static-readonly-field",
- "public-static-readonly-field",
- "instance-readonly-field",
- "public-instance-readonly-field",
- "abstract-readonly-field",
- "public-abstract-readonly-field",
- "protected-readonly-field",
- "protected-decorated-readonly-field",
- "protected-static-readonly-field",
- "protected-instance-readonly-field",
- "protected-abstract-readonly-field",
- "private-readonly-field",
- "private-decorated-readonly-field",
- "private-static-readonly-field",
- "private-instance-readonly-field",
- "#private-readonly-field",
- "#private-static-readonly-field",
- "#private-instance-readonly-field",
- "field",
- "public-field",
- "public-decorated-field",
- "decorated-field",
- "static-field",
- "public-static-field",
- "instance-field",
- "public-instance-field",
- "abstract-field",
- "public-abstract-field",
- "protected-field",
- "protected-decorated-field",
- "protected-static-field",
- "protected-instance-field",
- "protected-abstract-field",
- "private-field",
- "private-decorated-field",
- "private-static-field",
- "private-instance-field",
- "#private-field",
- "#private-static-field",
- "#private-instance-field",
- "method",
- "public-method",
- "public-decorated-method",
- "decorated-method",
- "static-method",
- "public-static-method",
- "instance-method",
- "public-instance-method",
- "abstract-method",
- "public-abstract-method",
- "protected-method",
- "protected-decorated-method",
- "protected-static-method",
- "protected-instance-method",
- "protected-abstract-method",
- "private-method",
- "private-decorated-method",
- "private-static-method",
- "private-instance-method",
- "#private-method",
- "#private-static-method",
- "#private-instance-method",
- "call-signature",
- "constructor",
- "public-constructor",
- "protected-constructor",
- "private-constructor",
- "accessor",
- "public-accessor",
- "public-decorated-accessor",
- "decorated-accessor",
- "static-accessor",
- "public-static-accessor",
- "instance-accessor",
- "public-instance-accessor",
- "abstract-accessor",
- "public-abstract-accessor",
- "protected-accessor",
- "protected-decorated-accessor",
- "protected-static-accessor",
- "protected-instance-accessor",
- "protected-abstract-accessor",
- "private-accessor",
- "private-decorated-accessor",
- "private-static-accessor",
- "private-instance-accessor",
- "#private-accessor",
- "#private-static-accessor",
- "#private-instance-accessor",
- "get",
- "public-get",
- "public-decorated-get",
- "decorated-get",
- "static-get",
- "public-static-get",
- "instance-get",
- "public-instance-get",
- "abstract-get",
- "public-abstract-get",
- "protected-get",
- "protected-decorated-get",
- "protected-static-get",
- "protected-instance-get",
- "protected-abstract-get",
- "private-get",
- "private-decorated-get",
- "private-static-get",
- "private-instance-get",
- "#private-get",
- "#private-static-get",
- "#private-instance-get",
- "set",
- "public-set",
- "public-decorated-set",
- "decorated-set",
- "static-set",
- "public-static-set",
- "instance-set",
- "public-instance-set",
- "abstract-set",
- "public-abstract-set",
- "protected-set",
- "protected-decorated-set",
- "protected-static-set",
- "protected-instance-set",
- "protected-abstract-set",
- "private-set",
- "private-decorated-set",
- "private-static-set",
- "private-instance-set",
- "#private-set",
- "#private-static-set",
- "#private-instance-set",
- "static-initialization",
- "static-static-initialization",
- "public-static-static-initialization",
- "instance-static-initialization",
- "public-instance-static-initialization",
- "abstract-static-initialization",
- "public-abstract-static-initialization",
- "protected-static-static-initialization",
- "protected-instance-static-initialization",
- "protected-abstract-static-initialization",
- "private-static-static-initialization",
- "private-instance-static-initialization",
- "#private-static-static-initialization",
- "#private-instance-static-initialization",
- ],
- "type": "string",
- },
- "baseConfig": {
- "oneOf": [
- {
- "enum": [
- "never",
- ],
- "type": "string",
- },
- {
- "items": {
- "oneOf": [
- {
- "$ref": "#/items/0/$defs/allItems",
- },
- {
- "items": {
- "$ref": "#/items/0/$defs/allItems",
- },
- "type": "array",
- },
- ],
- },
- "type": "array",
- },
- {
- "additionalProperties": false,
- "properties": {
- "memberTypes": {
- "oneOf": [
- {
- "items": {
- "oneOf": [
- {
- "$ref": "#/items/0/$defs/allItems",
- },
- {
- "items": {
- "$ref": "#/items/0/$defs/allItems",
- },
- "type": "array",
- },
- ],
- },
- "type": "array",
- },
- {
- "enum": [
- "never",
- ],
- "type": "string",
- },
- ],
- },
- "optionalityOrder": {
- "$ref": "#/items/0/$defs/optionalityOrderOptions",
- },
- "order": {
- "$ref": "#/items/0/$defs/orderOptions",
- },
- },
- "type": "object",
- },
- ],
- },
- "optionalityOrderOptions": {
- "enum": [
- "optional-first",
- "required-first",
- ],
- "type": "string",
- },
- "orderOptions": {
- "enum": [
- "alphabetically",
- "alphabetically-case-insensitive",
- "as-written",
- "natural",
- "natural-case-insensitive",
- ],
- "type": "string",
- },
- "typeItems": {
- "enum": [
- "readonly-signature",
- "signature",
- "readonly-field",
- "field",
- "method",
- "constructor",
- ],
- "type": "string",
- },
- "typesConfig": {
- "oneOf": [
- {
- "enum": [
- "never",
- ],
- "type": "string",
- },
- {
- "items": {
- "oneOf": [
- {
- "$ref": "#/items/0/$defs/typeItems",
- },
- {
- "items": {
- "$ref": "#/items/0/$defs/typeItems",
- },
- "type": "array",
- },
- ],
- },
- "type": "array",
- },
- {
- "additionalProperties": false,
- "properties": {
- "memberTypes": {
- "oneOf": [
- {
- "items": {
- "oneOf": [
- {
- "$ref": "#/items/0/$defs/typeItems",
- },
- {
- "items": {
- "$ref": "#/items/0/$defs/typeItems",
- },
- "type": "array",
- },
- ],
- },
- "type": "array",
- },
- {
- "enum": [
- "never",
- ],
- "type": "string",
- },
- ],
- },
- "optionalityOrder": {
- "$ref": "#/items/0/$defs/optionalityOrderOptions",
- },
- "order": {
- "$ref": "#/items/0/$defs/orderOptions",
- },
- },
- "type": "object",
- },
- ],
- },
- },
- "additionalProperties": false,
- "properties": {
- "classExpressions": {
- "$ref": "#/items/0/$defs/baseConfig",
- },
- "classes": {
- "$ref": "#/items/0/$defs/baseConfig",
- },
- "default": {
- "$ref": "#/items/0/$defs/baseConfig",
- },
- "interfaces": {
- "$ref": "#/items/0/$defs/typesConfig",
- },
- "typeLiterals": {
- "$ref": "#/items/0/$defs/typesConfig",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "method-signature-style": {
- "create": [Function],
- "defaultOptions": [
- "property",
- ],
- "meta": {
- "docs": {
- "description": "Enforce using a particular method signature syntax",
- "url": "https://typescript-eslint.io/rules/method-signature-style",
- },
- "fixable": "code",
- "messages": {
- "errorMethod": "Shorthand method signature is forbidden. Use a function property instead.",
- "errorProperty": "Function property signature is forbidden. Use a method shorthand instead.",
- },
- "schema": [
- {
- "enum": [
- "property",
- "method",
- ],
- "type": "string",
- },
- ],
- "type": "suggestion",
- },
- },
- "naming-convention": {
- "create": [Function],
- "defaultOptions": [
- {
- "format": [
- "camelCase",
- ],
- "leadingUnderscore": "allow",
- "selector": "default",
- "trailingUnderscore": "allow",
- },
- {
- "format": [
- "camelCase",
- "PascalCase",
- ],
- "selector": "import",
- },
- {
- "format": [
- "camelCase",
- "UPPER_CASE",
- ],
- "leadingUnderscore": "allow",
- "selector": "variable",
- "trailingUnderscore": "allow",
- },
- {
- "format": [
- "PascalCase",
- ],
- "selector": "typeLike",
- },
- ],
- "meta": {
- "docs": {
- "description": "Enforce naming conventions for everything across a codebase",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/naming-convention",
- },
- "messages": {
- "doesNotMatchFormat": "{{type}} name \`{{name}}\` must match one of the following formats: {{formats}}",
- "doesNotMatchFormatTrimmed": "{{type}} name \`{{name}}\` trimmed as \`{{processedName}}\` must match one of the following formats: {{formats}}",
- "missingAffix": "{{type}} name \`{{name}}\` must have one of the following {{position}}es: {{affixes}}",
- "missingUnderscore": "{{type}} name \`{{name}}\` must have {{count}} {{position}} underscore(s).",
- "satisfyCustom": "{{type}} name \`{{name}}\` must {{regexMatch}} the RegExp: {{regex}}",
- "unexpectedUnderscore": "{{type}} name \`{{name}}\` must not have a {{position}} underscore.",
- },
- "schema": {
- "$defs": {
- "formatOptionsConfig": {
- "oneOf": [
- {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/predefinedFormats",
- },
- "type": "array",
- },
- {
- "type": "null",
- },
- ],
- },
- "matchRegexConfig": {
- "additionalProperties": false,
- "properties": {
- "match": {
- "type": "boolean",
- },
- "regex": {
- "type": "string",
- },
- },
- "required": [
- "match",
- "regex",
- ],
- "type": "object",
- },
- "predefinedFormats": {
- "enum": [
- "camelCase",
- "strictCamelCase",
- "PascalCase",
- "StrictPascalCase",
- "snake_case",
- "UPPER_CASE",
- ],
- "type": "string",
- },
- "prefixSuffixConfig": {
- "additionalItems": false,
- "items": {
- "minLength": 1,
- "type": "string",
- },
- "type": "array",
- },
- "typeModifiers": {
- "enum": [
- "boolean",
- "string",
- "number",
- "function",
- "array",
- ],
- "type": "string",
- },
- "underscoreOptions": {
- "enum": [
- "forbid",
- "allow",
- "require",
- "requireDouble",
- "allowDouble",
- "allowSingleOrDouble",
- ],
- "type": "string",
- },
- },
- "additionalItems": false,
- "items": {
- "oneOf": [
- {
- "additionalProperties": false,
- "description": "Multiple selectors in one config",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "const",
- "readonly",
- "static",
- "public",
- "protected",
- "private",
- "#private",
- "abstract",
- "destructured",
- "global",
- "exported",
- "unused",
- "requiresQuotes",
- "override",
- "async",
- "default",
- "namespace",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "additionalItems": false,
- "items": {
- "enum": [
- "default",
- "variableLike",
- "memberLike",
- "typeLike",
- "method",
- "property",
- "accessor",
- "variable",
- "function",
- "parameter",
- "parameterProperty",
- "classicAccessor",
- "enumMember",
- "classMethod",
- "objectLiteralMethod",
- "typeMethod",
- "classProperty",
- "objectLiteralProperty",
- "typeProperty",
- "autoAccessor",
- "class",
- "interface",
- "typeAlias",
- "enum",
- "typeParameter",
- "import",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'default'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "const",
- "readonly",
- "static",
- "public",
- "protected",
- "private",
- "#private",
- "abstract",
- "destructured",
- "global",
- "exported",
- "unused",
- "requiresQuotes",
- "override",
- "async",
- "default",
- "namespace",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "default",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'variableLike'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "unused",
- "async",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "variableLike",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'variable'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "const",
- "destructured",
- "exported",
- "global",
- "unused",
- "async",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "variable",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'function'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "exported",
- "global",
- "unused",
- "async",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "function",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'parameter'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "destructured",
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "parameter",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'memberLike'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "private",
- "#private",
- "protected",
- "public",
- "readonly",
- "requiresQuotes",
- "static",
- "override",
- "async",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "memberLike",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'classProperty'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "private",
- "#private",
- "protected",
- "public",
- "readonly",
- "requiresQuotes",
- "static",
- "override",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "classProperty",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'objectLiteralProperty'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "public",
- "requiresQuotes",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "objectLiteralProperty",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'typeProperty'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "public",
- "readonly",
- "requiresQuotes",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "typeProperty",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'parameterProperty'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "private",
- "protected",
- "public",
- "readonly",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "parameterProperty",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'property'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "private",
- "#private",
- "protected",
- "public",
- "readonly",
- "requiresQuotes",
- "static",
- "override",
- "async",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "property",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'classMethod'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "private",
- "#private",
- "protected",
- "public",
- "requiresQuotes",
- "static",
- "override",
- "async",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "classMethod",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'objectLiteralMethod'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "public",
- "requiresQuotes",
- "async",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "objectLiteralMethod",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'typeMethod'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "public",
- "requiresQuotes",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "typeMethod",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'method'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "private",
- "#private",
- "protected",
- "public",
- "requiresQuotes",
- "static",
- "override",
- "async",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "method",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'classicAccessor'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "private",
- "protected",
- "public",
- "requiresQuotes",
- "static",
- "override",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "classicAccessor",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'autoAccessor'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "private",
- "protected",
- "public",
- "requiresQuotes",
- "static",
- "override",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "autoAccessor",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'accessor'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "private",
- "protected",
- "public",
- "requiresQuotes",
- "static",
- "override",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "accessor",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "types": {
- "additionalItems": false,
- "items": {
- "$ref": "#/$defs/typeModifiers",
- },
- "type": "array",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'enumMember'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "requiresQuotes",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "enumMember",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'typeLike'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "exported",
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "typeLike",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'class'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "abstract",
- "exported",
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "class",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'interface'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "exported",
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "interface",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'typeAlias'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "exported",
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "typeAlias",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'enum'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "exported",
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "enum",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'typeParameter'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "unused",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "typeParameter",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "description": "Selector 'import'",
- "properties": {
- "custom": {
- "$ref": "#/$defs/matchRegexConfig",
- },
- "failureMessage": {
- "type": "string",
- },
- "filter": {
- "oneOf": [
- {
- "minLength": 1,
- "type": "string",
- },
- {
- "$ref": "#/$defs/matchRegexConfig",
- },
- ],
- },
- "format": {
- "$ref": "#/$defs/formatOptionsConfig",
- },
- "leadingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- "modifiers": {
- "additionalItems": false,
- "items": {
- "enum": [
- "default",
- "namespace",
- ],
- "type": "string",
- },
- "type": "array",
- },
- "prefix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "selector": {
- "enum": [
- "import",
- ],
- "type": "string",
- },
- "suffix": {
- "$ref": "#/$defs/prefixSuffixConfig",
- },
- "trailingUnderscore": {
- "$ref": "#/$defs/underscoreOptions",
- },
- },
- "required": [
- "selector",
- "format",
- ],
- "type": "object",
- },
- ],
- },
- "type": "array",
- },
- "type": "suggestion",
- },
- },
- "no-array-constructor": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow generic \`Array\` constructors",
- "extendsBaseRule": true,
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-array-constructor",
- },
- "fixable": "code",
- "messages": {
- "useLiteral": "The array literal notation [] is preferable.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-array-delete": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow using the \`delete\` operator on array values",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-array-delete",
- },
- "hasSuggestions": true,
- "messages": {
- "noArrayDelete": "Using the \`delete\` operator with an array expression is unsafe.",
- "useSplice": "Use \`array.splice()\` instead.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-base-to-string": {
- "create": [Function],
- "defaultOptions": [
- {
- "ignoredTypeNames": [
- "Error",
- "RegExp",
- "URL",
- "URLSearchParams",
- ],
- },
- ],
- "meta": {
- "docs": {
- "description": "Require \`.toString()\` to only be called on objects which provide useful information when stringified",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-base-to-string",
- },
- "messages": {
- "baseToString": "'{{name}}' {{certainty}} evaluate to '[object Object]' when stringified.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "ignoredTypeNames": {
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-confusing-non-null-assertion": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow non-null assertion in locations that may be confusing",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/no-confusing-non-null-assertion",
- },
- "hasSuggestions": true,
- "messages": {
- "confusingAssign": "Confusing combinations of non-null assertion and equal test like "a! = b", which looks very similar to not equal "a != b".",
- "confusingEqual": "Confusing combinations of non-null assertion and equal test like "a! == b", which looks very similar to not equal "a !== b".",
- "notNeedInAssign": "Unnecessary non-null assertion (!) in assignment left hand.",
- "notNeedInEqualTest": "Unnecessary non-null assertion (!) in equal test.",
- "wrapUpLeft": "Wrap up left hand to avoid putting non-null assertion "!" and "=" together.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-confusing-void-expression": {
- "create": [Function],
- "defaultOptions": [
- {
- "ignoreArrowShorthand": false,
- "ignoreVoidOperator": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Require expressions of type void to appear in statement position",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-confusing-void-expression",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "invalidVoidExpr": "Placing a void expression inside another expression is forbidden. Move it to its own statement instead.",
- "invalidVoidExprArrow": "Returning a void expression from an arrow function shorthand is forbidden. Please add braces to the arrow function.",
- "invalidVoidExprArrowWrapVoid": "Void expressions returned from an arrow function shorthand must be marked explicitly with the \`void\` operator.",
- "invalidVoidExprReturn": "Returning a void expression from a function is forbidden. Please move it before the \`return\` statement.",
- "invalidVoidExprReturnLast": "Returning a void expression from a function is forbidden. Please remove the \`return\` statement.",
- "invalidVoidExprReturnWrapVoid": "Void expressions returned from a function must be marked explicitly with the \`void\` operator.",
- "invalidVoidExprWrapVoid": "Void expressions used inside another expression must be moved to its own statement or marked explicitly with the \`void\` operator.",
- "voidExprWrapVoid": "Mark with an explicit \`void\` operator.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "ignoreArrowShorthand": {
- "type": "boolean",
- },
- "ignoreVoidOperator": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "no-dupe-class-members": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow duplicate class members",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-dupe-class-members",
- },
- "hasSuggestions": undefined,
- "messages": {
- "unexpected": "Duplicate name '{{name}}'.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-duplicate-enum-values": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow duplicate enum member values",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-duplicate-enum-values",
- },
- "hasSuggestions": false,
- "messages": {
- "duplicateValue": "Duplicate enum member value {{value}}.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-duplicate-type-constituents": {
- "create": [Function],
- "defaultOptions": [
- {
- "ignoreIntersections": false,
- "ignoreUnions": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow duplicate constituents of union or intersection types",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-duplicate-type-constituents",
- },
- "fixable": "code",
- "messages": {
- "duplicate": "{{type}} type constituent is duplicated with {{previous}}.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "ignoreIntersections": {
- "type": "boolean",
- },
- "ignoreUnions": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-dynamic-delete": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow using the \`delete\` operator on computed key expressions",
- "recommended": "strict",
- "url": "https://typescript-eslint.io/rules/no-dynamic-delete",
- },
- "fixable": "code",
- "messages": {
- "dynamicDelete": "Do not delete dynamically computed property keys.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-empty-function": {
- "create": [Function],
- "defaultOptions": [
- {
- "allow": [],
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow empty functions",
- "extendsBaseRule": true,
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/no-empty-function",
- },
- "hasSuggestions": undefined,
- "messages": {
- "unexpected": "Unexpected empty {{name}}.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allow": {
- "items": {
- "enum": [
- "functions",
- "arrowFunctions",
- "generatorFunctions",
- "methods",
- "generatorMethods",
- "getters",
- "setters",
- "constructors",
- "private-constructors",
- "protected-constructors",
- "asyncFunctions",
- "asyncMethods",
- "decoratedFunctions",
- "overrideMethods",
- ],
- "type": "string",
- },
- "type": "array",
- "uniqueItems": true,
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-empty-interface": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowSingleExtends": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow the declaration of empty interfaces",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/no-empty-interface",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "noEmpty": "An empty interface is equivalent to \`{}\`.",
- "noEmptyWithSuper": "An interface declaring no members is equivalent to its supertype.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowSingleExtends": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-explicit-any": {
- "create": [Function],
- "defaultOptions": [
- {
- "fixToUnknown": false,
- "ignoreRestArgs": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow the \`any\` type",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-explicit-any",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "suggestNever": "Use \`never\` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.",
- "suggestUnknown": "Use \`unknown\` instead, this will force you to explicitly, and safely assert the type is correct.",
- "unexpectedAny": "Unexpected any. Specify a different type.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "fixToUnknown": {
- "description": "Whether to enable auto-fixing in which the \`any\` type is converted to the \`unknown\` type.",
- "type": "boolean",
- },
- "ignoreRestArgs": {
- "description": "Whether to ignore rest parameter arrays.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-extra-non-null-assertion": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow extra non-null assertions",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-extra-non-null-assertion",
- },
- "fixable": "code",
- "messages": {
- "noExtraNonNullAssertion": "Forbidden extra non-null assertion.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-extra-parens": {
- "create": [Function],
- "defaultOptions": [
- "all",
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Disallow unnecessary parentheses",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-extra-parens",
- },
- "fixable": "code",
- "hasSuggestions": undefined,
- "messages": {
- "unexpected": "Unnecessary parentheses around expression.",
- },
- "replacedBy": [
- "@stylistic/ts/no-extra-parens",
- ],
- "schema": {
- "anyOf": [
- {
- "items": [
- {
- "enum": [
- "functions",
- ],
- },
- ],
- "maxItems": 1,
- "minItems": 0,
- "type": "array",
- },
- {
- "items": [
- {
- "enum": [
- "all",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "allowParensAfterCommentPattern": {
- "type": "string",
- },
- "conditionalAssign": {
- "type": "boolean",
- },
- "enforceForArrowConditionals": {
- "type": "boolean",
- },
- "enforceForFunctionPrototypeMethods": {
- "type": "boolean",
- },
- "enforceForNewInMemberExpressions": {
- "type": "boolean",
- },
- "enforceForSequenceExpressions": {
- "type": "boolean",
- },
- "ignoreJSX": {
- "enum": [
- "none",
- "all",
- "single-line",
- "multi-line",
- ],
- },
- "nestedBinaryExpressions": {
- "type": "boolean",
- },
- "returnAssign": {
- "type": "boolean",
- },
- "ternaryOperandBinaryExpressions": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "maxItems": 2,
- "minItems": 0,
- "type": "array",
- },
- ],
- },
- "type": "layout",
- },
- },
- "no-extra-semi": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Disallow unnecessary semicolons",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-extra-semi",
- },
- "fixable": "code",
- "hasSuggestions": undefined,
- "messages": {
- "unexpected": "Unnecessary semicolon.",
- },
- "replacedBy": [
- "@stylistic/ts/no-extra-semi",
- ],
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-extraneous-class": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowConstructorOnly": false,
- "allowEmpty": false,
- "allowStaticOnly": false,
- "allowWithDecorator": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow classes used as namespaces",
- "recommended": "strict",
- "url": "https://typescript-eslint.io/rules/no-extraneous-class",
- },
- "messages": {
- "empty": "Unexpected empty class.",
- "onlyConstructor": "Unexpected class with only a constructor.",
- "onlyStatic": "Unexpected class with only static properties.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowConstructorOnly": {
- "description": "Whether to allow extraneous classes that contain only a constructor.",
- "type": "boolean",
- },
- "allowEmpty": {
- "description": "Whether to allow extraneous classes that have no body (i.e. are empty).",
- "type": "boolean",
- },
- "allowStaticOnly": {
- "description": "Whether to allow extraneous classes that only contain static members.",
- "type": "boolean",
- },
- "allowWithDecorator": {
- "description": "Whether to allow extraneous classes that include a decorator.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-floating-promises": {
- "create": [Function],
- "defaultOptions": [
- {
- "ignoreIIFE": false,
- "ignoreVoid": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Require Promise-like statements to be handled appropriately",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-floating-promises",
- },
- "hasSuggestions": true,
- "messages": {
- "floating": "Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler.",
- "floatingFixAwait": "Add await operator.",
- "floatingFixVoid": "Add void operator to ignore.",
- "floatingPromiseArray": "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar.",
- "floatingPromiseArrayVoid": "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the \`void\` operator.",
- "floatingUselessRejectionHandler": "Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler. A rejection handler that is not a function will be ignored.",
- "floatingUselessRejectionHandlerVoid": "Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the \`void\` operator. A rejection handler that is not a function will be ignored.",
- "floatingVoid": "Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the \`void\` operator.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "ignoreIIFE": {
- "description": "Whether to ignore async IIFEs (Immediately Invoked Function Expressions).",
- "type": "boolean",
- },
- "ignoreVoid": {
- "description": "Whether to ignore \`void\` expressions.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "no-for-in-array": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow iterating over an array with a for-in loop",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-for-in-array",
- },
- "messages": {
- "forInViolation": "For-in loops over arrays skips holes, returns indices as strings, and may visit the prototype chain or other enumerable properties. Use a more robust iteration method such as for-of or array.forEach instead.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-implied-eval": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow the use of \`eval()\`-like methods",
- "extendsBaseRule": true,
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-implied-eval",
- },
- "messages": {
- "noFunctionConstructor": "Implied eval. Do not use the Function constructor to create functions.",
- "noImpliedEvalError": "Implied eval. Consider passing a function.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-import-type-side-effects": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers",
- "url": "https://typescript-eslint.io/rules/no-import-type-side-effects",
- },
- "fixable": "code",
- "messages": {
- "useTopLevelQualifier": "TypeScript will only remove the inline type specifiers which will leave behind a side effect import at runtime. Convert this to a top-level type qualifier to properly remove the entire import.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-inferrable-types": {
- "create": [Function],
- "defaultOptions": [
- {
- "ignoreParameters": false,
- "ignoreProperties": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/no-inferrable-types",
- },
- "fixable": "code",
- "messages": {
- "noInferrableType": "Type {{type}} trivially inferred from a {{type}} literal, remove type annotation.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "ignoreParameters": {
- "type": "boolean",
- },
- "ignoreProperties": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-invalid-this": {
- "create": [Function],
- "defaultOptions": [
- {
- "capIsConstructor": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow \`this\` keywords outside of classes or class-like objects",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-invalid-this",
- },
- "hasSuggestions": undefined,
- "messages": {
- "unexpectedThis": "Unexpected 'this'.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "capIsConstructor": {
- "default": true,
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-invalid-void-type": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowAsThisParameter": false,
- "allowInGenericTypeArguments": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow \`void\` type outside of generic or return types",
- "recommended": "strict",
- "url": "https://typescript-eslint.io/rules/no-invalid-void-type",
- },
- "messages": {
- "invalidVoidForGeneric": "{{ generic }} may not have void as a type argument.",
- "invalidVoidNotReturn": "void is only valid as a return type.",
- "invalidVoidNotReturnOrGeneric": "void is only valid as a return type or generic type argument.",
- "invalidVoidNotReturnOrThisParam": "void is only valid as return type or type of \`this\` parameter.",
- "invalidVoidNotReturnOrThisParamOrGeneric": "void is only valid as a return type or generic type argument or the type of a \`this\` parameter.",
- "invalidVoidUnionConstituent": "void is not valid as a constituent in a union type",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowAsThisParameter": {
- "type": "boolean",
- },
- "allowInGenericTypeArguments": {
- "oneOf": [
- {
- "type": "boolean",
- },
- {
- "items": {
- "type": "string",
- },
- "minItems": 1,
- "type": "array",
- },
- ],
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "no-loop-func": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow function declarations that contain unsafe references inside loop statements",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-loop-func",
- },
- "hasSuggestions": undefined,
- "messages": {
- "unsafeRefs": "Function declared in a loop contains unsafe references to variable(s) {{ varNames }}.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-loss-of-precision": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow literal numbers that lose precision",
- "extendsBaseRule": true,
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-loss-of-precision",
- },
- "hasSuggestions": undefined,
- "messages": {
- "noLossOfPrecision": "This number literal will lose precision at runtime.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-magic-numbers": {
- "create": [Function],
- "defaultOptions": [
- {
- "detectObjects": false,
- "enforceConst": false,
- "ignore": [],
- "ignoreArrayIndexes": false,
- "ignoreEnums": false,
- "ignoreNumericLiteralTypes": false,
- "ignoreReadonlyClassProperties": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow magic numbers",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-magic-numbers",
- },
- "messages": {
- "noMagic": "No magic number: {{raw}}.",
- "useConst": "Number constants declarations must use 'const'.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "detectObjects": {
- "default": false,
- "type": "boolean",
- },
- "enforceConst": {
- "default": false,
- "type": "boolean",
- },
- "ignore": {
- "items": {
- "anyOf": [
- {
- "type": "number",
- },
- {
- "pattern": "^[+-]?(?:0|[1-9][0-9]*)n$",
- "type": "string",
- },
- ],
- },
- "type": "array",
- "uniqueItems": true,
- },
- "ignoreArrayIndexes": {
- "default": false,
- "type": "boolean",
- },
- "ignoreClassFieldInitialValues": {
- "default": false,
- "type": "boolean",
- },
- "ignoreDefaultValues": {
- "default": false,
- "type": "boolean",
- },
- "ignoreEnums": {
- "type": "boolean",
- },
- "ignoreNumericLiteralTypes": {
- "type": "boolean",
- },
- "ignoreReadonlyClassProperties": {
- "type": "boolean",
- },
- "ignoreTypeIndexes": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-meaningless-void-operator": {
- "create": [Function],
- "defaultOptions": [
- {
- "checkNever": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow the \`void\` operator except when used to discard a value",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-meaningless-void-operator",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "meaninglessVoidOperator": "void operator shouldn't be used on {{type}}; it should convey that a return value is being ignored",
- "removeVoid": "Remove 'void'",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "checkNever": {
- "default": false,
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-misused-new": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce valid definition of \`new\` and \`constructor\`",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-misused-new",
- },
- "messages": {
- "errorMessageClass": "Class cannot have method named \`new\`.",
- "errorMessageInterface": "Interfaces cannot be constructed, only classes.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-misused-promises": {
- "create": [Function],
- "defaultOptions": [
- {
- "checksConditionals": true,
- "checksSpreads": true,
- "checksVoidReturn": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow Promises in places not designed to handle them",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-misused-promises",
- },
- "messages": {
- "conditional": "Expected non-Promise value in a boolean conditional.",
- "spread": "Expected a non-Promise value to be spreaded in an object.",
- "voidReturnArgument": "Promise returned in function argument where a void return was expected.",
- "voidReturnAttribute": "Promise-returning function provided to attribute where a void return was expected.",
- "voidReturnProperty": "Promise-returning function provided to property where a void return was expected.",
- "voidReturnReturnValue": "Promise-returning function provided to return value where a void return was expected.",
- "voidReturnVariable": "Promise-returning function provided to variable where a void return was expected.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "checksConditionals": {
- "type": "boolean",
- },
- "checksSpreads": {
- "type": "boolean",
- },
- "checksVoidReturn": {
- "oneOf": [
- {
- "type": "boolean",
- },
- {
- "additionalProperties": false,
- "properties": {
- "arguments": {
- "type": "boolean",
- },
- "attributes": {
- "type": "boolean",
- },
- "properties": {
- "type": "boolean",
- },
- "returns": {
- "type": "boolean",
- },
- "variables": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "no-mixed-enums": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow enums from having both number and string members",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-mixed-enums",
- },
- "messages": {
- "mixed": "Mixing number and string enums can be confusing.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-namespace": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowDeclarations": false,
- "allowDefinitionFiles": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow TypeScript namespaces",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-namespace",
- },
- "messages": {
- "moduleSyntaxIsPreferred": "ES2015 module syntax is preferred over namespaces.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowDeclarations": {
- "description": "Whether to allow \`declare\` with custom TypeScript namespaces.",
- "type": "boolean",
- },
- "allowDefinitionFiles": {
- "description": "Whether to allow \`declare\` with custom TypeScript namespaces inside definition files.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-non-null-asserted-nullish-coalescing": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow non-null assertions in the left operand of a nullish coalescing operator",
- "recommended": "strict",
- "url": "https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing",
- },
- "hasSuggestions": true,
- "messages": {
- "noNonNullAssertedNullishCoalescing": "The nullish coalescing operator is designed to handle undefined and null - using a non-null assertion is not needed.",
- "suggestRemovingNonNull": "Remove the non-null assertion.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-non-null-asserted-optional-chain": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow non-null assertions after an optional chain expression",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain",
- },
- "hasSuggestions": true,
- "messages": {
- "noNonNullOptionalChain": "Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong.",
- "suggestRemovingNonNull": "You should remove the non-null assertion.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-non-null-assertion": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow non-null assertions using the \`!\` postfix operator",
- "recommended": "strict",
- "url": "https://typescript-eslint.io/rules/no-non-null-assertion",
- },
- "hasSuggestions": true,
- "messages": {
- "noNonNull": "Forbidden non-null assertion.",
- "suggestOptionalChain": "Consider using the optional chain operator \`?.\` instead. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-redeclare": {
- "create": [Function],
- "defaultOptions": [
- {
- "builtinGlobals": true,
- "ignoreDeclarationMerge": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow variable redeclaration",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-redeclare",
- },
- "messages": {
- "redeclared": "'{{id}}' is already defined.",
- "redeclaredAsBuiltin": "'{{id}}' is already defined as a built-in global variable.",
- "redeclaredBySyntax": "'{{id}}' is already defined by a variable declaration.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "builtinGlobals": {
- "type": "boolean",
- },
- "ignoreDeclarationMerge": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-redundant-type-constituents": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow members of unions and intersections that do nothing or override type information",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-redundant-type-constituents",
- },
- "messages": {
- "literalOverridden": "{{literal}} is overridden by {{primitive}} in this union type.",
- "overridden": "'{{typeName}}' is overridden by other types in this {{container}} type.",
- "overrides": "'{{typeName}}' overrides all other types in this {{container}} type.",
- "primitiveOverridden": "{{primitive}} is overridden by the {{literal}} in this intersection type.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-require-imports": {
- "create": [Function],
- "defaultOptions": [
- {
- "allow": [],
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow invocation of \`require()\`",
- "url": "https://typescript-eslint.io/rules/no-require-imports",
- },
- "messages": {
- "noRequireImports": "A \`require()\` style import is forbidden.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allow": {
- "description": "Patterns of import paths to allow requiring from.",
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "no-restricted-imports": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow specified modules when loaded by \`import\`",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-restricted-imports",
- },
- "fixable": undefined,
- "messages": {
- "everything": "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",
- "everythingWithCustomMessage": "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}",
- "importName": "'{{importName}}' import from '{{importSource}}' is restricted.",
- "importNameWithCustomMessage": "'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}",
- "path": "'{{importSource}}' import is restricted from being used.",
- "pathWithCustomMessage": "'{{importSource}}' import is restricted from being used. {{customMessage}}",
- "patternAndEverything": "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.",
- "patternAndEverythingWithCustomMessage": "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",
- "patternAndEverythingWithRegexImportName": "* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.",
- "patternAndEverythingWithRegexImportNameAndCustomMessage": "* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}",
- "patternAndImportName": "'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.",
- "patternAndImportNameWithCustomMessage": "'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",
- "patternWithCustomMessage": "'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}",
- "patterns": "'{{importSource}}' import is restricted from being used by a pattern.",
- },
- "schema": {
- "anyOf": [
- {
- "items": {
- "anyOf": [
- {
- "type": "string",
- },
- {
- "additionalProperties": false,
- "properties": {
- "allowTypeImports": {
- "description": "Disallow value imports, but allow type-only imports.",
- "type": "boolean",
- },
- "importNames": {
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- "message": {
- "minLength": 1,
- "type": "string",
- },
- "name": {
- "type": "string",
- },
- },
- "required": [
- "name",
- ],
- "type": "object",
- },
- ],
- },
- "type": "array",
- "uniqueItems": true,
- },
- {
- "additionalItems": false,
- "items": [
- {
- "additionalProperties": false,
- "properties": {
- "paths": {
- "items": {
- "anyOf": [
- {
- "type": "string",
- },
- {
- "additionalProperties": false,
- "properties": {
- "allowTypeImports": {
- "description": "Disallow value imports, but allow type-only imports.",
- "type": "boolean",
- },
- "importNames": {
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- "message": {
- "minLength": 1,
- "type": "string",
- },
- "name": {
- "type": "string",
- },
- },
- "required": [
- "name",
- ],
- "type": "object",
- },
- ],
- },
- "type": "array",
- "uniqueItems": true,
- },
- "patterns": {
- "anyOf": [
- {
- "items": {
- "type": "string",
- },
- "type": "array",
- "uniqueItems": true,
- },
- {
- "items": {
- "additionalProperties": false,
- "properties": {
- "allowTypeImports": {
- "description": "Disallow value imports, but allow type-only imports.",
- "type": "boolean",
- },
- "caseSensitive": {
- "type": "boolean",
- },
- "group": {
- "items": {
- "type": "string",
- },
- "minItems": 1,
- "type": "array",
- "uniqueItems": true,
- },
- "importNamePattern": {
- "type": "string",
- },
- "importNames": {
- "items": {
- "type": "string",
- },
- "minItems": 1,
- "type": "array",
- "uniqueItems": true,
- },
- "message": {
- "minLength": 1,
- "type": "string",
- },
- },
- "required": [
- "group",
- ],
- "type": "object",
- },
- "type": "array",
- "uniqueItems": true,
- },
- ],
- },
- },
- "type": "object",
- },
- ],
- "type": "array",
- },
- ],
- },
- "type": "suggestion",
- },
- },
- "no-shadow": {
- "create": [Function],
- "defaultOptions": [
- {
- "allow": [],
- "builtinGlobals": false,
- "hoist": "functions",
- "ignoreFunctionTypeParameterNameValueShadow": true,
- "ignoreOnInitialization": false,
- "ignoreTypeValueShadow": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow variable declarations from shadowing variables declared in the outer scope",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-shadow",
- },
- "messages": {
- "noShadow": "'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",
- "noShadowGlobal": "'{{name}}' is already a global variable.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allow": {
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- "builtinGlobals": {
- "type": "boolean",
- },
- "hoist": {
- "enum": [
- "all",
- "functions",
- "never",
- ],
- "type": "string",
- },
- "ignoreFunctionTypeParameterNameValueShadow": {
- "type": "boolean",
- },
- "ignoreOnInitialization": {
- "type": "boolean",
- },
- "ignoreTypeValueShadow": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-this-alias": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowDestructuring": true,
- "allowedNames": [],
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow aliasing \`this\`",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-this-alias",
- },
- "messages": {
- "thisAssignment": "Unexpected aliasing of 'this' to local variable.",
- "thisDestructure": "Unexpected aliasing of members of 'this' to local variables.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowDestructuring": {
- "description": "Whether to ignore destructurings, such as \`const { props, state } = this\`.",
- "type": "boolean",
- },
- "allowedNames": {
- "description": "Names to ignore, such as ["self"] for \`const self = this;\`.",
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-throw-literal": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowThrowingAny": true,
- "allowThrowingUnknown": true,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Disallow throwing literals as exceptions",
- "extendsBaseRule": true,
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-throw-literal",
- },
- "messages": {
- "object": "Expected an error object to be thrown.",
- "undef": "Do not throw undefined.",
- },
- "replacedBy": [
- "@typescript-eslint/only-throw-error",
- ],
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowThrowingAny": {
- "type": "boolean",
- },
- "allowThrowingUnknown": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "no-type-alias": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowAliases": "never",
- "allowCallbacks": "never",
- "allowConditionalTypes": "never",
- "allowConstructors": "never",
- "allowGenerics": "never",
- "allowLiterals": "never",
- "allowMappedTypes": "never",
- "allowTupleTypes": "never",
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Disallow type aliases",
- "url": "https://typescript-eslint.io/rules/no-type-alias",
- },
- "messages": {
- "noCompositionAlias": "{{typeName}} in {{compositionType}} types are not allowed.",
- "noTypeAlias": "Type {{alias}} are not allowed.",
- },
- "schema": [
- {
- "$defs": {
- "expandedOptions": {
- "enum": [
- "always",
- "never",
- "in-unions",
- "in-intersections",
- "in-unions-and-intersections",
- ],
- "type": "string",
- },
- "simpleOptions": {
- "enum": [
- "always",
- "never",
- ],
- "type": "string",
- },
- },
- "additionalProperties": false,
- "properties": {
- "allowAliases": {
- "$ref": "#/items/0/$defs/expandedOptions",
- "description": "Whether to allow direct one-to-one type aliases.",
- },
- "allowCallbacks": {
- "$ref": "#/items/0/$defs/simpleOptions",
- "description": "Whether to allow type aliases for callbacks.",
- },
- "allowConditionalTypes": {
- "$ref": "#/items/0/$defs/simpleOptions",
- "description": "Whether to allow type aliases for conditional types.",
- },
- "allowConstructors": {
- "$ref": "#/items/0/$defs/simpleOptions",
- "description": "Whether to allow type aliases with constructors.",
- },
- "allowGenerics": {
- "$ref": "#/items/0/$defs/simpleOptions",
- "description": "Whether to allow type aliases with generic types.",
- },
- "allowLiterals": {
- "$ref": "#/items/0/$defs/expandedOptions",
- "description": "Whether to allow type aliases with object literal types.",
- },
- "allowMappedTypes": {
- "$ref": "#/items/0/$defs/expandedOptions",
- "description": "Whether to allow type aliases with mapped types.",
- },
- "allowTupleTypes": {
- "$ref": "#/items/0/$defs/expandedOptions",
- "description": "Whether to allow type aliases with tuple types.",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-unnecessary-boolean-literal-compare": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowComparingNullableBooleansToFalse": true,
- "allowComparingNullableBooleansToTrue": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow unnecessary equality comparisons against boolean literals",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare",
- },
- "fixable": "code",
- "messages": {
- "comparingNullableToFalse": "This expression unnecessarily compares a nullable boolean value to false instead of using the ?? operator to provide a default.",
- "comparingNullableToTrueDirect": "This expression unnecessarily compares a nullable boolean value to true instead of using it directly.",
- "comparingNullableToTrueNegated": "This expression unnecessarily compares a nullable boolean value to true instead of negating it.",
- "direct": "This expression unnecessarily compares a boolean value to a boolean instead of using it directly.",
- "negated": "This expression unnecessarily compares a boolean value to a boolean instead of negating it.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowComparingNullableBooleansToFalse": {
- "description": "Whether to allow comparisons between nullable boolean variables and \`false\`.",
- "type": "boolean",
- },
- "allowComparingNullableBooleansToTrue": {
- "description": "Whether to allow comparisons between nullable boolean variables and \`true\`.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-unnecessary-condition": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowConstantLoopConditions": false,
- "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow conditionals where the type is always truthy or always falsy",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-unnecessary-condition",
- },
- "fixable": "code",
- "messages": {
- "alwaysFalsy": "Unnecessary conditional, value is always falsy.",
- "alwaysFalsyFunc": "This callback should return a conditional, but return is always falsy.",
- "alwaysNullish": "Unnecessary conditional, left-hand side of \`??\` operator is always \`null\` or \`undefined\`.",
- "alwaysTruthy": "Unnecessary conditional, value is always truthy.",
- "alwaysTruthyFunc": "This callback should return a conditional, but return is always truthy.",
- "literalBooleanExpression": "Unnecessary conditional, both sides of the expression are literal values.",
- "never": "Unnecessary conditional, value is \`never\`.",
- "neverNullish": "Unnecessary conditional, expected left-hand side of \`??\` operator to be possibly null or undefined.",
- "neverOptionalChain": "Unnecessary optional chain on a non-nullish value.",
- "noOverlapBooleanExpression": "Unnecessary conditional, the types have no overlap.",
- "noStrictNullCheck": "This rule requires the \`strictNullChecks\` compiler option to be turned on to function correctly.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowConstantLoopConditions": {
- "description": "Whether to ignore constant loop conditions, such as \`while (true)\`.",
- "type": "boolean",
- },
- "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": {
- "description": "Whether to not error when running with a tsconfig that has strictNullChecks turned.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-unnecessary-qualifier": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow unnecessary namespace qualifiers",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-unnecessary-qualifier",
- },
- "fixable": "code",
- "messages": {
- "unnecessaryQualifier": "Qualifier is unnecessary since '{{ name }}' is in scope.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-unnecessary-type-arguments": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow type arguments that are equal to the default",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-unnecessary-type-arguments",
- },
- "fixable": "code",
- "messages": {
- "unnecessaryTypeParameter": "This is the default value for this type parameter, so it can be omitted.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-unnecessary-type-assertion": {
- "create": [Function],
- "defaultOptions": [
- {},
- ],
- "meta": {
- "docs": {
- "description": "Disallow type assertions that do not change the type of an expression",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-unnecessary-type-assertion",
- },
- "fixable": "code",
- "messages": {
- "contextuallyUnnecessary": "This assertion is unnecessary since the receiver accepts the original type of the expression.",
- "unnecessaryAssertion": "This assertion is unnecessary since it does not change the type of the expression.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "typesToIgnore": {
- "description": "A list of type names to ignore.",
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-unnecessary-type-constraint": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow unnecessary constraints on generic types",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-unnecessary-type-constraint",
- },
- "hasSuggestions": true,
- "messages": {
- "removeUnnecessaryConstraint": "Remove the unnecessary \`{{constraint}}\` constraint.",
- "unnecessaryConstraint": "Constraining the generic type \`{{name}}\` to \`{{constraint}}\` does nothing and is unnecessary.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-unsafe-argument": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow calling a function with a value with type \`any\`",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-unsafe-argument",
- },
- "messages": {
- "unsafeArgument": "Unsafe argument of type \`{{sender}}\` assigned to a parameter of type \`{{receiver}}\`.",
- "unsafeArraySpread": "Unsafe spread of an \`any\` array type.",
- "unsafeSpread": "Unsafe spread of an \`any\` type.",
- "unsafeTupleSpread": "Unsafe spread of a tuple type. The argument is of type \`{{sender}}\` and is assigned to a parameter of type \`{{receiver}}\`.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-unsafe-assignment": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow assigning a value with type \`any\` to variables and properties",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-unsafe-assignment",
- },
- "messages": {
- "anyAssignment": "Unsafe assignment of an \`any\` value.",
- "anyAssignmentThis": "Unsafe assignment of an \`any\` value. \`this\` is typed as \`any\`.
-You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
- "unsafeArrayPattern": "Unsafe array destructuring of an \`any\` array value.",
- "unsafeArrayPatternFromTuple": "Unsafe array destructuring of a tuple element with an \`any\` value.",
- "unsafeArraySpread": "Unsafe spread of an \`any\` value in an array.",
- "unsafeAssignment": "Unsafe assignment of type {{sender}} to a variable of type {{receiver}}.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-unsafe-call": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow calling a value with type \`any\`",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-unsafe-call",
- },
- "messages": {
- "unsafeCall": "Unsafe call of an \`any\` typed value.",
- "unsafeCallThis": "Unsafe call of an \`any\` typed value. \`this\` is typed as \`any\`.
-You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
- "unsafeNew": "Unsafe construction of an any type value.",
- "unsafeTemplateTag": "Unsafe any typed template tag.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-unsafe-declaration-merging": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow unsafe declaration merging",
- "recommended": "recommended",
- "requiresTypeChecking": false,
- "url": "https://typescript-eslint.io/rules/no-unsafe-declaration-merging",
- },
- "messages": {
- "unsafeMerging": "Unsafe declaration merging between classes and interfaces.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-unsafe-enum-comparison": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow comparing an enum value with a non-enum value",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-unsafe-enum-comparison",
- },
- "hasSuggestions": true,
- "messages": {
- "mismatchedCase": "The case statement does not have a shared enum type with the switch predicate.",
- "mismatchedCondition": "The two values in this comparison do not have a shared enum type.",
- "replaceValueWithEnum": "Replace with an enum value comparison.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-unsafe-member-access": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow member access on a value with type \`any\`",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-unsafe-member-access",
- },
- "messages": {
- "unsafeComputedMemberAccess": "Computed name {{property}} resolves to an any value.",
- "unsafeMemberExpression": "Unsafe member access {{property}} on an \`any\` value.",
- "unsafeThisMemberExpression": "Unsafe member access {{property}} on an \`any\` value. \`this\` is typed as \`any\`.
-You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-unsafe-return": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow returning a value with type \`any\` from a function",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-unsafe-return",
- },
- "messages": {
- "unsafeReturn": "Unsafe return of an \`{{type}}\` typed value.",
- "unsafeReturnAssignment": "Unsafe return of type \`{{sender}}\` from function with return type \`{{receiver}}\`.",
- "unsafeReturnThis": "Unsafe return of an \`{{type}}\` typed value. \`this\` is typed as \`any\`.
-You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-unsafe-unary-minus": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Require unary negation to take a number",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-unsafe-unary-minus",
- },
- "messages": {
- "unaryMinus": "Argument of unary negation should be assignable to number | bigint but is {{type}} instead.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-unused-expressions": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowShortCircuit": false,
- "allowTaggedTemplates": false,
- "allowTernary": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow unused expressions",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-unused-expressions",
- },
- "hasSuggestions": undefined,
- "messages": {
- "unusedExpression": "Expected an assignment or function call and instead saw an expression.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowShortCircuit": {
- "default": false,
- "type": "boolean",
- },
- "allowTaggedTemplates": {
- "default": false,
- "type": "boolean",
- },
- "allowTernary": {
- "default": false,
- "type": "boolean",
- },
- "enforceForJSX": {
- "default": false,
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-unused-vars": {
- "create": [Function],
- "defaultOptions": [
- {},
- ],
- "meta": {
- "docs": {
- "description": "Disallow unused variables",
- "extendsBaseRule": true,
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-unused-vars",
- },
- "messages": {
- "unusedVar": "'{{varName}}' is {{action}} but never used{{additional}}.",
- },
- "schema": [
- {
- "oneOf": [
- {
- "enum": [
- "all",
- "local",
- ],
- "type": "string",
- },
- {
- "additionalProperties": false,
- "properties": {
- "args": {
- "enum": [
- "all",
- "after-used",
- "none",
- ],
- "type": "string",
- },
- "argsIgnorePattern": {
- "type": "string",
- },
- "caughtErrors": {
- "enum": [
- "all",
- "none",
- ],
- "type": "string",
- },
- "caughtErrorsIgnorePattern": {
- "type": "string",
- },
- "destructuredArrayIgnorePattern": {
- "type": "string",
- },
- "ignoreRestSiblings": {
- "type": "boolean",
- },
- "vars": {
- "enum": [
- "all",
- "local",
- ],
- "type": "string",
- },
- "varsIgnorePattern": {
- "type": "string",
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "problem",
- },
- },
- "no-use-before-define": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowNamedExports": false,
- "classes": true,
- "enums": true,
- "functions": true,
- "ignoreTypeReferences": true,
- "typedefs": true,
- "variables": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow the use of variables before they are defined",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-use-before-define",
- },
- "messages": {
- "noUseBeforeDefine": "'{{name}}' was used before it was defined.",
- },
- "schema": [
- {
- "oneOf": [
- {
- "enum": [
- "nofunc",
- ],
- "type": "string",
- },
- {
- "additionalProperties": false,
- "properties": {
- "allowNamedExports": {
- "type": "boolean",
- },
- "classes": {
- "type": "boolean",
- },
- "enums": {
- "type": "boolean",
- },
- "functions": {
- "type": "boolean",
- },
- "ignoreTypeReferences": {
- "type": "boolean",
- },
- "typedefs": {
- "type": "boolean",
- },
- "variables": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "problem",
- },
- },
- "no-useless-constructor": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow unnecessary constructors",
- "extendsBaseRule": true,
- "recommended": "strict",
- "url": "https://typescript-eslint.io/rules/no-useless-constructor",
- },
- "hasSuggestions": undefined,
- "messages": {
- "noUselessConstructor": "Useless constructor.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-useless-empty-export": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow empty exports that don't change anything in a module file",
- "url": "https://typescript-eslint.io/rules/no-useless-empty-export",
- },
- "fixable": "code",
- "hasSuggestions": false,
- "messages": {
- "uselessExport": "Empty export does nothing and can be removed.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-useless-template-literals": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow unnecessary template literals",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-useless-template-literals",
- },
- "fixable": "code",
- "messages": {
- "noUselessTemplateLiteral": "Template literal expression is unnecessary and can be simplified.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "no-var-requires": {
- "create": [Function],
- "defaultOptions": [
- {
- "allow": [],
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow \`require\` statements except in import statements",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-var-requires",
- },
- "messages": {
- "noVarReqs": "Require statement not part of import statement.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allow": {
- "description": "Patterns of import paths to allow requiring from.",
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "non-nullable-type-assertion-style": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce non-null assertions over explicit type casts",
- "recommended": "stylistic",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/non-nullable-type-assertion-style",
- },
- "fixable": "code",
- "messages": {
- "preferNonNullAssertion": "Use a ! assertion to more succinctly remove null and undefined from the type.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "object-curly-spacing": {
- "create": [Function],
- "defaultOptions": [
- "never",
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce consistent spacing inside braces",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/object-curly-spacing",
- },
- "fixable": "whitespace",
- "messages": {
- "requireSpaceAfter": "A space is required after '{{token}}'.",
- "requireSpaceBefore": "A space is required before '{{token}}'.",
- "unexpectedSpaceAfter": "There should be no space after '{{token}}'.",
- "unexpectedSpaceBefore": "There should be no space before '{{token}}'.",
- },
- "replacedBy": [
- "@stylistic/ts/object-curly-spacing",
- ],
- "schema": [
- {
- "enum": [
- "always",
- "never",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "arraysInObjects": {
- "type": "boolean",
- },
- "objectsInObjects": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
- "only-throw-error": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowThrowingAny": true,
- "allowThrowingUnknown": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow throwing non-\`Error\` values as exceptions",
- "extendsBaseRule": "no-throw-literal",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/only-throw-error",
- },
- "messages": {
- "object": "Expected an error object to be thrown.",
- "undef": "Do not throw undefined.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowThrowingAny": {
- "type": "boolean",
- },
- "allowThrowingUnknown": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "padding-line-between-statements": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require or disallow padding lines between statements",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/padding-line-between-statements",
- },
- "fixable": "whitespace",
- "hasSuggestions": false,
- "messages": {
- "expectedBlankLine": "Expected blank line before this statement.",
- "unexpectedBlankLine": "Unexpected blank line before this statement.",
- },
- "replacedBy": [
- "@stylistic/ts/padding-line-between-statements",
- ],
- "schema": {
- "$defs": {
- "paddingType": {
- "enum": [
- "any",
- "never",
- "always",
- ],
- "type": "string",
- },
- "statementType": {
- "anyOf": [
- {
- "enum": [
- "*",
- "block-like",
- "exports",
- "require",
- "directive",
- "expression",
- "iife",
- "multiline-block-like",
- "multiline-expression",
- "multiline-const",
- "multiline-let",
- "multiline-var",
- "singleline-const",
- "singleline-let",
- "singleline-var",
- "block",
- "empty",
- "function",
- "break",
- "case",
- "class",
- "const",
- "continue",
- "debugger",
- "default",
- "do",
- "export",
- "for",
- "if",
- "import",
- "let",
- "return",
- "switch",
- "throw",
- "try",
- "var",
- "while",
- "with",
- "interface",
- "type",
- ],
- "type": "string",
- },
- {
- "additionalItems": false,
- "items": {
- "enum": [
- "*",
- "block-like",
- "exports",
- "require",
- "directive",
- "expression",
- "iife",
- "multiline-block-like",
- "multiline-expression",
- "multiline-const",
- "multiline-let",
- "multiline-var",
- "singleline-const",
- "singleline-let",
- "singleline-var",
- "block",
- "empty",
- "function",
- "break",
- "case",
- "class",
- "const",
- "continue",
- "debugger",
- "default",
- "do",
- "export",
- "for",
- "if",
- "import",
- "let",
- "return",
- "switch",
- "throw",
- "try",
- "var",
- "while",
- "with",
- "interface",
- "type",
- ],
- "type": "string",
- },
- "minItems": 1,
- "type": "array",
- "uniqueItems": true,
- },
- ],
- },
- },
- "additionalItems": false,
- "items": {
- "additionalProperties": false,
- "properties": {
- "blankLine": {
- "$ref": "#/$defs/paddingType",
- },
- "next": {
- "$ref": "#/$defs/statementType",
- },
- "prev": {
- "$ref": "#/$defs/statementType",
- },
- },
- "required": [
- "blankLine",
- "prev",
- "next",
- ],
- "type": "object",
- },
- "type": "array",
- },
- "type": "layout",
- },
- },
- "parameter-properties": {
- "create": [Function],
- "defaultOptions": [
- {
- "allow": [],
- "prefer": "class-property",
- },
- ],
- "meta": {
- "docs": {
- "description": "Require or disallow parameter properties in class constructors",
- "url": "https://typescript-eslint.io/rules/parameter-properties",
- },
- "messages": {
- "preferClassProperty": "Property {{parameter}} should be declared as a class property.",
- "preferParameterProperty": "Property {{parameter}} should be declared as a parameter property.",
- },
- "schema": [
- {
- "$defs": {
- "modifier": {
- "enum": [
- "readonly",
- "private",
- "protected",
- "public",
- "private readonly",
- "protected readonly",
- "public readonly",
- ],
- "type": "string",
- },
- },
- "additionalProperties": false,
- "properties": {
- "allow": {
- "items": {
- "$ref": "#/items/0/$defs/modifier",
- },
- "type": "array",
- },
- "prefer": {
- "enum": [
- "class-property",
- "parameter-property",
- ],
- "type": "string",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "prefer-as-const": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce the use of \`as const\` over literal type",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/prefer-as-const",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "preferConstAssertion": "Expected a \`const\` instead of a literal type assertion.",
- "variableConstAssertion": "Expected a \`const\` assertion instead of a literal type annotation.",
- "variableSuggest": "You should use \`as const\` instead of type annotation.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "prefer-destructuring": {
- "create": [Function],
- "defaultOptions": [
- {
- "AssignmentExpression": {
- "array": true,
- "object": true,
- },
- "VariableDeclarator": {
- "array": true,
- "object": true,
- },
- },
- {},
- ],
- "meta": {
- "docs": {
- "description": "Require destructuring from arrays and/or objects",
- "extendsBaseRule": true,
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/prefer-destructuring",
- },
- "fixable": "code",
- "hasSuggestions": undefined,
- "messages": {
- "preferDestructuring": "Use {{type}} destructuring.",
- },
- "schema": [
- {
- "oneOf": [
- {
- "additionalProperties": false,
- "properties": {
- "AssignmentExpression": {
- "additionalProperties": false,
- "properties": {
- "array": {
- "type": "boolean",
- },
- "object": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "VariableDeclarator": {
- "additionalProperties": false,
- "properties": {
- "array": {
- "type": "boolean",
- },
- "object": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- },
- "type": "object",
- },
- {
- "additionalProperties": false,
- "properties": {
- "array": {
- "type": "boolean",
- },
- "object": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- },
- {
- "properties": {
- "enforceForDeclarationWithTypeAnnotation": {
- "type": "boolean",
- },
- "enforceForRenamedProperties": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "prefer-enum-initializers": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Require each enum member value to be explicitly initialized",
- "url": "https://typescript-eslint.io/rules/prefer-enum-initializers",
- },
- "hasSuggestions": true,
- "messages": {
- "defineInitializer": "The value of the member '{{ name }}' should be explicitly defined.",
- "defineInitializerSuggestion": "Can be fixed to {{ name }} = {{ suggested }}",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "prefer-find": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/prefer-find",
- },
- "hasSuggestions": true,
- "messages": {
- "preferFind": "Prefer .find(...) instead of .filter(...)[0].",
- "preferFindSuggestion": "Use .find(...) instead of .filter(...)[0].",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "prefer-for-of": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce the use of \`for-of\` loop over the standard \`for\` loop where possible",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/prefer-for-of",
- },
- "messages": {
- "preferForOf": "Expected a \`for-of\` loop instead of a \`for\` loop with this simple iteration.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "prefer-function-type": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce using function types instead of interfaces with call signatures",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/prefer-function-type",
- },
- "fixable": "code",
- "messages": {
- "functionTypeOverCallableType": "{{ literalOrInterface }} only has a call signature, you should use a function type instead.",
- "unexpectedThisOnFunctionOnlyInterface": "\`this\` refers to the function type '{{ interfaceName }}', did you intend to use a generic \`this\` parameter like \`(this: Self, ...) => Self\` instead?",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "prefer-includes": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce \`includes\` method over \`indexOf\` method",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/prefer-includes",
- },
- "fixable": "code",
- "messages": {
- "preferIncludes": "Use 'includes()' method instead.",
- "preferStringIncludes": "Use \`String#includes()\` method with a string instead.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "prefer-literal-enum-member": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowBitwiseExpressions": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Require all enum members to be literal values",
- "recommended": "strict",
- "requiresTypeChecking": false,
- "url": "https://typescript-eslint.io/rules/prefer-literal-enum-member",
- },
- "messages": {
- "notLiteral": "Explicit enum value must only be a literal value (string, number, boolean, etc).",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowBitwiseExpressions": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "prefer-namespace-keyword": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Require using \`namespace\` keyword over \`module\` keyword to declare custom TypeScript modules",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/prefer-namespace-keyword",
- },
- "fixable": "code",
- "messages": {
- "useNamespace": "Use 'namespace' instead of 'module' to declare custom TypeScript modules.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "prefer-nullish-coalescing": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false,
- "ignoreConditionalTests": false,
- "ignoreMixedLogicalExpressions": false,
- "ignorePrimitives": {
- "bigint": false,
- "boolean": false,
- "number": false,
- "string": false,
- },
- "ignoreTernaryTests": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Enforce using the nullish coalescing operator instead of logical assignments or chaining",
- "recommended": "stylistic",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/prefer-nullish-coalescing",
- },
- "hasSuggestions": true,
- "messages": {
- "noStrictNullCheck": "This rule requires the \`strictNullChecks\` compiler option to be turned on to function correctly.",
- "preferNullishOverOr": "Prefer using nullish coalescing operator (\`??\`) instead of a logical or (\`||\`), as it is a safer operator.",
- "preferNullishOverTernary": "Prefer using nullish coalescing operator (\`??\`) instead of a ternary expression, as it is simpler to read.",
- "suggestNullish": "Fix to nullish coalescing operator (\`??\`).",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": {
- "type": "boolean",
- },
- "ignoreConditionalTests": {
- "type": "boolean",
- },
- "ignoreMixedLogicalExpressions": {
- "type": "boolean",
- },
- "ignorePrimitives": {
- "oneOf": [
- {
- "properties": {
- "bigint": {
- "type": "boolean",
- },
- "boolean": {
- "type": "boolean",
- },
- "number": {
- "type": "boolean",
- },
- "string": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- {
- "enum": [
- true,
- ],
- "type": "boolean",
- },
- ],
- },
- "ignoreTernaryTests": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "prefer-optional-chain": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing": false,
- "checkAny": true,
- "checkBigInt": true,
- "checkBoolean": true,
- "checkNumber": true,
- "checkString": true,
- "checkUnknown": true,
- "requireNullish": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects",
- "recommended": "stylistic",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/prefer-optional-chain",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "optionalChainSuggest": "Change to an optional chain.",
- "preferOptionalChain": "Prefer using an optional chain expression instead, as it's more concise and easier to read.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing": {
- "description": "Allow autofixers that will change the return type of the expression. This option is considered unsafe as it may break the build.",
- "type": "boolean",
- },
- "checkAny": {
- "description": "Check operands that are typed as \`any\` when inspecting "loose boolean" operands.",
- "type": "boolean",
- },
- "checkBigInt": {
- "description": "Check operands that are typed as \`bigint\` when inspecting "loose boolean" operands.",
- "type": "boolean",
- },
- "checkBoolean": {
- "description": "Check operands that are typed as \`boolean\` when inspecting "loose boolean" operands.",
- "type": "boolean",
- },
- "checkNumber": {
- "description": "Check operands that are typed as \`number\` when inspecting "loose boolean" operands.",
- "type": "boolean",
- },
- "checkString": {
- "description": "Check operands that are typed as \`string\` when inspecting "loose boolean" operands.",
- "type": "boolean",
- },
- "checkUnknown": {
- "description": "Check operands that are typed as \`unknown\` when inspecting "loose boolean" operands.",
- "type": "boolean",
- },
- "requireNullish": {
- "description": "Skip operands that are not typed with \`null\` and/or \`undefined\` when inspecting "loose boolean" operands.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "prefer-promise-reject-errors": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowEmptyReject": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Require using Error objects as Promise rejection reasons",
- "extendsBaseRule": true,
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/prefer-promise-reject-errors",
- },
- "messages": {
- "rejectAnError": "Expected the Promise rejection reason to be an Error.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowEmptyReject": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "prefer-readonly": {
- "create": [Function],
- "defaultOptions": [
- {
- "onlyInlineLambdas": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Require private members to be marked as \`readonly\` if they're never modified outside of the constructor",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/prefer-readonly",
- },
- "fixable": "code",
- "messages": {
- "preferReadonly": "Member '{{name}}' is never reassigned; mark it as \`readonly\`.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "onlyInlineLambdas": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "prefer-readonly-parameter-types": {
- "create": [Function],
- "defaultOptions": [
- {
- "allow": [],
- "checkParameterProperties": true,
- "ignoreInferredTypes": false,
- "treatMethodsAsReadonly": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Require function parameters to be typed as \`readonly\` to prevent accidental mutation of inputs",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/prefer-readonly-parameter-types",
- },
- "messages": {
- "shouldBeReadonly": "Parameter should be a read only type.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allow": {
- "items": {
- "oneOf": [
- {
- "type": "string",
- },
- {
- "additionalProperties": false,
- "properties": {
- "from": {
- "enum": [
- "file",
- ],
- "type": "string",
- },
- "name": {
- "oneOf": [
- {
- "type": "string",
- },
- {
- "items": {
- "type": "string",
- },
- "minItems": 1,
- "type": "array",
- "uniqueItems": true,
- },
- ],
- },
- "path": {
- "type": "string",
- },
- },
- "required": [
- "from",
- "name",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "properties": {
- "from": {
- "enum": [
- "lib",
- ],
- "type": "string",
- },
- "name": {
- "oneOf": [
- {
- "type": "string",
- },
- {
- "items": {
- "type": "string",
- },
- "minItems": 1,
- "type": "array",
- "uniqueItems": true,
- },
- ],
- },
- },
- "required": [
- "from",
- "name",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "properties": {
- "from": {
- "enum": [
- "package",
- ],
- "type": "string",
- },
- "name": {
- "oneOf": [
- {
- "type": "string",
- },
- {
- "items": {
- "type": "string",
- },
- "minItems": 1,
- "type": "array",
- "uniqueItems": true,
- },
- ],
- },
- "package": {
- "type": "string",
- },
- },
- "required": [
- "from",
- "name",
- "package",
- ],
- "type": "object",
- },
- ],
- },
- "type": "array",
- },
- "checkParameterProperties": {
- "type": "boolean",
- },
- "ignoreInferredTypes": {
- "type": "boolean",
- },
- "treatMethodsAsReadonly": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "prefer-reduce-type-parameter": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce using type parameter when calling \`Array#reduce\` instead of casting",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/prefer-reduce-type-parameter",
- },
- "fixable": "code",
- "messages": {
- "preferTypeParameter": "Unnecessary cast: Array#reduce accepts a type parameter for the default value.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "prefer-regexp-exec": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce \`RegExp#exec\` over \`String#match\` if no global flag is provided",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/prefer-regexp-exec",
- },
- "fixable": "code",
- "messages": {
- "regExpExecOverStringMatch": "Use the \`RegExp#exec()\` method instead.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "prefer-return-this-type": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce that \`this\` is used when only \`this\` type is returned",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/prefer-return-this-type",
- },
- "fixable": "code",
- "messages": {
- "useThisType": "Use \`this\` type instead.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "prefer-string-starts-ends-with": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowSingleElementEquality": "never",
- },
- ],
- "meta": {
- "docs": {
- "description": "Enforce using \`String#startsWith\` and \`String#endsWith\` over other equivalent methods of checking substrings",
- "recommended": "stylistic",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/prefer-string-starts-ends-with",
- },
- "fixable": "code",
- "messages": {
- "preferEndsWith": "Use the 'String#endsWith' method instead.",
- "preferStartsWith": "Use 'String#startsWith' method instead.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowSingleElementEquality": {
- "description": "Whether to allow equality checks against the first or last element of a string.",
- "enum": [
- "always",
- "never",
- ],
- "type": "string",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "prefer-ts-expect-error": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce using \`@ts-expect-error\` over \`@ts-ignore\`",
- "recommended": "strict",
- "url": "https://typescript-eslint.io/rules/prefer-ts-expect-error",
- },
- "fixable": "code",
- "messages": {
- "preferExpectErrorComment": "Use "@ts-expect-error" to ensure an error is actually being suppressed.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "promise-function-async": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowAny": true,
- "allowedPromiseNames": [],
- "checkArrowFunctions": true,
- "checkFunctionDeclarations": true,
- "checkFunctionExpressions": true,
- "checkMethodDeclarations": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Require any function or method that returns a Promise to be marked async",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/promise-function-async",
- },
- "fixable": "code",
- "messages": {
- "missingAsync": "Functions that return promises must be async.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowAny": {
- "description": "Whether to consider \`any\` and \`unknown\` to be Promises.",
- "type": "boolean",
- },
- "allowedPromiseNames": {
- "description": "Any extra names of classes or interfaces to be considered Promises.",
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- "checkArrowFunctions": {
- "type": "boolean",
- },
- "checkFunctionDeclarations": {
- "type": "boolean",
- },
- "checkFunctionExpressions": {
- "type": "boolean",
- },
- "checkMethodDeclarations": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "quotes": {
- "create": [Function],
- "defaultOptions": [
- "double",
- {
- "allowTemplateLiterals": false,
- "avoidEscape": false,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce the consistent use of either backticks, double, or single quotes",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/quotes",
- },
- "fixable": "code",
- "hasSuggestions": undefined,
- "messages": {
- "wrongQuotes": "Strings must use {{description}}.",
- },
- "replacedBy": [
- "@stylistic/ts/quotes",
- ],
- "schema": [
- {
- "enum": [
- "single",
- "double",
- "backtick",
- ],
- },
- {
- "anyOf": [
- {
- "enum": [
- "avoid-escape",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "allowTemplateLiterals": {
- "type": "boolean",
- },
- "avoidEscape": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "layout",
- },
- },
- "require-array-sort-compare": {
- "create": [Function],
- "defaultOptions": [
- {
- "ignoreStringArrays": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Require \`Array#sort\` and \`Array#toSorted\` calls to always provide a \`compareFunction\`",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/require-array-sort-compare",
- },
- "messages": {
- "requireCompare": "Require 'compare' argument.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "ignoreStringArrays": {
- "description": "Whether to ignore arrays in which all elements are strings.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "require-await": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow async functions which have no \`await\` expression",
- "extendsBaseRule": true,
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/require-await",
- },
- "messages": {
- "missingAwait": "{{name}} has no 'await' expression.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "restrict-plus-operands": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowAny": true,
- "allowBoolean": true,
- "allowNullish": true,
- "allowNumberAndString": true,
- "allowRegExp": true,
- "skipCompoundAssignments": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Require both operands of addition to be the same type and be \`bigint\`, \`number\`, or \`string\`",
- "recommended": {
- "recommended": true,
- "strict": [
- {
- "allowAny": false,
- "allowBoolean": false,
- "allowNullish": false,
- "allowNumberAndString": false,
- "allowRegExp": false,
- },
- ],
- },
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/restrict-plus-operands",
- },
- "messages": {
- "bigintAndNumber": "Numeric '+' operations must either be both bigints or both numbers. Got \`{{left}}\` + \`{{right}}\`.",
- "invalid": "Invalid operand for a '+' operation. Operands must each be a number or {{stringLike}}. Got \`{{type}}\`.",
- "mismatched": "Operands of '+' operations must be a number or {{stringLike}}. Got \`{{left}}\` + \`{{right}}\`.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowAny": {
- "description": "Whether to allow \`any\` typed values.",
- "type": "boolean",
- },
- "allowBoolean": {
- "description": "Whether to allow \`boolean\` typed values.",
- "type": "boolean",
- },
- "allowNullish": {
- "description": "Whether to allow potentially \`null\` or \`undefined\` typed values.",
- "type": "boolean",
- },
- "allowNumberAndString": {
- "description": "Whether to allow \`bigint\`/\`number\` typed values and \`string\` typed values to be added together.",
- "type": "boolean",
- },
- "allowRegExp": {
- "description": "Whether to allow \`regexp\` typed values.",
- "type": "boolean",
- },
- "skipCompoundAssignments": {
- "description": "Whether to skip compound assignments such as \`+=\`.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "restrict-template-expressions": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowAny": true,
- "allowBoolean": true,
- "allowNullish": true,
- "allowNumber": true,
- "allowRegExp": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Enforce template literal expressions to be of \`string\` type",
- "recommended": {
- "recommended": true,
- "strict": [
- {
- "allowAny": false,
- "allowBoolean": false,
- "allowNever": false,
- "allowNullish": false,
- "allowNumber": false,
- "allowRegExp": false,
- },
- ],
- },
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/restrict-template-expressions",
- },
- "messages": {
- "invalidType": "Invalid type "{{type}}" of template literal expression.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowAny": {
- "description": "Whether to allow \`any\` typed values in template expressions.",
- "type": "boolean",
- },
- "allowArray": {
- "description": "Whether to allow \`array\` typed values in template expressions.",
- "type": "boolean",
- },
- "allowBoolean": {
- "description": "Whether to allow \`boolean\` typed values in template expressions.",
- "type": "boolean",
- },
- "allowNever": {
- "description": "Whether to allow \`never\` typed values in template expressions.",
- "type": "boolean",
- },
- "allowNullish": {
- "description": "Whether to allow \`nullish\` typed values in template expressions.",
- "type": "boolean",
- },
- "allowNumber": {
- "description": "Whether to allow \`number\` typed values in template expressions.",
- "type": "boolean",
- },
- "allowRegExp": {
- "description": "Whether to allow \`regexp\` typed values in template expressions.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "return-await": {
- "create": [Function],
- "defaultOptions": [
- "in-try-catch",
- ],
- "meta": {
- "docs": {
- "description": "Enforce consistent returning of awaited values",
- "extendsBaseRule": "no-return-await",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/return-await",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "disallowedPromiseAwait": "Returning an awaited promise is not allowed in this context.",
- "nonPromiseAwait": "Returning an awaited value that is not a promise is not allowed.",
- "requiredPromiseAwait": "Returning an awaited promise is required in this context.",
- },
- "schema": [
- {
- "enum": [
- "in-try-catch",
- "always",
- "never",
- ],
- "type": "string",
- },
- ],
- "type": "problem",
- },
- },
- "semi": {
- "create": [Function],
- "defaultOptions": [
- "always",
- {
- "beforeStatementContinuationChars": "any",
- "omitLastInOneLineBlock": false,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require or disallow semicolons instead of ASI",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/semi",
- },
- "fixable": "code",
- "hasSuggestions": undefined,
- "messages": {
- "extraSemi": "Extra semicolon.",
- "missingSemi": "Missing semicolon.",
- },
- "replacedBy": [
- "@stylistic/ts/semi",
- ],
- "schema": {
- "anyOf": [
- {
- "items": [
- {
- "enum": [
- "never",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "beforeStatementContinuationChars": {
- "enum": [
- "always",
- "any",
- "never",
- ],
- },
- },
- "type": "object",
- },
- ],
- "maxItems": 2,
- "minItems": 0,
- "type": "array",
- },
- {
- "items": [
- {
- "enum": [
- "always",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "omitLastInOneLineBlock": {
- "type": "boolean",
- },
- "omitLastInOneLineClassBody": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "maxItems": 2,
- "minItems": 0,
- "type": "array",
- },
- ],
- },
- "type": "layout",
- },
- },
- "sort-type-constituents": {
- "create": [Function],
- "defaultOptions": [
- {
- "checkIntersections": true,
- "checkUnions": true,
- "groupOrder": [
- "named",
- "keyword",
- "operator",
- "literal",
- "function",
- "import",
- "conditional",
- "object",
- "tuple",
- "intersection",
- "union",
- "nullish",
- ],
- },
- ],
- "meta": {
- "docs": {
- "description": "Enforce constituents of a type union/intersection to be sorted alphabetically",
- "url": "https://typescript-eslint.io/rules/sort-type-constituents",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "notSorted": "{{type}} type constituents must be sorted.",
- "notSortedNamed": "{{type}} type {{name}} constituents must be sorted.",
- "suggestFix": "Sort constituents of type (removes all comments).",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "checkIntersections": {
- "description": "Whether to check intersection types.",
- "type": "boolean",
- },
- "checkUnions": {
- "description": "Whether to check union types.",
- "type": "boolean",
- },
- "groupOrder": {
- "description": "Ordering of the groups.",
- "items": {
- "enum": [
- "conditional",
- "function",
- "import",
- "intersection",
- "keyword",
- "nullish",
- "literal",
- "named",
- "object",
- "operator",
- "tuple",
- "union",
- ],
- "type": "string",
- },
- "type": "array",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "space-before-blocks": {
- "create": [Function],
- "defaultOptions": [
- "always",
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce consistent spacing before blocks",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/space-before-blocks",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "missingSpace": "Missing space before opening brace.",
- "unexpectedSpace": "Unexpected space before opening brace.",
- },
- "replacedBy": [
- "@stylistic/ts/space-before-blocks",
- ],
- "schema": [
- {
- "oneOf": [
- {
- "enum": [
- "always",
- "never",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "classes": {
- "enum": [
- "always",
- "never",
- "off",
- ],
- },
- "functions": {
- "enum": [
- "always",
- "never",
- "off",
- ],
- },
- "keywords": {
- "enum": [
- "always",
- "never",
- "off",
- ],
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "layout",
- },
- },
- "space-before-function-paren": {
- "create": [Function],
- "defaultOptions": [
- "always",
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce consistent spacing before function parenthesis",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/space-before-function-paren",
- },
- "fixable": "whitespace",
- "messages": {
- "missing": "Missing space before function parentheses.",
- "unexpected": "Unexpected space before function parentheses.",
- },
- "replacedBy": [
- "@stylistic/ts/space-before-function-paren",
- ],
- "schema": [
- {
- "oneOf": [
- {
- "enum": [
- "always",
- "never",
- ],
- "type": "string",
- },
- {
- "additionalProperties": false,
- "properties": {
- "anonymous": {
- "enum": [
- "always",
- "never",
- "ignore",
- ],
- "type": "string",
- },
- "asyncArrow": {
- "enum": [
- "always",
- "never",
- "ignore",
- ],
- "type": "string",
- },
- "named": {
- "enum": [
- "always",
- "never",
- "ignore",
- ],
- "type": "string",
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "layout",
- },
- },
- "space-infix-ops": {
- "create": [Function],
- "defaultOptions": [
- {
- "int32Hint": false,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require spacing around infix operators",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/space-infix-ops",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "missingSpace": "Operator '{{operator}}' must be spaced.",
- },
- "replacedBy": [
- "@stylistic/ts/space-infix-ops",
- ],
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "int32Hint": {
- "default": false,
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
- "strict-boolean-expressions": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowAny": false,
- "allowNullableBoolean": false,
- "allowNullableEnum": false,
- "allowNullableNumber": false,
- "allowNullableObject": true,
- "allowNullableString": false,
- "allowNumber": true,
- "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false,
- "allowString": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow certain types in boolean expressions",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/strict-boolean-expressions",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "conditionErrorAny": "Unexpected any value in conditional. An explicit comparison or type cast is required.",
- "conditionErrorNullableBoolean": "Unexpected nullable boolean value in conditional. Please handle the nullish case explicitly.",
- "conditionErrorNullableEnum": "Unexpected nullable enum value in conditional. Please handle the nullish/zero/NaN cases explicitly.",
- "conditionErrorNullableNumber": "Unexpected nullable number value in conditional. Please handle the nullish/zero/NaN cases explicitly.",
- "conditionErrorNullableObject": "Unexpected nullable object value in conditional. An explicit null check is required.",
- "conditionErrorNullableString": "Unexpected nullable string value in conditional. Please handle the nullish/empty cases explicitly.",
- "conditionErrorNullish": "Unexpected nullish value in conditional. The condition is always false.",
- "conditionErrorNumber": "Unexpected number value in conditional. An explicit zero/NaN check is required.",
- "conditionErrorObject": "Unexpected object value in conditional. The condition is always true.",
- "conditionErrorOther": "Unexpected value in conditional. A boolean expression is required.",
- "conditionErrorString": "Unexpected string value in conditional. An explicit empty string check is required.",
- "conditionFixCastBoolean": "Explicitly cast value to a boolean (\`Boolean(value)\`)",
- "conditionFixCompareEmptyString": "Change condition to check for empty string (\`value !== ""\`)",
- "conditionFixCompareFalse": "Change condition to check if false (\`value === false\`)",
- "conditionFixCompareNaN": "Change condition to check for NaN (\`!Number.isNaN(value)\`)",
- "conditionFixCompareNullish": "Change condition to check for null/undefined (\`value != null\`)",
- "conditionFixCompareStringLength": "Change condition to check string's length (\`value.length !== 0\`)",
- "conditionFixCompareTrue": "Change condition to check if true (\`value === true\`)",
- "conditionFixCompareZero": "Change condition to check for 0 (\`value !== 0\`)",
- "conditionFixDefaultEmptyString": "Explicitly treat nullish value the same as an empty string (\`value ?? ""\`)",
- "conditionFixDefaultFalse": "Explicitly treat nullish value the same as false (\`value ?? false\`)",
- "conditionFixDefaultZero": "Explicitly treat nullish value the same as 0 (\`value ?? 0\`)",
- "noStrictNullCheck": "This rule requires the \`strictNullChecks\` compiler option to be turned on to function correctly.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowAny": {
- "type": "boolean",
- },
- "allowNullableBoolean": {
- "type": "boolean",
- },
- "allowNullableEnum": {
- "type": "boolean",
- },
- "allowNullableNumber": {
- "type": "boolean",
- },
- "allowNullableObject": {
- "type": "boolean",
- },
- "allowNullableString": {
- "type": "boolean",
- },
- "allowNumber": {
- "type": "boolean",
- },
- "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": {
- "type": "boolean",
- },
- "allowString": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "switch-exhaustiveness-check": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowDefaultCaseForExhaustiveSwitch": true,
- "requireDefaultForNonUnion": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Require switch-case statements to be exhaustive",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/switch-exhaustiveness-check",
- },
- "hasSuggestions": true,
- "messages": {
- "addMissingCases": "Add branches for missing cases.",
- "dangerousDefaultCase": "The switch statement is exhaustive, so the default case is unnecessary.",
- "switchIsNotExhaustive": "Switch is not exhaustive. Cases not matched: {{missingBranches}}",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowDefaultCaseForExhaustiveSwitch": {
- "description": "If 'true', allow 'default' cases on switch statements with exhaustive cases.",
- "type": "boolean",
- },
- "requireDefaultForNonUnion": {
- "description": "If 'true', require a 'default' clause for switches on non-union types.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "triple-slash-reference": {
- "create": [Function],
- "defaultOptions": [
- {
- "lib": "always",
- "path": "never",
- "types": "prefer-import",
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow certain triple slash directives in favor of ES6-style import declarations",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/triple-slash-reference",
- },
- "messages": {
- "tripleSlashReference": "Do not use a triple slash reference for {{module}}, use \`import\` style instead.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "lib": {
- "enum": [
- "always",
- "never",
- ],
- "type": "string",
- },
- "path": {
- "enum": [
- "always",
- "never",
- ],
- "type": "string",
- },
- "types": {
- "enum": [
- "always",
- "never",
- "prefer-import",
- ],
- "type": "string",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "type-annotation-spacing": {
- "create": [Function],
- "defaultOptions": [
- {},
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require consistent spacing around type annotations",
- "url": "https://typescript-eslint.io/rules/type-annotation-spacing",
- },
- "fixable": "whitespace",
- "messages": {
- "expectedSpaceAfter": "Expected a space after the '{{type}}'.",
- "expectedSpaceBefore": "Expected a space before the '{{type}}'.",
- "unexpectedSpaceAfter": "Unexpected space after the '{{type}}'.",
- "unexpectedSpaceBefore": "Unexpected space before the '{{type}}'.",
- "unexpectedSpaceBetween": "Unexpected space between the '{{previousToken}}' and the '{{type}}'.",
- },
- "replacedBy": [
- "@stylistic/ts/type-annotation-spacing",
- ],
- "schema": [
- {
- "$defs": {
- "spacingConfig": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- },
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- "overrides": {
- "additionalProperties": false,
- "properties": {
- "arrow": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "colon": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "parameter": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "property": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "returnType": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "variable": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- },
- "type": "object",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
- "typedef": {
- "create": [Function],
- "defaultOptions": [
- {
- "arrayDestructuring": false,
- "arrowParameter": false,
- "memberVariableDeclaration": false,
- "objectDestructuring": false,
- "parameter": false,
- "propertyDeclaration": false,
- "variableDeclaration": false,
- "variableDeclarationIgnoreFunction": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Require type annotations in certain places",
- "url": "https://typescript-eslint.io/rules/typedef",
- },
- "messages": {
- "expectedTypedef": "Expected a type annotation.",
- "expectedTypedefNamed": "Expected {{name}} to have a type annotation.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "arrayDestructuring": {
- "type": "boolean",
- },
- "arrowParameter": {
- "type": "boolean",
- },
- "memberVariableDeclaration": {
- "type": "boolean",
- },
- "objectDestructuring": {
- "type": "boolean",
- },
- "parameter": {
- "type": "boolean",
- },
- "propertyDeclaration": {
- "type": "boolean",
- },
- "variableDeclaration": {
- "type": "boolean",
- },
- "variableDeclarationIgnoreFunction": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "unbound-method": {
- "create": [Function],
- "defaultOptions": [
- {
- "ignoreStatic": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Enforce unbound methods are called with their expected scope",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/unbound-method",
- },
- "messages": {
- "unbound": "Avoid referencing unbound methods which may cause unintentional scoping of \`this\`.",
- "unboundWithoutThisAnnotation": "Avoid referencing unbound methods which may cause unintentional scoping of \`this\`.
-If your function does not access \`this\`, you can annotate it with \`this: void\`, or consider using an arrow function instead.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "ignoreStatic": {
- "description": "Whether to skip checking whether \`static\` methods are correctly bound.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "unified-signatures": {
- "create": [Function],
- "defaultOptions": [
- {
- "ignoreDifferentlyNamedParameters": false,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow two overloads that could be unified into one with a union or an optional/rest parameter",
- "recommended": "strict",
- "url": "https://typescript-eslint.io/rules/unified-signatures",
- },
- "messages": {
- "omittingRestParameter": "{{failureStringStart}} with a rest parameter.",
- "omittingSingleParameter": "{{failureStringStart}} with an optional parameter.",
- "singleParameterDifference": "{{failureStringStart}} taking \`{{type1}} | {{type2}}\`.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "ignoreDifferentlyNamedParameters": {
- "description": "Whether two parameters with different names at the same index should be considered different even if their types are the same.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "use-unknown-in-catch-callback-variable": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce typing arguments in \`.catch()\` callbacks as \`unknown\`",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "addUnknownRestTypeAnnotationSuggestion": "Add an explicit \`: [unknown]\` type annotation to the catch rest variable.",
- "addUnknownTypeAnnotationSuggestion": "Add an explicit \`: unknown\` type annotation to the catch variable.",
- "useUnknown": "Prefer the safe \`: unknown\` for a catch callback variable.",
- "useUnknownArrayDestructuringPattern": "Prefer the safe \`: unknown\` for a catch callback variable. The thrown error may not be iterable.",
- "useUnknownObjectDestructuringPattern": "Prefer the safe \`: unknown\` for a catch callback variable. The thrown error may be nullable, or may not have the expected shape.",
- "useUnknownSpreadArgs": "Prefer the safe \`: unknown\` for a catch callback variable. The argument list may contain a handler that does not use \`unknown\` for the catch callback variable.",
- "wrongRestTypeAnnotationSuggestion": "Change existing type annotation to \`: [unknown]\`.",
- "wrongTypeAnnotationSuggestion": "Change existing type annotation to \`: unknown\`.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- },
- },
- },
- },
- {
- "files": [
- "**/*.ts",
- "**/*.tsx",
- "**/*.mts",
- "**/*.cts",
- ],
- "name": "typescript-eslint/eslint-recommended",
- "rules": {
- "constructor-super": "off",
- "getter-return": "off",
- "no-const-assign": "off",
- "no-dupe-args": "off",
- "no-dupe-class-members": "off",
- "no-dupe-keys": "off",
- "no-func-assign": "off",
- "no-import-assign": "off",
- "no-new-symbol": "off",
- "no-obj-calls": "off",
- "no-redeclare": "off",
- "no-setter-return": "off",
- "no-this-before-super": "off",
- "no-undef": "off",
- "no-unreachable": "off",
- "no-unsafe-negation": "off",
- "no-var": "error",
- "prefer-const": "error",
- "prefer-rest-params": "error",
- "prefer-spread": "error",
- },
- },
- {
- "name": "typescript-eslint/strict-type-checked",
- "rules": {
- "@typescript-eslint/await-thenable": "error",
- "@typescript-eslint/ban-ts-comment": [
- "error",
- {
- "minimumDescriptionLength": 10,
- },
- ],
- "@typescript-eslint/ban-types": "error",
- "@typescript-eslint/no-array-constructor": "error",
- "@typescript-eslint/no-array-delete": "error",
- "@typescript-eslint/no-base-to-string": "error",
- "@typescript-eslint/no-confusing-void-expression": "error",
- "@typescript-eslint/no-duplicate-enum-values": "error",
- "@typescript-eslint/no-duplicate-type-constituents": "error",
- "@typescript-eslint/no-dynamic-delete": "error",
- "@typescript-eslint/no-explicit-any": "error",
- "@typescript-eslint/no-extra-non-null-assertion": "error",
- "@typescript-eslint/no-extraneous-class": "error",
- "@typescript-eslint/no-floating-promises": "error",
- "@typescript-eslint/no-for-in-array": "error",
- "@typescript-eslint/no-implied-eval": "error",
- "@typescript-eslint/no-invalid-void-type": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
- "@typescript-eslint/no-meaningless-void-operator": "error",
- "@typescript-eslint/no-misused-new": "error",
- "@typescript-eslint/no-misused-promises": "error",
- "@typescript-eslint/no-mixed-enums": "error",
- "@typescript-eslint/no-namespace": "error",
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
- "@typescript-eslint/no-non-null-assertion": "error",
- "@typescript-eslint/no-redundant-type-constituents": "error",
- "@typescript-eslint/no-this-alias": "error",
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
- "@typescript-eslint/no-unnecessary-condition": "error",
- "@typescript-eslint/no-unnecessary-type-arguments": "error",
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
- "@typescript-eslint/no-unnecessary-type-constraint": "error",
- "@typescript-eslint/no-unsafe-argument": "error",
- "@typescript-eslint/no-unsafe-assignment": "error",
- "@typescript-eslint/no-unsafe-call": "error",
- "@typescript-eslint/no-unsafe-declaration-merging": "error",
- "@typescript-eslint/no-unsafe-enum-comparison": "error",
- "@typescript-eslint/no-unsafe-member-access": "error",
- "@typescript-eslint/no-unsafe-return": "error",
- "@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-useless-constructor": "error",
- "@typescript-eslint/no-useless-template-literals": "error",
- "@typescript-eslint/no-var-requires": "error",
- "@typescript-eslint/only-throw-error": "error",
- "@typescript-eslint/prefer-as-const": "error",
- "@typescript-eslint/prefer-includes": "error",
- "@typescript-eslint/prefer-literal-enum-member": "error",
- "@typescript-eslint/prefer-promise-reject-errors": "error",
- "@typescript-eslint/prefer-reduce-type-parameter": "error",
- "@typescript-eslint/prefer-return-this-type": "error",
- "@typescript-eslint/prefer-ts-expect-error": "error",
- "@typescript-eslint/require-await": "error",
- "@typescript-eslint/restrict-plus-operands": [
- "error",
- {
- "allowAny": false,
- "allowBoolean": false,
- "allowNullish": false,
- "allowNumberAndString": false,
- "allowRegExp": false,
- },
- ],
- "@typescript-eslint/restrict-template-expressions": [
- "error",
- {
- "allowAny": false,
- "allowBoolean": false,
- "allowNever": false,
- "allowNullish": false,
- "allowNumber": false,
- "allowRegExp": false,
- },
- ],
- "@typescript-eslint/triple-slash-reference": "error",
- "@typescript-eslint/unbound-method": "error",
- "@typescript-eslint/unified-signatures": "error",
- "@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
- "no-array-constructor": "off",
- "no-implied-eval": "off",
- "no-loss-of-precision": "off",
- "no-throw-literal": "off",
- "no-unused-vars": "off",
- "no-useless-constructor": "off",
- "prefer-promise-reject-errors": "off",
- "require-await": "off",
- },
- },
- {
- "languageOptions": {
- "parser": {
- "meta": {
- "name": "typescript-eslint/parser",
- "version": "7.6.0",
- },
- "parseForESLint": [Function],
- },
- "sourceType": "module",
- },
- "name": "typescript-eslint/base",
- "plugins": {
- "@typescript-eslint": {
- "configs": {
- "all": {
- "extends": [
- "./configs/base",
- "./configs/eslint-recommended",
- ],
- "rules": {
- "@typescript-eslint/adjacent-overload-signatures": "error",
- "@typescript-eslint/array-type": "error",
- "@typescript-eslint/await-thenable": "error",
- "@typescript-eslint/ban-ts-comment": "error",
- "@typescript-eslint/ban-tslint-comment": "error",
- "@typescript-eslint/ban-types": "error",
- "@typescript-eslint/class-literal-property-style": "error",
- "@typescript-eslint/class-methods-use-this": "error",
- "@typescript-eslint/consistent-generic-constructors": "error",
- "@typescript-eslint/consistent-indexed-object-style": "error",
- "@typescript-eslint/consistent-return": "error",
- "@typescript-eslint/consistent-type-assertions": "error",
- "@typescript-eslint/consistent-type-definitions": "error",
- "@typescript-eslint/consistent-type-exports": "error",
- "@typescript-eslint/consistent-type-imports": "error",
- "@typescript-eslint/default-param-last": "error",
- "@typescript-eslint/dot-notation": "error",
- "@typescript-eslint/explicit-function-return-type": "error",
- "@typescript-eslint/explicit-member-accessibility": "error",
- "@typescript-eslint/explicit-module-boundary-types": "error",
- "@typescript-eslint/init-declarations": "error",
- "@typescript-eslint/max-params": "error",
- "@typescript-eslint/member-ordering": "error",
- "@typescript-eslint/method-signature-style": "error",
- "@typescript-eslint/naming-convention": "error",
- "@typescript-eslint/no-array-constructor": "error",
- "@typescript-eslint/no-array-delete": "error",
- "@typescript-eslint/no-base-to-string": "error",
- "@typescript-eslint/no-confusing-non-null-assertion": "error",
- "@typescript-eslint/no-confusing-void-expression": "error",
- "@typescript-eslint/no-dupe-class-members": "error",
- "@typescript-eslint/no-duplicate-enum-values": "error",
- "@typescript-eslint/no-duplicate-type-constituents": "error",
- "@typescript-eslint/no-dynamic-delete": "error",
- "@typescript-eslint/no-empty-function": "error",
- "@typescript-eslint/no-empty-interface": "error",
- "@typescript-eslint/no-explicit-any": "error",
- "@typescript-eslint/no-extra-non-null-assertion": "error",
- "@typescript-eslint/no-extraneous-class": "error",
- "@typescript-eslint/no-floating-promises": "error",
- "@typescript-eslint/no-for-in-array": "error",
- "@typescript-eslint/no-implied-eval": "error",
- "@typescript-eslint/no-import-type-side-effects": "error",
- "@typescript-eslint/no-inferrable-types": "error",
- "@typescript-eslint/no-invalid-this": "error",
- "@typescript-eslint/no-invalid-void-type": "error",
- "@typescript-eslint/no-loop-func": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
- "@typescript-eslint/no-magic-numbers": "error",
- "@typescript-eslint/no-meaningless-void-operator": "error",
- "@typescript-eslint/no-misused-new": "error",
- "@typescript-eslint/no-misused-promises": "error",
- "@typescript-eslint/no-mixed-enums": "error",
- "@typescript-eslint/no-namespace": "error",
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
- "@typescript-eslint/no-non-null-assertion": "error",
- "@typescript-eslint/no-redeclare": "error",
- "@typescript-eslint/no-redundant-type-constituents": "error",
- "@typescript-eslint/no-require-imports": "error",
- "@typescript-eslint/no-restricted-imports": "error",
- "@typescript-eslint/no-shadow": "error",
- "@typescript-eslint/no-this-alias": "error",
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
- "@typescript-eslint/no-unnecessary-condition": "error",
- "@typescript-eslint/no-unnecessary-qualifier": "error",
- "@typescript-eslint/no-unnecessary-type-arguments": "error",
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
- "@typescript-eslint/no-unnecessary-type-constraint": "error",
- "@typescript-eslint/no-unsafe-argument": "error",
- "@typescript-eslint/no-unsafe-assignment": "error",
- "@typescript-eslint/no-unsafe-call": "error",
- "@typescript-eslint/no-unsafe-declaration-merging": "error",
- "@typescript-eslint/no-unsafe-enum-comparison": "error",
- "@typescript-eslint/no-unsafe-member-access": "error",
- "@typescript-eslint/no-unsafe-return": "error",
- "@typescript-eslint/no-unsafe-unary-minus": "error",
- "@typescript-eslint/no-unused-expressions": "error",
- "@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-use-before-define": "error",
- "@typescript-eslint/no-useless-constructor": "error",
- "@typescript-eslint/no-useless-empty-export": "error",
- "@typescript-eslint/no-useless-template-literals": "error",
- "@typescript-eslint/no-var-requires": "error",
- "@typescript-eslint/non-nullable-type-assertion-style": "error",
- "@typescript-eslint/only-throw-error": "error",
- "@typescript-eslint/parameter-properties": "error",
- "@typescript-eslint/prefer-as-const": "error",
- "@typescript-eslint/prefer-destructuring": "error",
- "@typescript-eslint/prefer-enum-initializers": "error",
- "@typescript-eslint/prefer-find": "error",
- "@typescript-eslint/prefer-for-of": "error",
- "@typescript-eslint/prefer-function-type": "error",
- "@typescript-eslint/prefer-includes": "error",
- "@typescript-eslint/prefer-literal-enum-member": "error",
- "@typescript-eslint/prefer-namespace-keyword": "error",
- "@typescript-eslint/prefer-nullish-coalescing": "error",
- "@typescript-eslint/prefer-optional-chain": "error",
- "@typescript-eslint/prefer-promise-reject-errors": "error",
- "@typescript-eslint/prefer-readonly": "error",
- "@typescript-eslint/prefer-readonly-parameter-types": "error",
- "@typescript-eslint/prefer-reduce-type-parameter": "error",
- "@typescript-eslint/prefer-regexp-exec": "error",
- "@typescript-eslint/prefer-return-this-type": "error",
- "@typescript-eslint/prefer-string-starts-ends-with": "error",
- "@typescript-eslint/prefer-ts-expect-error": "error",
- "@typescript-eslint/promise-function-async": "error",
- "@typescript-eslint/require-array-sort-compare": "error",
- "@typescript-eslint/require-await": "error",
- "@typescript-eslint/restrict-plus-operands": "error",
- "@typescript-eslint/restrict-template-expressions": "error",
- "@typescript-eslint/return-await": "error",
- "@typescript-eslint/sort-type-constituents": "error",
- "@typescript-eslint/strict-boolean-expressions": "error",
- "@typescript-eslint/switch-exhaustiveness-check": "error",
- "@typescript-eslint/triple-slash-reference": "error",
- "@typescript-eslint/typedef": "error",
- "@typescript-eslint/unbound-method": "error",
- "@typescript-eslint/unified-signatures": "error",
- "@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
- "class-methods-use-this": "off",
- "consistent-return": "off",
- "default-param-last": "off",
- "dot-notation": "off",
- "init-declarations": "off",
- "max-params": "off",
- "no-array-constructor": "off",
- "no-dupe-class-members": "off",
- "no-empty-function": "off",
- "no-implied-eval": "off",
- "no-invalid-this": "off",
- "no-loop-func": "off",
- "no-loss-of-precision": "off",
- "no-magic-numbers": "off",
- "no-redeclare": "off",
- "no-restricted-imports": "off",
- "no-return-await": "off",
- "no-shadow": "off",
- "no-throw-literal": "off",
- "no-unused-expressions": "off",
- "no-unused-vars": "off",
- "no-use-before-define": "off",
- "no-useless-constructor": "off",
- "prefer-destructuring": "off",
- "prefer-promise-reject-errors": "off",
- "require-await": "off",
- },
- },
- "base": {
- "parser": "@typescript-eslint/parser",
- "parserOptions": {
- "sourceType": "module",
- },
- "plugins": [
- "@typescript-eslint",
- ],
- },
- "disable-type-checked": {
- "parserOptions": {
- "program": null,
- "project": false,
- },
- "rules": {
- "@typescript-eslint/await-thenable": "off",
- "@typescript-eslint/consistent-return": "off",
- "@typescript-eslint/consistent-type-exports": "off",
- "@typescript-eslint/dot-notation": "off",
- "@typescript-eslint/naming-convention": "off",
- "@typescript-eslint/no-array-delete": "off",
- "@typescript-eslint/no-base-to-string": "off",
- "@typescript-eslint/no-confusing-void-expression": "off",
- "@typescript-eslint/no-duplicate-type-constituents": "off",
- "@typescript-eslint/no-floating-promises": "off",
- "@typescript-eslint/no-for-in-array": "off",
- "@typescript-eslint/no-implied-eval": "off",
- "@typescript-eslint/no-meaningless-void-operator": "off",
- "@typescript-eslint/no-misused-promises": "off",
- "@typescript-eslint/no-mixed-enums": "off",
- "@typescript-eslint/no-redundant-type-constituents": "off",
- "@typescript-eslint/no-throw-literal": "off",
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
- "@typescript-eslint/no-unnecessary-condition": "off",
- "@typescript-eslint/no-unnecessary-qualifier": "off",
- "@typescript-eslint/no-unnecessary-type-arguments": "off",
- "@typescript-eslint/no-unnecessary-type-assertion": "off",
- "@typescript-eslint/no-unsafe-argument": "off",
- "@typescript-eslint/no-unsafe-assignment": "off",
- "@typescript-eslint/no-unsafe-call": "off",
- "@typescript-eslint/no-unsafe-enum-comparison": "off",
- "@typescript-eslint/no-unsafe-member-access": "off",
- "@typescript-eslint/no-unsafe-return": "off",
- "@typescript-eslint/no-unsafe-unary-minus": "off",
- "@typescript-eslint/no-useless-template-literals": "off",
- "@typescript-eslint/non-nullable-type-assertion-style": "off",
- "@typescript-eslint/only-throw-error": "off",
- "@typescript-eslint/prefer-destructuring": "off",
- "@typescript-eslint/prefer-find": "off",
- "@typescript-eslint/prefer-includes": "off",
- "@typescript-eslint/prefer-nullish-coalescing": "off",
- "@typescript-eslint/prefer-optional-chain": "off",
- "@typescript-eslint/prefer-promise-reject-errors": "off",
- "@typescript-eslint/prefer-readonly": "off",
- "@typescript-eslint/prefer-readonly-parameter-types": "off",
- "@typescript-eslint/prefer-reduce-type-parameter": "off",
- "@typescript-eslint/prefer-regexp-exec": "off",
- "@typescript-eslint/prefer-return-this-type": "off",
- "@typescript-eslint/prefer-string-starts-ends-with": "off",
- "@typescript-eslint/promise-function-async": "off",
- "@typescript-eslint/require-array-sort-compare": "off",
- "@typescript-eslint/require-await": "off",
- "@typescript-eslint/restrict-plus-operands": "off",
- "@typescript-eslint/restrict-template-expressions": "off",
- "@typescript-eslint/return-await": "off",
- "@typescript-eslint/strict-boolean-expressions": "off",
- "@typescript-eslint/switch-exhaustiveness-check": "off",
- "@typescript-eslint/unbound-method": "off",
- "@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
- },
- },
- "eslint-recommended": {
- "overrides": [
- {
- "files": [
- "*.ts",
- "*.tsx",
- "*.mts",
- "*.cts",
- ],
- "rules": {
- "constructor-super": "off",
- "getter-return": "off",
- "no-const-assign": "off",
- "no-dupe-args": "off",
- "no-dupe-class-members": "off",
- "no-dupe-keys": "off",
- "no-func-assign": "off",
- "no-import-assign": "off",
- "no-new-symbol": "off",
- "no-obj-calls": "off",
- "no-redeclare": "off",
- "no-setter-return": "off",
- "no-this-before-super": "off",
- "no-undef": "off",
- "no-unreachable": "off",
- "no-unsafe-negation": "off",
- "no-var": "error",
- "prefer-const": "error",
- "prefer-rest-params": "error",
- "prefer-spread": "error",
- },
- },
- ],
- },
- "recommended": {
- "extends": [
- "./configs/base",
- "./configs/eslint-recommended",
- ],
- "rules": {
- "@typescript-eslint/ban-ts-comment": "error",
- "@typescript-eslint/ban-types": "error",
- "@typescript-eslint/no-array-constructor": "error",
- "@typescript-eslint/no-duplicate-enum-values": "error",
- "@typescript-eslint/no-explicit-any": "error",
- "@typescript-eslint/no-extra-non-null-assertion": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
- "@typescript-eslint/no-misused-new": "error",
- "@typescript-eslint/no-namespace": "error",
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
- "@typescript-eslint/no-this-alias": "error",
- "@typescript-eslint/no-unnecessary-type-constraint": "error",
- "@typescript-eslint/no-unsafe-declaration-merging": "error",
- "@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-var-requires": "error",
- "@typescript-eslint/prefer-as-const": "error",
- "@typescript-eslint/triple-slash-reference": "error",
- "no-array-constructor": "off",
- "no-loss-of-precision": "off",
- "no-unused-vars": "off",
- },
- },
- "recommended-requiring-type-checking": {
- "extends": [
- "./configs/base",
- "./configs/eslint-recommended",
- ],
- "rules": {
- "@typescript-eslint/await-thenable": "error",
- "@typescript-eslint/ban-ts-comment": "error",
- "@typescript-eslint/ban-types": "error",
- "@typescript-eslint/no-array-constructor": "error",
- "@typescript-eslint/no-base-to-string": "error",
- "@typescript-eslint/no-duplicate-enum-values": "error",
- "@typescript-eslint/no-duplicate-type-constituents": "error",
- "@typescript-eslint/no-explicit-any": "error",
- "@typescript-eslint/no-extra-non-null-assertion": "error",
- "@typescript-eslint/no-floating-promises": "error",
- "@typescript-eslint/no-for-in-array": "error",
- "@typescript-eslint/no-implied-eval": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
- "@typescript-eslint/no-misused-new": "error",
- "@typescript-eslint/no-misused-promises": "error",
- "@typescript-eslint/no-namespace": "error",
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
- "@typescript-eslint/no-redundant-type-constituents": "error",
- "@typescript-eslint/no-this-alias": "error",
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
- "@typescript-eslint/no-unnecessary-type-constraint": "error",
- "@typescript-eslint/no-unsafe-argument": "error",
- "@typescript-eslint/no-unsafe-assignment": "error",
- "@typescript-eslint/no-unsafe-call": "error",
- "@typescript-eslint/no-unsafe-declaration-merging": "error",
- "@typescript-eslint/no-unsafe-enum-comparison": "error",
- "@typescript-eslint/no-unsafe-member-access": "error",
- "@typescript-eslint/no-unsafe-return": "error",
- "@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-var-requires": "error",
- "@typescript-eslint/prefer-as-const": "error",
- "@typescript-eslint/require-await": "error",
- "@typescript-eslint/restrict-plus-operands": "error",
- "@typescript-eslint/restrict-template-expressions": "error",
- "@typescript-eslint/triple-slash-reference": "error",
- "@typescript-eslint/unbound-method": "error",
- "no-array-constructor": "off",
- "no-implied-eval": "off",
- "no-loss-of-precision": "off",
- "no-unused-vars": "off",
- "require-await": "off",
- },
- },
- "recommended-type-checked": {
- "extends": [
- "./configs/base",
- "./configs/eslint-recommended",
- ],
- "rules": {
- "@typescript-eslint/await-thenable": "error",
- "@typescript-eslint/ban-ts-comment": "error",
- "@typescript-eslint/ban-types": "error",
- "@typescript-eslint/no-array-constructor": "error",
- "@typescript-eslint/no-base-to-string": "error",
- "@typescript-eslint/no-duplicate-enum-values": "error",
- "@typescript-eslint/no-duplicate-type-constituents": "error",
- "@typescript-eslint/no-explicit-any": "error",
- "@typescript-eslint/no-extra-non-null-assertion": "error",
- "@typescript-eslint/no-floating-promises": "error",
- "@typescript-eslint/no-for-in-array": "error",
- "@typescript-eslint/no-implied-eval": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
- "@typescript-eslint/no-misused-new": "error",
- "@typescript-eslint/no-misused-promises": "error",
- "@typescript-eslint/no-namespace": "error",
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
- "@typescript-eslint/no-redundant-type-constituents": "error",
- "@typescript-eslint/no-this-alias": "error",
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
- "@typescript-eslint/no-unnecessary-type-constraint": "error",
- "@typescript-eslint/no-unsafe-argument": "error",
- "@typescript-eslint/no-unsafe-assignment": "error",
- "@typescript-eslint/no-unsafe-call": "error",
- "@typescript-eslint/no-unsafe-declaration-merging": "error",
- "@typescript-eslint/no-unsafe-enum-comparison": "error",
- "@typescript-eslint/no-unsafe-member-access": "error",
- "@typescript-eslint/no-unsafe-return": "error",
- "@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-var-requires": "error",
- "@typescript-eslint/prefer-as-const": "error",
- "@typescript-eslint/require-await": "error",
- "@typescript-eslint/restrict-plus-operands": "error",
- "@typescript-eslint/restrict-template-expressions": "error",
- "@typescript-eslint/triple-slash-reference": "error",
- "@typescript-eslint/unbound-method": "error",
- "no-array-constructor": "off",
- "no-implied-eval": "off",
- "no-loss-of-precision": "off",
- "no-unused-vars": "off",
- "require-await": "off",
- },
- },
- "recommended-type-checked-only": {
- "extends": [
- "./configs/base",
- "./configs/eslint-recommended",
- ],
- "rules": {
- "@typescript-eslint/await-thenable": "error",
- "@typescript-eslint/no-base-to-string": "error",
- "@typescript-eslint/no-duplicate-type-constituents": "error",
- "@typescript-eslint/no-floating-promises": "error",
- "@typescript-eslint/no-for-in-array": "error",
- "@typescript-eslint/no-implied-eval": "error",
- "@typescript-eslint/no-misused-promises": "error",
- "@typescript-eslint/no-redundant-type-constituents": "error",
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
- "@typescript-eslint/no-unsafe-argument": "error",
- "@typescript-eslint/no-unsafe-assignment": "error",
- "@typescript-eslint/no-unsafe-call": "error",
- "@typescript-eslint/no-unsafe-enum-comparison": "error",
- "@typescript-eslint/no-unsafe-member-access": "error",
- "@typescript-eslint/no-unsafe-return": "error",
- "@typescript-eslint/require-await": "error",
- "@typescript-eslint/restrict-plus-operands": "error",
- "@typescript-eslint/restrict-template-expressions": "error",
- "@typescript-eslint/unbound-method": "error",
- "no-implied-eval": "off",
- "require-await": "off",
- },
- },
- "strict": {
- "extends": [
- "./configs/base",
- "./configs/eslint-recommended",
- ],
- "rules": {
- "@typescript-eslint/ban-ts-comment": [
- "error",
- {
- "minimumDescriptionLength": 10,
- },
- ],
- "@typescript-eslint/ban-types": "error",
- "@typescript-eslint/no-array-constructor": "error",
- "@typescript-eslint/no-duplicate-enum-values": "error",
- "@typescript-eslint/no-dynamic-delete": "error",
- "@typescript-eslint/no-explicit-any": "error",
- "@typescript-eslint/no-extra-non-null-assertion": "error",
- "@typescript-eslint/no-extraneous-class": "error",
- "@typescript-eslint/no-invalid-void-type": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
- "@typescript-eslint/no-misused-new": "error",
- "@typescript-eslint/no-namespace": "error",
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
- "@typescript-eslint/no-non-null-assertion": "error",
- "@typescript-eslint/no-this-alias": "error",
- "@typescript-eslint/no-unnecessary-type-constraint": "error",
- "@typescript-eslint/no-unsafe-declaration-merging": "error",
- "@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-useless-constructor": "error",
- "@typescript-eslint/no-var-requires": "error",
- "@typescript-eslint/prefer-as-const": "error",
- "@typescript-eslint/prefer-literal-enum-member": "error",
- "@typescript-eslint/prefer-ts-expect-error": "error",
- "@typescript-eslint/triple-slash-reference": "error",
- "@typescript-eslint/unified-signatures": "error",
- "no-array-constructor": "off",
- "no-loss-of-precision": "off",
- "no-unused-vars": "off",
- "no-useless-constructor": "off",
- },
- },
- "strict-type-checked": {
- "extends": [
- "./configs/base",
- "./configs/eslint-recommended",
- ],
- "rules": {
- "@typescript-eslint/await-thenable": "error",
- "@typescript-eslint/ban-ts-comment": [
- "error",
- {
- "minimumDescriptionLength": 10,
- },
- ],
- "@typescript-eslint/ban-types": "error",
- "@typescript-eslint/no-array-constructor": "error",
- "@typescript-eslint/no-array-delete": "error",
- "@typescript-eslint/no-base-to-string": "error",
- "@typescript-eslint/no-confusing-void-expression": "error",
- "@typescript-eslint/no-duplicate-enum-values": "error",
- "@typescript-eslint/no-duplicate-type-constituents": "error",
- "@typescript-eslint/no-dynamic-delete": "error",
- "@typescript-eslint/no-explicit-any": "error",
- "@typescript-eslint/no-extra-non-null-assertion": "error",
- "@typescript-eslint/no-extraneous-class": "error",
- "@typescript-eslint/no-floating-promises": "error",
- "@typescript-eslint/no-for-in-array": "error",
- "@typescript-eslint/no-implied-eval": "error",
- "@typescript-eslint/no-invalid-void-type": "error",
- "@typescript-eslint/no-loss-of-precision": "error",
- "@typescript-eslint/no-meaningless-void-operator": "error",
- "@typescript-eslint/no-misused-new": "error",
- "@typescript-eslint/no-misused-promises": "error",
- "@typescript-eslint/no-mixed-enums": "error",
- "@typescript-eslint/no-namespace": "error",
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
- "@typescript-eslint/no-non-null-assertion": "error",
- "@typescript-eslint/no-redundant-type-constituents": "error",
- "@typescript-eslint/no-this-alias": "error",
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
- "@typescript-eslint/no-unnecessary-condition": "error",
- "@typescript-eslint/no-unnecessary-type-arguments": "error",
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
- "@typescript-eslint/no-unnecessary-type-constraint": "error",
- "@typescript-eslint/no-unsafe-argument": "error",
- "@typescript-eslint/no-unsafe-assignment": "error",
- "@typescript-eslint/no-unsafe-call": "error",
- "@typescript-eslint/no-unsafe-declaration-merging": "error",
- "@typescript-eslint/no-unsafe-enum-comparison": "error",
- "@typescript-eslint/no-unsafe-member-access": "error",
- "@typescript-eslint/no-unsafe-return": "error",
- "@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-useless-constructor": "error",
- "@typescript-eslint/no-useless-template-literals": "error",
- "@typescript-eslint/no-var-requires": "error",
- "@typescript-eslint/only-throw-error": "error",
- "@typescript-eslint/prefer-as-const": "error",
- "@typescript-eslint/prefer-includes": "error",
- "@typescript-eslint/prefer-literal-enum-member": "error",
- "@typescript-eslint/prefer-promise-reject-errors": "error",
- "@typescript-eslint/prefer-reduce-type-parameter": "error",
- "@typescript-eslint/prefer-return-this-type": "error",
- "@typescript-eslint/prefer-ts-expect-error": "error",
- "@typescript-eslint/require-await": "error",
- "@typescript-eslint/restrict-plus-operands": [
- "error",
- {
- "allowAny": false,
- "allowBoolean": false,
- "allowNullish": false,
- "allowNumberAndString": false,
- "allowRegExp": false,
- },
- ],
- "@typescript-eslint/restrict-template-expressions": [
- "error",
- {
- "allowAny": false,
- "allowBoolean": false,
- "allowNever": false,
- "allowNullish": false,
- "allowNumber": false,
- "allowRegExp": false,
- },
- ],
- "@typescript-eslint/triple-slash-reference": "error",
- "@typescript-eslint/unbound-method": "error",
- "@typescript-eslint/unified-signatures": "error",
- "@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
- "no-array-constructor": "off",
- "no-implied-eval": "off",
- "no-loss-of-precision": "off",
- "no-throw-literal": "off",
- "no-unused-vars": "off",
- "no-useless-constructor": "off",
- "prefer-promise-reject-errors": "off",
- "require-await": "off",
- },
- },
- "strict-type-checked-only": {
- "extends": [
- "./configs/base",
- "./configs/eslint-recommended",
- ],
- "rules": {
- "@typescript-eslint/await-thenable": "error",
- "@typescript-eslint/no-array-delete": "error",
- "@typescript-eslint/no-base-to-string": "error",
- "@typescript-eslint/no-confusing-void-expression": "error",
- "@typescript-eslint/no-duplicate-type-constituents": "error",
- "@typescript-eslint/no-floating-promises": "error",
- "@typescript-eslint/no-for-in-array": "error",
- "@typescript-eslint/no-implied-eval": "error",
- "@typescript-eslint/no-meaningless-void-operator": "error",
- "@typescript-eslint/no-misused-promises": "error",
- "@typescript-eslint/no-mixed-enums": "error",
- "@typescript-eslint/no-redundant-type-constituents": "error",
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
- "@typescript-eslint/no-unnecessary-condition": "error",
- "@typescript-eslint/no-unnecessary-type-arguments": "error",
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
- "@typescript-eslint/no-unsafe-argument": "error",
- "@typescript-eslint/no-unsafe-assignment": "error",
- "@typescript-eslint/no-unsafe-call": "error",
- "@typescript-eslint/no-unsafe-enum-comparison": "error",
- "@typescript-eslint/no-unsafe-member-access": "error",
- "@typescript-eslint/no-unsafe-return": "error",
- "@typescript-eslint/no-useless-template-literals": "error",
- "@typescript-eslint/only-throw-error": "error",
- "@typescript-eslint/prefer-includes": "error",
- "@typescript-eslint/prefer-promise-reject-errors": "error",
- "@typescript-eslint/prefer-reduce-type-parameter": "error",
- "@typescript-eslint/prefer-return-this-type": "error",
- "@typescript-eslint/require-await": "error",
- "@typescript-eslint/restrict-plus-operands": [
- "error",
- {
- "allowAny": false,
- "allowBoolean": false,
- "allowNullish": false,
- "allowNumberAndString": false,
- "allowRegExp": false,
- },
- ],
- "@typescript-eslint/restrict-template-expressions": [
- "error",
- {
- "allowAny": false,
- "allowBoolean": false,
- "allowNever": false,
- "allowNullish": false,
- "allowNumber": false,
- "allowRegExp": false,
- },
- ],
- "@typescript-eslint/unbound-method": "error",
- "@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
- "no-implied-eval": "off",
- "no-throw-literal": "off",
- "prefer-promise-reject-errors": "off",
- "require-await": "off",
- },
- },
- "stylistic": {
- "extends": [
- "./configs/base",
- "./configs/eslint-recommended",
- ],
- "rules": {
- "@typescript-eslint/adjacent-overload-signatures": "error",
- "@typescript-eslint/array-type": "error",
- "@typescript-eslint/ban-tslint-comment": "error",
- "@typescript-eslint/class-literal-property-style": "error",
- "@typescript-eslint/consistent-generic-constructors": "error",
- "@typescript-eslint/consistent-indexed-object-style": "error",
- "@typescript-eslint/consistent-type-assertions": "error",
- "@typescript-eslint/consistent-type-definitions": "error",
- "@typescript-eslint/no-confusing-non-null-assertion": "error",
- "@typescript-eslint/no-empty-function": "error",
- "@typescript-eslint/no-empty-interface": "error",
- "@typescript-eslint/no-inferrable-types": "error",
- "@typescript-eslint/prefer-for-of": "error",
- "@typescript-eslint/prefer-function-type": "error",
- "@typescript-eslint/prefer-namespace-keyword": "error",
- "no-empty-function": "off",
- },
- },
- "stylistic-type-checked": {
- "extends": [
- "./configs/base",
- "./configs/eslint-recommended",
- ],
- "rules": {
- "@typescript-eslint/adjacent-overload-signatures": "error",
- "@typescript-eslint/array-type": "error",
- "@typescript-eslint/ban-tslint-comment": "error",
- "@typescript-eslint/class-literal-property-style": "error",
- "@typescript-eslint/consistent-generic-constructors": "error",
- "@typescript-eslint/consistent-indexed-object-style": "error",
- "@typescript-eslint/consistent-type-assertions": "error",
- "@typescript-eslint/consistent-type-definitions": "error",
- "@typescript-eslint/dot-notation": "error",
- "@typescript-eslint/no-confusing-non-null-assertion": "error",
- "@typescript-eslint/no-empty-function": "error",
- "@typescript-eslint/no-empty-interface": "error",
- "@typescript-eslint/no-inferrable-types": "error",
- "@typescript-eslint/non-nullable-type-assertion-style": "error",
- "@typescript-eslint/prefer-for-of": "error",
- "@typescript-eslint/prefer-function-type": "error",
- "@typescript-eslint/prefer-namespace-keyword": "error",
- "@typescript-eslint/prefer-nullish-coalescing": "error",
- "@typescript-eslint/prefer-optional-chain": "error",
- "@typescript-eslint/prefer-string-starts-ends-with": "error",
- "dot-notation": "off",
- "no-empty-function": "off",
- },
- },
- "stylistic-type-checked-only": {
- "extends": [
- "./configs/base",
- "./configs/eslint-recommended",
- ],
- "rules": {
- "@typescript-eslint/dot-notation": "error",
- "@typescript-eslint/non-nullable-type-assertion-style": "error",
- "@typescript-eslint/prefer-nullish-coalescing": "error",
- "@typescript-eslint/prefer-optional-chain": "error",
- "@typescript-eslint/prefer-string-starts-ends-with": "error",
- "dot-notation": "off",
- },
- },
- },
- "meta": {
- "name": "@typescript-eslint/eslint-plugin",
- "version": "7.6.0",
- },
- "rules": {
- "adjacent-overload-signatures": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Require that function overload signatures be consecutive",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/adjacent-overload-signatures",
- },
- "messages": {
- "adjacentSignature": "All {{name}} signatures should be adjacent.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "array-type": {
- "create": [Function],
- "defaultOptions": [
- {
- "default": "array",
- },
- ],
- "meta": {
- "docs": {
- "description": "Require consistently using either \`T[]\` or \`Array\` for arrays",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/array-type",
- },
- "fixable": "code",
- "messages": {
- "errorStringArray": "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}[]' instead.",
- "errorStringArraySimple": "Array type using '{{className}}<{{type}}>' is forbidden for simple types. Use '{{readonlyPrefix}}{{type}}[]' instead.",
- "errorStringGeneric": "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden. Use '{{className}}<{{type}}>' instead.",
- "errorStringGenericSimple": "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden for non-simple types. Use '{{className}}<{{type}}>' instead.",
- },
- "schema": [
- {
- "$defs": {
- "arrayOption": {
- "enum": [
- "array",
- "generic",
- "array-simple",
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "public",
+ "requiresQuotes",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "objectLiteralProperty",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
+ },
+ "type": "array",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'typeProperty'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "public",
+ "readonly",
+ "requiresQuotes",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "typeProperty",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
+ },
+ "type": "array",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'parameterProperty'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "private",
+ "protected",
+ "public",
+ "readonly",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "parameterProperty",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
+ },
+ "type": "array",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'property'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "private",
+ "#private",
+ "protected",
+ "public",
+ "readonly",
+ "requiresQuotes",
+ "static",
+ "override",
+ "async",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "property",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
+ },
+ "type": "array",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'classMethod'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "private",
+ "#private",
+ "protected",
+ "public",
+ "requiresQuotes",
+ "static",
+ "override",
+ "async",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "classMethod",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'objectLiteralMethod'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "public",
+ "requiresQuotes",
+ "async",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "objectLiteralMethod",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'typeMethod'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "public",
+ "requiresQuotes",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "typeMethod",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'method'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "private",
+ "#private",
+ "protected",
+ "public",
+ "requiresQuotes",
+ "static",
+ "override",
+ "async",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "method",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'classicAccessor'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "private",
+ "protected",
+ "public",
+ "requiresQuotes",
+ "static",
+ "override",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "classicAccessor",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
+ },
+ "type": "array",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'autoAccessor'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "private",
+ "protected",
+ "public",
+ "requiresQuotes",
+ "static",
+ "override",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "autoAccessor",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
+ },
+ "type": "array",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'accessor'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "private",
+ "protected",
+ "public",
+ "requiresQuotes",
+ "static",
+ "override",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "accessor",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "types": {
+ "additionalItems": false,
+ "items": {
+ "$ref": "#/$defs/typeModifiers",
+ },
+ "type": "array",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'enumMember'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "requiresQuotes",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "enumMember",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'typeLike'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "exported",
+ "unused",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "typeLike",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'class'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "abstract",
+ "exported",
+ "unused",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "class",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
],
- "type": "string",
- },
- },
- "additionalProperties": false,
- "properties": {
- "default": {
- "$ref": "#/items/0/$defs/arrayOption",
- "description": "The array type expected for mutable cases.",
+ "type": "object",
},
- "readonly": {
- "$ref": "#/items/0/$defs/arrayOption",
- "description": "The array type expected for readonly cases. If omitted, the value for \`default\` will be used.",
+ {
+ "additionalProperties": false,
+ "description": "Selector 'interface'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "exported",
+ "unused",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "interface",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
},
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "await-thenable": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow awaiting a value that is not a Thenable",
- "recommended": "recommended",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/await-thenable",
- },
- "hasSuggestions": true,
- "messages": {
- "await": "Unexpected \`await\` of a non-Promise (non-"Thenable") value.",
- "removeAwait": "Remove unnecessary \`await\`.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "ban-ts-comment": {
- "create": [Function],
- "defaultOptions": [
- {
- "minimumDescriptionLength": 3,
- "ts-check": false,
- "ts-expect-error": "allow-with-description",
- "ts-ignore": true,
- "ts-nocheck": true,
- },
- ],
- "meta": {
- "docs": {
- "description": "Disallow \`@ts-\` comments or require descriptions after directives",
- "recommended": {
- "recommended": true,
- "strict": [
{
- "minimumDescriptionLength": 10,
+ "additionalProperties": false,
+ "description": "Selector 'typeAlias'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "exported",
+ "unused",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "typeAlias",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
},
- ],
- },
- "url": "https://typescript-eslint.io/rules/ban-ts-comment",
- },
- "hasSuggestions": true,
- "messages": {
- "replaceTsIgnoreWithTsExpectError": "Replace "@ts-ignore" with "@ts-expect-error".",
- "tsDirectiveComment": "Do not use "@ts-{{directive}}" because it alters compilation errors.",
- "tsDirectiveCommentDescriptionNotMatchPattern": "The description for the "@ts-{{directive}}" directive must match the {{format}} format.",
- "tsDirectiveCommentRequiresDescription": "Include a description after the "@ts-{{directive}}" directive to explain why the @ts-{{directive}} is necessary. The description must be {{minimumDescriptionLength}} characters or longer.",
- "tsIgnoreInsteadOfExpectError": "Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free.",
- },
- "schema": [
- {
- "$defs": {
- "directiveConfigSchema": {
- "oneOf": [
- {
- "default": true,
- "type": "boolean",
+ {
+ "additionalProperties": false,
+ "description": "Selector 'enum'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ ],
},
- {
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "exported",
+ "unused",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
"enum": [
- "allow-with-description",
+ "enum",
],
"type": "string",
},
- {
- "additionalProperties": false,
- "properties": {
- "descriptionFormat": {
- "type": "string",
- },
- },
- "type": "object",
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
+ },
+ "required": [
+ "selector",
+ "format",
],
+ "type": "object",
},
- },
- "additionalProperties": false,
- "properties": {
- "minimumDescriptionLength": {
- "default": 3,
- "type": "number",
- },
- "ts-check": {
- "$ref": "#/items/0/$defs/directiveConfigSchema",
- },
- "ts-expect-error": {
- "$ref": "#/items/0/$defs/directiveConfigSchema",
- },
- "ts-ignore": {
- "$ref": "#/items/0/$defs/directiveConfigSchema",
- },
- "ts-nocheck": {
- "$ref": "#/items/0/$defs/directiveConfigSchema",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
- "ban-tslint-comment": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow \`// tslint:\` comments",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/ban-tslint-comment",
- },
- "fixable": "code",
- "messages": {
- "commentDetected": "tslint comment detected: "{{ text }}"",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "ban-types": {
- "create": [Function],
- "defaultOptions": [
- {},
- ],
- "meta": {
- "docs": {
- "description": "Disallow certain types",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/ban-types",
- },
- "fixable": "code",
- "hasSuggestions": true,
- "messages": {
- "bannedTypeMessage": "Don't use \`{{name}}\` as a type.{{customMessage}}",
- "bannedTypeReplacement": "Replace \`{{name}}\` with \`{{replacement}}\`.",
- },
- "schema": [
- {
- "$defs": {
- "banConfig": {
- "oneOf": [
- {
- "description": "Bans the type with the default message",
- "type": "null",
+ {
+ "additionalProperties": false,
+ "description": "Selector 'typeParameter'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
},
- {
- "description": "Un-bans the type (useful when paired with \`extendDefaults\`)",
- "enum": [
- false,
+ "failureMessage": {
+ "type": "string",
+ },
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
+ "type": "string",
+ },
+ {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
],
- "type": "boolean",
},
- {
- "description": "Bans the type with the default message",
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "unused",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
"enum": [
- true,
+ "typeParameter",
],
- "type": "boolean",
+ "type": "string",
},
- {
- "description": "Bans the type with a custom message",
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ },
+ "required": [
+ "selector",
+ "format",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Selector 'import'",
+ "properties": {
+ "custom": {
+ "$ref": "#/$defs/matchRegexConfig",
+ },
+ "failureMessage": {
"type": "string",
},
- {
- "additionalProperties": false,
- "description": "Bans a type",
- "properties": {
- "fixWith": {
- "description": "Type to autofix replace with. Note that autofixers can be applied automatically - so you need to be careful with this option.",
- "type": "string",
- },
- "message": {
- "description": "Custom error message",
+ "filter": {
+ "oneOf": [
+ {
+ "minLength": 1,
"type": "string",
},
- "suggest": {
- "additionalItems": false,
- "description": "Types to suggest replacing with.",
- "items": {
- "type": "string",
- },
- "type": "array",
+ {
+ "$ref": "#/$defs/matchRegexConfig",
},
+ ],
+ },
+ "format": {
+ "$ref": "#/$defs/formatOptionsConfig",
+ },
+ "leadingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
+ },
+ "modifiers": {
+ "additionalItems": false,
+ "items": {
+ "enum": [
+ "default",
+ "namespace",
+ ],
+ "type": "string",
},
- "type": "object",
+ "type": "array",
+ },
+ "prefix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "selector": {
+ "enum": [
+ "import",
+ ],
+ "type": "string",
+ },
+ "suffix": {
+ "$ref": "#/$defs/prefixSuffixConfig",
+ },
+ "trailingUnderscore": {
+ "$ref": "#/$defs/underscoreOptions",
},
- ],
- },
- },
- "additionalProperties": false,
- "properties": {
- "extendDefaults": {
- "type": "boolean",
- },
- "types": {
- "additionalProperties": {
- "$ref": "#/items/0/$defs/banConfig",
},
+ "required": [
+ "selector",
+ "format",
+ ],
"type": "object",
},
- },
- "type": "object",
+ ],
},
- ],
+ "type": "array",
+ },
+ "type": "suggestion",
+ },
+ },
+ "no-array-constructor": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow generic \`Array\` constructors",
+ "extendsBaseRule": true,
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-array-constructor",
+ },
+ "fixable": "code",
+ "messages": {
+ "useLiteral": "The array literal notation [] is preferable.",
+ },
+ "schema": [],
"type": "suggestion",
},
},
- "block-spacing": {
+ "no-array-delete": {
"create": [Function],
- "defaultOptions": [
- "always",
- ],
+ "defaultOptions": [],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Disallow or enforce spaces inside of blocks after opening block and before closing block",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/block-spacing",
+ "description": "Disallow using the \`delete\` operator on array values",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-array-delete",
},
- "fixable": "whitespace",
- "hasSuggestions": undefined,
+ "hasSuggestions": true,
"messages": {
- "extra": "Unexpected space(s) {{location}} '{{token}}'.",
- "missing": "Requires a space {{location}} '{{token}}'.",
+ "noArrayDelete": "Using the \`delete\` operator with an array expression is unsafe.",
+ "useSplice": "Use \`array.splice()\` instead.",
},
- "replacedBy": [
- "@stylistic/ts/block-spacing",
- ],
- "schema": [
- {
- "enum": [
- "always",
- "never",
- ],
- },
- ],
- "type": "layout",
+ "schema": [],
+ "type": "problem",
},
},
- "brace-style": {
+ "no-base-to-string": {
"create": [Function],
"defaultOptions": [
- "1tbs",
+ {
+ "ignoredTypeNames": [
+ "Error",
+ "RegExp",
+ "URL",
+ "URLSearchParams",
+ ],
+ },
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Enforce consistent brace style for blocks",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/brace-style",
+ "description": "Require \`.toString()\` and \`.toLocaleString()\` to only be called on objects which provide useful information when stringified",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-base-to-string",
},
- "fixable": "whitespace",
- "hasSuggestions": undefined,
"messages": {
- "blockSameLine": "Statement inside of curly braces should be on next line.",
- "nextLineClose": "Closing curly brace does not appear on the same line as the subsequent block.",
- "nextLineOpen": "Opening curly brace does not appear on the same line as controlling statement.",
- "sameLineClose": "Closing curly brace appears on the same line as the subsequent block.",
- "sameLineOpen": "Opening curly brace appears on the same line as controlling statement.",
- "singleLineClose": "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",
+ "baseToString": "'{{name}}' {{certainty}} use Object's default stringification format ('[object Object]') when stringified.",
},
- "replacedBy": [
- "@stylistic/ts/brace-style",
- ],
"schema": [
- {
- "enum": [
- "1tbs",
- "stroustrup",
- "allman",
- ],
- },
{
"additionalProperties": false,
"properties": {
- "allowSingleLine": {
- "default": false,
- "type": "boolean",
+ "ignoredTypeNames": {
+ "description": "Stringified regular expressions of type names to ignore.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
},
},
"type": "object",
},
],
- "type": "layout",
+ "type": "suggestion",
},
},
- "class-literal-property-style": {
+ "no-confusing-non-null-assertion": {
"create": [Function],
- "defaultOptions": [
- "fields",
- ],
+ "defaultOptions": [],
"meta": {
"docs": {
- "description": "Enforce that literals on classes are exposed in a consistent style",
+ "description": "Disallow non-null assertion in locations that may be confusing",
"recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/class-literal-property-style",
+ "url": "https://typescript-eslint.io/rules/no-confusing-non-null-assertion",
},
"hasSuggestions": true,
"messages": {
- "preferFieldStyle": "Literals should be exposed using readonly fields.",
- "preferFieldStyleSuggestion": "Replace the literals with readonly fields.",
- "preferGetterStyle": "Literals should be exposed using getters.",
- "preferGetterStyleSuggestion": "Replace the literals with getters.",
+ "confusingAssign": "Confusing combination of non-null assertion and assignment like \`a! = b\`, which looks very similar to \`a != b\`.",
+ "confusingEqual": "Confusing combination of non-null assertion and equality test like \`a! == b\`, which looks very similar to \`a !== b\`.",
+ "confusingOperator": "Confusing combination of non-null assertion and \`{{operator}}\` operator like \`a! {{operator}} b\`, which might be misinterpreted as \`!(a {{operator}} b)\`.",
+ "notNeedInAssign": "Remove unnecessary non-null assertion (!) in assignment left-hand side.",
+ "notNeedInEqualTest": "Remove unnecessary non-null assertion (!) in equality test.",
+ "notNeedInOperator": "Remove possibly unnecessary non-null assertion (!) in the left operand of the \`{{operator}}\` operator.",
+ "wrapUpLeft": "Wrap the left-hand side in parentheses to avoid confusion with "{{operator}}" operator.",
},
- "schema": [
- {
- "enum": [
- "fields",
- "getters",
- ],
- "type": "string",
- },
- ],
+ "schema": [],
"type": "problem",
},
},
- "class-methods-use-this": {
+ "no-confusing-void-expression": {
"create": [Function],
"defaultOptions": [
{
- "enforceForClassFields": true,
- "exceptMethods": [],
- "ignoreClassesThatImplementAnInterface": false,
- "ignoreOverrideMethods": false,
+ "ignoreArrowShorthand": false,
+ "ignoreVoidOperator": false,
},
],
"meta": {
"docs": {
- "description": "Enforce that class methods utilize \`this\`",
- "extendsBaseRule": true,
- "requiresTypeChecking": false,
- "url": "https://typescript-eslint.io/rules/class-methods-use-this",
+ "description": "Require expressions of type void to appear in statement position",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-confusing-void-expression",
},
+ "fixable": "code",
+ "hasSuggestions": true,
"messages": {
- "missingThis": "Expected 'this' to be used by class {{name}}.",
+ "invalidVoidExpr": "Placing a void expression inside another expression is forbidden. Move it to its own statement instead.",
+ "invalidVoidExprArrow": "Returning a void expression from an arrow function shorthand is forbidden. Please add braces to the arrow function.",
+ "invalidVoidExprArrowWrapVoid": "Void expressions returned from an arrow function shorthand must be marked explicitly with the \`void\` operator.",
+ "invalidVoidExprReturn": "Returning a void expression from a function is forbidden. Please move it before the \`return\` statement.",
+ "invalidVoidExprReturnLast": "Returning a void expression from a function is forbidden. Please remove the \`return\` statement.",
+ "invalidVoidExprReturnWrapVoid": "Void expressions returned from a function must be marked explicitly with the \`void\` operator.",
+ "invalidVoidExprWrapVoid": "Void expressions used inside another expression must be moved to its own statement or marked explicitly with the \`void\` operator.",
+ "voidExprWrapVoid": "Mark with an explicit \`void\` operator.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
- "enforceForClassFields": {
- "default": true,
- "description": "Enforces that functions used as instance field initializers utilize \`this\`",
+ "ignoreArrowShorthand": {
+ "description": "Whether to ignore "shorthand" \`() =>\` arrow functions: those without \`{ ... }\` braces.",
"type": "boolean",
},
- "exceptMethods": {
- "description": "Allows specified method names to be ignored with this rule",
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- "ignoreClassesThatImplementAnInterface": {
- "description": "Ignore classes that specifically implement some interface",
- "oneOf": [
- {
- "description": "Ignore all classes that implement an interface",
- "type": "boolean",
- },
- {
- "description": "Ignore only the public fields of classes that implement an interface",
- "enum": [
- "public-fields",
- ],
- "type": "string",
- },
- ],
- },
- "ignoreOverrideMethods": {
- "description": "Ignore members marked with the \`override\` modifier",
+ "ignoreVoidOperator": {
+ "description": "Whether to ignore returns that start with the \`void\` operator.",
"type": "boolean",
},
},
"type": "object",
},
],
- "type": "suggestion",
+ "type": "problem",
},
},
- "comma-dangle": {
+ "no-deprecated": {
"create": [Function],
- "defaultOptions": [
- "never",
- ],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow using code marked as \`@deprecated\`",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-deprecated",
+ },
+ "messages": {
+ "deprecated": "\`{{name}}\` is deprecated.",
+ "deprecatedWithReason": "\`{{name}}\` is deprecated. {{reason}}",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-dupe-class-members": {
+ "create": [Function],
+ "defaultOptions": [],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Require or disallow trailing commas",
+ "description": "Disallow duplicate class members",
"extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/comma-dangle",
+ "url": "https://typescript-eslint.io/rules/no-dupe-class-members",
},
- "fixable": "code",
"hasSuggestions": undefined,
"messages": {
- "missing": "Missing trailing comma.",
- "unexpected": "Unexpected trailing comma.",
- },
- "replacedBy": [
- "@stylistic/ts/comma-dangle",
- ],
- "schema": {
- "$defs": {
- "value": {
- "enum": [
- "always-multiline",
- "always",
- "never",
- "only-multiline",
- ],
- "type": "string",
- },
- "valueWithIgnore": {
- "enum": [
- "always-multiline",
- "always",
- "never",
- "only-multiline",
- "ignore",
- ],
- "type": "string",
- },
- },
- "additionalItems": false,
- "items": [
- {
- "oneOf": [
- {
- "$ref": "#/$defs/value",
- },
- {
- "additionalProperties": false,
- "properties": {
- "arrays": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "enums": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "exports": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "functions": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "generics": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "imports": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "objects": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- "tuples": {
- "$ref": "#/$defs/valueWithIgnore",
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "array",
+ "unexpected": "Duplicate name '{{name}}'.",
},
- "type": "layout",
+ "schema": [],
+ "type": "problem",
},
},
- "comma-spacing": {
+ "no-duplicate-enum-values": {
"create": [Function],
- "defaultOptions": [
- {
- "after": true,
- "before": false,
- },
- ],
+ "defaultOptions": [],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Enforce consistent spacing before and after commas",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/comma-spacing",
+ "description": "Disallow duplicate enum member values",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-duplicate-enum-values",
},
- "fixable": "whitespace",
+ "hasSuggestions": false,
"messages": {
- "missing": "A space is required {{loc}} ','.",
- "unexpected": "There should be no space {{loc}} ','.",
+ "duplicateValue": "Duplicate enum member value {{value}}.",
},
- "replacedBy": [
- "@stylistic/ts/comma-spacing",
- ],
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "after": {
- "default": true,
- "type": "boolean",
- },
- "before": {
- "default": false,
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
+ "schema": [],
+ "type": "problem",
},
},
- "consistent-generic-constructors": {
+ "no-duplicate-type-constituents": {
"create": [Function],
"defaultOptions": [
- "constructor",
+ {
+ "ignoreIntersections": false,
+ "ignoreUnions": false,
+ },
],
"meta": {
"docs": {
- "description": "Enforce specifying generic type arguments on type annotation or constructor name of a constructor call",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/consistent-generic-constructors",
+ "description": "Disallow duplicate constituents of union or intersection types",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-duplicate-type-constituents",
},
"fixable": "code",
"messages": {
- "preferConstructor": "The generic type arguments should be specified as part of the constructor type arguments.",
- "preferTypeAnnotation": "The generic type arguments should be specified as part of the type annotation.",
+ "duplicate": "{{type}} type constituent is duplicated with {{previous}}.",
+ "unnecessary": "Explicit undefined is unnecessary on an optional parameter.",
},
"schema": [
{
- "enum": [
- "type-annotation",
- "constructor",
- ],
- "type": "string",
+ "additionalProperties": false,
+ "properties": {
+ "ignoreIntersections": {
+ "description": "Whether to ignore \`&\` intersections.",
+ "type": "boolean",
+ },
+ "ignoreUnions": {
+ "description": "Whether to ignore \`|\` unions.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
},
],
"type": "suggestion",
},
},
- "consistent-indexed-object-style": {
+ "no-dynamic-delete": {
"create": [Function],
- "defaultOptions": [
- "record",
- ],
+ "defaultOptions": [],
"meta": {
"docs": {
- "description": "Require or disallow the \`Record\` type",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/consistent-indexed-object-style",
+ "description": "Disallow using the \`delete\` operator on computed key expressions",
+ "recommended": "strict",
+ "url": "https://typescript-eslint.io/rules/no-dynamic-delete",
},
"fixable": "code",
"messages": {
- "preferIndexSignature": "An index signature is preferred over a record.",
- "preferRecord": "A record is preferred over an index signature.",
+ "dynamicDelete": "Do not delete dynamically computed property keys.",
},
- "schema": [
- {
- "enum": [
- "record",
- "index-signature",
- ],
- "type": "string",
- },
- ],
+ "schema": [],
"type": "suggestion",
},
},
- "consistent-return": {
+ "no-empty-function": {
"create": [Function],
"defaultOptions": [
{
- "treatUndefinedAsUnspecified": false,
+ "allow": [],
},
],
"meta": {
"docs": {
- "description": "Require \`return\` statements to either always or never specify values",
+ "description": "Disallow empty functions",
"extendsBaseRule": true,
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/consistent-return",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/no-empty-function",
},
"hasSuggestions": undefined,
"messages": {
- "missingReturn": "Expected to return a value at the end of {{name}}.",
- "missingReturnValue": "{{name}} expected a return value.",
- "unexpectedReturnValue": "{{name}} expected no return value.",
+ "unexpected": "Unexpected empty {{name}}.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
- "treatUndefinedAsUnspecified": {
- "default": false,
- "type": "boolean",
+ "allow": {
+ "description": "Locations and kinds of functions that are allowed to be empty.",
+ "items": {
+ "enum": [
+ "functions",
+ "arrowFunctions",
+ "generatorFunctions",
+ "methods",
+ "generatorMethods",
+ "getters",
+ "setters",
+ "constructors",
+ "private-constructors",
+ "protected-constructors",
+ "asyncFunctions",
+ "asyncMethods",
+ "decoratedFunctions",
+ "overrideMethods",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ "uniqueItems": true,
},
},
"type": "object",
@@ -22545,130 +13096,135 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"type": "suggestion",
},
},
- "consistent-type-assertions": {
+ "no-empty-interface": {
"create": [Function],
"defaultOptions": [
{
- "assertionStyle": "as",
- "objectLiteralTypeAssertions": "allow",
+ "allowSingleExtends": false,
},
],
"meta": {
+ "deprecated": true,
"docs": {
- "description": "Enforce consistent usage of type assertions",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/consistent-type-assertions",
+ "description": "Disallow the declaration of empty interfaces",
+ "url": "https://typescript-eslint.io/rules/no-empty-interface",
},
"fixable": "code",
"hasSuggestions": true,
"messages": {
- "angle-bracket": "Use '<{{cast}}>' instead of 'as {{cast}}'.",
- "as": "Use 'as {{cast}}' instead of '<{{cast}}>'.",
- "never": "Do not use any type assertions.",
- "replaceObjectTypeAssertionWithAnnotation": "Use const x: {{cast}} = { ... } instead.",
- "replaceObjectTypeAssertionWithSatisfies": "Use const x = { ... } satisfies {{cast}} instead.",
- "unexpectedObjectTypeAssertion": "Always prefer const x: T = { ... }.",
+ "noEmpty": "An empty interface is equivalent to \`{}\`.",
+ "noEmptyWithSuper": "An interface declaring no members is equivalent to its supertype.",
},
+ "replacedBy": [
+ "@typescript-eslint/no-empty-object-type",
+ ],
"schema": [
{
- "oneOf": [
- {
- "additionalProperties": false,
- "properties": {
- "assertionStyle": {
- "enum": [
- "never",
- ],
- "type": "string",
- },
- },
- "required": [
- "assertionStyle",
- ],
- "type": "object",
- },
- {
- "additionalProperties": false,
- "properties": {
- "assertionStyle": {
- "enum": [
- "as",
- "angle-bracket",
- ],
- "type": "string",
- },
- "objectLiteralTypeAssertions": {
- "enum": [
- "allow",
- "allow-as-parameter",
- "never",
- ],
- "type": "string",
- },
- },
- "required": [
- "assertionStyle",
- ],
- "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "allowSingleExtends": {
+ "description": "Whether to allow empty interfaces that extend a single other interface.",
+ "type": "boolean",
},
- ],
+ },
+ "type": "object",
},
],
"type": "suggestion",
},
},
- "consistent-type-definitions": {
+ "no-empty-object-type": {
"create": [Function],
"defaultOptions": [
- "interface",
+ {
+ "allowInterfaces": "never",
+ "allowObjectTypes": "never",
+ },
],
"meta": {
"docs": {
- "description": "Enforce type definitions to consistently use either \`interface\` or \`type\`",
- "recommended": "stylistic",
- "url": "https://typescript-eslint.io/rules/consistent-type-definitions",
+ "description": "Disallow accidentally using the "empty object" type",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-empty-object-type",
},
- "fixable": "code",
+ "hasSuggestions": true,
"messages": {
- "interfaceOverType": "Use an \`interface\` instead of a \`type\`.",
- "typeOverInterface": "Use a \`type\` instead of an \`interface\`.",
+ "noEmptyInterface": "An empty interface declaration allows any non-nullish value, including literals like \`0\` and \`""\`.
+- If that's what you want, disable this lint rule with an inline comment or configure the '{{ option }}' rule option.
+- If you want a type meaning "any object", you probably want \`object\` instead.
+- If you want a type meaning "any value", you probably want \`unknown\` instead.",
+ "noEmptyInterfaceWithSuper": "An interface declaring no members is equivalent to its supertype.",
+ "noEmptyObject": "The \`{}\` ("empty object") type allows any non-nullish value, including literals like \`0\` and \`""\`.
+- If that's what you want, disable this lint rule with an inline comment or configure the '{{ option }}' rule option.
+- If you want a type meaning "any object", you probably want \`object\` instead.
+- If you want a type meaning "any value", you probably want \`unknown\` instead.",
+ "replaceEmptyInterface": "Replace empty interface with \`{{replacement}}\`.",
+ "replaceEmptyInterfaceWithSuper": "Replace empty interface with a type alias.",
+ "replaceEmptyObjectType": "Replace \`{}\` with \`{{replacement}}\`.",
},
"schema": [
{
- "enum": [
- "interface",
- "type",
- ],
- "type": "string",
+ "additionalProperties": false,
+ "properties": {
+ "allowInterfaces": {
+ "description": "Whether to allow empty interfaces.",
+ "enum": [
+ "always",
+ "never",
+ "with-single-extends",
+ ],
+ "type": "string",
+ },
+ "allowObjectTypes": {
+ "description": "Whether to allow empty object type literals.",
+ "enum": [
+ "always",
+ "never",
+ ],
+ "type": "string",
+ },
+ "allowWithName": {
+ "description": "A stringified regular expression to allow interfaces and object type aliases with the configured name.",
+ "type": "string",
+ },
+ },
+ "type": "object",
},
],
"type": "suggestion",
},
},
- "consistent-type-exports": {
+ "no-explicit-any": {
"create": [Function],
"defaultOptions": [
{
- "fixMixedExportsWithInlineTypeSpecifier": false,
+ "fixToUnknown": false,
+ "ignoreRestArgs": false,
},
],
"meta": {
"docs": {
- "description": "Enforce consistent usage of type exports",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/consistent-type-exports",
+ "description": "Disallow the \`any\` type",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-explicit-any",
},
"fixable": "code",
+ "hasSuggestions": true,
"messages": {
- "multipleExportsAreTypes": "Type exports {{exportNames}} are not values and should be exported using \`export type\`.",
- "singleExportIsType": "Type export {{exportNames}} is not a value and should be exported using \`export type\`.",
- "typeOverValue": "All exports in the declaration are only used as types. Use \`export type\`.",
+ "suggestNever": "Use \`never\` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.",
+ "suggestUnknown": "Use \`unknown\` instead, this will force you to explicitly, and safely assert the type is correct.",
+ "unexpectedAny": "Unexpected any. Specify a different type.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
- "fixMixedExportsWithInlineTypeSpecifier": {
+ "fixToUnknown": {
+ "description": "Whether to enable auto-fixing in which the \`any\` type is converted to the \`unknown\` type.",
+ "type": "boolean",
+ },
+ "ignoreRestArgs": {
+ "description": "Whether to ignore rest parameter arrays.",
"type": "boolean",
},
},
@@ -22678,47 +13234,63 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"type": "suggestion",
},
},
- "consistent-type-imports": {
+ "no-extra-non-null-assertion": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow extra non-null assertions",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-extra-non-null-assertion",
+ },
+ "fixable": "code",
+ "messages": {
+ "noExtraNonNullAssertion": "Forbidden extra non-null assertion.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-extraneous-class": {
"create": [Function],
"defaultOptions": [
{
- "disallowTypeAnnotations": true,
- "fixStyle": "separate-type-imports",
- "prefer": "type-imports",
+ "allowConstructorOnly": false,
+ "allowEmpty": false,
+ "allowStaticOnly": false,
+ "allowWithDecorator": false,
},
],
"meta": {
"docs": {
- "description": "Enforce consistent usage of type imports",
- "url": "https://typescript-eslint.io/rules/consistent-type-imports",
+ "description": "Disallow classes used as namespaces",
+ "recommended": "strict",
+ "url": "https://typescript-eslint.io/rules/no-extraneous-class",
},
- "fixable": "code",
"messages": {
- "avoidImportType": "Use an \`import\` instead of an \`import type\`.",
- "noImportTypeAnnotations": "\`import()\` type annotations are forbidden.",
- "someImportsAreOnlyTypes": "Imports {{typeImports}} are only used as type.",
- "typeOverValue": "All imports in the declaration are only used as types. Use \`import type\`.",
+ "empty": "Unexpected empty class.",
+ "onlyConstructor": "Unexpected class with only a constructor.",
+ "onlyStatic": "Unexpected class with only static properties.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
- "disallowTypeAnnotations": {
+ "allowConstructorOnly": {
+ "description": "Whether to allow extraneous classes that contain only a constructor.",
+ "type": "boolean",
+ },
+ "allowEmpty": {
+ "description": "Whether to allow extraneous classes that have no body (i.e. are empty).",
+ "type": "boolean",
+ },
+ "allowStaticOnly": {
+ "description": "Whether to allow extraneous classes that only contain static members.",
"type": "boolean",
},
- "fixStyle": {
- "enum": [
- "separate-type-imports",
- "inline-type-imports",
- ],
- "type": "string",
- },
- "prefer": {
- "enum": [
- "type-imports",
- "no-type-imports",
- ],
- "type": "string",
+ "allowWithDecorator": {
+ "description": "Whether to allow extraneous classes that include a decorator.",
+ "type": "boolean",
},
},
"type": "object",
@@ -22727,633 +13299,445 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"type": "suggestion",
},
},
- "default-param-last": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Enforce default parameters to be last",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/default-param-last",
- },
- "messages": {
- "shouldBeLast": "Default parameters should be last.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
- "dot-notation": {
+ "no-floating-promises": {
"create": [Function],
"defaultOptions": [
{
- "allowIndexSignaturePropertyAccess": false,
- "allowKeywords": true,
- "allowPattern": "",
- "allowPrivateClassPropertyAccess": false,
- "allowProtectedClassPropertyAccess": false,
+ "allowForKnownSafeCalls": [],
+ "allowForKnownSafePromises": [],
+ "checkThenables": false,
+ "ignoreIIFE": false,
+ "ignoreVoid": true,
},
],
"meta": {
"docs": {
- "description": "Enforce dot notation whenever possible",
- "extendsBaseRule": true,
- "recommended": "stylistic",
+ "description": "Require Promise-like statements to be handled appropriately",
+ "recommended": "recommended",
"requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/dot-notation",
+ "url": "https://typescript-eslint.io/rules/no-floating-promises",
},
- "fixable": "code",
- "hasSuggestions": undefined,
+ "hasSuggestions": true,
"messages": {
- "useBrackets": ".{{key}} is a syntax error.",
- "useDot": "[{{key}}] is better written in dot notation.",
+ "floating": "Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler.",
+ "floatingFixAwait": "Add await operator.",
+ "floatingFixVoid": "Add void operator to ignore.",
+ "floatingPromiseArray": "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar.",
+ "floatingPromiseArrayVoid": "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the \`void\` operator.",
+ "floatingUselessRejectionHandler": "Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler. A rejection handler that is not a function will be ignored.",
+ "floatingUselessRejectionHandlerVoid": "Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the \`void\` operator. A rejection handler that is not a function will be ignored.",
+ "floatingVoid": "Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the \`void\` operator.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
- "allowIndexSignaturePropertyAccess": {
- "default": false,
- "type": "boolean",
+ "allowForKnownSafeCalls": {
+ "description": "Type specifiers of functions whose calls are safe to float.",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "file",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "path": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "lib",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "package",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "package": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ "package",
+ ],
+ "type": "object",
+ },
+ ],
+ },
+ "type": "array",
+ },
+ "allowForKnownSafePromises": {
+ "description": "Type specifiers that are known to be safe to float.",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "file",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "path": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "lib",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "package",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "package": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ "package",
+ ],
+ "type": "object",
+ },
+ ],
+ },
+ "type": "array",
},
- "allowKeywords": {
- "default": true,
+ "checkThenables": {
+ "description": "Whether to check all "Thenable"s, not just the built-in Promise type.",
"type": "boolean",
},
- "allowPattern": {
- "default": "",
- "type": "string",
- },
- "allowPrivateClassPropertyAccess": {
- "default": false,
+ "ignoreIIFE": {
+ "description": "Whether to ignore async IIFEs (Immediately Invoked Function Expressions).",
"type": "boolean",
},
- "allowProtectedClassPropertyAccess": {
- "default": false,
+ "ignoreVoid": {
+ "description": "Whether to ignore \`void\` expressions.",
"type": "boolean",
},
},
"type": "object",
},
],
- "type": "suggestion",
+ "type": "problem",
},
},
- "explicit-function-return-type": {
+ "no-for-in-array": {
"create": [Function],
- "defaultOptions": [
- {
- "allowConciseArrowFunctionExpressionsStartingWithVoid": false,
- "allowDirectConstAssertionInArrowFunctions": true,
- "allowExpressions": false,
- "allowFunctionsWithoutTypeParameters": false,
- "allowHigherOrderFunctions": true,
- "allowIIFEs": false,
- "allowTypedFunctionExpressions": true,
- "allowedNames": [],
- },
- ],
+ "defaultOptions": [],
"meta": {
"docs": {
- "description": "Require explicit return types on functions and class methods",
- "url": "https://typescript-eslint.io/rules/explicit-function-return-type",
+ "description": "Disallow iterating over an array with a for-in loop",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-for-in-array",
},
"messages": {
- "missingReturnType": "Missing return type on function.",
+ "forInViolation": "For-in loops over arrays skips holes, returns indices as strings, and may visit the prototype chain or other enumerable properties. Use a more robust iteration method such as for-of or array.forEach instead.",
},
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowConciseArrowFunctionExpressionsStartingWithVoid": {
- "description": "Whether to allow arrow functions that start with the \`void\` keyword.",
- "type": "boolean",
- },
- "allowDirectConstAssertionInArrowFunctions": {
- "description": "Whether to ignore arrow functions immediately returning a \`as const\` value.",
- "type": "boolean",
- },
- "allowExpressions": {
- "description": "Whether to ignore function expressions (functions which are not part of a declaration).",
- "type": "boolean",
- },
- "allowFunctionsWithoutTypeParameters": {
- "description": "Whether to ignore functions that don't have generic type parameters.",
- "type": "boolean",
- },
- "allowHigherOrderFunctions": {
- "description": "Whether to ignore functions immediately returning another function expression.",
- "type": "boolean",
- },
- "allowIIFEs": {
- "description": "Whether to ignore immediately invoked function expressions (IIFEs).",
- "type": "boolean",
- },
- "allowTypedFunctionExpressions": {
- "description": "Whether to ignore type annotations on the variable of function expressions.",
- "type": "boolean",
- },
- "allowedNames": {
- "description": "An array of function/method names that will not have their arguments or return values checked.",
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- },
- "type": "object",
- },
- ],
+ "schema": [],
"type": "problem",
},
},
- "explicit-member-accessibility": {
+ "no-implied-eval": {
"create": [Function],
- "defaultOptions": [
- {
- "accessibility": "explicit",
- },
- ],
+ "defaultOptions": [],
"meta": {
"docs": {
- "description": "Require explicit accessibility modifiers on class properties and methods",
- "url": "https://typescript-eslint.io/rules/explicit-member-accessibility",
+ "description": "Disallow the use of \`eval()\`-like methods",
+ "extendsBaseRule": true,
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-implied-eval",
},
- "fixable": "code",
- "hasSuggestions": true,
"messages": {
- "addExplicitAccessibility": "Add '{{ type }}' accessibility modifier",
- "missingAccessibility": "Missing accessibility modifier on {{type}} {{name}}.",
- "unwantedPublicAccessibility": "Public accessibility modifier on {{type}} {{name}}.",
+ "noFunctionConstructor": "Implied eval. Do not use the Function constructor to create functions.",
+ "noImpliedEvalError": "Implied eval. Consider passing a function.",
},
- "schema": [
- {
- "$defs": {
- "accessibilityLevel": {
- "oneOf": [
- {
- "description": "Always require an accessor.",
- "enum": [
- "explicit",
- ],
- "type": "string",
- },
- {
- "description": "Require an accessor except when public.",
- "enum": [
- "no-public",
- ],
- "type": "string",
- },
- {
- "description": "Never check whether there is an accessor.",
- "enum": [
- "off",
- ],
- "type": "string",
- },
- ],
- },
- },
- "additionalProperties": false,
- "properties": {
- "accessibility": {
- "$ref": "#/items/0/$defs/accessibilityLevel",
- },
- "ignoredMethodNames": {
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- "overrides": {
- "additionalProperties": false,
- "properties": {
- "accessors": {
- "$ref": "#/items/0/$defs/accessibilityLevel",
- },
- "constructors": {
- "$ref": "#/items/0/$defs/accessibilityLevel",
- },
- "methods": {
- "$ref": "#/items/0/$defs/accessibilityLevel",
- },
- "parameterProperties": {
- "$ref": "#/items/0/$defs/accessibilityLevel",
- },
- "properties": {
- "$ref": "#/items/0/$defs/accessibilityLevel",
- },
- },
- "type": "object",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
+ "schema": [],
+ "type": "suggestion",
},
},
- "explicit-module-boundary-types": {
+ "no-import-type-side-effects": {
"create": [Function],
- "defaultOptions": [
- {
- "allowArgumentsExplicitlyTypedAsAny": false,
- "allowDirectConstAssertionInArrowFunctions": true,
- "allowHigherOrderFunctions": true,
- "allowTypedFunctionExpressions": true,
- "allowedNames": [],
- },
- ],
+ "defaultOptions": [],
"meta": {
"docs": {
- "description": "Require explicit return and argument types on exported functions' and classes' public class methods",
- "url": "https://typescript-eslint.io/rules/explicit-module-boundary-types",
+ "description": "Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers",
+ "url": "https://typescript-eslint.io/rules/no-import-type-side-effects",
},
+ "fixable": "code",
"messages": {
- "anyTypedArg": "Argument '{{name}}' should be typed with a non-any type.",
- "anyTypedArgUnnamed": "{{type}} argument should be typed with a non-any type.",
- "missingArgType": "Argument '{{name}}' should be typed.",
- "missingArgTypeUnnamed": "{{type}} argument should be typed.",
- "missingReturnType": "Missing return type on function.",
- },
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowArgumentsExplicitlyTypedAsAny": {
- "description": "Whether to ignore arguments that are explicitly typed as \`any\`.",
- "type": "boolean",
- },
- "allowDirectConstAssertionInArrowFunctions": {
- "description": "Whether to ignore return type annotations on body-less arrow functions that return an \`as const\` type assertion.
-You must still type the parameters of the function.",
- "type": "boolean",
- },
- "allowHigherOrderFunctions": {
- "description": "Whether to ignore return type annotations on functions immediately returning another function expression.
-You must still type the parameters of the function.",
- "type": "boolean",
- },
- "allowTypedFunctionExpressions": {
- "description": "Whether to ignore type annotations on the variable of a function expression.",
- "type": "boolean",
- },
- "allowedNames": {
- "description": "An array of function/method names that will not have their arguments or return values checked.",
- "items": {
- "type": "string",
- },
- "type": "array",
- },
- },
- "type": "object",
- },
- ],
+ "useTopLevelQualifier": "TypeScript will only remove the inline type specifiers which will leave behind a side effect import at runtime. Convert this to a top-level type qualifier to properly remove the entire import.",
+ },
+ "schema": [],
"type": "problem",
},
},
- "func-call-spacing": {
+ "no-inferrable-types": {
"create": [Function],
"defaultOptions": [
- "never",
- {},
+ {
+ "ignoreParameters": false,
+ "ignoreProperties": false,
+ },
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Require or disallow spacing between function identifiers and their invocations",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/func-call-spacing",
+ "description": "Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/no-inferrable-types",
},
- "fixable": "whitespace",
+ "fixable": "code",
"messages": {
- "missing": "Missing space between function name and paren.",
- "unexpectedNewline": "Unexpected newline between function name and paren.",
- "unexpectedWhitespace": "Unexpected whitespace between function name and paren.",
+ "noInferrableType": "Type {{type}} trivially inferred from a {{type}} literal, remove type annotation.",
},
- "replacedBy": [
- "@stylistic/ts/func-call-spacing",
- ],
- "schema": {
- "anyOf": [
- {
- "items": [
- {
- "enum": [
- "never",
- ],
- "type": "string",
- },
- ],
- "maxItems": 1,
- "minItems": 0,
- "type": "array",
- },
- {
- "items": [
- {
- "enum": [
- "always",
- ],
- "type": "string",
- },
- {
- "additionalProperties": false,
- "properties": {
- "allowNewlines": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "maxItems": 2,
- "minItems": 0,
- "type": "array",
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "ignoreParameters": {
+ "description": "Whether to ignore function parameters.",
+ "type": "boolean",
+ },
+ "ignoreProperties": {
+ "description": "Whether to ignore class properties.",
+ "type": "boolean",
+ },
},
- ],
- },
- "type": "layout",
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
},
},
- "indent": {
+ "no-invalid-this": {
"create": [Function],
"defaultOptions": [
- 4,
{
- "SwitchCase": 1,
- "flatTernaryExpressions": false,
- "ignoredNodes": [],
+ "capIsConstructor": true,
},
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Enforce consistent indentation",
+ "description": "Disallow \`this\` keywords outside of classes or class-like objects",
"extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/indent",
+ "url": "https://typescript-eslint.io/rules/no-invalid-this",
},
- "fixable": "whitespace",
"hasSuggestions": undefined,
"messages": {
- "wrongIndentation": "Expected indentation of {{expected}} but found {{actual}}.",
+ "unexpectedThis": "Unexpected 'this'.",
},
- "replacedBy": [
- "@stylistic/ts/indent",
- ],
"schema": [
- {
- "oneOf": [
- {
- "enum": [
- "tab",
- ],
- },
- {
- "minimum": 0,
- "type": "integer",
- },
- ],
- },
{
"additionalProperties": false,
"properties": {
- "ArrayExpression": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "CallExpression": {
- "additionalProperties": false,
- "properties": {
- "arguments": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- },
- "type": "object",
- },
- "FunctionDeclaration": {
- "additionalProperties": false,
- "properties": {
- "body": {
- "minimum": 0,
- "type": "integer",
- },
- "parameters": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- },
- "type": "object",
- },
- "FunctionExpression": {
- "additionalProperties": false,
- "properties": {
- "body": {
- "minimum": 0,
- "type": "integer",
- },
- "parameters": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- },
- "type": "object",
- },
- "ImportDeclaration": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "MemberExpression": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "off",
- ],
- },
- ],
- },
- "ObjectExpression": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "StaticBlock": {
- "additionalProperties": false,
- "properties": {
- "body": {
- "minimum": 0,
- "type": "integer",
- },
- },
- "type": "object",
- },
- "SwitchCase": {
- "default": 0,
- "minimum": 0,
- "type": "integer",
- },
- "VariableDeclarator": {
- "oneOf": [
- {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "const": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "let": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- "var": {
- "oneOf": [
- {
- "minimum": 0,
- "type": "integer",
- },
- {
- "enum": [
- "first",
- "off",
- ],
- },
- ],
- },
- },
- "type": "object",
- },
- ],
- },
- "flatTernaryExpressions": {
- "default": false,
- "type": "boolean",
- },
- "ignoreComments": {
- "default": false,
+ "capIsConstructor": {
+ "default": true,
"type": "boolean",
},
- "ignoredNodes": {
- "items": {
- "not": {
- "pattern": ":exit$",
- },
- "type": "string",
- },
- "type": "array",
- },
- "offsetTernaryExpressions": {
- "default": false,
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-invalid-void-type": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowAsThisParameter": false,
+ "allowInGenericTypeArguments": true,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow \`void\` type outside of generic or return types",
+ "recommended": "strict",
+ "url": "https://typescript-eslint.io/rules/no-invalid-void-type",
+ },
+ "messages": {
+ "invalidVoidForGeneric": "{{ generic }} may not have void as a type argument.",
+ "invalidVoidNotReturn": "void is only valid as a return type.",
+ "invalidVoidNotReturnOrGeneric": "void is only valid as a return type or generic type argument.",
+ "invalidVoidNotReturnOrThisParam": "void is only valid as return type or type of \`this\` parameter.",
+ "invalidVoidNotReturnOrThisParamOrGeneric": "void is only valid as a return type or generic type argument or the type of a \`this\` parameter.",
+ "invalidVoidUnionConstituent": "void is not valid as a constituent in a union type",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowAsThisParameter": {
+ "description": "Whether a \`this\` parameter of a function may be \`void\`.",
"type": "boolean",
},
- "outerIIFEBody": {
+ "allowInGenericTypeArguments": {
+ "description": "Whether \`void\` can be used as a valid value for generic type parameters.",
"oneOf": [
{
- "minimum": 0,
- "type": "integer",
+ "description": "Whether \`void\` can be used as a valid value for all generic type parameters.",
+ "type": "boolean",
},
{
- "enum": [
- "off",
- ],
+ "description": "Allowlist of types that may accept \`void\` as a generic type parameter.",
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
},
],
},
@@ -23361,1369 +13745,5165 @@ You must still type the parameters of the function.",
"type": "object",
},
],
- "type": "layout",
+ "type": "problem",
},
},
- "init-declarations": {
+ "no-loop-func": {
"create": [Function],
- "defaultOptions": [
- "always",
- ],
+ "defaultOptions": [],
"meta": {
"docs": {
- "description": "Require or disallow initialization in variable declarations",
+ "description": "Disallow function declarations that contain unsafe references inside loop statements",
"extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/init-declarations",
+ "url": "https://typescript-eslint.io/rules/no-loop-func",
},
"hasSuggestions": undefined,
"messages": {
- "initialized": "Variable '{{idName}}' should be initialized on declaration.",
- "notInitialized": "Variable '{{idName}}' should not be initialized on declaration.",
- },
- "schema": {
- "anyOf": [
- {
- "items": [
- {
- "enum": [
- "always",
- ],
- },
- ],
- "maxItems": 1,
- "minItems": 0,
- "type": "array",
- },
- {
- "items": [
- {
- "enum": [
- "never",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "ignoreForLoopInit": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "maxItems": 2,
- "minItems": 0,
- "type": "array",
- },
- ],
+ "unsafeRefs": "Function declared in a loop contains unsafe references to variable(s) {{ varNames }}.",
},
+ "schema": [],
"type": "suggestion",
},
},
- "key-spacing": {
+ "no-loss-of-precision": {
"create": [Function],
- "defaultOptions": [
- {},
- ],
+ "defaultOptions": [],
"meta": {
"deprecated": true,
"docs": {
- "description": "Enforce consistent spacing between property names and type annotations in types and interfaces",
+ "description": "Disallow literal numbers that lose precision",
"extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/key-spacing",
+ "url": "https://typescript-eslint.io/rules/no-loss-of-precision",
},
- "fixable": "whitespace",
"hasSuggestions": undefined,
"messages": {
- "extraKey": "Extra space after {{computed}}key '{{key}}'.",
- "extraValue": "Extra space before value for {{computed}}key '{{key}}'.",
- "missingKey": "Missing space after {{computed}}key '{{key}}'.",
- "missingValue": "Missing space before value for {{computed}}key '{{key}}'.",
+ "noLossOfPrecision": "This number literal will lose precision at runtime.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-magic-numbers": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "detectObjects": false,
+ "enforceConst": false,
+ "ignore": [],
+ "ignoreArrayIndexes": false,
+ "ignoreEnums": false,
+ "ignoreNumericLiteralTypes": false,
+ "ignoreReadonlyClassProperties": false,
+ "ignoreTypeIndexes": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow magic numbers",
+ "extendsBaseRule": true,
+ "url": "https://typescript-eslint.io/rules/no-magic-numbers",
+ },
+ "messages": {
+ "noMagic": "No magic number: {{raw}}.",
+ "useConst": "Number constants declarations must use 'const'.",
},
- "replacedBy": [
- "@stylistic/ts/key-spacing",
- ],
"schema": [
{
- "anyOf": [
- {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "align": {
- "anyOf": [
- {
- "enum": [
- "colon",
- "value",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- "on": {
- "enum": [
- "colon",
- "value",
- ],
- },
- },
- "type": "object",
- },
- ],
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- },
- "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "detectObjects": {
+ "default": false,
+ "type": "boolean",
},
- {
- "additionalProperties": false,
- "properties": {
- "multiLine": {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "align": {
- "anyOf": [
- {
- "enum": [
- "colon",
- "value",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- "on": {
- "enum": [
- "colon",
- "value",
- ],
- },
- },
- "type": "object",
- },
- ],
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- },
- "type": "object",
- },
- "singleLine": {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- },
- "type": "object",
- },
- },
- "type": "object",
+ "enforceConst": {
+ "default": false,
+ "type": "boolean",
},
- {
- "additionalProperties": false,
- "properties": {
- "align": {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
- "on": {
- "enum": [
- "colon",
- "value",
- ],
- },
- },
- "type": "object",
- },
- "multiLine": {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
+ "ignore": {
+ "items": {
+ "anyOf": [
+ {
+ "type": "number",
},
- "type": "object",
- },
- "singleLine": {
- "additionalProperties": false,
- "properties": {
- "afterColon": {
- "type": "boolean",
- },
- "beforeColon": {
- "type": "boolean",
- },
- "mode": {
- "enum": [
- "strict",
- "minimum",
- ],
- },
+ {
+ "pattern": "^[+-]?(?:0|[1-9][0-9]*)n$",
+ "type": "string",
},
- "type": "object",
- },
+ ],
},
- "type": "object",
+ "type": "array",
+ "uniqueItems": true,
+ },
+ "ignoreArrayIndexes": {
+ "default": false,
+ "type": "boolean",
+ },
+ "ignoreClassFieldInitialValues": {
+ "default": false,
+ "type": "boolean",
+ },
+ "ignoreDefaultValues": {
+ "default": false,
+ "type": "boolean",
+ },
+ "ignoreEnums": {
+ "description": "Whether enums used in TypeScript are considered okay.",
+ "type": "boolean",
},
- ],
+ "ignoreNumericLiteralTypes": {
+ "description": "Whether numbers used in TypeScript numeric literal types are considered okay.",
+ "type": "boolean",
+ },
+ "ignoreReadonlyClassProperties": {
+ "description": "Whether \`readonly\` class properties are considered okay.",
+ "type": "boolean",
+ },
+ "ignoreTypeIndexes": {
+ "description": "Whether numbers used to index types are okay.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
},
],
- "type": "layout",
+ "type": "suggestion",
},
},
- "keyword-spacing": {
+ "no-meaningless-void-operator": {
"create": [Function],
"defaultOptions": [
- {},
+ {
+ "checkNever": false,
+ },
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Enforce consistent spacing before and after keywords",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/keyword-spacing",
+ "description": "Disallow the \`void\` operator except when used to discard a value",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-meaningless-void-operator",
},
- "fixable": "whitespace",
- "hasSuggestions": undefined,
+ "fixable": "code",
+ "hasSuggestions": true,
"messages": {
- "expectedAfter": "Expected space(s) after "{{value}}".",
- "expectedBefore": "Expected space(s) before "{{value}}".",
- "unexpectedAfter": "Unexpected space(s) after "{{value}}".",
- "unexpectedBefore": "Unexpected space(s) before "{{value}}".",
+ "meaninglessVoidOperator": "void operator shouldn't be used on {{type}}; it should convey that a return value is being ignored",
+ "removeVoid": "Remove 'void'",
},
- "replacedBy": [
- "@stylistic/ts/keyword-spacing",
- ],
"schema": [
{
"additionalProperties": false,
"properties": {
- "after": {
- "default": true,
- "type": "boolean",
- },
- "before": {
- "default": true,
+ "checkNever": {
+ "default": false,
+ "description": "Whether to suggest removing \`void\` when the argument has type \`never\`.",
"type": "boolean",
},
- "overrides": {
- "additionalProperties": false,
- "properties": {
- "abstract": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "as": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "async": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "await": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "boolean": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "break": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "byte": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "case": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "catch": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "char": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "class": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "const": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "continue": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "debugger": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "default": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "delete": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "do": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "double": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "else": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-misused-new": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Enforce valid definition of \`new\` and \`constructor\`",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-misused-new",
+ },
+ "messages": {
+ "errorMessageClass": "Class cannot have method named \`new\`.",
+ "errorMessageInterface": "Interfaces cannot be constructed, only classes.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-misused-promises": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "checksConditionals": true,
+ "checksSpreads": true,
+ "checksVoidReturn": true,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow Promises in places not designed to handle them",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-misused-promises",
+ },
+ "messages": {
+ "conditional": "Expected non-Promise value in a boolean conditional.",
+ "predicate": "Expected a non-Promise value to be returned.",
+ "spread": "Expected a non-Promise value to be spreaded in an object.",
+ "voidReturnArgument": "Promise returned in function argument where a void return was expected.",
+ "voidReturnAttribute": "Promise-returning function provided to attribute where a void return was expected.",
+ "voidReturnInheritedMethod": "Promise-returning method provided where a void return was expected by extended/implemented type '{{ heritageTypeName }}'.",
+ "voidReturnProperty": "Promise-returning function provided to property where a void return was expected.",
+ "voidReturnReturnValue": "Promise-returning function provided to return value where a void return was expected.",
+ "voidReturnVariable": "Promise-returning function provided to variable where a void return was expected.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "checksConditionals": {
+ "description": "Whether to warn when a Promise is provided to conditional statements.",
+ "type": "boolean",
+ },
+ "checksSpreads": {
+ "description": "Whether to warn when \`...\` spreading a \`Promise\`.",
+ "type": "boolean",
+ },
+ "checksVoidReturn": {
+ "description": "Whether to warn when a Promise is returned from a function typed as returning \`void\`.",
+ "oneOf": [
+ {
+ "description": "Whether to disable checking all asynchronous functions.",
+ "type": "boolean",
},
- "enum": {
+ {
"additionalProperties": false,
+ "description": "Which forms of functions may have checking disabled.",
"properties": {
- "after": {
+ "arguments": {
+ "description": "Disables checking an asynchronous function passed as argument where the parameter type expects a function that returns \`void\`.",
"type": "boolean",
},
- "before": {
+ "attributes": {
+ "description": "Disables checking an asynchronous function passed as a JSX attribute expected to be a function that returns \`void\`.",
"type": "boolean",
},
- },
- "type": "object",
- },
- "export": {
- "additionalProperties": false,
- "properties": {
- "after": {
+ "inheritedMethods": {
+ "description": "Disables checking an asynchronous method in a type that extends or implements another type expecting that method to return \`void\`.",
"type": "boolean",
},
- "before": {
+ "properties": {
+ "description": "Disables checking an asynchronous function passed as an object property expected to be a function that returns \`void\`.",
"type": "boolean",
},
- },
- "type": "object",
- },
- "extends": {
- "additionalProperties": false,
- "properties": {
- "after": {
+ "returns": {
+ "description": "Disables checking an asynchronous function returned in a function whose return type is a function that returns \`void\`.",
"type": "boolean",
},
- "before": {
+ "variables": {
+ "description": "Disables checking an asynchronous function used as a variable whose return type is a function that returns \`void\`.",
"type": "boolean",
},
},
"type": "object",
},
- "false": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ ],
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "no-mixed-enums": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow enums from having both number and string members",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-mixed-enums",
+ },
+ "messages": {
+ "mixed": "Mixing number and string enums can be confusing.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-namespace": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowDeclarations": false,
+ "allowDefinitionFiles": true,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow TypeScript namespaces",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-namespace",
+ },
+ "messages": {
+ "moduleSyntaxIsPreferred": "ES2015 module syntax is preferred over namespaces.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowDeclarations": {
+ "description": "Whether to allow \`declare\` with custom TypeScript namespaces.",
+ "type": "boolean",
+ },
+ "allowDefinitionFiles": {
+ "description": "Whether to allow \`declare\` with custom TypeScript namespaces inside definition files.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-non-null-asserted-nullish-coalescing": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow non-null assertions in the left operand of a nullish coalescing operator",
+ "recommended": "strict",
+ "url": "https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "noNonNullAssertedNullishCoalescing": "The nullish coalescing operator is designed to handle undefined and null - using a non-null assertion is not needed.",
+ "suggestRemovingNonNull": "Remove the non-null assertion.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-non-null-asserted-optional-chain": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow non-null assertions after an optional chain expression",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "noNonNullOptionalChain": "Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong.",
+ "suggestRemovingNonNull": "You should remove the non-null assertion.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-non-null-assertion": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow non-null assertions using the \`!\` postfix operator",
+ "recommended": "strict",
+ "url": "https://typescript-eslint.io/rules/no-non-null-assertion",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "noNonNull": "Forbidden non-null assertion.",
+ "suggestOptionalChain": "Consider using the optional chain operator \`?.\` instead. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-redeclare": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "builtinGlobals": true,
+ "ignoreDeclarationMerge": true,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow variable redeclaration",
+ "extendsBaseRule": true,
+ "url": "https://typescript-eslint.io/rules/no-redeclare",
+ },
+ "messages": {
+ "redeclared": "'{{id}}' is already defined.",
+ "redeclaredAsBuiltin": "'{{id}}' is already defined as a built-in global variable.",
+ "redeclaredBySyntax": "'{{id}}' is already defined by a variable declaration.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "builtinGlobals": {
+ "description": "Whether to report shadowing of built-in global variables.",
+ "type": "boolean",
+ },
+ "ignoreDeclarationMerge": {
+ "description": "Whether to ignore declaration merges between certain TypeScript declaration types.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-redundant-type-constituents": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow members of unions and intersections that do nothing or override type information",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-redundant-type-constituents",
+ },
+ "messages": {
+ "errorTypeOverrides": "'{{typeName}}' is an 'error' type that acts as 'any' and overrides all other types in this {{container}} type.",
+ "literalOverridden": "{{literal}} is overridden by {{primitive}} in this union type.",
+ "overridden": "'{{typeName}}' is overridden by other types in this {{container}} type.",
+ "overrides": "'{{typeName}}' overrides all other types in this {{container}} type.",
+ "primitiveOverridden": "{{primitive}} is overridden by the {{literal}} in this intersection type.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "no-require-imports": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allow": [],
+ "allowAsImport": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow invocation of \`require()\`",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-require-imports",
+ },
+ "messages": {
+ "noRequireImports": "A \`require()\` style import is forbidden.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allow": {
+ "description": "Patterns of import paths to allow requiring from.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "allowAsImport": {
+ "description": "Allows \`require\` statements in import declarations.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "no-restricted-imports": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow specified modules when loaded by \`import\`",
+ "extendsBaseRule": true,
+ "url": "https://typescript-eslint.io/rules/no-restricted-imports",
+ },
+ "fixable": undefined,
+ "messages": {
+ "everything": "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",
+ "everythingWithCustomMessage": "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}",
+ "importName": "'{{importName}}' import from '{{importSource}}' is restricted.",
+ "importNameWithCustomMessage": "'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}",
+ "path": "'{{importSource}}' import is restricted from being used.",
+ "pathWithCustomMessage": "'{{importSource}}' import is restricted from being used. {{customMessage}}",
+ "patternAndEverything": "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.",
+ "patternAndEverythingWithCustomMessage": "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",
+ "patternAndEverythingWithRegexImportName": "* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.",
+ "patternAndEverythingWithRegexImportNameAndCustomMessage": "* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}",
+ "patternAndImportName": "'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.",
+ "patternAndImportNameWithCustomMessage": "'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",
+ "patternWithCustomMessage": "'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}",
+ "patterns": "'{{importSource}}' import is restricted from being used by a pattern.",
+ },
+ "schema": {
+ "anyOf": [
+ {
+ "items": {
+ "anyOf": [
+ {
+ "type": "string",
},
- "final": {
+ {
"additionalProperties": false,
"properties": {
- "after": {
+ "allowTypeImports": {
+ "description": "Whether to allow type-only imports for a path.",
"type": "boolean",
},
- "before": {
- "type": "boolean",
+ "importNames": {
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
},
- },
- "type": "object",
- },
- "finally": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "message": {
+ "minLength": 1,
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ "name": {
+ "type": "string",
},
},
+ "required": [
+ "name",
+ ],
"type": "object",
},
- "float": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
+ ],
+ },
+ "type": "array",
+ "uniqueItems": true,
+ },
+ {
+ "additionalItems": false,
+ "items": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "paths": {
+ "items": {
+ "anyOf": [
+ {
+ "type": "string",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowTypeImports": {
+ "description": "Whether to allow type-only imports for a path.",
+ "type": "boolean",
+ },
+ "importNames": {
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "message": {
+ "minLength": 1,
+ "type": "string",
+ },
+ "name": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "name",
+ ],
+ "type": "object",
+ },
+ ],
},
+ "type": "array",
+ "uniqueItems": true,
},
- "type": "object",
- },
- "for": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ "patterns": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
+ "uniqueItems": true,
+ },
+ {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "allowTypeImports": {
+ "description": "Whether to allow type-only imports for a path.",
+ "type": "boolean",
+ },
+ "caseSensitive": {
+ "type": "boolean",
+ },
+ "group": {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ "importNamePattern": {
+ "type": "string",
+ },
+ "importNames": {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ "message": {
+ "minLength": 1,
+ "type": "string",
+ },
+ },
+ "required": [
+ "group",
+ ],
+ "type": "object",
+ },
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
},
- "type": "object",
},
- "from": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "type": "object",
+ },
+ ],
+ "type": "array",
+ },
+ ],
+ },
+ "type": "suggestion",
+ },
+ },
+ "no-restricted-types": {
+ "create": [Function],
+ "defaultOptions": [
+ {},
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow certain types",
+ "url": "https://typescript-eslint.io/rules/no-restricted-types",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "bannedTypeMessage": "Don't use \`{{name}}\` as a type.{{customMessage}}",
+ "bannedTypeReplacement": "Replace \`{{name}}\` with \`{{replacement}}\`.",
+ },
+ "schema": [
+ {
+ "$defs": {
+ "banConfig": {
+ "oneOf": [
+ {
+ "description": "Bans the type with the default message.",
+ "enum": [
+ true,
+ ],
+ "type": "boolean",
},
- "function": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ {
+ "description": "Bans the type with a custom message.",
+ "type": "string",
},
- "get": {
+ {
"additionalProperties": false,
+ "description": "Bans a type.",
"properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
+ "fixWith": {
+ "description": "Type to autofix replace with. Note that autofixers can be applied automatically - so you need to be careful with this option.",
+ "type": "string",
},
- },
- "type": "object",
- },
- "goto": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ "message": {
+ "description": "Custom error message.",
+ "type": "string",
},
- "before": {
- "type": "boolean",
+ "suggest": {
+ "description": "Types to suggest replacing with.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
},
},
"type": "object",
},
- "if": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ ],
+ },
+ },
+ "additionalProperties": false,
+ "properties": {
+ "types": {
+ "additionalProperties": {
+ "$ref": "#/items/0/$defs/banConfig",
+ },
+ "description": "An object whose keys are the types you want to ban, and the values are error messages.",
+ "type": "object",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-shadow": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allow": [],
+ "builtinGlobals": false,
+ "hoist": "functions",
+ "ignoreFunctionTypeParameterNameValueShadow": true,
+ "ignoreOnInitialization": false,
+ "ignoreTypeValueShadow": true,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow variable declarations from shadowing variables declared in the outer scope",
+ "extendsBaseRule": true,
+ "url": "https://typescript-eslint.io/rules/no-shadow",
+ },
+ "messages": {
+ "noShadow": "'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",
+ "noShadowGlobal": "'{{name}}' is already a global variable.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allow": {
+ "description": "Identifier names for which shadowing is allowed.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "builtinGlobals": {
+ "description": "Whether to report shadowing of built-in global variables.",
+ "type": "boolean",
+ },
+ "hoist": {
+ "description": "Whether to report shadowing before outer functions or variables are defined.",
+ "enum": [
+ "all",
+ "functions",
+ "never",
+ ],
+ "type": "string",
+ },
+ "ignoreFunctionTypeParameterNameValueShadow": {
+ "description": "Whether to ignore function parameters named the same as a variable.",
+ "type": "boolean",
+ },
+ "ignoreOnInitialization": {
+ "description": "Whether to ignore the variable initializers when the shadowed variable is presumably still unitialized.",
+ "type": "boolean",
+ },
+ "ignoreTypeValueShadow": {
+ "description": "Whether to ignore types named the same as a variable.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-this-alias": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowDestructuring": true,
+ "allowedNames": [],
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow aliasing \`this\`",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-this-alias",
+ },
+ "messages": {
+ "thisAssignment": "Unexpected aliasing of 'this' to local variable.",
+ "thisDestructure": "Unexpected aliasing of members of 'this' to local variables.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowDestructuring": {
+ "description": "Whether to ignore destructurings, such as \`const { props, state } = this\`.",
+ "type": "boolean",
+ },
+ "allowedNames": {
+ "description": "Names to ignore, such as ["self"] for \`const self = this;\`.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-type-alias": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowAliases": "never",
+ "allowCallbacks": "never",
+ "allowConditionalTypes": "never",
+ "allowConstructors": "never",
+ "allowGenerics": "never",
+ "allowLiterals": "never",
+ "allowMappedTypes": "never",
+ "allowTupleTypes": "never",
+ },
+ ],
+ "meta": {
+ "deprecated": true,
+ "docs": {
+ "description": "Disallow type aliases",
+ "url": "https://typescript-eslint.io/rules/no-type-alias",
+ },
+ "messages": {
+ "noCompositionAlias": "{{typeName}} in {{compositionType}} types are not allowed.",
+ "noTypeAlias": "Type {{alias}} are not allowed.",
+ },
+ "schema": [
+ {
+ "$defs": {
+ "expandedOptions": {
+ "enum": [
+ "always",
+ "never",
+ "in-unions",
+ "in-intersections",
+ "in-unions-and-intersections",
+ ],
+ "type": "string",
+ },
+ "simpleOptions": {
+ "enum": [
+ "always",
+ "never",
+ ],
+ "type": "string",
+ },
+ },
+ "additionalProperties": false,
+ "properties": {
+ "allowAliases": {
+ "$ref": "#/items/0/$defs/expandedOptions",
+ "description": "Whether to allow direct one-to-one type aliases.",
+ },
+ "allowCallbacks": {
+ "$ref": "#/items/0/$defs/simpleOptions",
+ "description": "Whether to allow type aliases for callbacks.",
+ },
+ "allowConditionalTypes": {
+ "$ref": "#/items/0/$defs/simpleOptions",
+ "description": "Whether to allow type aliases for conditional types.",
+ },
+ "allowConstructors": {
+ "$ref": "#/items/0/$defs/simpleOptions",
+ "description": "Whether to allow type aliases with constructors.",
+ },
+ "allowGenerics": {
+ "$ref": "#/items/0/$defs/simpleOptions",
+ "description": "Whether to allow type aliases with generic types.",
+ },
+ "allowLiterals": {
+ "$ref": "#/items/0/$defs/expandedOptions",
+ "description": "Whether to allow type aliases with object literal types.",
+ },
+ "allowMappedTypes": {
+ "$ref": "#/items/0/$defs/expandedOptions",
+ "description": "Whether to allow type aliases with mapped types.",
+ },
+ "allowTupleTypes": {
+ "$ref": "#/items/0/$defs/expandedOptions",
+ "description": "Whether to allow type aliases with tuple types.",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-unnecessary-boolean-literal-compare": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowComparingNullableBooleansToFalse": true,
+ "allowComparingNullableBooleansToTrue": true,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow unnecessary equality comparisons against boolean literals",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare",
+ },
+ "fixable": "code",
+ "messages": {
+ "comparingNullableToFalse": "This expression unnecessarily compares a nullable boolean value to false instead of using the ?? operator to provide a default.",
+ "comparingNullableToTrueDirect": "This expression unnecessarily compares a nullable boolean value to true instead of using it directly.",
+ "comparingNullableToTrueNegated": "This expression unnecessarily compares a nullable boolean value to true instead of negating it.",
+ "direct": "This expression unnecessarily compares a boolean value to a boolean instead of using it directly.",
+ "negated": "This expression unnecessarily compares a boolean value to a boolean instead of negating it.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowComparingNullableBooleansToFalse": {
+ "description": "Whether to allow comparisons between nullable boolean variables and \`false\`.",
+ "type": "boolean",
+ },
+ "allowComparingNullableBooleansToTrue": {
+ "description": "Whether to allow comparisons between nullable boolean variables and \`true\`.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-unnecessary-condition": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowConstantLoopConditions": false,
+ "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false,
+ "checkTypePredicates": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow conditionals where the type is always truthy or always falsy",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-condition",
+ },
+ "fixable": "code",
+ "messages": {
+ "alwaysFalsy": "Unnecessary conditional, value is always falsy.",
+ "alwaysFalsyFunc": "This callback should return a conditional, but return is always falsy.",
+ "alwaysNullish": "Unnecessary conditional, left-hand side of \`??\` operator is always \`null\` or \`undefined\`.",
+ "alwaysTruthy": "Unnecessary conditional, value is always truthy.",
+ "alwaysTruthyFunc": "This callback should return a conditional, but return is always truthy.",
+ "literalBooleanExpression": "Unnecessary conditional, both sides of the expression are literal values.",
+ "never": "Unnecessary conditional, value is \`never\`.",
+ "neverNullish": "Unnecessary conditional, expected left-hand side of \`??\` operator to be possibly null or undefined.",
+ "neverOptionalChain": "Unnecessary optional chain on a non-nullish value.",
+ "noOverlapBooleanExpression": "Unnecessary conditional, the types have no overlap.",
+ "noStrictNullCheck": "This rule requires the \`strictNullChecks\` compiler option to be turned on to function correctly.",
+ "typeGuardAlreadyIsType": "Unnecessary conditional, expression already has the type being checked by the {{typeGuardOrAssertionFunction}}.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowConstantLoopConditions": {
+ "description": "Whether to ignore constant loop conditions, such as \`while (true)\`.",
+ "type": "boolean",
+ },
+ "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": {
+ "description": "Whether to not error when running with a tsconfig that has strictNullChecks turned.",
+ "type": "boolean",
+ },
+ "checkTypePredicates": {
+ "description": "Whether to check the asserted argument of a type predicate function for unnecessary conditions",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-unnecessary-parameter-property-assignment": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow unnecessary assignment of constructor property parameter",
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment",
+ },
+ "messages": {
+ "unnecessaryAssign": "This assignment is unnecessary since it is already assigned by a parameter property.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "no-unnecessary-qualifier": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow unnecessary namespace qualifiers",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-qualifier",
+ },
+ "fixable": "code",
+ "messages": {
+ "unnecessaryQualifier": "Qualifier is unnecessary since '{{ name }}' is in scope.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "no-unnecessary-template-expression": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow unnecessary template expressions",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-template-expression",
+ },
+ "fixable": "code",
+ "messages": {
+ "noUnnecessaryTemplateExpression": "Template literal expression is unnecessary and can be simplified.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "no-unnecessary-type-arguments": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow type arguments that are equal to the default",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-type-arguments",
+ },
+ "fixable": "code",
+ "messages": {
+ "unnecessaryTypeParameter": "This is the default value for this type parameter, so it can be omitted.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "no-unnecessary-type-assertion": {
+ "create": [Function],
+ "defaultOptions": [
+ {},
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow type assertions that do not change the type of an expression",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-type-assertion",
+ },
+ "fixable": "code",
+ "messages": {
+ "contextuallyUnnecessary": "This assertion is unnecessary since the receiver accepts the original type of the expression.",
+ "unnecessaryAssertion": "This assertion is unnecessary since it does not change the type of the expression.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "typesToIgnore": {
+ "description": "A list of type names to ignore.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-unnecessary-type-constraint": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow unnecessary constraints on generic types",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-type-constraint",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "removeUnnecessaryConstraint": "Remove the unnecessary \`{{constraint}}\` constraint.",
+ "unnecessaryConstraint": "Constraining the generic type \`{{name}}\` to \`{{constraint}}\` does nothing and is unnecessary.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "no-unnecessary-type-parameters": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow type parameters that aren't used multiple times",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-type-parameters",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "replaceUsagesWithConstraint": "Replace all usages of type parameter with its constraint.",
+ "sole": "Type parameter {{name}} is {{uses}} in the {{descriptor}} signature.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-unsafe-argument": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow calling a function with a value with type \`any\`",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unsafe-argument",
+ },
+ "messages": {
+ "unsafeArgument": "Unsafe argument of type {{sender}} assigned to a parameter of type {{receiver}}.",
+ "unsafeArraySpread": "Unsafe spread of an {{sender}} array type.",
+ "unsafeSpread": "Unsafe spread of an {{sender}} type.",
+ "unsafeTupleSpread": "Unsafe spread of a tuple type. The argument is {{sender}} and is assigned to a parameter of type {{receiver}}.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-unsafe-assignment": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow assigning a value with type \`any\` to variables and properties",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unsafe-assignment",
+ },
+ "messages": {
+ "anyAssignment": "Unsafe assignment of an {{sender}} value.",
+ "anyAssignmentThis": "Unsafe assignment of an {{sender}} value. \`this\` is typed as \`any\`.
+You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
+ "unsafeArrayPattern": "Unsafe array destructuring of an {{sender}} array value.",
+ "unsafeArrayPatternFromTuple": "Unsafe array destructuring of a tuple element with an {{sender}} value.",
+ "unsafeArraySpread": "Unsafe spread of an {{sender}} value in an array.",
+ "unsafeAssignment": "Unsafe assignment of type {{sender}} to a variable of type {{receiver}}.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-unsafe-call": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow calling a value with type \`any\`",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unsafe-call",
+ },
+ "messages": {
+ "unsafeCall": "Unsafe call of a(n) {{type}} typed value.",
+ "unsafeCallThis": "Unsafe call of a(n) {{type}} typed value. \`this\` is typed as {{type}}.
+You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
+ "unsafeNew": "Unsafe construction of a(n) {{type}} typed value.",
+ "unsafeTemplateTag": "Unsafe use of a(n) {{type}} typed template tag.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-unsafe-declaration-merging": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow unsafe declaration merging",
+ "recommended": "recommended",
+ "requiresTypeChecking": false,
+ "url": "https://typescript-eslint.io/rules/no-unsafe-declaration-merging",
+ },
+ "messages": {
+ "unsafeMerging": "Unsafe declaration merging between classes and interfaces.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-unsafe-enum-comparison": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow comparing an enum value with a non-enum value",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unsafe-enum-comparison",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "mismatchedCase": "The case statement does not have a shared enum type with the switch predicate.",
+ "mismatchedCondition": "The two values in this comparison do not have a shared enum type.",
+ "replaceValueWithEnum": "Replace with an enum value comparison.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "no-unsafe-function-type": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow using the unsafe built-in Function type",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-unsafe-function-type",
+ },
+ "fixable": "code",
+ "messages": {
+ "bannedFunctionType": "The \`Function\` type accepts any function-like value.
+Prefer explicitly defining any function parameters and return type.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-unsafe-member-access": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow member access on a value with type \`any\`",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unsafe-member-access",
+ },
+ "messages": {
+ "unsafeComputedMemberAccess": "Computed name {{property}} resolves to an {{type}} value.",
+ "unsafeMemberExpression": "Unsafe member access {{property}} on an {{type}} value.",
+ "unsafeThisMemberExpression": "Unsafe member access {{property}} on an \`any\` value. \`this\` is typed as \`any\`.
+You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-unsafe-return": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow returning a value with type \`any\` from a function",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unsafe-return",
+ },
+ "messages": {
+ "unsafeReturn": "Unsafe return of a value of type {{type}}.",
+ "unsafeReturnAssignment": "Unsafe return of type \`{{sender}}\` from function with return type \`{{receiver}}\`.",
+ "unsafeReturnThis": "Unsafe return of a value of type \`{{type}}\`. \`this\` is typed as \`any\`.
+You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-unsafe-unary-minus": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Require unary negation to take a number",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unsafe-unary-minus",
+ },
+ "messages": {
+ "unaryMinus": "Argument of unary negation should be assignable to number | bigint but is {{type}} instead.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-unused-expressions": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowShortCircuit": false,
+ "allowTaggedTemplates": false,
+ "allowTernary": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow unused expressions",
+ "extendsBaseRule": true,
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-unused-expressions",
+ },
+ "hasSuggestions": undefined,
+ "messages": {
+ "unusedExpression": "Expected an assignment or function call and instead saw an expression.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowShortCircuit": {
+ "default": false,
+ "type": "boolean",
+ },
+ "allowTaggedTemplates": {
+ "default": false,
+ "type": "boolean",
+ },
+ "allowTernary": {
+ "default": false,
+ "type": "boolean",
+ },
+ "enforceForJSX": {
+ "default": false,
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-unused-vars": {
+ "create": [Function],
+ "defaultOptions": [
+ {},
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow unused variables",
+ "extendsBaseRule": true,
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-unused-vars",
+ },
+ "messages": {
+ "unusedVar": "'{{varName}}' is {{action}} but never used{{additional}}.",
+ "usedIgnoredVar": "'{{varName}}' is marked as ignored but is used{{additional}}.",
+ "usedOnlyAsType": "'{{varName}}' is {{action}} but only used as a type{{additional}}.",
+ },
+ "schema": [
+ {
+ "oneOf": [
+ {
+ "enum": [
+ "all",
+ "local",
+ ],
+ "type": "string",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "args": {
+ "description": "Whether to check all, some, or no arguments.",
+ "enum": [
+ "all",
+ "after-used",
+ "none",
+ ],
+ "type": "string",
},
- "implements": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "argsIgnorePattern": {
+ "description": "Regular expressions of argument names to not check for usage.",
+ "type": "string",
},
- "import": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "caughtErrors": {
+ "description": "Whether to check catch block arguments.",
+ "enum": [
+ "all",
+ "none",
+ ],
+ "type": "string",
},
- "in": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "caughtErrorsIgnorePattern": {
+ "description": "Regular expressions of catch block argument names to not check for usage.",
+ "type": "string",
},
- "instanceof": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "destructuredArrayIgnorePattern": {
+ "description": "Regular expressions of destructured array variable names to not check for usage.",
+ "type": "string",
},
- "int": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "ignoreClassWithStaticInitBlock": {
+ "description": "Whether to ignore classes with at least one static initialization block.",
+ "type": "boolean",
},
- "interface": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "ignoreRestSiblings": {
+ "description": "Whether to ignore sibling properties in \`...\` destructurings.",
+ "type": "boolean",
},
- "let": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "reportUsedIgnorePattern": {
+ "description": "Whether to report variables that match any of the valid ignore pattern options if they have been used.",
+ "type": "boolean",
},
- "long": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "vars": {
+ "description": "Whether to check all variables or only locally-declared variables.",
+ "enum": [
+ "all",
+ "local",
+ ],
+ "type": "string",
},
- "native": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "varsIgnorePattern": {
+ "description": "Regular expressions of variable names to not check for usage.",
+ "type": "string",
},
- "new": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "type": "object",
+ },
+ ],
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "no-use-before-define": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowNamedExports": false,
+ "classes": true,
+ "enums": true,
+ "functions": true,
+ "ignoreTypeReferences": true,
+ "typedefs": true,
+ "variables": true,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow the use of variables before they are defined",
+ "extendsBaseRule": true,
+ "url": "https://typescript-eslint.io/rules/no-use-before-define",
+ },
+ "messages": {
+ "noUseBeforeDefine": "'{{name}}' was used before it was defined.",
+ },
+ "schema": [
+ {
+ "oneOf": [
+ {
+ "enum": [
+ "nofunc",
+ ],
+ "type": "string",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowNamedExports": {
+ "description": "Whether to ignore named exports.",
+ "type": "boolean",
},
- "null": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "classes": {
+ "description": "Whether to ignore references to class declarations.",
+ "type": "boolean",
},
- "of": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "enums": {
+ "description": "Whether to check references to enums.",
+ "type": "boolean",
},
- "package": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "functions": {
+ "description": "Whether to ignore references to function declarations.",
+ "type": "boolean",
},
- "private": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "ignoreTypeReferences": {
+ "description": "Whether to ignore type references, such as in type annotations and assertions.",
+ "type": "boolean",
},
- "protected": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "typedefs": {
+ "description": "Whether to check references to types.",
+ "type": "boolean",
},
- "public": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "variables": {
+ "description": "Whether to ignore references to variables.",
+ "type": "boolean",
},
- "return": {
+ },
+ "type": "object",
+ },
+ ],
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "no-useless-constructor": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow unnecessary constructors",
+ "extendsBaseRule": true,
+ "recommended": "strict",
+ "url": "https://typescript-eslint.io/rules/no-useless-constructor",
+ },
+ "hasSuggestions": undefined,
+ "messages": {
+ "noUselessConstructor": "Useless constructor.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "no-useless-empty-export": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow empty exports that don't change anything in a module file",
+ "url": "https://typescript-eslint.io/rules/no-useless-empty-export",
+ },
+ "fixable": "code",
+ "hasSuggestions": false,
+ "messages": {
+ "uselessExport": "Empty export does nothing and can be removed.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "no-var-requires": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allow": [],
+ },
+ ],
+ "meta": {
+ "deprecated": true,
+ "docs": {
+ "description": "Disallow \`require\` statements except in import statements",
+ "url": "https://typescript-eslint.io/rules/no-var-requires",
+ },
+ "messages": {
+ "noVarReqs": "Require statement not part of import statement.",
+ },
+ "replacedBy": [
+ "@typescript-eslint/no-require-imports",
+ ],
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allow": {
+ "description": "Patterns of import paths to allow requiring from.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "no-wrapper-object-types": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow using confusing built-in primitive class wrappers",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-wrapper-object-types",
+ },
+ "fixable": "code",
+ "messages": {
+ "bannedClassType": "Prefer using the primitive \`{{preferred}}\` as a type name, rather than the upper-cased \`{{typeName}}\`.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "non-nullable-type-assertion-style": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Enforce non-null assertions over explicit type casts",
+ "recommended": "stylistic",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/non-nullable-type-assertion-style",
+ },
+ "fixable": "code",
+ "messages": {
+ "preferNonNullAssertion": "Use a ! assertion to more succinctly remove null and undefined from the type.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "only-throw-error": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowThrowingAny": true,
+ "allowThrowingUnknown": true,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow throwing non-\`Error\` values as exceptions",
+ "extendsBaseRule": "no-throw-literal",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/only-throw-error",
+ },
+ "messages": {
+ "object": "Expected an error object to be thrown.",
+ "undef": "Do not throw undefined.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowThrowingAny": {
+ "description": "Whether to always allow throwing values typed as \`any\`.",
+ "type": "boolean",
+ },
+ "allowThrowingUnknown": {
+ "description": "Whether to always allow throwing values typed as \`unknown\`.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "parameter-properties": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allow": [],
+ "prefer": "class-property",
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require or disallow parameter properties in class constructors",
+ "url": "https://typescript-eslint.io/rules/parameter-properties",
+ },
+ "messages": {
+ "preferClassProperty": "Property {{parameter}} should be declared as a class property.",
+ "preferParameterProperty": "Property {{parameter}} should be declared as a parameter property.",
+ },
+ "schema": [
+ {
+ "$defs": {
+ "modifier": {
+ "enum": [
+ "readonly",
+ "private",
+ "protected",
+ "public",
+ "private readonly",
+ "protected readonly",
+ "public readonly",
+ ],
+ "type": "string",
+ },
+ },
+ "additionalProperties": false,
+ "properties": {
+ "allow": {
+ "description": "Whether to allow certain kinds of properties to be ignored.",
+ "items": {
+ "$ref": "#/items/0/$defs/modifier",
+ },
+ "type": "array",
+ },
+ "prefer": {
+ "description": "Whether to prefer class properties or parameter properties.",
+ "enum": [
+ "class-property",
+ "parameter-property",
+ ],
+ "type": "string",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "prefer-as-const": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Enforce the use of \`as const\` over literal type",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/prefer-as-const",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "preferConstAssertion": "Expected a \`const\` instead of a literal type assertion.",
+ "variableConstAssertion": "Expected a \`const\` assertion instead of a literal type annotation.",
+ "variableSuggest": "You should use \`as const\` instead of type annotation.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "prefer-destructuring": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "AssignmentExpression": {
+ "array": true,
+ "object": true,
+ },
+ "VariableDeclarator": {
+ "array": true,
+ "object": true,
+ },
+ },
+ {},
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require destructuring from arrays and/or objects",
+ "extendsBaseRule": true,
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/prefer-destructuring",
+ },
+ "fixable": "code",
+ "hasSuggestions": undefined,
+ "messages": {
+ "preferDestructuring": "Use {{type}} destructuring.",
+ },
+ "schema": [
+ {
+ "oneOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "AssignmentExpression": {
"additionalProperties": false,
"properties": {
- "after": {
+ "array": {
"type": "boolean",
},
- "before": {
+ "object": {
"type": "boolean",
},
},
"type": "object",
},
- "set": {
+ "VariableDeclarator": {
"additionalProperties": false,
"properties": {
- "after": {
+ "array": {
"type": "boolean",
},
- "before": {
+ "object": {
"type": "boolean",
},
},
"type": "object",
},
- "short": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "array": {
+ "type": "boolean",
},
- "static": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "object": {
+ "type": "boolean",
},
- "super": {
- "additionalProperties": false,
+ },
+ "type": "object",
+ },
+ ],
+ },
+ {
+ "properties": {
+ "enforceForDeclarationWithTypeAnnotation": {
+ "description": "Whether to enforce destructuring on variable declarations with type annotations.",
+ "type": "boolean",
+ },
+ "enforceForRenamedProperties": {
+ "description": "Whether to enforce destructuring that use a different variable name than the property name.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "prefer-enum-initializers": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Require each enum member value to be explicitly initialized",
+ "url": "https://typescript-eslint.io/rules/prefer-enum-initializers",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "defineInitializer": "The value of the member '{{ name }}' should be explicitly defined.",
+ "defineInitializerSuggestion": "Can be fixed to {{ name }} = {{ suggested }}",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "prefer-find": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result",
+ "recommended": "stylistic",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/prefer-find",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "preferFind": "Prefer .find(...) instead of .filter(...)[0].",
+ "preferFindSuggestion": "Use .find(...) instead of .filter(...)[0].",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "prefer-for-of": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Enforce the use of \`for-of\` loop over the standard \`for\` loop where possible",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/prefer-for-of",
+ },
+ "messages": {
+ "preferForOf": "Expected a \`for-of\` loop instead of a \`for\` loop with this simple iteration.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "prefer-function-type": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Enforce using function types instead of interfaces with call signatures",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/prefer-function-type",
+ },
+ "fixable": "code",
+ "messages": {
+ "functionTypeOverCallableType": "{{ literalOrInterface }} only has a call signature, you should use a function type instead.",
+ "unexpectedThisOnFunctionOnlyInterface": "\`this\` refers to the function type '{{ interfaceName }}', did you intend to use a generic \`this\` parameter like \`(this: Self, ...) => Self\` instead?",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "prefer-includes": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Enforce \`includes\` method over \`indexOf\` method",
+ "recommended": "stylistic",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/prefer-includes",
+ },
+ "fixable": "code",
+ "messages": {
+ "preferIncludes": "Use 'includes()' method instead.",
+ "preferStringIncludes": "Use \`String#includes()\` method with a string instead.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "prefer-literal-enum-member": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowBitwiseExpressions": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require all enum members to be literal values",
+ "recommended": "strict",
+ "requiresTypeChecking": false,
+ "url": "https://typescript-eslint.io/rules/prefer-literal-enum-member",
+ },
+ "messages": {
+ "notLiteral": "Explicit enum value must only be a literal value (string or number).",
+ "notLiteralOrBitwiseExpression": "Explicit enum value must only be a literal value (string or number) or a bitwise expression.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowBitwiseExpressions": {
+ "description": "Whether to allow using bitwise expressions in enum initializers.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "prefer-namespace-keyword": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Require using \`namespace\` keyword over \`module\` keyword to declare custom TypeScript modules",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/prefer-namespace-keyword",
+ },
+ "fixable": "code",
+ "messages": {
+ "useNamespace": "Use 'namespace' instead of 'module' to declare custom TypeScript modules.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "prefer-nullish-coalescing": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false,
+ "ignoreConditionalTests": true,
+ "ignoreMixedLogicalExpressions": false,
+ "ignorePrimitives": {
+ "bigint": false,
+ "boolean": false,
+ "number": false,
+ "string": false,
+ },
+ "ignoreTernaryTests": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce using the nullish coalescing operator instead of logical assignments or chaining",
+ "recommended": "stylistic",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/prefer-nullish-coalescing",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "noStrictNullCheck": "This rule requires the \`strictNullChecks\` compiler option to be turned on to function correctly.",
+ "preferNullishOverOr": "Prefer using nullish coalescing operator (\`??{{ equals }}\`) instead of a logical {{ description }} (\`||{{ equals }}\`), as it is a safer operator.",
+ "preferNullishOverTernary": "Prefer using nullish coalescing operator (\`??{{ equals }}\`) instead of a ternary expression, as it is simpler to read.",
+ "suggestNullish": "Fix to nullish coalescing operator (\`??{{ equals }}\`).",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": {
+ "description": "Unless this is set to \`true\`, the rule will error on every file whose \`tsconfig.json\` does _not_ have the \`strictNullChecks\` compiler option (or \`strict\`) set to \`true\`.",
+ "type": "boolean",
+ },
+ "ignoreConditionalTests": {
+ "description": "Whether to ignore cases that are located within a conditional test.",
+ "type": "boolean",
+ },
+ "ignoreMixedLogicalExpressions": {
+ "description": "Whether to ignore any logical or expressions that are part of a mixed logical expression (with \`&&\`).",
+ "type": "boolean",
+ },
+ "ignorePrimitives": {
+ "description": "Whether to ignore all (\`true\`) or some (an object with properties) primitive types.",
+ "oneOf": [
+ {
+ "description": "Which primitives types may be ignored.",
"properties": {
- "after": {
+ "bigint": {
+ "description": "Ignore bigint primitive types.",
"type": "boolean",
},
- "before": {
+ "boolean": {
+ "description": "Ignore boolean primitive types.",
"type": "boolean",
},
- },
- "type": "object",
- },
- "switch": {
- "additionalProperties": false,
- "properties": {
- "after": {
+ "number": {
+ "description": "Ignore number primitive types.",
"type": "boolean",
},
- "before": {
+ "string": {
+ "description": "Ignore string primitive types.",
"type": "boolean",
},
},
"type": "object",
},
- "synchronized": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ {
+ "description": "Ignore all primitive types.",
+ "enum": [
+ true,
+ ],
+ "type": "boolean",
},
- "this": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ ],
+ },
+ "ignoreTernaryTests": {
+ "description": "Whether to ignore any ternary expressions that could be simplified by using the nullish coalescing operator.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "prefer-optional-chain": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing": false,
+ "checkAny": true,
+ "checkBigInt": true,
+ "checkBoolean": true,
+ "checkNumber": true,
+ "checkString": true,
+ "checkUnknown": true,
+ "requireNullish": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects",
+ "recommended": "stylistic",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/prefer-optional-chain",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "optionalChainSuggest": "Change to an optional chain.",
+ "preferOptionalChain": "Prefer using an optional chain expression instead, as it's more concise and easier to read.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing": {
+ "description": "Allow autofixers that will change the return type of the expression. This option is considered unsafe as it may break the build.",
+ "type": "boolean",
+ },
+ "checkAny": {
+ "description": "Check operands that are typed as \`any\` when inspecting "loose boolean" operands.",
+ "type": "boolean",
+ },
+ "checkBigInt": {
+ "description": "Check operands that are typed as \`bigint\` when inspecting "loose boolean" operands.",
+ "type": "boolean",
+ },
+ "checkBoolean": {
+ "description": "Check operands that are typed as \`boolean\` when inspecting "loose boolean" operands.",
+ "type": "boolean",
+ },
+ "checkNumber": {
+ "description": "Check operands that are typed as \`number\` when inspecting "loose boolean" operands.",
+ "type": "boolean",
+ },
+ "checkString": {
+ "description": "Check operands that are typed as \`string\` when inspecting "loose boolean" operands.",
+ "type": "boolean",
+ },
+ "checkUnknown": {
+ "description": "Check operands that are typed as \`unknown\` when inspecting "loose boolean" operands.",
+ "type": "boolean",
+ },
+ "requireNullish": {
+ "description": "Skip operands that are not typed with \`null\` and/or \`undefined\` when inspecting "loose boolean" operands.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "prefer-promise-reject-errors": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowEmptyReject": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require using Error objects as Promise rejection reasons",
+ "extendsBaseRule": true,
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/prefer-promise-reject-errors",
+ },
+ "messages": {
+ "rejectAnError": "Expected the Promise rejection reason to be an Error.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowEmptyReject": {
+ "description": "Whether to allow calls to \`Promise.reject()\` with no arguments.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "prefer-readonly": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "onlyInlineLambdas": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require private members to be marked as \`readonly\` if they're never modified outside of the constructor",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/prefer-readonly",
+ },
+ "fixable": "code",
+ "messages": {
+ "preferReadonly": "Member '{{name}}' is never reassigned; mark it as \`readonly\`.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "onlyInlineLambdas": {
+ "description": "Whether to restrict checking only to members immediately assigned a lambda value.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "prefer-readonly-parameter-types": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allow": [],
+ "checkParameterProperties": true,
+ "ignoreInferredTypes": false,
+ "treatMethodsAsReadonly": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require function parameters to be typed as \`readonly\` to prevent accidental mutation of inputs",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/prefer-readonly-parameter-types",
+ },
+ "messages": {
+ "shouldBeReadonly": "Parameter should be a read only type.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allow": {
+ "description": "An array of type specifiers to ignore.",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string",
},
- "type": "object",
- },
- "throw": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "file",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "path": {
+ "type": "string",
+ },
},
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
},
- "type": "object",
- },
- "throws": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "lib",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
},
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
},
- "type": "object",
- },
- "transient": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "package",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "package": {
+ "type": "string",
+ },
},
+ "required": [
+ "from",
+ "name",
+ "package",
+ ],
+ "type": "object",
},
- "type": "object",
- },
- "true": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
+ ],
+ },
+ "type": "array",
+ },
+ "checkParameterProperties": {
+ "description": "Whether to check class parameter properties.",
+ "type": "boolean",
+ },
+ "ignoreInferredTypes": {
+ "description": "Whether to ignore parameters which don't explicitly specify a type.",
+ "type": "boolean",
+ },
+ "treatMethodsAsReadonly": {
+ "description": "Whether to treat all mutable methods as though they are readonly.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "prefer-reduce-type-parameter": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Enforce using type parameter when calling \`Array#reduce\` instead of casting",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/prefer-reduce-type-parameter",
+ },
+ "fixable": "code",
+ "messages": {
+ "preferTypeParameter": "Unnecessary cast: Array#reduce accepts a type parameter for the default value.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "prefer-regexp-exec": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Enforce \`RegExp#exec\` over \`String#match\` if no global flag is provided",
+ "recommended": "stylistic",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/prefer-regexp-exec",
+ },
+ "fixable": "code",
+ "messages": {
+ "regExpExecOverStringMatch": "Use the \`RegExp#exec()\` method instead.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "prefer-return-this-type": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Enforce that \`this\` is used when only \`this\` type is returned",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/prefer-return-this-type",
+ },
+ "fixable": "code",
+ "messages": {
+ "useThisType": "Use \`this\` type instead.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "prefer-string-starts-ends-with": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowSingleElementEquality": "never",
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce using \`String#startsWith\` and \`String#endsWith\` over other equivalent methods of checking substrings",
+ "recommended": "stylistic",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/prefer-string-starts-ends-with",
+ },
+ "fixable": "code",
+ "messages": {
+ "preferEndsWith": "Use the 'String#endsWith' method instead.",
+ "preferStartsWith": "Use 'String#startsWith' method instead.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowSingleElementEquality": {
+ "description": "Whether to allow equality checks against the first or last element of a string.",
+ "enum": [
+ "always",
+ "never",
+ ],
+ "type": "string",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "prefer-ts-expect-error": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "deprecated": true,
+ "docs": {
+ "description": "Enforce using \`@ts-expect-error\` over \`@ts-ignore\`",
+ "url": "https://typescript-eslint.io/rules/prefer-ts-expect-error",
+ },
+ "fixable": "code",
+ "messages": {
+ "preferExpectErrorComment": "Use "@ts-expect-error" to ensure an error is actually being suppressed.",
+ },
+ "replacedBy": [
+ "@typescript-eslint/ban-ts-comment",
+ ],
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "promise-function-async": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowAny": true,
+ "allowedPromiseNames": [],
+ "checkArrowFunctions": true,
+ "checkFunctionDeclarations": true,
+ "checkFunctionExpressions": true,
+ "checkMethodDeclarations": true,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require any function or method that returns a Promise to be marked async",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/promise-function-async",
+ },
+ "fixable": "code",
+ "messages": {
+ "missingAsync": "Functions that return promises must be async.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowAny": {
+ "description": "Whether to consider \`any\` and \`unknown\` to be Promises.",
+ "type": "boolean",
+ },
+ "allowedPromiseNames": {
+ "description": "Any extra names of classes or interfaces to be considered Promises.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "checkArrowFunctions": {
+ "description": "Whether to check arrow functions.",
+ "type": "boolean",
+ },
+ "checkFunctionDeclarations": {
+ "description": "Whether to check standalone function declarations.",
+ "type": "boolean",
+ },
+ "checkFunctionExpressions": {
+ "description": "Whether to check inline function expressions",
+ "type": "boolean",
+ },
+ "checkMethodDeclarations": {
+ "description": "Whether to check methods on classes and object literals.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "require-array-sort-compare": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "ignoreStringArrays": true,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require \`Array#sort\` and \`Array#toSorted\` calls to always provide a \`compareFunction\`",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/require-array-sort-compare",
+ },
+ "messages": {
+ "requireCompare": "Require 'compare' argument.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "ignoreStringArrays": {
+ "description": "Whether to ignore arrays in which all elements are strings.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "require-await": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow async functions which do not return promises and have no \`await\` expression",
+ "extendsBaseRule": true,
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/require-await",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "missingAwait": "{{name}} has no 'await' expression.",
+ "removeAsync": "Remove 'async'.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "restrict-plus-operands": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowAny": true,
+ "allowBoolean": true,
+ "allowNullish": true,
+ "allowNumberAndString": true,
+ "allowRegExp": true,
+ "skipCompoundAssignments": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require both operands of addition to be the same type and be \`bigint\`, \`number\`, or \`string\`",
+ "recommended": {
+ "recommended": true,
+ "strict": [
+ {
+ "allowAny": false,
+ "allowBoolean": false,
+ "allowNullish": false,
+ "allowNumberAndString": false,
+ "allowRegExp": false,
+ },
+ ],
+ },
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/restrict-plus-operands",
+ },
+ "messages": {
+ "bigintAndNumber": "Numeric '+' operations must either be both bigints or both numbers. Got \`{{left}}\` + \`{{right}}\`.",
+ "invalid": "Invalid operand for a '+' operation. Operands must each be a number or {{stringLike}}. Got \`{{type}}\`.",
+ "mismatched": "Operands of '+' operations must be a number or {{stringLike}}. Got \`{{left}}\` + \`{{right}}\`.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowAny": {
+ "description": "Whether to allow \`any\` typed values.",
+ "type": "boolean",
+ },
+ "allowBoolean": {
+ "description": "Whether to allow \`boolean\` typed values.",
+ "type": "boolean",
+ },
+ "allowNullish": {
+ "description": "Whether to allow potentially \`null\` or \`undefined\` typed values.",
+ "type": "boolean",
+ },
+ "allowNumberAndString": {
+ "description": "Whether to allow \`bigint\`/\`number\` typed values and \`string\` typed values to be added together.",
+ "type": "boolean",
+ },
+ "allowRegExp": {
+ "description": "Whether to allow \`regexp\` typed values.",
+ "type": "boolean",
+ },
+ "skipCompoundAssignments": {
+ "description": "Whether to skip compound assignments such as \`+=\`.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "restrict-template-expressions": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allow": [
+ {
+ "from": "lib",
+ "name": [
+ "Error",
+ "URL",
+ "URLSearchParams",
+ ],
+ },
+ ],
+ "allowAny": true,
+ "allowBoolean": true,
+ "allowNullish": true,
+ "allowNumber": true,
+ "allowRegExp": true,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce template literal expressions to be of \`string\` type",
+ "recommended": {
+ "recommended": true,
+ "strict": [
+ {
+ "allowAny": false,
+ "allowBoolean": false,
+ "allowNever": false,
+ "allowNullish": false,
+ "allowNumber": false,
+ "allowRegExp": false,
+ },
+ ],
+ },
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/restrict-template-expressions",
+ },
+ "messages": {
+ "invalidType": "Invalid type "{{type}}" of template literal expression.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allow": {
+ "description": "Types to allow in template expressions.",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string",
},
- "type": "object",
- },
- "try": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "file",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "path": {
+ "type": "string",
+ },
},
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
},
- "type": "object",
- },
- "type": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "lib",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
},
- "before": {
- "type": "boolean",
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "package",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "package": {
+ "type": "string",
+ },
},
+ "required": [
+ "from",
+ "name",
+ "package",
+ ],
+ "type": "object",
},
- "type": "object",
+ ],
+ },
+ "type": "array",
+ },
+ "allowAny": {
+ "description": "Whether to allow \`any\` typed values in template expressions.",
+ "type": "boolean",
+ },
+ "allowArray": {
+ "description": "Whether to allow \`array\` typed values in template expressions.",
+ "type": "boolean",
+ },
+ "allowBoolean": {
+ "description": "Whether to allow \`boolean\` typed values in template expressions.",
+ "type": "boolean",
+ },
+ "allowNever": {
+ "description": "Whether to allow \`never\` typed values in template expressions.",
+ "type": "boolean",
+ },
+ "allowNullish": {
+ "description": "Whether to allow \`nullish\` typed values in template expressions.",
+ "type": "boolean",
+ },
+ "allowNumber": {
+ "description": "Whether to allow \`number\` typed values in template expressions.",
+ "type": "boolean",
+ },
+ "allowRegExp": {
+ "description": "Whether to allow \`regexp\` typed values in template expressions.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "return-await": {
+ "create": [Function],
+ "defaultOptions": [
+ "in-try-catch",
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce consistent awaiting of returned promises",
+ "extendsBaseRule": "no-return-await",
+ "recommended": {
+ "strict": [
+ "error-handling-correctness-only",
+ ],
+ },
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/return-await",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "disallowedPromiseAwait": "Returning an awaited promise is not allowed in this context.",
+ "disallowedPromiseAwaitSuggestion": "Remove \`await\` before the expression. Use caution as this may impact control flow.",
+ "nonPromiseAwait": "Returning an awaited value that is not a promise is not allowed.",
+ "requiredPromiseAwait": "Returning an awaited promise is required in this context.",
+ "requiredPromiseAwaitSuggestion": "Add \`await\` before the expression. Use caution as this may impact control flow.",
+ },
+ "schema": [
+ {
+ "oneOf": [
+ {
+ "description": "Requires that all returned promises be awaited.",
+ "enum": [
+ "always",
+ ],
+ "type": "string",
+ },
+ {
+ "description": "In error-handling contexts, the rule enforces that returned promises must be awaited. In ordinary contexts, the rule does not enforce any particular behavior around whether returned promises are awaited.",
+ "enum": [
+ "error-handling-correctness-only",
+ ],
+ "type": "string",
+ },
+ {
+ "description": "In error-handling contexts, the rule enforces that returned promises must be awaited. In ordinary contexts, the rule enforces that returned promises _must not_ be awaited.",
+ "enum": [
+ "in-try-catch",
+ ],
+ "type": "string",
+ },
+ {
+ "description": "Disallows awaiting any returned promises.",
+ "enum": [
+ "never",
+ ],
+ "type": "string",
+ },
+ ],
+ "type": "string",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "sort-type-constituents": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "caseSensitive": false,
+ "checkIntersections": true,
+ "checkUnions": true,
+ "groupOrder": [
+ "named",
+ "keyword",
+ "operator",
+ "literal",
+ "function",
+ "import",
+ "conditional",
+ "object",
+ "tuple",
+ "intersection",
+ "union",
+ "nullish",
+ ],
+ },
+ ],
+ "meta": {
+ "deprecated": true,
+ "docs": {
+ "description": "Enforce constituents of a type union/intersection to be sorted alphabetically",
+ "url": "https://typescript-eslint.io/rules/sort-type-constituents",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "notSorted": "{{type}} type constituents must be sorted.",
+ "notSortedNamed": "{{type}} type {{name}} constituents must be sorted.",
+ "suggestFix": "Sort constituents of type (removes all comments).",
+ },
+ "replacedBy": [
+ "perfectionist/sort-intersection-types",
+ "perfectionist/sort-union-types",
+ ],
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "caseSensitive": {
+ "description": "Whether to sort using case sensitive string comparisons.",
+ "type": "boolean",
+ },
+ "checkIntersections": {
+ "description": "Whether to check intersection types (\`&\`).",
+ "type": "boolean",
+ },
+ "checkUnions": {
+ "description": "Whether to check union types (\`|\`).",
+ "type": "boolean",
+ },
+ "groupOrder": {
+ "description": "Ordering of the groups.",
+ "items": {
+ "enum": [
+ "conditional",
+ "function",
+ "import",
+ "intersection",
+ "keyword",
+ "nullish",
+ "literal",
+ "named",
+ "object",
+ "operator",
+ "tuple",
+ "union",
+ ],
+ "type": "string",
+ },
+ "type": "array",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "strict-boolean-expressions": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowAny": false,
+ "allowNullableBoolean": false,
+ "allowNullableEnum": false,
+ "allowNullableNumber": false,
+ "allowNullableObject": true,
+ "allowNullableString": false,
+ "allowNumber": true,
+ "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false,
+ "allowString": true,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow certain types in boolean expressions",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/strict-boolean-expressions",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "conditionErrorAny": "Unexpected any value in conditional. An explicit comparison or type cast is required.",
+ "conditionErrorNullableBoolean": "Unexpected nullable boolean value in conditional. Please handle the nullish case explicitly.",
+ "conditionErrorNullableEnum": "Unexpected nullable enum value in conditional. Please handle the nullish/zero/NaN cases explicitly.",
+ "conditionErrorNullableNumber": "Unexpected nullable number value in conditional. Please handle the nullish/zero/NaN cases explicitly.",
+ "conditionErrorNullableObject": "Unexpected nullable object value in conditional. An explicit null check is required.",
+ "conditionErrorNullableString": "Unexpected nullable string value in conditional. Please handle the nullish/empty cases explicitly.",
+ "conditionErrorNullish": "Unexpected nullish value in conditional. The condition is always false.",
+ "conditionErrorNumber": "Unexpected number value in conditional. An explicit zero/NaN check is required.",
+ "conditionErrorObject": "Unexpected object value in conditional. The condition is always true.",
+ "conditionErrorOther": "Unexpected value in conditional. A boolean expression is required.",
+ "conditionErrorString": "Unexpected string value in conditional. An explicit empty string check is required.",
+ "conditionFixCastBoolean": "Explicitly cast value to a boolean (\`Boolean(value)\`)",
+ "conditionFixCompareEmptyString": "Change condition to check for empty string (\`value !== ""\`)",
+ "conditionFixCompareFalse": "Change condition to check if false (\`value === false\`)",
+ "conditionFixCompareNaN": "Change condition to check for NaN (\`!Number.isNaN(value)\`)",
+ "conditionFixCompareNullish": "Change condition to check for null/undefined (\`value != null\`)",
+ "conditionFixCompareStringLength": "Change condition to check string's length (\`value.length !== 0\`)",
+ "conditionFixCompareTrue": "Change condition to check if true (\`value === true\`)",
+ "conditionFixCompareZero": "Change condition to check for 0 (\`value !== 0\`)",
+ "conditionFixDefaultEmptyString": "Explicitly treat nullish value the same as an empty string (\`value ?? ""\`)",
+ "conditionFixDefaultFalse": "Explicitly treat nullish value the same as false (\`value ?? false\`)",
+ "conditionFixDefaultZero": "Explicitly treat nullish value the same as 0 (\`value ?? 0\`)",
+ "noStrictNullCheck": "This rule requires the \`strictNullChecks\` compiler option to be turned on to function correctly.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowAny": {
+ "description": "Whether to allow \`any\`s in a boolean context.",
+ "type": "boolean",
+ },
+ "allowNullableBoolean": {
+ "description": "Whether to allow nullable \`boolean\`s in a boolean context.",
+ "type": "boolean",
+ },
+ "allowNullableEnum": {
+ "description": "Whether to allow nullable \`enum\`s in a boolean context.",
+ "type": "boolean",
+ },
+ "allowNullableNumber": {
+ "description": "Whether to allow nullable \`number\`s in a boolean context.",
+ "type": "boolean",
+ },
+ "allowNullableObject": {
+ "description": "Whether to allow nullable \`object\`s, \`symbol\`s, and functions in a boolean context.",
+ "type": "boolean",
+ },
+ "allowNullableString": {
+ "description": "Whether to allow nullable \`string\`s in a boolean context.",
+ "type": "boolean",
+ },
+ "allowNumber": {
+ "description": "Whether to allow \`number\`s in a boolean context.",
+ "type": "boolean",
+ },
+ "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": {
+ "description": "Unless this is set to \`true\`, the rule will error on every file whose \`tsconfig.json\` does _not_ have the \`strictNullChecks\` compiler option (or \`strict\`) set to \`true\`.",
+ "type": "boolean",
+ },
+ "allowString": {
+ "description": "Whether to allow \`string\`s in a boolean context.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "switch-exhaustiveness-check": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowDefaultCaseForExhaustiveSwitch": true,
+ "considerDefaultExhaustiveForUnions": false,
+ "requireDefaultForNonUnion": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require switch-case statements to be exhaustive",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/switch-exhaustiveness-check",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "addMissingCases": "Add branches for missing cases.",
+ "dangerousDefaultCase": "The switch statement is exhaustive, so the default case is unnecessary.",
+ "switchIsNotExhaustive": "Switch is not exhaustive. Cases not matched: {{missingBranches}}",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowDefaultCaseForExhaustiveSwitch": {
+ "description": "If 'true', allow 'default' cases on switch statements with exhaustive cases.",
+ "type": "boolean",
+ },
+ "considerDefaultExhaustiveForUnions": {
+ "description": "If 'true', the 'default' clause is used to determine whether the switch statement is exhaustive for union type",
+ "type": "boolean",
+ },
+ "requireDefaultForNonUnion": {
+ "description": "If 'true', require a 'default' clause for switches on non-union types.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "triple-slash-reference": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "lib": "always",
+ "path": "never",
+ "types": "prefer-import",
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow certain triple slash directives in favor of ES6-style import declarations",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/triple-slash-reference",
+ },
+ "messages": {
+ "tripleSlashReference": "Do not use a triple slash reference for {{module}}, use \`import\` style instead.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "lib": {
+ "description": "What to enforce for \`/// \` references.",
+ "enum": [
+ "always",
+ "never",
+ ],
+ "type": "string",
+ },
+ "path": {
+ "description": "What to enforce for \`/// \` references.",
+ "enum": [
+ "always",
+ "never",
+ ],
+ "type": "string",
+ },
+ "types": {
+ "description": "What to enforce for \`/// \` references.",
+ "enum": [
+ "always",
+ "never",
+ "prefer-import",
+ ],
+ "type": "string",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "typedef": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "arrayDestructuring": false,
+ "arrowParameter": false,
+ "memberVariableDeclaration": false,
+ "objectDestructuring": false,
+ "parameter": false,
+ "propertyDeclaration": false,
+ "variableDeclaration": false,
+ "variableDeclarationIgnoreFunction": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require type annotations in certain places",
+ "url": "https://typescript-eslint.io/rules/typedef",
+ },
+ "messages": {
+ "expectedTypedef": "Expected a type annotation.",
+ "expectedTypedefNamed": "Expected {{name}} to have a type annotation.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "arrayDestructuring": {
+ "description": "Whether to enforce type annotations on variables declared using array destructuring.",
+ "type": "boolean",
+ },
+ "arrowParameter": {
+ "description": "Whether to enforce type annotations for parameters of arrow functions.",
+ "type": "boolean",
+ },
+ "memberVariableDeclaration": {
+ "description": "Whether to enforce type annotations on member variables of classes.",
+ "type": "boolean",
+ },
+ "objectDestructuring": {
+ "description": "Whether to enforce type annotations on variables declared using object destructuring.",
+ "type": "boolean",
+ },
+ "parameter": {
+ "description": "Whether to enforce type annotations for parameters of functions and methods.",
+ "type": "boolean",
+ },
+ "propertyDeclaration": {
+ "description": "Whether to enforce type annotations for properties of interfaces and types.",
+ "type": "boolean",
+ },
+ "variableDeclaration": {
+ "description": "Whether to enforce type annotations for variable declarations, excluding array and object destructuring.",
+ "type": "boolean",
+ },
+ "variableDeclarationIgnoreFunction": {
+ "description": "Whether to ignore variable declarations for non-arrow and arrow functions.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "unbound-method": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "ignoreStatic": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce unbound methods are called with their expected scope",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/unbound-method",
+ },
+ "messages": {
+ "unbound": "Avoid referencing unbound methods which may cause unintentional scoping of \`this\`.",
+ "unboundWithoutThisAnnotation": "Avoid referencing unbound methods which may cause unintentional scoping of \`this\`.
+If your function does not access \`this\`, you can annotate it with \`this: void\`, or consider using an arrow function instead.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "ignoreStatic": {
+ "description": "Whether to skip checking whether \`static\` methods are correctly bound.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "unified-signatures": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "ignoreDifferentlyNamedParameters": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow two overloads that could be unified into one with a union or an optional/rest parameter",
+ "recommended": "strict",
+ "url": "https://typescript-eslint.io/rules/unified-signatures",
+ },
+ "messages": {
+ "omittingRestParameter": "{{failureStringStart}} with a rest parameter.",
+ "omittingSingleParameter": "{{failureStringStart}} with an optional parameter.",
+ "singleParameterDifference": "{{failureStringStart}} taking \`{{type1}} | {{type2}}\`.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "ignoreDifferentlyNamedParameters": {
+ "description": "Whether two parameters with different names at the same index should be considered different even if their types are the same.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "use-unknown-in-catch-callback-variable": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Enforce typing arguments in Promise rejection callbacks as \`unknown\`",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "addUnknownRestTypeAnnotationSuggestion": "Add an explicit \`: [unknown]\` type annotation to the rejection callback rest variable.",
+ "addUnknownTypeAnnotationSuggestion": "Add an explicit \`: unknown\` type annotation to the rejection callback variable.",
+ "useUnknown": "Prefer the safe \`: unknown\` for a \`{{method}}\`{{append}} callback variable.",
+ "useUnknownArrayDestructuringPattern": "Prefer the safe \`: unknown\` for a \`{{method}}\`{{append}} callback variable. The thrown error may not be iterable.",
+ "useUnknownObjectDestructuringPattern": "Prefer the safe \`: unknown\` for a \`{{method}}\`{{append}} callback variable. The thrown error may be nullable, or may not have the expected shape.",
+ "wrongRestTypeAnnotationSuggestion": "Change existing type annotation to \`: [unknown]\`.",
+ "wrongTypeAnnotationSuggestion": "Change existing type annotation to \`: unknown\`.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ },
+ },
+ },
+ },
+ {
+ "files": [
+ "**/*.ts",
+ "**/*.tsx",
+ "**/*.mts",
+ "**/*.cts",
+ ],
+ "name": "jimmy.codes/typescript__typescript-eslint/eslint-recommended",
+ "rules": {
+ "constructor-super": "off",
+ "getter-return": "off",
+ "no-const-assign": "off",
+ "no-dupe-args": "off",
+ "no-dupe-class-members": "off",
+ "no-dupe-keys": "off",
+ "no-func-assign": "off",
+ "no-import-assign": "off",
+ "no-new-native-nonconstructor": "off",
+ "no-new-symbol": "off",
+ "no-obj-calls": "off",
+ "no-redeclare": "off",
+ "no-setter-return": "off",
+ "no-this-before-super": "off",
+ "no-undef": "off",
+ "no-unreachable": "off",
+ "no-unsafe-negation": "off",
+ "no-var": "error",
+ "prefer-const": "error",
+ "prefer-rest-params": "error",
+ "prefer-spread": "error",
+ },
+ },
+ {
+ "name": "jimmy.codes/typescript__typescript-eslint/strict-type-checked",
+ "rules": {
+ "@typescript-eslint/await-thenable": "error",
+ "@typescript-eslint/ban-ts-comment": [
+ "error",
+ {
+ "minimumDescriptionLength": 10,
+ },
+ ],
+ "@typescript-eslint/no-array-constructor": "error",
+ "@typescript-eslint/no-array-delete": "error",
+ "@typescript-eslint/no-base-to-string": "error",
+ "@typescript-eslint/no-confusing-void-expression": "error",
+ "@typescript-eslint/no-deprecated": "error",
+ "@typescript-eslint/no-duplicate-enum-values": "error",
+ "@typescript-eslint/no-duplicate-type-constituents": "error",
+ "@typescript-eslint/no-dynamic-delete": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
+ "@typescript-eslint/no-explicit-any": "error",
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
+ "@typescript-eslint/no-extraneous-class": "error",
+ "@typescript-eslint/no-floating-promises": "error",
+ "@typescript-eslint/no-for-in-array": "error",
+ "@typescript-eslint/no-implied-eval": "error",
+ "@typescript-eslint/no-invalid-void-type": "error",
+ "@typescript-eslint/no-meaningless-void-operator": "error",
+ "@typescript-eslint/no-misused-new": "error",
+ "@typescript-eslint/no-misused-promises": "error",
+ "@typescript-eslint/no-mixed-enums": "error",
+ "@typescript-eslint/no-namespace": "error",
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
+ "@typescript-eslint/no-non-null-assertion": "error",
+ "@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-require-imports": "error",
+ "@typescript-eslint/no-this-alias": "error",
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
+ "@typescript-eslint/no-unnecessary-condition": "error",
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
+ "@typescript-eslint/no-unnecessary-type-arguments": "error",
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
+ "@typescript-eslint/no-unsafe-argument": "error",
+ "@typescript-eslint/no-unsafe-assignment": "error",
+ "@typescript-eslint/no-unsafe-call": "error",
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
+ "@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
+ "@typescript-eslint/no-unsafe-member-access": "error",
+ "@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
+ "@typescript-eslint/no-unused-vars": "error",
+ "@typescript-eslint/no-useless-constructor": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
+ "@typescript-eslint/only-throw-error": "error",
+ "@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-literal-enum-member": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
+ "@typescript-eslint/prefer-reduce-type-parameter": "error",
+ "@typescript-eslint/prefer-return-this-type": "error",
+ "@typescript-eslint/require-await": "error",
+ "@typescript-eslint/restrict-plus-operands": [
+ "error",
+ {
+ "allowAny": false,
+ "allowBoolean": false,
+ "allowNullish": false,
+ "allowNumberAndString": false,
+ "allowRegExp": false,
+ },
+ ],
+ "@typescript-eslint/restrict-template-expressions": [
+ "error",
+ {
+ "allowAny": false,
+ "allowBoolean": false,
+ "allowNever": false,
+ "allowNullish": false,
+ "allowNumber": false,
+ "allowRegExp": false,
+ },
+ ],
+ "@typescript-eslint/return-await": [
+ "error",
+ "error-handling-correctness-only",
+ ],
+ "@typescript-eslint/triple-slash-reference": "error",
+ "@typescript-eslint/unbound-method": "error",
+ "@typescript-eslint/unified-signatures": "error",
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
+ "no-array-constructor": "off",
+ "no-implied-eval": "off",
+ "no-return-await": "off",
+ "no-throw-literal": "off",
+ "no-unused-expressions": "off",
+ "no-unused-vars": "off",
+ "no-useless-constructor": "off",
+ "prefer-promise-reject-errors": "off",
+ "require-await": "off",
+ },
+ },
+ {
+ "languageOptions": {
+ "parser": {
+ "meta": {
+ "name": "typescript-eslint/parser",
+ "version": "8.12.2",
+ },
+ "parseForESLint": [Function],
+ },
+ "sourceType": "module",
+ },
+ "name": "jimmy.codes/typescript__typescript-eslint/base",
+ "plugins": {
+ "@typescript-eslint": {
+ "configs": {
+ "all": {
+ "extends": [
+ "./configs/base",
+ "./configs/eslint-recommended",
+ ],
+ "rules": {
+ "@typescript-eslint/adjacent-overload-signatures": "error",
+ "@typescript-eslint/array-type": "error",
+ "@typescript-eslint/await-thenable": "error",
+ "@typescript-eslint/ban-ts-comment": "error",
+ "@typescript-eslint/ban-tslint-comment": "error",
+ "@typescript-eslint/class-literal-property-style": "error",
+ "@typescript-eslint/class-methods-use-this": "error",
+ "@typescript-eslint/consistent-generic-constructors": "error",
+ "@typescript-eslint/consistent-indexed-object-style": "error",
+ "@typescript-eslint/consistent-return": "error",
+ "@typescript-eslint/consistent-type-assertions": "error",
+ "@typescript-eslint/consistent-type-definitions": "error",
+ "@typescript-eslint/consistent-type-exports": "error",
+ "@typescript-eslint/consistent-type-imports": "error",
+ "@typescript-eslint/default-param-last": "error",
+ "@typescript-eslint/dot-notation": "error",
+ "@typescript-eslint/explicit-function-return-type": "error",
+ "@typescript-eslint/explicit-member-accessibility": "error",
+ "@typescript-eslint/explicit-module-boundary-types": "error",
+ "@typescript-eslint/init-declarations": "error",
+ "@typescript-eslint/max-params": "error",
+ "@typescript-eslint/member-ordering": "error",
+ "@typescript-eslint/method-signature-style": "error",
+ "@typescript-eslint/naming-convention": "error",
+ "@typescript-eslint/no-array-constructor": "error",
+ "@typescript-eslint/no-array-delete": "error",
+ "@typescript-eslint/no-base-to-string": "error",
+ "@typescript-eslint/no-confusing-non-null-assertion": "error",
+ "@typescript-eslint/no-confusing-void-expression": "error",
+ "@typescript-eslint/no-deprecated": "error",
+ "@typescript-eslint/no-dupe-class-members": "error",
+ "@typescript-eslint/no-duplicate-enum-values": "error",
+ "@typescript-eslint/no-duplicate-type-constituents": "error",
+ "@typescript-eslint/no-dynamic-delete": "error",
+ "@typescript-eslint/no-empty-function": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
+ "@typescript-eslint/no-explicit-any": "error",
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
+ "@typescript-eslint/no-extraneous-class": "error",
+ "@typescript-eslint/no-floating-promises": "error",
+ "@typescript-eslint/no-for-in-array": "error",
+ "@typescript-eslint/no-implied-eval": "error",
+ "@typescript-eslint/no-import-type-side-effects": "error",
+ "@typescript-eslint/no-inferrable-types": "error",
+ "@typescript-eslint/no-invalid-this": "error",
+ "@typescript-eslint/no-invalid-void-type": "error",
+ "@typescript-eslint/no-loop-func": "error",
+ "@typescript-eslint/no-magic-numbers": "error",
+ "@typescript-eslint/no-meaningless-void-operator": "error",
+ "@typescript-eslint/no-misused-new": "error",
+ "@typescript-eslint/no-misused-promises": "error",
+ "@typescript-eslint/no-mixed-enums": "error",
+ "@typescript-eslint/no-namespace": "error",
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
+ "@typescript-eslint/no-non-null-assertion": "error",
+ "@typescript-eslint/no-redeclare": "error",
+ "@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-require-imports": "error",
+ "@typescript-eslint/no-restricted-imports": "error",
+ "@typescript-eslint/no-restricted-types": "error",
+ "@typescript-eslint/no-shadow": "error",
+ "@typescript-eslint/no-this-alias": "error",
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
+ "@typescript-eslint/no-unnecessary-condition": "error",
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "error",
+ "@typescript-eslint/no-unnecessary-qualifier": "error",
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
+ "@typescript-eslint/no-unnecessary-type-arguments": "error",
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
+ "@typescript-eslint/no-unsafe-argument": "error",
+ "@typescript-eslint/no-unsafe-assignment": "error",
+ "@typescript-eslint/no-unsafe-call": "error",
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
+ "@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
+ "@typescript-eslint/no-unsafe-member-access": "error",
+ "@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
+ "@typescript-eslint/no-unused-vars": "error",
+ "@typescript-eslint/no-use-before-define": "error",
+ "@typescript-eslint/no-useless-constructor": "error",
+ "@typescript-eslint/no-useless-empty-export": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
+ "@typescript-eslint/non-nullable-type-assertion-style": "error",
+ "@typescript-eslint/only-throw-error": "error",
+ "@typescript-eslint/parameter-properties": "error",
+ "@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-destructuring": "error",
+ "@typescript-eslint/prefer-enum-initializers": "error",
+ "@typescript-eslint/prefer-find": "error",
+ "@typescript-eslint/prefer-for-of": "error",
+ "@typescript-eslint/prefer-function-type": "error",
+ "@typescript-eslint/prefer-includes": "error",
+ "@typescript-eslint/prefer-literal-enum-member": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/prefer-nullish-coalescing": "error",
+ "@typescript-eslint/prefer-optional-chain": "error",
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
+ "@typescript-eslint/prefer-readonly": "error",
+ "@typescript-eslint/prefer-readonly-parameter-types": "error",
+ "@typescript-eslint/prefer-reduce-type-parameter": "error",
+ "@typescript-eslint/prefer-regexp-exec": "error",
+ "@typescript-eslint/prefer-return-this-type": "error",
+ "@typescript-eslint/prefer-string-starts-ends-with": "error",
+ "@typescript-eslint/promise-function-async": "error",
+ "@typescript-eslint/require-array-sort-compare": "error",
+ "@typescript-eslint/require-await": "error",
+ "@typescript-eslint/restrict-plus-operands": "error",
+ "@typescript-eslint/restrict-template-expressions": "error",
+ "@typescript-eslint/return-await": "error",
+ "@typescript-eslint/strict-boolean-expressions": "error",
+ "@typescript-eslint/switch-exhaustiveness-check": "error",
+ "@typescript-eslint/triple-slash-reference": "error",
+ "@typescript-eslint/typedef": "error",
+ "@typescript-eslint/unbound-method": "error",
+ "@typescript-eslint/unified-signatures": "error",
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
+ "class-methods-use-this": "off",
+ "consistent-return": "off",
+ "default-param-last": "off",
+ "dot-notation": "off",
+ "init-declarations": "off",
+ "max-params": "off",
+ "no-array-constructor": "off",
+ "no-dupe-class-members": "off",
+ "no-empty-function": "off",
+ "no-implied-eval": "off",
+ "no-invalid-this": "off",
+ "no-loop-func": "off",
+ "no-magic-numbers": "off",
+ "no-redeclare": "off",
+ "no-restricted-imports": "off",
+ "no-return-await": "off",
+ "no-shadow": "off",
+ "no-throw-literal": "off",
+ "no-unused-expressions": "off",
+ "no-unused-vars": "off",
+ "no-use-before-define": "off",
+ "no-useless-constructor": "off",
+ "prefer-destructuring": "off",
+ "prefer-promise-reject-errors": "off",
+ "require-await": "off",
+ },
+ },
+ "base": {
+ "parser": "@typescript-eslint/parser",
+ "parserOptions": {
+ "sourceType": "module",
+ },
+ "plugins": [
+ "@typescript-eslint",
+ ],
+ },
+ "disable-type-checked": {
+ "parserOptions": {
+ "program": null,
+ "project": false,
+ "projectService": false,
+ },
+ "rules": {
+ "@typescript-eslint/await-thenable": "off",
+ "@typescript-eslint/consistent-return": "off",
+ "@typescript-eslint/consistent-type-exports": "off",
+ "@typescript-eslint/dot-notation": "off",
+ "@typescript-eslint/naming-convention": "off",
+ "@typescript-eslint/no-array-delete": "off",
+ "@typescript-eslint/no-base-to-string": "off",
+ "@typescript-eslint/no-confusing-void-expression": "off",
+ "@typescript-eslint/no-deprecated": "off",
+ "@typescript-eslint/no-duplicate-type-constituents": "off",
+ "@typescript-eslint/no-floating-promises": "off",
+ "@typescript-eslint/no-for-in-array": "off",
+ "@typescript-eslint/no-implied-eval": "off",
+ "@typescript-eslint/no-meaningless-void-operator": "off",
+ "@typescript-eslint/no-misused-promises": "off",
+ "@typescript-eslint/no-mixed-enums": "off",
+ "@typescript-eslint/no-redundant-type-constituents": "off",
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
+ "@typescript-eslint/no-unnecessary-condition": "off",
+ "@typescript-eslint/no-unnecessary-qualifier": "off",
+ "@typescript-eslint/no-unnecessary-template-expression": "off",
+ "@typescript-eslint/no-unnecessary-type-arguments": "off",
+ "@typescript-eslint/no-unnecessary-type-assertion": "off",
+ "@typescript-eslint/no-unnecessary-type-parameters": "off",
+ "@typescript-eslint/no-unsafe-argument": "off",
+ "@typescript-eslint/no-unsafe-assignment": "off",
+ "@typescript-eslint/no-unsafe-call": "off",
+ "@typescript-eslint/no-unsafe-enum-comparison": "off",
+ "@typescript-eslint/no-unsafe-member-access": "off",
+ "@typescript-eslint/no-unsafe-return": "off",
+ "@typescript-eslint/no-unsafe-unary-minus": "off",
+ "@typescript-eslint/non-nullable-type-assertion-style": "off",
+ "@typescript-eslint/only-throw-error": "off",
+ "@typescript-eslint/prefer-destructuring": "off",
+ "@typescript-eslint/prefer-find": "off",
+ "@typescript-eslint/prefer-includes": "off",
+ "@typescript-eslint/prefer-nullish-coalescing": "off",
+ "@typescript-eslint/prefer-optional-chain": "off",
+ "@typescript-eslint/prefer-promise-reject-errors": "off",
+ "@typescript-eslint/prefer-readonly": "off",
+ "@typescript-eslint/prefer-readonly-parameter-types": "off",
+ "@typescript-eslint/prefer-reduce-type-parameter": "off",
+ "@typescript-eslint/prefer-regexp-exec": "off",
+ "@typescript-eslint/prefer-return-this-type": "off",
+ "@typescript-eslint/prefer-string-starts-ends-with": "off",
+ "@typescript-eslint/promise-function-async": "off",
+ "@typescript-eslint/require-array-sort-compare": "off",
+ "@typescript-eslint/require-await": "off",
+ "@typescript-eslint/restrict-plus-operands": "off",
+ "@typescript-eslint/restrict-template-expressions": "off",
+ "@typescript-eslint/return-await": "off",
+ "@typescript-eslint/strict-boolean-expressions": "off",
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
+ "@typescript-eslint/unbound-method": "off",
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
+ },
+ },
+ "eslint-recommended": {
+ "overrides": [
+ {
+ "files": [
+ "*.ts",
+ "*.tsx",
+ "*.mts",
+ "*.cts",
+ ],
+ "rules": {
+ "constructor-super": "off",
+ "getter-return": "off",
+ "no-const-assign": "off",
+ "no-dupe-args": "off",
+ "no-dupe-class-members": "off",
+ "no-dupe-keys": "off",
+ "no-func-assign": "off",
+ "no-import-assign": "off",
+ "no-new-native-nonconstructor": "off",
+ "no-new-symbol": "off",
+ "no-obj-calls": "off",
+ "no-redeclare": "off",
+ "no-setter-return": "off",
+ "no-this-before-super": "off",
+ "no-undef": "off",
+ "no-unreachable": "off",
+ "no-unsafe-negation": "off",
+ "no-var": "error",
+ "prefer-const": "error",
+ "prefer-rest-params": "error",
+ "prefer-spread": "error",
+ },
+ },
+ ],
+ },
+ "recommended": {
+ "extends": [
+ "./configs/base",
+ "./configs/eslint-recommended",
+ ],
+ "rules": {
+ "@typescript-eslint/ban-ts-comment": "error",
+ "@typescript-eslint/no-array-constructor": "error",
+ "@typescript-eslint/no-duplicate-enum-values": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
+ "@typescript-eslint/no-explicit-any": "error",
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
+ "@typescript-eslint/no-misused-new": "error",
+ "@typescript-eslint/no-namespace": "error",
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
+ "@typescript-eslint/no-require-imports": "error",
+ "@typescript-eslint/no-this-alias": "error",
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
+ "@typescript-eslint/no-unused-vars": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
+ "@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/triple-slash-reference": "error",
+ "no-array-constructor": "off",
+ "no-unused-expressions": "off",
+ "no-unused-vars": "off",
+ },
+ },
+ "recommended-requiring-type-checking": {
+ "extends": [
+ "./configs/base",
+ "./configs/eslint-recommended",
+ ],
+ "rules": {
+ "@typescript-eslint/await-thenable": "error",
+ "@typescript-eslint/ban-ts-comment": "error",
+ "@typescript-eslint/no-array-constructor": "error",
+ "@typescript-eslint/no-array-delete": "error",
+ "@typescript-eslint/no-base-to-string": "error",
+ "@typescript-eslint/no-duplicate-enum-values": "error",
+ "@typescript-eslint/no-duplicate-type-constituents": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
+ "@typescript-eslint/no-explicit-any": "error",
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
+ "@typescript-eslint/no-floating-promises": "error",
+ "@typescript-eslint/no-for-in-array": "error",
+ "@typescript-eslint/no-implied-eval": "error",
+ "@typescript-eslint/no-misused-new": "error",
+ "@typescript-eslint/no-misused-promises": "error",
+ "@typescript-eslint/no-namespace": "error",
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
+ "@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-require-imports": "error",
+ "@typescript-eslint/no-this-alias": "error",
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
+ "@typescript-eslint/no-unsafe-argument": "error",
+ "@typescript-eslint/no-unsafe-assignment": "error",
+ "@typescript-eslint/no-unsafe-call": "error",
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
+ "@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
+ "@typescript-eslint/no-unsafe-member-access": "error",
+ "@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
+ "@typescript-eslint/no-unused-vars": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
+ "@typescript-eslint/only-throw-error": "error",
+ "@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
+ "@typescript-eslint/require-await": "error",
+ "@typescript-eslint/restrict-plus-operands": "error",
+ "@typescript-eslint/restrict-template-expressions": "error",
+ "@typescript-eslint/triple-slash-reference": "error",
+ "@typescript-eslint/unbound-method": "error",
+ "no-array-constructor": "off",
+ "no-implied-eval": "off",
+ "no-throw-literal": "off",
+ "no-unused-expressions": "off",
+ "no-unused-vars": "off",
+ "prefer-promise-reject-errors": "off",
+ "require-await": "off",
+ },
+ },
+ "recommended-type-checked": {
+ "extends": [
+ "./configs/base",
+ "./configs/eslint-recommended",
+ ],
+ "rules": {
+ "@typescript-eslint/await-thenable": "error",
+ "@typescript-eslint/ban-ts-comment": "error",
+ "@typescript-eslint/no-array-constructor": "error",
+ "@typescript-eslint/no-array-delete": "error",
+ "@typescript-eslint/no-base-to-string": "error",
+ "@typescript-eslint/no-duplicate-enum-values": "error",
+ "@typescript-eslint/no-duplicate-type-constituents": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
+ "@typescript-eslint/no-explicit-any": "error",
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
+ "@typescript-eslint/no-floating-promises": "error",
+ "@typescript-eslint/no-for-in-array": "error",
+ "@typescript-eslint/no-implied-eval": "error",
+ "@typescript-eslint/no-misused-new": "error",
+ "@typescript-eslint/no-misused-promises": "error",
+ "@typescript-eslint/no-namespace": "error",
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
+ "@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-require-imports": "error",
+ "@typescript-eslint/no-this-alias": "error",
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
+ "@typescript-eslint/no-unsafe-argument": "error",
+ "@typescript-eslint/no-unsafe-assignment": "error",
+ "@typescript-eslint/no-unsafe-call": "error",
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
+ "@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
+ "@typescript-eslint/no-unsafe-member-access": "error",
+ "@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
+ "@typescript-eslint/no-unused-vars": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
+ "@typescript-eslint/only-throw-error": "error",
+ "@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
+ "@typescript-eslint/require-await": "error",
+ "@typescript-eslint/restrict-plus-operands": "error",
+ "@typescript-eslint/restrict-template-expressions": "error",
+ "@typescript-eslint/triple-slash-reference": "error",
+ "@typescript-eslint/unbound-method": "error",
+ "no-array-constructor": "off",
+ "no-implied-eval": "off",
+ "no-throw-literal": "off",
+ "no-unused-expressions": "off",
+ "no-unused-vars": "off",
+ "prefer-promise-reject-errors": "off",
+ "require-await": "off",
+ },
+ },
+ "recommended-type-checked-only": {
+ "extends": [
+ "./configs/base",
+ "./configs/eslint-recommended",
+ ],
+ "rules": {
+ "@typescript-eslint/await-thenable": "error",
+ "@typescript-eslint/no-array-delete": "error",
+ "@typescript-eslint/no-base-to-string": "error",
+ "@typescript-eslint/no-duplicate-type-constituents": "error",
+ "@typescript-eslint/no-floating-promises": "error",
+ "@typescript-eslint/no-for-in-array": "error",
+ "@typescript-eslint/no-implied-eval": "error",
+ "@typescript-eslint/no-misused-promises": "error",
+ "@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
+ "@typescript-eslint/no-unsafe-argument": "error",
+ "@typescript-eslint/no-unsafe-assignment": "error",
+ "@typescript-eslint/no-unsafe-call": "error",
+ "@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-member-access": "error",
+ "@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/only-throw-error": "error",
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
+ "@typescript-eslint/require-await": "error",
+ "@typescript-eslint/restrict-plus-operands": "error",
+ "@typescript-eslint/restrict-template-expressions": "error",
+ "@typescript-eslint/unbound-method": "error",
+ "no-implied-eval": "off",
+ "no-throw-literal": "off",
+ "prefer-promise-reject-errors": "off",
+ "require-await": "off",
+ },
+ },
+ "strict": {
+ "extends": [
+ "./configs/base",
+ "./configs/eslint-recommended",
+ ],
+ "rules": {
+ "@typescript-eslint/ban-ts-comment": [
+ "error",
+ {
+ "minimumDescriptionLength": 10,
+ },
+ ],
+ "@typescript-eslint/no-array-constructor": "error",
+ "@typescript-eslint/no-duplicate-enum-values": "error",
+ "@typescript-eslint/no-dynamic-delete": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
+ "@typescript-eslint/no-explicit-any": "error",
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
+ "@typescript-eslint/no-extraneous-class": "error",
+ "@typescript-eslint/no-invalid-void-type": "error",
+ "@typescript-eslint/no-misused-new": "error",
+ "@typescript-eslint/no-namespace": "error",
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
+ "@typescript-eslint/no-non-null-assertion": "error",
+ "@typescript-eslint/no-require-imports": "error",
+ "@typescript-eslint/no-this-alias": "error",
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
+ "@typescript-eslint/no-unused-vars": "error",
+ "@typescript-eslint/no-useless-constructor": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
+ "@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-literal-enum-member": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/triple-slash-reference": "error",
+ "@typescript-eslint/unified-signatures": "error",
+ "no-array-constructor": "off",
+ "no-unused-expressions": "off",
+ "no-unused-vars": "off",
+ "no-useless-constructor": "off",
+ },
+ },
+ "strict-type-checked": {
+ "extends": [
+ "./configs/base",
+ "./configs/eslint-recommended",
+ ],
+ "rules": {
+ "@typescript-eslint/await-thenable": "error",
+ "@typescript-eslint/ban-ts-comment": [
+ "error",
+ {
+ "minimumDescriptionLength": 10,
+ },
+ ],
+ "@typescript-eslint/no-array-constructor": "error",
+ "@typescript-eslint/no-array-delete": "error",
+ "@typescript-eslint/no-base-to-string": "error",
+ "@typescript-eslint/no-confusing-void-expression": "error",
+ "@typescript-eslint/no-deprecated": "error",
+ "@typescript-eslint/no-duplicate-enum-values": "error",
+ "@typescript-eslint/no-duplicate-type-constituents": "error",
+ "@typescript-eslint/no-dynamic-delete": "error",
+ "@typescript-eslint/no-empty-object-type": "error",
+ "@typescript-eslint/no-explicit-any": "error",
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
+ "@typescript-eslint/no-extraneous-class": "error",
+ "@typescript-eslint/no-floating-promises": "error",
+ "@typescript-eslint/no-for-in-array": "error",
+ "@typescript-eslint/no-implied-eval": "error",
+ "@typescript-eslint/no-invalid-void-type": "error",
+ "@typescript-eslint/no-meaningless-void-operator": "error",
+ "@typescript-eslint/no-misused-new": "error",
+ "@typescript-eslint/no-misused-promises": "error",
+ "@typescript-eslint/no-mixed-enums": "error",
+ "@typescript-eslint/no-namespace": "error",
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
+ "@typescript-eslint/no-non-null-assertion": "error",
+ "@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-require-imports": "error",
+ "@typescript-eslint/no-this-alias": "error",
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
+ "@typescript-eslint/no-unnecessary-condition": "error",
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
+ "@typescript-eslint/no-unnecessary-type-arguments": "error",
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
+ "@typescript-eslint/no-unsafe-argument": "error",
+ "@typescript-eslint/no-unsafe-assignment": "error",
+ "@typescript-eslint/no-unsafe-call": "error",
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
+ "@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-function-type": "error",
+ "@typescript-eslint/no-unsafe-member-access": "error",
+ "@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/no-unused-expressions": "error",
+ "@typescript-eslint/no-unused-vars": "error",
+ "@typescript-eslint/no-useless-constructor": "error",
+ "@typescript-eslint/no-wrapper-object-types": "error",
+ "@typescript-eslint/only-throw-error": "error",
+ "@typescript-eslint/prefer-as-const": "error",
+ "@typescript-eslint/prefer-literal-enum-member": "error",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
+ "@typescript-eslint/prefer-reduce-type-parameter": "error",
+ "@typescript-eslint/prefer-return-this-type": "error",
+ "@typescript-eslint/require-await": "error",
+ "@typescript-eslint/restrict-plus-operands": [
+ "error",
+ {
+ "allowAny": false,
+ "allowBoolean": false,
+ "allowNullish": false,
+ "allowNumberAndString": false,
+ "allowRegExp": false,
+ },
+ ],
+ "@typescript-eslint/restrict-template-expressions": [
+ "error",
+ {
+ "allowAny": false,
+ "allowBoolean": false,
+ "allowNever": false,
+ "allowNullish": false,
+ "allowNumber": false,
+ "allowRegExp": false,
+ },
+ ],
+ "@typescript-eslint/return-await": [
+ "error",
+ "error-handling-correctness-only",
+ ],
+ "@typescript-eslint/triple-slash-reference": "error",
+ "@typescript-eslint/unbound-method": "error",
+ "@typescript-eslint/unified-signatures": "error",
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
+ "no-array-constructor": "off",
+ "no-implied-eval": "off",
+ "no-return-await": "off",
+ "no-throw-literal": "off",
+ "no-unused-expressions": "off",
+ "no-unused-vars": "off",
+ "no-useless-constructor": "off",
+ "prefer-promise-reject-errors": "off",
+ "require-await": "off",
+ },
+ },
+ "strict-type-checked-only": {
+ "extends": [
+ "./configs/base",
+ "./configs/eslint-recommended",
+ ],
+ "rules": {
+ "@typescript-eslint/await-thenable": "error",
+ "@typescript-eslint/no-array-delete": "error",
+ "@typescript-eslint/no-base-to-string": "error",
+ "@typescript-eslint/no-confusing-void-expression": "error",
+ "@typescript-eslint/no-deprecated": "error",
+ "@typescript-eslint/no-duplicate-type-constituents": "error",
+ "@typescript-eslint/no-floating-promises": "error",
+ "@typescript-eslint/no-for-in-array": "error",
+ "@typescript-eslint/no-implied-eval": "error",
+ "@typescript-eslint/no-meaningless-void-operator": "error",
+ "@typescript-eslint/no-misused-promises": "error",
+ "@typescript-eslint/no-mixed-enums": "error",
+ "@typescript-eslint/no-redundant-type-constituents": "error",
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
+ "@typescript-eslint/no-unnecessary-condition": "error",
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
+ "@typescript-eslint/no-unnecessary-type-arguments": "error",
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
+ "@typescript-eslint/no-unsafe-argument": "error",
+ "@typescript-eslint/no-unsafe-assignment": "error",
+ "@typescript-eslint/no-unsafe-call": "error",
+ "@typescript-eslint/no-unsafe-enum-comparison": "error",
+ "@typescript-eslint/no-unsafe-member-access": "error",
+ "@typescript-eslint/no-unsafe-return": "error",
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
+ "@typescript-eslint/only-throw-error": "error",
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
+ "@typescript-eslint/prefer-reduce-type-parameter": "error",
+ "@typescript-eslint/prefer-return-this-type": "error",
+ "@typescript-eslint/require-await": "error",
+ "@typescript-eslint/restrict-plus-operands": [
+ "error",
+ {
+ "allowAny": false,
+ "allowBoolean": false,
+ "allowNullish": false,
+ "allowNumberAndString": false,
+ "allowRegExp": false,
+ },
+ ],
+ "@typescript-eslint/restrict-template-expressions": [
+ "error",
+ {
+ "allowAny": false,
+ "allowBoolean": false,
+ "allowNever": false,
+ "allowNullish": false,
+ "allowNumber": false,
+ "allowRegExp": false,
+ },
+ ],
+ "@typescript-eslint/return-await": [
+ "error",
+ "error-handling-correctness-only",
+ ],
+ "@typescript-eslint/unbound-method": "error",
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
+ "no-implied-eval": "off",
+ "no-return-await": "off",
+ "no-throw-literal": "off",
+ "prefer-promise-reject-errors": "off",
+ "require-await": "off",
+ },
+ },
+ "stylistic": {
+ "extends": [
+ "./configs/base",
+ "./configs/eslint-recommended",
+ ],
+ "rules": {
+ "@typescript-eslint/adjacent-overload-signatures": "error",
+ "@typescript-eslint/array-type": "error",
+ "@typescript-eslint/ban-tslint-comment": "error",
+ "@typescript-eslint/class-literal-property-style": "error",
+ "@typescript-eslint/consistent-generic-constructors": "error",
+ "@typescript-eslint/consistent-indexed-object-style": "error",
+ "@typescript-eslint/consistent-type-assertions": "error",
+ "@typescript-eslint/consistent-type-definitions": "error",
+ "@typescript-eslint/no-confusing-non-null-assertion": "error",
+ "@typescript-eslint/no-empty-function": "error",
+ "@typescript-eslint/no-inferrable-types": "error",
+ "@typescript-eslint/prefer-for-of": "error",
+ "@typescript-eslint/prefer-function-type": "error",
+ "no-empty-function": "off",
+ },
+ },
+ "stylistic-type-checked": {
+ "extends": [
+ "./configs/base",
+ "./configs/eslint-recommended",
+ ],
+ "rules": {
+ "@typescript-eslint/adjacent-overload-signatures": "error",
+ "@typescript-eslint/array-type": "error",
+ "@typescript-eslint/ban-tslint-comment": "error",
+ "@typescript-eslint/class-literal-property-style": "error",
+ "@typescript-eslint/consistent-generic-constructors": "error",
+ "@typescript-eslint/consistent-indexed-object-style": "error",
+ "@typescript-eslint/consistent-type-assertions": "error",
+ "@typescript-eslint/consistent-type-definitions": "error",
+ "@typescript-eslint/dot-notation": "error",
+ "@typescript-eslint/no-confusing-non-null-assertion": "error",
+ "@typescript-eslint/no-empty-function": "error",
+ "@typescript-eslint/no-inferrable-types": "error",
+ "@typescript-eslint/non-nullable-type-assertion-style": "error",
+ "@typescript-eslint/prefer-find": "error",
+ "@typescript-eslint/prefer-for-of": "error",
+ "@typescript-eslint/prefer-function-type": "error",
+ "@typescript-eslint/prefer-includes": "error",
+ "@typescript-eslint/prefer-nullish-coalescing": "error",
+ "@typescript-eslint/prefer-optional-chain": "error",
+ "@typescript-eslint/prefer-regexp-exec": "error",
+ "@typescript-eslint/prefer-string-starts-ends-with": "error",
+ "dot-notation": "off",
+ "no-empty-function": "off",
+ },
+ },
+ "stylistic-type-checked-only": {
+ "extends": [
+ "./configs/base",
+ "./configs/eslint-recommended",
+ ],
+ "rules": {
+ "@typescript-eslint/dot-notation": "error",
+ "@typescript-eslint/non-nullable-type-assertion-style": "error",
+ "@typescript-eslint/prefer-find": "error",
+ "@typescript-eslint/prefer-includes": "error",
+ "@typescript-eslint/prefer-nullish-coalescing": "error",
+ "@typescript-eslint/prefer-optional-chain": "error",
+ "@typescript-eslint/prefer-regexp-exec": "error",
+ "@typescript-eslint/prefer-string-starts-ends-with": "error",
+ "dot-notation": "off",
+ },
+ },
+ },
+ "meta": {
+ "name": "@typescript-eslint/eslint-plugin",
+ "version": "8.12.2",
+ },
+ "rules": {
+ "adjacent-overload-signatures": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Require that function overload signatures be consecutive",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/adjacent-overload-signatures",
+ },
+ "messages": {
+ "adjacentSignature": "All {{name}} signatures should be adjacent.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "array-type": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "default": "array",
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require consistently using either \`T[]\` or \`Array\` for arrays",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/array-type",
+ },
+ "fixable": "code",
+ "messages": {
+ "errorStringArray": "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}[]' instead.",
+ "errorStringArrayReadonly": "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}' instead.",
+ "errorStringArraySimple": "Array type using '{{className}}<{{type}}>' is forbidden for simple types. Use '{{readonlyPrefix}}{{type}}[]' instead.",
+ "errorStringArraySimpleReadonly": "Array type using '{{className}}<{{type}}>' is forbidden for simple types. Use '{{readonlyPrefix}}{{type}}' instead.",
+ "errorStringGeneric": "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden. Use '{{className}}<{{type}}>' instead.",
+ "errorStringGenericSimple": "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden for non-simple types. Use '{{className}}<{{type}}>' instead.",
+ },
+ "schema": [
+ {
+ "$defs": {
+ "arrayOption": {
+ "enum": [
+ "array",
+ "generic",
+ "array-simple",
+ ],
+ "type": "string",
+ },
+ },
+ "additionalProperties": false,
+ "properties": {
+ "default": {
+ "$ref": "#/items/0/$defs/arrayOption",
+ "description": "The array type expected for mutable cases.",
+ },
+ "readonly": {
+ "$ref": "#/items/0/$defs/arrayOption",
+ "description": "The array type expected for readonly cases. If omitted, the value for \`default\` will be used.",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "await-thenable": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow awaiting a value that is not a Thenable",
+ "recommended": "recommended",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/await-thenable",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "await": "Unexpected \`await\` of a non-Promise (non-"Thenable") value.",
+ "convertToOrdinaryFor": "Convert to an ordinary \`for...of\` loop.",
+ "forAwaitOfNonThenable": "Unexpected \`for await...of\` of a value that is not async iterable.",
+ "removeAwait": "Remove unnecessary \`await\`.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
+ "ban-ts-comment": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "minimumDescriptionLength": 3,
+ "ts-check": false,
+ "ts-expect-error": "allow-with-description",
+ "ts-ignore": true,
+ "ts-nocheck": true,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow \`@ts-\` comments or require descriptions after directives",
+ "recommended": {
+ "recommended": true,
+ "strict": [
+ {
+ "minimumDescriptionLength": 10,
+ },
+ ],
+ },
+ "url": "https://typescript-eslint.io/rules/ban-ts-comment",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "replaceTsIgnoreWithTsExpectError": "Replace "@ts-ignore" with "@ts-expect-error".",
+ "tsDirectiveComment": "Do not use "@ts-{{directive}}" because it alters compilation errors.",
+ "tsDirectiveCommentDescriptionNotMatchPattern": "The description for the "@ts-{{directive}}" directive must match the {{format}} format.",
+ "tsDirectiveCommentRequiresDescription": "Include a description after the "@ts-{{directive}}" directive to explain why the @ts-{{directive}} is necessary. The description must be {{minimumDescriptionLength}} characters or longer.",
+ "tsIgnoreInsteadOfExpectError": "Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free.",
+ },
+ "schema": [
+ {
+ "$defs": {
+ "directiveConfigSchema": {
+ "oneOf": [
+ {
+ "default": true,
+ "type": "boolean",
},
- "typeof": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ {
+ "enum": [
+ "allow-with-description",
+ ],
+ "type": "string",
},
- "var": {
+ {
"additionalProperties": false,
"properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
+ "descriptionFormat": {
+ "type": "string",
},
},
"type": "object",
},
- "void": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ ],
+ },
+ },
+ "additionalProperties": false,
+ "properties": {
+ "minimumDescriptionLength": {
+ "default": 3,
+ "description": "A minimum character length for descriptions when \`allow-with-description\` is enabled.",
+ "type": "number",
+ },
+ "ts-check": {
+ "$ref": "#/items/0/$defs/directiveConfigSchema",
+ },
+ "ts-expect-error": {
+ "$ref": "#/items/0/$defs/directiveConfigSchema",
+ },
+ "ts-ignore": {
+ "$ref": "#/items/0/$defs/directiveConfigSchema",
+ },
+ "ts-nocheck": {
+ "$ref": "#/items/0/$defs/directiveConfigSchema",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "ban-tslint-comment": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow \`// tslint:\` comments",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/ban-tslint-comment",
+ },
+ "fixable": "code",
+ "messages": {
+ "commentDetected": "tslint comment detected: "{{ text }}"",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "class-literal-property-style": {
+ "create": [Function],
+ "defaultOptions": [
+ "fields",
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce that literals on classes are exposed in a consistent style",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/class-literal-property-style",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "preferFieldStyle": "Literals should be exposed using readonly fields.",
+ "preferFieldStyleSuggestion": "Replace the literals with readonly fields.",
+ "preferGetterStyle": "Literals should be exposed using getters.",
+ "preferGetterStyleSuggestion": "Replace the literals with getters.",
+ },
+ "schema": [
+ {
+ "description": "Which literal class member syntax to prefer.",
+ "enum": [
+ "fields",
+ "getters",
+ ],
+ "type": "string",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "class-methods-use-this": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "enforceForClassFields": true,
+ "exceptMethods": [],
+ "ignoreClassesThatImplementAnInterface": false,
+ "ignoreOverrideMethods": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce that class methods utilize \`this\`",
+ "extendsBaseRule": true,
+ "requiresTypeChecking": false,
+ "url": "https://typescript-eslint.io/rules/class-methods-use-this",
+ },
+ "messages": {
+ "missingThis": "Expected 'this' to be used by class {{name}}.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "enforceForClassFields": {
+ "default": true,
+ "description": "Enforces that functions used as instance field initializers utilize \`this\`.",
+ "type": "boolean",
+ },
+ "exceptMethods": {
+ "description": "Allows specified method names to be ignored with this rule.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
+ },
+ "ignoreClassesThatImplementAnInterface": {
+ "description": "Makes the rule ignore class members that are defined within a class that \`implements\` a type",
+ "oneOf": [
+ {
+ "description": "Ignore all classes that implement an interface",
+ "type": "boolean",
},
- "volatile": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ {
+ "description": "Ignore only the public fields of classes that implement an interface",
+ "enum": [
+ "public-fields",
+ ],
+ "type": "string",
},
- "while": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ ],
+ },
+ "ignoreOverrideMethods": {
+ "description": "Ignore members marked with the \`override\` modifier",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "consistent-generic-constructors": {
+ "create": [Function],
+ "defaultOptions": [
+ "constructor",
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce specifying generic type arguments on type annotation or constructor name of a constructor call",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/consistent-generic-constructors",
+ },
+ "fixable": "code",
+ "messages": {
+ "preferConstructor": "The generic type arguments should be specified as part of the constructor type arguments.",
+ "preferTypeAnnotation": "The generic type arguments should be specified as part of the type annotation.",
+ },
+ "schema": [
+ {
+ "description": "Which constructor call syntax to prefer.",
+ "enum": [
+ "type-annotation",
+ "constructor",
+ ],
+ "type": "string",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "consistent-indexed-object-style": {
+ "create": [Function],
+ "defaultOptions": [
+ "record",
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require or disallow the \`Record\` type",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/consistent-indexed-object-style",
+ },
+ "fixable": "code",
+ "messages": {
+ "preferIndexSignature": "An index signature is preferred over a record.",
+ "preferRecord": "A record is preferred over an index signature.",
+ },
+ "schema": [
+ {
+ "description": "Which indexed object syntax to prefer.",
+ "enum": [
+ "record",
+ "index-signature",
+ ],
+ "type": "string",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "consistent-return": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "treatUndefinedAsUnspecified": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require \`return\` statements to either always or never specify values",
+ "extendsBaseRule": true,
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/consistent-return",
+ },
+ "hasSuggestions": undefined,
+ "messages": {
+ "missingReturn": "Expected to return a value at the end of {{name}}.",
+ "missingReturnValue": "{{name}} expected a return value.",
+ "unexpectedReturnValue": "{{name}} expected no return value.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "treatUndefinedAsUnspecified": {
+ "default": false,
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "consistent-type-assertions": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "assertionStyle": "as",
+ "objectLiteralTypeAssertions": "allow",
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce consistent usage of type assertions",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/consistent-type-assertions",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "angle-bracket": "Use '<{{cast}}>' instead of 'as {{cast}}'.",
+ "as": "Use 'as {{cast}}' instead of '<{{cast}}>'.",
+ "never": "Do not use any type assertions.",
+ "replaceObjectTypeAssertionWithAnnotation": "Use const x: {{cast}} = { ... } instead.",
+ "replaceObjectTypeAssertionWithSatisfies": "Use const x = { ... } satisfies {{cast}} instead.",
+ "unexpectedObjectTypeAssertion": "Always prefer const x: T = { ... }.",
+ },
+ "schema": [
+ {
+ "oneOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "assertionStyle": {
+ "description": "The expected assertion style to enforce.",
+ "enum": [
+ "never",
+ ],
+ "type": "string",
},
- "with": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ },
+ "required": [
+ "assertionStyle",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "assertionStyle": {
+ "description": "The expected assertion style to enforce.",
+ "enum": [
+ "as",
+ "angle-bracket",
+ ],
+ "type": "string",
},
- "yield": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
+ "objectLiteralTypeAssertions": {
+ "description": "Whether to always prefer type declarations for object literals used as variable initializers, rather than type assertions.",
+ "enum": [
+ "allow",
+ "allow-as-parameter",
+ "never",
+ ],
+ "type": "string",
},
},
+ "required": [
+ "assertionStyle",
+ ],
"type": "object",
},
+ ],
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "consistent-type-definitions": {
+ "create": [Function],
+ "defaultOptions": [
+ "interface",
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce type definitions to consistently use either \`interface\` or \`type\`",
+ "recommended": "stylistic",
+ "url": "https://typescript-eslint.io/rules/consistent-type-definitions",
+ },
+ "fixable": "code",
+ "messages": {
+ "interfaceOverType": "Use an \`interface\` instead of a \`type\`.",
+ "typeOverInterface": "Use a \`type\` instead of an \`interface\`.",
+ },
+ "schema": [
+ {
+ "description": "Which type definition syntax to prefer.",
+ "enum": [
+ "interface",
+ "type",
+ ],
+ "type": "string",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "consistent-type-exports": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "fixMixedExportsWithInlineTypeSpecifier": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce consistent usage of type exports",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/consistent-type-exports",
+ },
+ "fixable": "code",
+ "messages": {
+ "multipleExportsAreTypes": "Type exports {{exportNames}} are not values and should be exported using \`export type\`.",
+ "singleExportIsType": "Type export {{exportNames}} is not a value and should be exported using \`export type\`.",
+ "typeOverValue": "All exports in the declaration are only used as types. Use \`export type\`.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "fixMixedExportsWithInlineTypeSpecifier": {
+ "description": "Whether the rule will autofix "mixed" export cases using TS inline type specifiers.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "consistent-type-imports": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "disallowTypeAnnotations": true,
+ "fixStyle": "separate-type-imports",
+ "prefer": "type-imports",
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce consistent usage of type imports",
+ "url": "https://typescript-eslint.io/rules/consistent-type-imports",
+ },
+ "fixable": "code",
+ "messages": {
+ "avoidImportType": "Use an \`import\` instead of an \`import type\`.",
+ "noImportTypeAnnotations": "\`import()\` type annotations are forbidden.",
+ "someImportsAreOnlyTypes": "Imports {{typeImports}} are only used as type.",
+ "typeOverValue": "All imports in the declaration are only used as types. Use \`import type\`.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "disallowTypeAnnotations": {
+ "description": "Whether to disallow type imports in type annotations (\`import()\`).",
+ "type": "boolean",
+ },
+ "fixStyle": {
+ "description": "The expected type modifier to be added when an import is detected as used only in the type position.",
+ "enum": [
+ "separate-type-imports",
+ "inline-type-imports",
+ ],
+ "type": "string",
+ },
+ "prefer": {
+ "description": "The expected import kind for type-only imports.",
+ "enum": [
+ "type-imports",
+ "no-type-imports",
+ ],
+ "type": "string",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "default-param-last": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Enforce default parameters to be last",
+ "extendsBaseRule": true,
+ "url": "https://typescript-eslint.io/rules/default-param-last",
+ },
+ "messages": {
+ "shouldBeLast": "Default parameters should be last.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
+ "dot-notation": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowIndexSignaturePropertyAccess": false,
+ "allowKeywords": true,
+ "allowPattern": "",
+ "allowPrivateClassPropertyAccess": false,
+ "allowProtectedClassPropertyAccess": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Enforce dot notation whenever possible",
+ "extendsBaseRule": true,
+ "recommended": "stylistic",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/dot-notation",
+ },
+ "fixable": "code",
+ "hasSuggestions": undefined,
+ "messages": {
+ "useBrackets": ".{{key}} is a syntax error.",
+ "useDot": "[{{key}}] is better written in dot notation.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowIndexSignaturePropertyAccess": {
+ "default": false,
+ "description": "Whether to allow accessing properties matching an index signature with array notation.",
+ "type": "boolean",
+ },
+ "allowKeywords": {
+ "default": true,
+ "description": "Whether to allow keywords such as ["class"]\`.",
+ "type": "boolean",
+ },
+ "allowPattern": {
+ "default": "",
+ "description": "Regular expression of names to allow.",
+ "type": "string",
+ },
+ "allowPrivateClassPropertyAccess": {
+ "default": false,
+ "description": "Whether to allow accessing class members marked as \`private\` with array notation.",
+ "type": "boolean",
+ },
+ "allowProtectedClassPropertyAccess": {
+ "default": false,
+ "description": "Whether to allow accessing class members marked as \`protected\` with array notation.",
+ "type": "boolean",
+ },
},
"type": "object",
},
],
- "type": "layout",
+ "type": "suggestion",
},
},
- "lines-around-comment": {
+ "explicit-function-return-type": {
"create": [Function],
"defaultOptions": [
{
- "beforeBlockComment": true,
+ "allowConciseArrowFunctionExpressionsStartingWithVoid": false,
+ "allowDirectConstAssertionInArrowFunctions": true,
+ "allowExpressions": false,
+ "allowFunctionsWithoutTypeParameters": false,
+ "allowHigherOrderFunctions": true,
+ "allowIIFEs": false,
+ "allowTypedFunctionExpressions": true,
+ "allowedNames": [],
},
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Require empty lines around comments",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/lines-around-comment",
+ "description": "Require explicit return types on functions and class methods",
+ "url": "https://typescript-eslint.io/rules/explicit-function-return-type",
},
- "fixable": "whitespace",
- "hasSuggestions": undefined,
"messages": {
- "after": "Expected line after comment.",
- "before": "Expected line before comment.",
+ "missingReturnType": "Missing return type on function.",
},
- "replacedBy": [
- "@stylistic/ts/lines-around-comment",
- ],
"schema": [
{
"additionalProperties": false,
"properties": {
- "afterBlockComment": {
- "default": false,
- "type": "boolean",
- },
- "afterLineComment": {
- "default": false,
- "type": "boolean",
- },
- "allowArrayEnd": {
- "type": "boolean",
- },
- "allowArrayStart": {
- "type": "boolean",
- },
- "allowBlockEnd": {
- "default": false,
- "type": "boolean",
- },
- "allowBlockStart": {
- "default": false,
+ "allowConciseArrowFunctionExpressionsStartingWithVoid": {
+ "description": "Whether to allow arrow functions that start with the \`void\` keyword.",
"type": "boolean",
},
- "allowClassEnd": {
+ "allowDirectConstAssertionInArrowFunctions": {
+ "description": "Whether to ignore arrow functions immediately returning a \`as const\` value.",
"type": "boolean",
},
- "allowClassStart": {
+ "allowExpressions": {
+ "description": "Whether to ignore function expressions (functions which are not part of a declaration).",
"type": "boolean",
},
- "allowEnumEnd": {
+ "allowFunctionsWithoutTypeParameters": {
+ "description": "Whether to ignore functions that don't have generic type parameters.",
"type": "boolean",
},
- "allowEnumStart": {
+ "allowHigherOrderFunctions": {
+ "description": "Whether to ignore functions immediately returning another function expression.",
"type": "boolean",
},
- "allowInterfaceEnd": {
+ "allowIIFEs": {
+ "description": "Whether to ignore immediately invoked function expressions (IIFEs).",
"type": "boolean",
},
- "allowInterfaceStart": {
+ "allowTypedFunctionExpressions": {
+ "description": "Whether to ignore type annotations on the variable of function expressions.",
"type": "boolean",
},
- "allowModuleEnd": {
- "type": "boolean",
+ "allowedNames": {
+ "description": "An array of function/method names that will not have their arguments or return values checked.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
},
- "allowModuleStart": {
- "type": "boolean",
+ },
+ "type": "object",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "explicit-member-accessibility": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "accessibility": "explicit",
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require explicit accessibility modifiers on class properties and methods",
+ "url": "https://typescript-eslint.io/rules/explicit-member-accessibility",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "addExplicitAccessibility": "Add '{{ type }}' accessibility modifier",
+ "missingAccessibility": "Missing accessibility modifier on {{type}} {{name}}.",
+ "unwantedPublicAccessibility": "Public accessibility modifier on {{type}} {{name}}.",
+ },
+ "schema": [
+ {
+ "$defs": {
+ "accessibilityLevel": {
+ "oneOf": [
+ {
+ "description": "Always require an accessor.",
+ "enum": [
+ "explicit",
+ ],
+ "type": "string",
+ },
+ {
+ "description": "Require an accessor except when public.",
+ "enum": [
+ "no-public",
+ ],
+ "type": "string",
+ },
+ {
+ "description": "Never check whether there is an accessor.",
+ "enum": [
+ "off",
+ ],
+ "type": "string",
+ },
+ ],
},
- "allowObjectEnd": {
- "type": "boolean",
+ },
+ "additionalProperties": false,
+ "properties": {
+ "accessibility": {
+ "$ref": "#/items/0/$defs/accessibilityLevel",
+ "description": "Which accessibility modifier is required to exist or not exist.",
},
- "allowObjectStart": {
- "type": "boolean",
+ "ignoredMethodNames": {
+ "description": "Specific method names that may be ignored.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
},
- "allowTypeEnd": {
- "type": "boolean",
+ "overrides": {
+ "additionalProperties": false,
+ "description": "Changes to required accessibility modifiers for specific kinds of class members.",
+ "properties": {
+ "accessors": {
+ "$ref": "#/items/0/$defs/accessibilityLevel",
+ },
+ "constructors": {
+ "$ref": "#/items/0/$defs/accessibilityLevel",
+ },
+ "methods": {
+ "$ref": "#/items/0/$defs/accessibilityLevel",
+ },
+ "parameterProperties": {
+ "$ref": "#/items/0/$defs/accessibilityLevel",
+ },
+ "properties": {
+ "$ref": "#/items/0/$defs/accessibilityLevel",
+ },
+ },
+ "type": "object",
},
- "allowTypeStart": {
+ },
+ "type": "object",
+ },
+ ],
+ "type": "problem",
+ },
+ },
+ "explicit-module-boundary-types": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "allowArgumentsExplicitlyTypedAsAny": false,
+ "allowDirectConstAssertionInArrowFunctions": true,
+ "allowHigherOrderFunctions": true,
+ "allowTypedFunctionExpressions": true,
+ "allowedNames": [],
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Require explicit return and argument types on exported functions' and classes' public class methods",
+ "url": "https://typescript-eslint.io/rules/explicit-module-boundary-types",
+ },
+ "messages": {
+ "anyTypedArg": "Argument '{{name}}' should be typed with a non-any type.",
+ "anyTypedArgUnnamed": "{{type}} argument should be typed with a non-any type.",
+ "missingArgType": "Argument '{{name}}' should be typed.",
+ "missingArgTypeUnnamed": "{{type}} argument should be typed.",
+ "missingReturnType": "Missing return type on function.",
+ },
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "allowArgumentsExplicitlyTypedAsAny": {
+ "description": "Whether to ignore arguments that are explicitly typed as \`any\`.",
"type": "boolean",
},
- "applyDefaultIgnorePatterns": {
+ "allowDirectConstAssertionInArrowFunctions": {
+ "description": "Whether to ignore return type annotations on body-less arrow functions that return an \`as const\` type assertion.
+You must still type the parameters of the function.",
"type": "boolean",
},
- "beforeBlockComment": {
- "default": true,
+ "allowHigherOrderFunctions": {
+ "description": "Whether to ignore return type annotations on functions immediately returning another function expression.
+You must still type the parameters of the function.",
"type": "boolean",
},
- "beforeLineComment": {
- "default": false,
+ "allowTypedFunctionExpressions": {
+ "description": "Whether to ignore type annotations on the variable of a function expression.",
"type": "boolean",
},
- "ignorePattern": {
- "type": "string",
+ "allowedNames": {
+ "description": "An array of function/method names that will not have their arguments or return values checked.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
},
},
"type": "object",
},
],
- "type": "layout",
+ "type": "problem",
},
},
- "lines-between-class-members": {
+ "init-declarations": {
"create": [Function],
"defaultOptions": [
"always",
- {
- "exceptAfterOverload": true,
- "exceptAfterSingleLine": false,
- },
],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Require or disallow an empty line between class members",
+ "description": "Require or disallow initialization in variable declarations",
"extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/lines-between-class-members",
+ "url": "https://typescript-eslint.io/rules/init-declarations",
},
- "fixable": "whitespace",
"hasSuggestions": undefined,
"messages": {
- "always": "Expected blank line between class members.",
- "never": "Unexpected blank line between class members.",
+ "initialized": "Variable '{{idName}}' should be initialized on declaration.",
+ "notInitialized": "Variable '{{idName}}' should not be initialized on declaration.",
},
- "replacedBy": [
- "@stylistic/ts/lines-between-class-members",
- ],
- "schema": [
- {
- "anyOf": [
- {
- "additionalProperties": false,
- "properties": {
- "enforce": {
- "items": {
- "additionalProperties": false,
- "properties": {
- "blankLine": {
- "enum": [
- "always",
- "never",
- ],
- },
- "next": {
- "enum": [
- "method",
- "field",
- "*",
- ],
- },
- "prev": {
- "enum": [
- "method",
- "field",
- "*",
- ],
- },
- },
- "required": [
- "blankLine",
- "prev",
- "next",
- ],
- "type": "object",
+ "schema": {
+ "anyOf": [
+ {
+ "items": [
+ {
+ "enum": [
+ "always",
+ ],
+ },
+ ],
+ "maxItems": 1,
+ "minItems": 0,
+ "type": "array",
+ },
+ {
+ "items": [
+ {
+ "enum": [
+ "never",
+ ],
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "ignoreForLoopInit": {
+ "type": "boolean",
},
- "minItems": 1,
- "type": "array",
},
+ "type": "object",
},
- "required": [
- "enforce",
- ],
- "type": "object",
- },
- {
- "enum": [
- "always",
- "never",
- ],
- },
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "exceptAfterOverload": {
- "default": true,
- "type": "boolean",
- },
- "exceptAfterSingleLine": {
- "default": false,
- "type": "boolean",
- },
+ ],
+ "maxItems": 2,
+ "minItems": 0,
+ "type": "array",
},
- "type": "object",
- },
- ],
- "type": "layout",
+ ],
+ },
+ "type": "suggestion",
},
},
"max-params": {
@@ -24748,13 +18928,16 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"countVoidThis": {
+ "description": "Whether to count a \`this\` declaration when the type is \`void\`.",
"type": "boolean",
},
"max": {
+ "description": "A maximum number of parameters in function definitions.",
"minimum": 0,
"type": "integer",
},
"maximum": {
+ "description": "(deprecated) A maximum number of parameters in function definitions.",
"minimum": 0,
"type": "integer",
},
@@ -24765,138 +18948,6 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
- "member-delimiter-style": {
- "create": [Function],
- "defaultOptions": [
- {
- "multiline": {
- "delimiter": "semi",
- "requireLast": true,
- },
- "multilineDetection": "brackets",
- "singleline": {
- "delimiter": "semi",
- "requireLast": false,
- },
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require a specific member delimiter style for interfaces and type literals",
- "url": "https://typescript-eslint.io/rules/member-delimiter-style",
- },
- "fixable": "whitespace",
- "messages": {
- "expectedComma": "Expected a comma.",
- "expectedSemi": "Expected a semicolon.",
- "unexpectedComma": "Unexpected separator (,).",
- "unexpectedSemi": "Unexpected separator (;).",
- },
- "replacedBy": [
- "@stylistic/ts/member-delimiter-style",
- ],
- "schema": [
- {
- "$defs": {
- "delimiterConfig": {
- "additionalProperties": false,
- "properties": {
- "multiline": {
- "additionalProperties": false,
- "properties": {
- "delimiter": {
- "$ref": "#/items/0/$defs/multiLineOption",
- },
- "requireLast": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "singleline": {
- "additionalProperties": false,
- "properties": {
- "delimiter": {
- "$ref": "#/items/0/$defs/singleLineOption",
- },
- "requireLast": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- },
- "type": "object",
- },
- "multiLineOption": {
- "enum": [
- "none",
- "semi",
- "comma",
- ],
- "type": "string",
- },
- "singleLineOption": {
- "enum": [
- "semi",
- "comma",
- ],
- "type": "string",
- },
- },
- "additionalProperties": false,
- "properties": {
- "multiline": {
- "additionalProperties": false,
- "properties": {
- "delimiter": {
- "$ref": "#/items/0/$defs/multiLineOption",
- },
- "requireLast": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- "multilineDetection": {
- "enum": [
- "brackets",
- "last-member",
- ],
- "type": "string",
- },
- "overrides": {
- "additionalProperties": false,
- "properties": {
- "interface": {
- "$ref": "#/items/0/$defs/delimiterConfig",
- },
- "typeLiteral": {
- "$ref": "#/items/0/$defs/delimiterConfig",
- },
- },
- "type": "object",
- },
- "singleline": {
- "additionalProperties": false,
- "properties": {
- "delimiter": {
- "$ref": "#/items/0/$defs/singleLineOption",
- },
- "requireLast": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
"member-ordering": {
"create": [Function],
"defaultOptions": [
@@ -27376,7 +21427,7 @@ You must still type the parameters of the function.",
"meta": {
"docs": {
"description": "Disallow using the \`delete\` operator on array values",
- "recommended": "strict",
+ "recommended": "recommended",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/no-array-delete",
},
@@ -27403,19 +21454,20 @@ You must still type the parameters of the function.",
],
"meta": {
"docs": {
- "description": "Require \`.toString()\` to only be called on objects which provide useful information when stringified",
+ "description": "Require \`.toString()\` and \`.toLocaleString()\` to only be called on objects which provide useful information when stringified",
"recommended": "recommended",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/no-base-to-string",
},
"messages": {
- "baseToString": "'{{name}}' {{certainty}} evaluate to '[object Object]' when stringified.",
+ "baseToString": "'{{name}}' {{certainty}} use Object's default stringification format ('[object Object]') when stringified.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
"ignoredTypeNames": {
+ "description": "Stringified regular expressions of type names to ignore.",
"items": {
"type": "string",
},
@@ -27439,11 +21491,13 @@ You must still type the parameters of the function.",
},
"hasSuggestions": true,
"messages": {
- "confusingAssign": "Confusing combinations of non-null assertion and equal test like "a! = b", which looks very similar to not equal "a != b".",
- "confusingEqual": "Confusing combinations of non-null assertion and equal test like "a! == b", which looks very similar to not equal "a !== b".",
- "notNeedInAssign": "Unnecessary non-null assertion (!) in assignment left hand.",
- "notNeedInEqualTest": "Unnecessary non-null assertion (!) in equal test.",
- "wrapUpLeft": "Wrap up left hand to avoid putting non-null assertion "!" and "=" together.",
+ "confusingAssign": "Confusing combination of non-null assertion and assignment like \`a! = b\`, which looks very similar to \`a != b\`.",
+ "confusingEqual": "Confusing combination of non-null assertion and equality test like \`a! == b\`, which looks very similar to \`a !== b\`.",
+ "confusingOperator": "Confusing combination of non-null assertion and \`{{operator}}\` operator like \`a! {{operator}} b\`, which might be misinterpreted as \`!(a {{operator}} b)\`.",
+ "notNeedInAssign": "Remove unnecessary non-null assertion (!) in assignment left-hand side.",
+ "notNeedInEqualTest": "Remove unnecessary non-null assertion (!) in equality test.",
+ "notNeedInOperator": "Remove possibly unnecessary non-null assertion (!) in the left operand of the \`{{operator}}\` operator.",
+ "wrapUpLeft": "Wrap the left-hand side in parentheses to avoid confusion with "{{operator}}" operator.",
},
"schema": [],
"type": "problem",
@@ -27481,9 +21535,11 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"ignoreArrowShorthand": {
+ "description": "Whether to ignore "shorthand" \`() =>\` arrow functions: those without \`{ ... }\` braces.",
"type": "boolean",
},
"ignoreVoidOperator": {
+ "description": "Whether to ignore returns that start with the \`void\` operator.",
"type": "boolean",
},
},
@@ -27493,6 +21549,24 @@ You must still type the parameters of the function.",
"type": "problem",
},
},
+ "no-deprecated": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow using code marked as \`@deprecated\`",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-deprecated",
+ },
+ "messages": {
+ "deprecated": "\`{{name}}\` is deprecated.",
+ "deprecatedWithReason": "\`{{name}}\` is deprecated. {{reason}}",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
"no-dupe-class-members": {
"create": [Function],
"defaultOptions": [],
@@ -27545,15 +21619,18 @@ You must still type the parameters of the function.",
"fixable": "code",
"messages": {
"duplicate": "{{type}} type constituent is duplicated with {{previous}}.",
+ "unnecessary": "Explicit undefined is unnecessary on an optional parameter.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
"ignoreIntersections": {
+ "description": "Whether to ignore \`&\` intersections.",
"type": "boolean",
},
"ignoreUnions": {
+ "description": "Whether to ignore \`|\` unions.",
"type": "boolean",
},
},
@@ -27603,6 +21680,7 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"allow": {
+ "description": "Locations and kinds of functions that are allowed to be empty.",
"items": {
"enum": [
"functions",
@@ -27640,9 +21718,9 @@ You must still type the parameters of the function.",
},
],
"meta": {
+ "deprecated": true,
"docs": {
"description": "Disallow the declaration of empty interfaces",
- "recommended": "stylistic",
"url": "https://typescript-eslint.io/rules/no-empty-interface",
},
"fixable": "code",
@@ -27651,11 +21729,15 @@ You must still type the parameters of the function.",
"noEmpty": "An empty interface is equivalent to \`{}\`.",
"noEmptyWithSuper": "An interface declaring no members is equivalent to its supertype.",
},
+ "replacedBy": [
+ "@typescript-eslint/no-empty-object-type",
+ ],
"schema": [
{
"additionalProperties": false,
"properties": {
"allowSingleExtends": {
+ "description": "Whether to allow empty interfaces that extend a single other interface.",
"type": "boolean",
},
},
@@ -27665,175 +21747,122 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
- "no-explicit-any": {
+ "no-empty-object-type": {
"create": [Function],
"defaultOptions": [
{
- "fixToUnknown": false,
- "ignoreRestArgs": false,
+ "allowInterfaces": "never",
+ "allowObjectTypes": "never",
},
],
"meta": {
"docs": {
- "description": "Disallow the \`any\` type",
+ "description": "Disallow accidentally using the "empty object" type",
"recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-explicit-any",
+ "url": "https://typescript-eslint.io/rules/no-empty-object-type",
},
- "fixable": "code",
"hasSuggestions": true,
"messages": {
- "suggestNever": "Use \`never\` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.",
- "suggestUnknown": "Use \`unknown\` instead, this will force you to explicitly, and safely assert the type is correct.",
- "unexpectedAny": "Unexpected any. Specify a different type.",
+ "noEmptyInterface": "An empty interface declaration allows any non-nullish value, including literals like \`0\` and \`""\`.
+- If that's what you want, disable this lint rule with an inline comment or configure the '{{ option }}' rule option.
+- If you want a type meaning "any object", you probably want \`object\` instead.
+- If you want a type meaning "any value", you probably want \`unknown\` instead.",
+ "noEmptyInterfaceWithSuper": "An interface declaring no members is equivalent to its supertype.",
+ "noEmptyObject": "The \`{}\` ("empty object") type allows any non-nullish value, including literals like \`0\` and \`""\`.
+- If that's what you want, disable this lint rule with an inline comment or configure the '{{ option }}' rule option.
+- If you want a type meaning "any object", you probably want \`object\` instead.
+- If you want a type meaning "any value", you probably want \`unknown\` instead.",
+ "replaceEmptyInterface": "Replace empty interface with \`{{replacement}}\`.",
+ "replaceEmptyInterfaceWithSuper": "Replace empty interface with a type alias.",
+ "replaceEmptyObjectType": "Replace \`{}\` with \`{{replacement}}\`.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
- "fixToUnknown": {
- "description": "Whether to enable auto-fixing in which the \`any\` type is converted to the \`unknown\` type.",
- "type": "boolean",
- },
- "ignoreRestArgs": {
- "description": "Whether to ignore rest parameter arrays.",
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "suggestion",
- },
- },
- "no-extra-non-null-assertion": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow extra non-null assertions",
- "recommended": "recommended",
- "url": "https://typescript-eslint.io/rules/no-extra-non-null-assertion",
- },
- "fixable": "code",
- "messages": {
- "noExtraNonNullAssertion": "Forbidden extra non-null assertion.",
- },
- "schema": [],
- "type": "problem",
- },
- },
- "no-extra-parens": {
- "create": [Function],
- "defaultOptions": [
- "all",
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Disallow unnecessary parentheses",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-extra-parens",
- },
- "fixable": "code",
- "hasSuggestions": undefined,
- "messages": {
- "unexpected": "Unnecessary parentheses around expression.",
- },
- "replacedBy": [
- "@stylistic/ts/no-extra-parens",
- ],
- "schema": {
- "anyOf": [
- {
- "items": [
- {
- "enum": [
- "functions",
- ],
- },
- ],
- "maxItems": 1,
- "minItems": 0,
- "type": "array",
- },
- {
- "items": [
- {
- "enum": [
- "all",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "allowParensAfterCommentPattern": {
- "type": "string",
- },
- "conditionalAssign": {
- "type": "boolean",
- },
- "enforceForArrowConditionals": {
- "type": "boolean",
- },
- "enforceForFunctionPrototypeMethods": {
- "type": "boolean",
- },
- "enforceForNewInMemberExpressions": {
- "type": "boolean",
- },
- "enforceForSequenceExpressions": {
- "type": "boolean",
- },
- "ignoreJSX": {
- "enum": [
- "none",
- "all",
- "single-line",
- "multi-line",
- ],
- },
- "nestedBinaryExpressions": {
- "type": "boolean",
- },
- "returnAssign": {
- "type": "boolean",
- },
- "ternaryOperandBinaryExpressions": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "maxItems": 2,
- "minItems": 0,
- "type": "array",
+ "allowInterfaces": {
+ "description": "Whether to allow empty interfaces.",
+ "enum": [
+ "always",
+ "never",
+ "with-single-extends",
+ ],
+ "type": "string",
+ },
+ "allowObjectTypes": {
+ "description": "Whether to allow empty object type literals.",
+ "enum": [
+ "always",
+ "never",
+ ],
+ "type": "string",
+ },
+ "allowWithName": {
+ "description": "A stringified regular expression to allow interfaces and object type aliases with the configured name.",
+ "type": "string",
+ },
},
- ],
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
+ "no-explicit-any": {
+ "create": [Function],
+ "defaultOptions": [
+ {
+ "fixToUnknown": false,
+ "ignoreRestArgs": false,
+ },
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow the \`any\` type",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-explicit-any",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "suggestNever": "Use \`never\` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.",
+ "suggestUnknown": "Use \`unknown\` instead, this will force you to explicitly, and safely assert the type is correct.",
+ "unexpectedAny": "Unexpected any. Specify a different type.",
},
- "type": "layout",
+ "schema": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "fixToUnknown": {
+ "description": "Whether to enable auto-fixing in which the \`any\` type is converted to the \`unknown\` type.",
+ "type": "boolean",
+ },
+ "ignoreRestArgs": {
+ "description": "Whether to ignore rest parameter arrays.",
+ "type": "boolean",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
},
},
- "no-extra-semi": {
+ "no-extra-non-null-assertion": {
"create": [Function],
"defaultOptions": [],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Disallow unnecessary semicolons",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/no-extra-semi",
+ "description": "Disallow extra non-null assertions",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-extra-non-null-assertion",
},
"fixable": "code",
- "hasSuggestions": undefined,
"messages": {
- "unexpected": "Unnecessary semicolon.",
+ "noExtraNonNullAssertion": "Forbidden extra non-null assertion.",
},
- "replacedBy": [
- "@stylistic/ts/no-extra-semi",
- ],
"schema": [],
- "type": "suggestion",
+ "type": "problem",
},
},
"no-extraneous-class": {
@@ -27888,6 +21917,9 @@ You must still type the parameters of the function.",
"create": [Function],
"defaultOptions": [
{
+ "allowForKnownSafeCalls": [],
+ "allowForKnownSafePromises": [],
+ "checkThenables": false,
"ignoreIIFE": false,
"ignoreVoid": true,
},
@@ -27914,6 +21946,232 @@ You must still type the parameters of the function.",
{
"additionalProperties": false,
"properties": {
+ "allowForKnownSafeCalls": {
+ "description": "Type specifiers of functions whose calls are safe to float.",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "file",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "path": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "lib",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "package",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "package": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ "package",
+ ],
+ "type": "object",
+ },
+ ],
+ },
+ "type": "array",
+ },
+ "allowForKnownSafePromises": {
+ "description": "Type specifiers that are known to be safe to float.",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "file",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "path": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "lib",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "package",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "package": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ "package",
+ ],
+ "type": "object",
+ },
+ ],
+ },
+ "type": "array",
+ },
+ "checkThenables": {
+ "description": "Whether to check all "Thenable"s, not just the built-in Promise type.",
+ "type": "boolean",
+ },
"ignoreIIFE": {
"description": "Whether to ignore async IIFEs (Immediately Invoked Function Expressions).",
"type": "boolean",
@@ -28004,9 +22262,11 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"ignoreParameters": {
+ "description": "Whether to ignore function parameters.",
"type": "boolean",
},
"ignoreProperties": {
+ "description": "Whether to ignore class properties.",
"type": "boolean",
},
},
@@ -28075,14 +22335,18 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"allowAsThisParameter": {
+ "description": "Whether a \`this\` parameter of a function may be \`void\`.",
"type": "boolean",
},
"allowInGenericTypeArguments": {
+ "description": "Whether \`void\` can be used as a valid value for generic type parameters.",
"oneOf": [
{
+ "description": "Whether \`void\` can be used as a valid value for all generic type parameters.",
"type": "boolean",
},
{
+ "description": "Allowlist of types that may accept \`void\` as a generic type parameter.",
"items": {
"type": "string",
},
@@ -28119,10 +22383,10 @@ You must still type the parameters of the function.",
"create": [Function],
"defaultOptions": [],
"meta": {
+ "deprecated": true,
"docs": {
"description": "Disallow literal numbers that lose precision",
"extendsBaseRule": true,
- "recommended": "recommended",
"url": "https://typescript-eslint.io/rules/no-loss-of-precision",
},
"hasSuggestions": undefined,
@@ -28144,6 +22408,7 @@ You must still type the parameters of the function.",
"ignoreEnums": false,
"ignoreNumericLiteralTypes": false,
"ignoreReadonlyClassProperties": false,
+ "ignoreTypeIndexes": false,
},
],
"meta": {
@@ -28196,15 +22461,19 @@ You must still type the parameters of the function.",
"type": "boolean",
},
"ignoreEnums": {
+ "description": "Whether enums used in TypeScript are considered okay.",
"type": "boolean",
},
"ignoreNumericLiteralTypes": {
+ "description": "Whether numbers used in TypeScript numeric literal types are considered okay.",
"type": "boolean",
},
"ignoreReadonlyClassProperties": {
+ "description": "Whether \`readonly\` class properties are considered okay.",
"type": "boolean",
},
"ignoreTypeIndexes": {
+ "description": "Whether numbers used to index types are okay.",
"type": "boolean",
},
},
@@ -28240,6 +22509,7 @@ You must still type the parameters of the function.",
"properties": {
"checkNever": {
"default": false,
+ "description": "Whether to suggest removing \`void\` when the argument has type \`never\`.",
"type": "boolean",
},
},
@@ -28284,9 +22554,11 @@ You must still type the parameters of the function.",
},
"messages": {
"conditional": "Expected non-Promise value in a boolean conditional.",
+ "predicate": "Expected a non-Promise value to be returned.",
"spread": "Expected a non-Promise value to be spreaded in an object.",
"voidReturnArgument": "Promise returned in function argument where a void return was expected.",
"voidReturnAttribute": "Promise-returning function provided to attribute where a void return was expected.",
+ "voidReturnInheritedMethod": "Promise-returning method provided where a void return was expected by extended/implemented type '{{ heritageTypeName }}'.",
"voidReturnProperty": "Promise-returning function provided to property where a void return was expected.",
"voidReturnReturnValue": "Promise-returning function provided to return value where a void return was expected.",
"voidReturnVariable": "Promise-returning function provided to variable where a void return was expected.",
@@ -28296,32 +22568,46 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"checksConditionals": {
+ "description": "Whether to warn when a Promise is provided to conditional statements.",
"type": "boolean",
},
"checksSpreads": {
+ "description": "Whether to warn when \`...\` spreading a \`Promise\`.",
"type": "boolean",
},
"checksVoidReturn": {
+ "description": "Whether to warn when a Promise is returned from a function typed as returning \`void\`.",
"oneOf": [
{
+ "description": "Whether to disable checking all asynchronous functions.",
"type": "boolean",
},
{
"additionalProperties": false,
+ "description": "Which forms of functions may have checking disabled.",
"properties": {
"arguments": {
+ "description": "Disables checking an asynchronous function passed as argument where the parameter type expects a function that returns \`void\`.",
"type": "boolean",
},
"attributes": {
+ "description": "Disables checking an asynchronous function passed as a JSX attribute expected to be a function that returns \`void\`.",
+ "type": "boolean",
+ },
+ "inheritedMethods": {
+ "description": "Disables checking an asynchronous method in a type that extends or implements another type expecting that method to return \`void\`.",
"type": "boolean",
},
"properties": {
+ "description": "Disables checking an asynchronous function passed as an object property expected to be a function that returns \`void\`.",
"type": "boolean",
},
"returns": {
+ "description": "Disables checking an asynchronous function returned in a function whose return type is a function that returns \`void\`.",
"type": "boolean",
},
"variables": {
+ "description": "Disables checking an asynchronous function used as a variable whose return type is a function that returns \`void\`.",
"type": "boolean",
},
},
@@ -28467,9 +22753,11 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"builtinGlobals": {
+ "description": "Whether to report shadowing of built-in global variables.",
"type": "boolean",
},
"ignoreDeclarationMerge": {
+ "description": "Whether to ignore declaration merges between certain TypeScript declaration types.",
"type": "boolean",
},
},
@@ -28490,6 +22778,7 @@ You must still type the parameters of the function.",
"url": "https://typescript-eslint.io/rules/no-redundant-type-constituents",
},
"messages": {
+ "errorTypeOverrides": "'{{typeName}}' is an 'error' type that acts as 'any' and overrides all other types in this {{container}} type.",
"literalOverridden": "{{literal}} is overridden by {{primitive}} in this union type.",
"overridden": "'{{typeName}}' is overridden by other types in this {{container}} type.",
"overrides": "'{{typeName}}' overrides all other types in this {{container}} type.",
@@ -28504,11 +22793,13 @@ You must still type the parameters of the function.",
"defaultOptions": [
{
"allow": [],
+ "allowAsImport": false,
},
],
"meta": {
"docs": {
"description": "Disallow invocation of \`require()\`",
+ "recommended": "recommended",
"url": "https://typescript-eslint.io/rules/no-require-imports",
},
"messages": {
@@ -28525,6 +22816,10 @@ You must still type the parameters of the function.",
},
"type": "array",
},
+ "allowAsImport": {
+ "description": "Allows \`require\` statements in import declarations.",
+ "type": "boolean",
+ },
},
"type": "object",
},
@@ -28570,7 +22865,7 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"allowTypeImports": {
- "description": "Disallow value imports, but allow type-only imports.",
+ "description": "Whether to allow type-only imports for a path.",
"type": "boolean",
},
"importNames": {
@@ -28613,7 +22908,7 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"allowTypeImports": {
- "description": "Disallow value imports, but allow type-only imports.",
+ "description": "Whether to allow type-only imports for a path.",
"type": "boolean",
},
"importNames": {
@@ -28654,7 +22949,7 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"allowTypeImports": {
- "description": "Disallow value imports, but allow type-only imports.",
+ "description": "Whether to allow type-only imports for a path.",
"type": "boolean",
},
"caseSensitive": {
@@ -28705,6 +23000,79 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
+ "no-restricted-types": {
+ "create": [Function],
+ "defaultOptions": [
+ {},
+ ],
+ "meta": {
+ "docs": {
+ "description": "Disallow certain types",
+ "url": "https://typescript-eslint.io/rules/no-restricted-types",
+ },
+ "fixable": "code",
+ "hasSuggestions": true,
+ "messages": {
+ "bannedTypeMessage": "Don't use \`{{name}}\` as a type.{{customMessage}}",
+ "bannedTypeReplacement": "Replace \`{{name}}\` with \`{{replacement}}\`.",
+ },
+ "schema": [
+ {
+ "$defs": {
+ "banConfig": {
+ "oneOf": [
+ {
+ "description": "Bans the type with the default message.",
+ "enum": [
+ true,
+ ],
+ "type": "boolean",
+ },
+ {
+ "description": "Bans the type with a custom message.",
+ "type": "string",
+ },
+ {
+ "additionalProperties": false,
+ "description": "Bans a type.",
+ "properties": {
+ "fixWith": {
+ "description": "Type to autofix replace with. Note that autofixers can be applied automatically - so you need to be careful with this option.",
+ "type": "string",
+ },
+ "message": {
+ "description": "Custom error message.",
+ "type": "string",
+ },
+ "suggest": {
+ "description": "Types to suggest replacing with.",
+ "items": {
+ "type": "string",
+ },
+ "type": "array",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ },
+ },
+ "additionalProperties": false,
+ "properties": {
+ "types": {
+ "additionalProperties": {
+ "$ref": "#/items/0/$defs/banConfig",
+ },
+ "description": "An object whose keys are the types you want to ban, and the values are error messages.",
+ "type": "object",
+ },
+ },
+ "type": "object",
+ },
+ ],
+ "type": "suggestion",
+ },
+ },
"no-shadow": {
"create": [Function],
"defaultOptions": [
@@ -28732,15 +23100,18 @@ You must still type the parameters of the function.",
"additionalProperties": false,
"properties": {
"allow": {
+ "description": "Identifier names for which shadowing is allowed.",
"items": {
"type": "string",
},
"type": "array",
},
"builtinGlobals": {
+ "description": "Whether to report shadowing of built-in global variables.",
"type": "boolean",
},
"hoist": {
+ "description": "Whether to report shadowing before outer functions or variables are defined.",
"enum": [
"all",
"functions",
@@ -28749,12 +23120,15 @@ You must still type the parameters of the function.",
"type": "string",
},
"ignoreFunctionTypeParameterNameValueShadow": {
+ "description": "Whether to ignore function parameters named the same as a variable.",
"type": "boolean",
},
"ignoreOnInitialization": {
+ "description": "Whether to ignore the variable initializers when the shadowed variable is presumably still unitialized.",
"type": "boolean",
},
"ignoreTypeValueShadow": {
+ "description": "Whether to ignore types named the same as a variable.",
"type": "boolean",
},
},
@@ -28804,46 +23178,6 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
- "no-throw-literal": {
- "create": [Function],
- "defaultOptions": [
- {
- "allowThrowingAny": true,
- "allowThrowingUnknown": true,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Disallow throwing literals as exceptions",
- "extendsBaseRule": true,
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-throw-literal",
- },
- "messages": {
- "object": "Expected an error object to be thrown.",
- "undef": "Do not throw undefined.",
- },
- "replacedBy": [
- "@typescript-eslint/only-throw-error",
- ],
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "allowThrowingAny": {
- "type": "boolean",
- },
- "allowThrowingUnknown": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "problem",
- },
- },
"no-type-alias": {
"create": [Function],
"defaultOptions": [
@@ -28978,6 +23312,7 @@ You must still type the parameters of the function.",
{
"allowConstantLoopConditions": false,
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false,
+ "checkTypePredicates": false,
},
],
"meta": {
@@ -29000,6 +23335,7 @@ You must still type the parameters of the function.",
"neverOptionalChain": "Unnecessary optional chain on a non-nullish value.",
"noOverlapBooleanExpression": "Unnecessary conditional, the types have no overlap.",
"noStrictNullCheck": "This rule requires the \`strictNullChecks\` compiler option to be turned on to function correctly.",
+ "typeGuardAlreadyIsType": "Unnecessary conditional, expression already has the type being checked by the {{typeGuardOrAssertionFunction}}.",
},
"schema": [
{
@@ -29013,6 +23349,10 @@ You must still type the parameters of the function.",
"description": "Whether to not error when running with a tsconfig that has strictNullChecks turned.",
"type": "boolean",
},
+ "checkTypePredicates": {
+ "description": "Whether to check the asserted argument of a type predicate function for unnecessary conditions",
+ "type": "boolean",
+ },
},
"type": "object",
},
@@ -29020,6 +23360,21 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
+ "no-unnecessary-parameter-property-assignment": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow unnecessary assignment of constructor property parameter",
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment",
+ },
+ "messages": {
+ "unnecessaryAssign": "This assignment is unnecessary since it is already assigned by a parameter property.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
"no-unnecessary-qualifier": {
"create": [Function],
"defaultOptions": [],
@@ -29037,6 +23392,24 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
+ "no-unnecessary-template-expression": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow unnecessary template expressions",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-template-expression",
+ },
+ "fixable": "code",
+ "messages": {
+ "noUnnecessaryTemplateExpression": "Template literal expression is unnecessary and can be simplified.",
+ },
+ "schema": [],
+ "type": "suggestion",
+ },
+ },
"no-unnecessary-type-arguments": {
"create": [Function],
"defaultOptions": [],
@@ -29108,6 +23481,25 @@ You must still type the parameters of the function.",
"type": "suggestion",
},
},
+ "no-unnecessary-type-parameters": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow type parameters that aren't used multiple times",
+ "recommended": "strict",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/no-unnecessary-type-parameters",
+ },
+ "hasSuggestions": true,
+ "messages": {
+ "replaceUsagesWithConstraint": "Replace all usages of type parameter with its constraint.",
+ "sole": "Type parameter {{name}} is {{uses}} in the {{descriptor}} signature.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
"no-unsafe-argument": {
"create": [Function],
"defaultOptions": [],
@@ -29119,10 +23511,10 @@ You must still type the parameters of the function.",
"url": "https://typescript-eslint.io/rules/no-unsafe-argument",
},
"messages": {
- "unsafeArgument": "Unsafe argument of type \`{{sender}}\` assigned to a parameter of type \`{{receiver}}\`.",
- "unsafeArraySpread": "Unsafe spread of an \`any\` array type.",
- "unsafeSpread": "Unsafe spread of an \`any\` type.",
- "unsafeTupleSpread": "Unsafe spread of a tuple type. The argument is of type \`{{sender}}\` and is assigned to a parameter of type \`{{receiver}}\`.",
+ "unsafeArgument": "Unsafe argument of type {{sender}} assigned to a parameter of type {{receiver}}.",
+ "unsafeArraySpread": "Unsafe spread of an {{sender}} array type.",
+ "unsafeSpread": "Unsafe spread of an {{sender}} type.",
+ "unsafeTupleSpread": "Unsafe spread of a tuple type. The argument is {{sender}} and is assigned to a parameter of type {{receiver}}.",
},
"schema": [],
"type": "problem",
@@ -29139,12 +23531,12 @@ You must still type the parameters of the function.",
"url": "https://typescript-eslint.io/rules/no-unsafe-assignment",
},
"messages": {
- "anyAssignment": "Unsafe assignment of an \`any\` value.",
- "anyAssignmentThis": "Unsafe assignment of an \`any\` value. \`this\` is typed as \`any\`.
+ "anyAssignment": "Unsafe assignment of an {{sender}} value.",
+ "anyAssignmentThis": "Unsafe assignment of an {{sender}} value. \`this\` is typed as \`any\`.
You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
- "unsafeArrayPattern": "Unsafe array destructuring of an \`any\` array value.",
- "unsafeArrayPatternFromTuple": "Unsafe array destructuring of a tuple element with an \`any\` value.",
- "unsafeArraySpread": "Unsafe spread of an \`any\` value in an array.",
+ "unsafeArrayPattern": "Unsafe array destructuring of an {{sender}} array value.",
+ "unsafeArrayPatternFromTuple": "Unsafe array destructuring of a tuple element with an {{sender}} value.",
+ "unsafeArraySpread": "Unsafe spread of an {{sender}} value in an array.",
"unsafeAssignment": "Unsafe assignment of type {{sender}} to a variable of type {{receiver}}.",
},
"schema": [],
@@ -29162,11 +23554,11 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"url": "https://typescript-eslint.io/rules/no-unsafe-call",
},
"messages": {
- "unsafeCall": "Unsafe call of an \`any\` typed value.",
- "unsafeCallThis": "Unsafe call of an \`any\` typed value. \`this\` is typed as \`any\`.
+ "unsafeCall": "Unsafe call of a(n) {{type}} typed value.",
+ "unsafeCallThis": "Unsafe call of a(n) {{type}} typed value. \`this\` is typed as {{type}}.
You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
- "unsafeNew": "Unsafe construction of an any type value.",
- "unsafeTemplateTag": "Unsafe any typed template tag.",
+ "unsafeNew": "Unsafe construction of a(n) {{type}} typed value.",
+ "unsafeTemplateTag": "Unsafe use of a(n) {{type}} typed template tag.",
},
"schema": [],
"type": "problem",
@@ -29209,6 +23601,24 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "suggestion",
},
},
+ "no-unsafe-function-type": {
+ "create": [Function],
+ "defaultOptions": [],
+ "meta": {
+ "docs": {
+ "description": "Disallow using the unsafe built-in Function type",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-unsafe-function-type",
+ },
+ "fixable": "code",
+ "messages": {
+ "bannedFunctionType": "The \`Function\` type accepts any function-like value.
+Prefer explicitly defining any function parameters and return type.",
+ },
+ "schema": [],
+ "type": "problem",
+ },
+ },
"no-unsafe-member-access": {
"create": [Function],
"defaultOptions": [],
@@ -29220,8 +23630,8 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"url": "https://typescript-eslint.io/rules/no-unsafe-member-access",
},
"messages": {
- "unsafeComputedMemberAccess": "Computed name {{property}} resolves to an any value.",
- "unsafeMemberExpression": "Unsafe member access {{property}} on an \`any\` value.",
+ "unsafeComputedMemberAccess": "Computed name {{property}} resolves to an {{type}} value.",
+ "unsafeMemberExpression": "Unsafe member access {{property}} on an {{type}} value.",
"unsafeThisMemberExpression": "Unsafe member access {{property}} on an \`any\` value. \`this\` is typed as \`any\`.
You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
},
@@ -29240,9 +23650,9 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"url": "https://typescript-eslint.io/rules/no-unsafe-return",
},
"messages": {
- "unsafeReturn": "Unsafe return of an \`{{type}}\` typed value.",
+ "unsafeReturn": "Unsafe return of a value of type {{type}}.",
"unsafeReturnAssignment": "Unsafe return of type \`{{sender}}\` from function with return type \`{{receiver}}\`.",
- "unsafeReturnThis": "Unsafe return of an \`{{type}}\` typed value. \`this\` is typed as \`any\`.
+ "unsafeReturnThis": "Unsafe return of a value of type \`{{type}}\`. \`this\` is typed as \`any\`.
You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.",
},
"schema": [],
@@ -29255,6 +23665,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"meta": {
"docs": {
"description": "Require unary negation to take a number",
+ "recommended": "recommended",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/no-unsafe-unary-minus",
},
@@ -29278,6 +23689,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"docs": {
"description": "Disallow unused expressions",
"extendsBaseRule": true,
+ "recommended": "recommended",
"url": "https://typescript-eslint.io/rules/no-unused-expressions",
},
"hasSuggestions": undefined,
@@ -29325,6 +23737,8 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
},
"messages": {
"unusedVar": "'{{varName}}' is {{action}} but never used{{additional}}.",
+ "usedIgnoredVar": "'{{varName}}' is marked as ignored but is used{{additional}}.",
+ "usedOnlyAsType": "'{{varName}}' is {{action}} but only used as a type{{additional}}.",
},
"schema": [
{
@@ -29340,6 +23754,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"args": {
+ "description": "Whether to check all, some, or no arguments.",
"enum": [
"all",
"after-used",
@@ -29348,9 +23763,11 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "string",
},
"argsIgnorePattern": {
+ "description": "Regular expressions of argument names to not check for usage.",
"type": "string",
},
"caughtErrors": {
+ "description": "Whether to check catch block arguments.",
"enum": [
"all",
"none",
@@ -29358,15 +23775,27 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "string",
},
"caughtErrorsIgnorePattern": {
+ "description": "Regular expressions of catch block argument names to not check for usage.",
"type": "string",
},
"destructuredArrayIgnorePattern": {
+ "description": "Regular expressions of destructured array variable names to not check for usage.",
"type": "string",
},
+ "ignoreClassWithStaticInitBlock": {
+ "description": "Whether to ignore classes with at least one static initialization block.",
+ "type": "boolean",
+ },
"ignoreRestSiblings": {
+ "description": "Whether to ignore sibling properties in \`...\` destructurings.",
+ "type": "boolean",
+ },
+ "reportUsedIgnorePattern": {
+ "description": "Whether to report variables that match any of the valid ignore pattern options if they have been used.",
"type": "boolean",
},
"vars": {
+ "description": "Whether to check all variables or only locally-declared variables.",
"enum": [
"all",
"local",
@@ -29374,6 +23803,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "string",
},
"varsIgnorePattern": {
+ "description": "Regular expressions of variable names to not check for usage.",
"type": "string",
},
},
@@ -29420,24 +23850,31 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"allowNamedExports": {
+ "description": "Whether to ignore named exports.",
"type": "boolean",
},
"classes": {
+ "description": "Whether to ignore references to class declarations.",
"type": "boolean",
},
"enums": {
+ "description": "Whether to check references to enums.",
"type": "boolean",
},
"functions": {
+ "description": "Whether to ignore references to function declarations.",
"type": "boolean",
},
"ignoreTypeReferences": {
+ "description": "Whether to ignore type references, such as in type annotations and assertions.",
"type": "boolean",
},
"typedefs": {
+ "description": "Whether to check references to types.",
"type": "boolean",
},
"variables": {
+ "description": "Whether to ignore references to variables.",
"type": "boolean",
},
},
@@ -29484,24 +23921,6 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "suggestion",
},
},
- "no-useless-template-literals": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "docs": {
- "description": "Disallow unnecessary template literals",
- "recommended": "strict",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/no-useless-template-literals",
- },
- "fixable": "code",
- "messages": {
- "noUselessTemplateLiteral": "Template literal expression is unnecessary and can be simplified.",
- },
- "schema": [],
- "type": "suggestion",
- },
- },
"no-var-requires": {
"create": [Function],
"defaultOptions": [
@@ -29510,14 +23929,17 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
},
],
"meta": {
+ "deprecated": true,
"docs": {
"description": "Disallow \`require\` statements except in import statements",
- "recommended": "recommended",
"url": "https://typescript-eslint.io/rules/no-var-requires",
},
"messages": {
"noVarReqs": "Require statement not part of import statement.",
},
+ "replacedBy": [
+ "@typescript-eslint/no-require-imports",
+ ],
"schema": [
{
"additionalProperties": false,
@@ -29536,67 +23958,39 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "problem",
},
},
- "non-nullable-type-assertion-style": {
+ "no-wrapper-object-types": {
"create": [Function],
"defaultOptions": [],
"meta": {
"docs": {
- "description": "Enforce non-null assertions over explicit type casts",
- "recommended": "stylistic",
- "requiresTypeChecking": true,
- "url": "https://typescript-eslint.io/rules/non-nullable-type-assertion-style",
+ "description": "Disallow using confusing built-in primitive class wrappers",
+ "recommended": "recommended",
+ "url": "https://typescript-eslint.io/rules/no-wrapper-object-types",
},
"fixable": "code",
"messages": {
- "preferNonNullAssertion": "Use a ! assertion to more succinctly remove null and undefined from the type.",
+ "bannedClassType": "Prefer using the primitive \`{{preferred}}\` as a type name, rather than the upper-cased \`{{typeName}}\`.",
},
"schema": [],
- "type": "suggestion",
+ "type": "problem",
},
},
- "object-curly-spacing": {
+ "non-nullable-type-assertion-style": {
"create": [Function],
- "defaultOptions": [
- "never",
- ],
+ "defaultOptions": [],
"meta": {
- "deprecated": true,
"docs": {
- "description": "Enforce consistent spacing inside braces",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/object-curly-spacing",
+ "description": "Enforce non-null assertions over explicit type casts",
+ "recommended": "stylistic",
+ "requiresTypeChecking": true,
+ "url": "https://typescript-eslint.io/rules/non-nullable-type-assertion-style",
},
- "fixable": "whitespace",
+ "fixable": "code",
"messages": {
- "requireSpaceAfter": "A space is required after '{{token}}'.",
- "requireSpaceBefore": "A space is required before '{{token}}'.",
- "unexpectedSpaceAfter": "There should be no space after '{{token}}'.",
- "unexpectedSpaceBefore": "There should be no space before '{{token}}'.",
- },
- "replacedBy": [
- "@stylistic/ts/object-curly-spacing",
- ],
- "schema": [
- {
- "enum": [
- "always",
- "never",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "arraysInObjects": {
- "type": "boolean",
- },
- "objectsInObjects": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
+ "preferNonNullAssertion": "Use a ! assertion to more succinctly remove null and undefined from the type.",
+ },
+ "schema": [],
+ "type": "suggestion",
},
},
"only-throw-error": {
@@ -29611,7 +24005,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"docs": {
"description": "Disallow throwing non-\`Error\` values as exceptions",
"extendsBaseRule": "no-throw-literal",
- "recommended": "strict",
+ "recommended": "recommended",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/only-throw-error",
},
@@ -29624,9 +24018,11 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"allowThrowingAny": {
+ "description": "Whether to always allow throwing values typed as \`any\`.",
"type": "boolean",
},
"allowThrowingUnknown": {
+ "description": "Whether to always allow throwing values typed as \`unknown\`.",
"type": "boolean",
},
},
@@ -29636,162 +24032,6 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "problem",
},
},
- "padding-line-between-statements": {
- "create": [Function],
- "defaultOptions": [],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require or disallow padding lines between statements",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/padding-line-between-statements",
- },
- "fixable": "whitespace",
- "hasSuggestions": false,
- "messages": {
- "expectedBlankLine": "Expected blank line before this statement.",
- "unexpectedBlankLine": "Unexpected blank line before this statement.",
- },
- "replacedBy": [
- "@stylistic/ts/padding-line-between-statements",
- ],
- "schema": {
- "$defs": {
- "paddingType": {
- "enum": [
- "any",
- "never",
- "always",
- ],
- "type": "string",
- },
- "statementType": {
- "anyOf": [
- {
- "enum": [
- "*",
- "block-like",
- "exports",
- "require",
- "directive",
- "expression",
- "iife",
- "multiline-block-like",
- "multiline-expression",
- "multiline-const",
- "multiline-let",
- "multiline-var",
- "singleline-const",
- "singleline-let",
- "singleline-var",
- "block",
- "empty",
- "function",
- "break",
- "case",
- "class",
- "const",
- "continue",
- "debugger",
- "default",
- "do",
- "export",
- "for",
- "if",
- "import",
- "let",
- "return",
- "switch",
- "throw",
- "try",
- "var",
- "while",
- "with",
- "interface",
- "type",
- ],
- "type": "string",
- },
- {
- "additionalItems": false,
- "items": {
- "enum": [
- "*",
- "block-like",
- "exports",
- "require",
- "directive",
- "expression",
- "iife",
- "multiline-block-like",
- "multiline-expression",
- "multiline-const",
- "multiline-let",
- "multiline-var",
- "singleline-const",
- "singleline-let",
- "singleline-var",
- "block",
- "empty",
- "function",
- "break",
- "case",
- "class",
- "const",
- "continue",
- "debugger",
- "default",
- "do",
- "export",
- "for",
- "if",
- "import",
- "let",
- "return",
- "switch",
- "throw",
- "try",
- "var",
- "while",
- "with",
- "interface",
- "type",
- ],
- "type": "string",
- },
- "minItems": 1,
- "type": "array",
- "uniqueItems": true,
- },
- ],
- },
- },
- "additionalItems": false,
- "items": {
- "additionalProperties": false,
- "properties": {
- "blankLine": {
- "$ref": "#/$defs/paddingType",
- },
- "next": {
- "$ref": "#/$defs/statementType",
- },
- "prev": {
- "$ref": "#/$defs/statementType",
- },
- },
- "required": [
- "blankLine",
- "prev",
- "next",
- ],
- "type": "object",
- },
- "type": "array",
- },
- "type": "layout",
- },
- },
"parameter-properties": {
"create": [Function],
"defaultOptions": [
@@ -29828,12 +24068,14 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"allow": {
+ "description": "Whether to allow certain kinds of properties to be ignored.",
"items": {
"$ref": "#/items/0/$defs/modifier",
},
"type": "array",
},
"prefer": {
+ "description": "Whether to prefer class properties or parameter properties.",
"enum": [
"class-property",
"parameter-property",
@@ -29944,9 +24186,11 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
{
"properties": {
"enforceForDeclarationWithTypeAnnotation": {
+ "description": "Whether to enforce destructuring on variable declarations with type annotations.",
"type": "boolean",
},
"enforceForRenamedProperties": {
+ "description": "Whether to enforce destructuring that use a different variable name than the property name.",
"type": "boolean",
},
},
@@ -29979,6 +24223,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"meta": {
"docs": {
"description": "Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result",
+ "recommended": "stylistic",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/prefer-find",
},
@@ -30031,7 +24276,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"meta": {
"docs": {
"description": "Enforce \`includes\` method over \`indexOf\` method",
- "recommended": "strict",
+ "recommended": "stylistic",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/prefer-includes",
},
@@ -30059,13 +24304,15 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"url": "https://typescript-eslint.io/rules/prefer-literal-enum-member",
},
"messages": {
- "notLiteral": "Explicit enum value must only be a literal value (string, number, boolean, etc).",
+ "notLiteral": "Explicit enum value must only be a literal value (string or number).",
+ "notLiteralOrBitwiseExpression": "Explicit enum value must only be a literal value (string or number) or a bitwise expression.",
},
"schema": [
{
"additionalProperties": false,
"properties": {
"allowBitwiseExpressions": {
+ "description": "Whether to allow using bitwise expressions in enum initializers.",
"type": "boolean",
},
},
@@ -30081,7 +24328,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"meta": {
"docs": {
"description": "Require using \`namespace\` keyword over \`module\` keyword to declare custom TypeScript modules",
- "recommended": "stylistic",
+ "recommended": "recommended",
"url": "https://typescript-eslint.io/rules/prefer-namespace-keyword",
},
"fixable": "code",
@@ -30097,7 +24344,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"defaultOptions": [
{
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false,
- "ignoreConditionalTests": false,
+ "ignoreConditionalTests": true,
"ignoreMixedLogicalExpressions": false,
"ignorePrimitives": {
"bigint": false,
@@ -30118,43 +24365,53 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"hasSuggestions": true,
"messages": {
"noStrictNullCheck": "This rule requires the \`strictNullChecks\` compiler option to be turned on to function correctly.",
- "preferNullishOverOr": "Prefer using nullish coalescing operator (\`??\`) instead of a logical or (\`||\`), as it is a safer operator.",
- "preferNullishOverTernary": "Prefer using nullish coalescing operator (\`??\`) instead of a ternary expression, as it is simpler to read.",
- "suggestNullish": "Fix to nullish coalescing operator (\`??\`).",
+ "preferNullishOverOr": "Prefer using nullish coalescing operator (\`??{{ equals }}\`) instead of a logical {{ description }} (\`||{{ equals }}\`), as it is a safer operator.",
+ "preferNullishOverTernary": "Prefer using nullish coalescing operator (\`??{{ equals }}\`) instead of a ternary expression, as it is simpler to read.",
+ "suggestNullish": "Fix to nullish coalescing operator (\`??{{ equals }}\`).",
},
"schema": [
{
"additionalProperties": false,
"properties": {
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": {
+ "description": "Unless this is set to \`true\`, the rule will error on every file whose \`tsconfig.json\` does _not_ have the \`strictNullChecks\` compiler option (or \`strict\`) set to \`true\`.",
"type": "boolean",
},
"ignoreConditionalTests": {
+ "description": "Whether to ignore cases that are located within a conditional test.",
"type": "boolean",
},
"ignoreMixedLogicalExpressions": {
+ "description": "Whether to ignore any logical or expressions that are part of a mixed logical expression (with \`&&\`).",
"type": "boolean",
},
"ignorePrimitives": {
+ "description": "Whether to ignore all (\`true\`) or some (an object with properties) primitive types.",
"oneOf": [
{
+ "description": "Which primitives types may be ignored.",
"properties": {
"bigint": {
+ "description": "Ignore bigint primitive types.",
"type": "boolean",
},
"boolean": {
+ "description": "Ignore boolean primitive types.",
"type": "boolean",
},
"number": {
+ "description": "Ignore number primitive types.",
"type": "boolean",
},
"string": {
+ "description": "Ignore string primitive types.",
"type": "boolean",
},
},
"type": "object",
},
{
+ "description": "Ignore all primitive types.",
"enum": [
true,
],
@@ -30163,6 +24420,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
],
},
"ignoreTernaryTests": {
+ "description": "Whether to ignore any ternary expressions that could be simplified by using the nullish coalescing operator.",
"type": "boolean",
},
},
@@ -30253,7 +24511,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"docs": {
"description": "Require using Error objects as Promise rejection reasons",
"extendsBaseRule": true,
- "recommended": "strict",
+ "recommended": "recommended",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/prefer-promise-reject-errors",
},
@@ -30265,6 +24523,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"allowEmptyReject": {
+ "description": "Whether to allow calls to \`Promise.reject()\` with no arguments.",
"type": "boolean",
},
},
@@ -30296,6 +24555,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"onlyInlineLambdas": {
+ "description": "Whether to restrict checking only to members immediately assigned a lambda value.",
"type": "boolean",
},
},
@@ -30329,6 +24589,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"allow": {
+ "description": "An array of type specifiers to ignore.",
"items": {
"oneOf": [
{
@@ -30439,12 +24700,15 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "array",
},
"checkParameterProperties": {
+ "description": "Whether to check class parameter properties.",
"type": "boolean",
},
"ignoreInferredTypes": {
+ "description": "Whether to ignore parameters which don't explicitly specify a type.",
"type": "boolean",
},
"treatMethodsAsReadonly": {
+ "description": "Whether to treat all mutable methods as though they are readonly.",
"type": "boolean",
},
},
@@ -30478,6 +24742,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"meta": {
"docs": {
"description": "Enforce \`RegExp#exec\` over \`String#match\` if no global flag is provided",
+ "recommended": "stylistic",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/prefer-regexp-exec",
},
@@ -30549,15 +24814,18 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"create": [Function],
"defaultOptions": [],
"meta": {
+ "deprecated": true,
"docs": {
"description": "Enforce using \`@ts-expect-error\` over \`@ts-ignore\`",
- "recommended": "strict",
"url": "https://typescript-eslint.io/rules/prefer-ts-expect-error",
},
"fixable": "code",
"messages": {
"preferExpectErrorComment": "Use "@ts-expect-error" to ensure an error is actually being suppressed.",
},
+ "replacedBy": [
+ "@typescript-eslint/ban-ts-comment",
+ ],
"schema": [],
"type": "problem",
},
@@ -30600,15 +24868,19 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "array",
},
"checkArrowFunctions": {
+ "description": "Whether to check arrow functions.",
"type": "boolean",
},
"checkFunctionDeclarations": {
+ "description": "Whether to check standalone function declarations.",
"type": "boolean",
},
"checkFunctionExpressions": {
+ "description": "Whether to check inline function expressions",
"type": "boolean",
},
"checkMethodDeclarations": {
+ "description": "Whether to check methods on classes and object literals.",
"type": "boolean",
},
},
@@ -30618,63 +24890,6 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "suggestion",
},
},
- "quotes": {
- "create": [Function],
- "defaultOptions": [
- "double",
- {
- "allowTemplateLiterals": false,
- "avoidEscape": false,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce the consistent use of either backticks, double, or single quotes",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/quotes",
- },
- "fixable": "code",
- "hasSuggestions": undefined,
- "messages": {
- "wrongQuotes": "Strings must use {{description}}.",
- },
- "replacedBy": [
- "@stylistic/ts/quotes",
- ],
- "schema": [
- {
- "enum": [
- "single",
- "double",
- "backtick",
- ],
- },
- {
- "anyOf": [
- {
- "enum": [
- "avoid-escape",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "allowTemplateLiterals": {
- "type": "boolean",
- },
- "avoidEscape": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "layout",
- },
- },
"require-array-sort-compare": {
"create": [Function],
"defaultOptions": [
@@ -30711,14 +24926,16 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"defaultOptions": [],
"meta": {
"docs": {
- "description": "Disallow async functions which have no \`await\` expression",
+ "description": "Disallow async functions which do not return promises and have no \`await\` expression",
"extendsBaseRule": true,
"recommended": "recommended",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/require-await",
},
+ "hasSuggestions": true,
"messages": {
"missingAwait": "{{name}} has no 'await' expression.",
+ "removeAsync": "Remove 'async'.",
},
"schema": [],
"type": "suggestion",
@@ -30798,6 +25015,16 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"create": [Function],
"defaultOptions": [
{
+ "allow": [
+ {
+ "from": "lib",
+ "name": [
+ "Error",
+ "URL",
+ "URLSearchParams",
+ ],
+ },
+ ],
"allowAny": true,
"allowBoolean": true,
"allowNullish": true,
@@ -30831,6 +25058,117 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
{
"additionalProperties": false,
"properties": {
+ "allow": {
+ "description": "Types to allow in template expressions.",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "file",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "path": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "lib",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ ],
+ "type": "object",
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "from": {
+ "enum": [
+ "package",
+ ],
+ "type": "string",
+ },
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ },
+ {
+ "items": {
+ "type": "string",
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems": true,
+ },
+ ],
+ },
+ "package": {
+ "type": "string",
+ },
+ },
+ "required": [
+ "from",
+ "name",
+ "package",
+ ],
+ "type": "object",
+ },
+ ],
+ },
+ "type": "array",
+ },
"allowAny": {
"description": "Whether to allow \`any\` typed values in template expressions.",
"type": "boolean",
@@ -30873,8 +25211,13 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
],
"meta": {
"docs": {
- "description": "Enforce consistent returning of awaited values",
+ "description": "Enforce consistent awaiting of returned promises",
"extendsBaseRule": "no-return-await",
+ "recommended": {
+ "strict": [
+ "error-handling-correctness-only",
+ ],
+ },
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/return-await",
},
@@ -30882,15 +25225,42 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"hasSuggestions": true,
"messages": {
"disallowedPromiseAwait": "Returning an awaited promise is not allowed in this context.",
+ "disallowedPromiseAwaitSuggestion": "Remove \`await\` before the expression. Use caution as this may impact control flow.",
"nonPromiseAwait": "Returning an awaited value that is not a promise is not allowed.",
"requiredPromiseAwait": "Returning an awaited promise is required in this context.",
+ "requiredPromiseAwaitSuggestion": "Add \`await\` before the expression. Use caution as this may impact control flow.",
},
"schema": [
{
- "enum": [
- "in-try-catch",
- "always",
- "never",
+ "oneOf": [
+ {
+ "description": "Requires that all returned promises be awaited.",
+ "enum": [
+ "always",
+ ],
+ "type": "string",
+ },
+ {
+ "description": "In error-handling contexts, the rule enforces that returned promises must be awaited. In ordinary contexts, the rule does not enforce any particular behavior around whether returned promises are awaited.",
+ "enum": [
+ "error-handling-correctness-only",
+ ],
+ "type": "string",
+ },
+ {
+ "description": "In error-handling contexts, the rule enforces that returned promises must be awaited. In ordinary contexts, the rule enforces that returned promises _must not_ be awaited.",
+ "enum": [
+ "in-try-catch",
+ ],
+ "type": "string",
+ },
+ {
+ "description": "Disallows awaiting any returned promises.",
+ "enum": [
+ "never",
+ ],
+ "type": "string",
+ },
],
"type": "string",
},
@@ -30898,91 +25268,11 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "problem",
},
},
- "semi": {
- "create": [Function],
- "defaultOptions": [
- "always",
- {
- "beforeStatementContinuationChars": "any",
- "omitLastInOneLineBlock": false,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require or disallow semicolons instead of ASI",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/semi",
- },
- "fixable": "code",
- "hasSuggestions": undefined,
- "messages": {
- "extraSemi": "Extra semicolon.",
- "missingSemi": "Missing semicolon.",
- },
- "replacedBy": [
- "@stylistic/ts/semi",
- ],
- "schema": {
- "anyOf": [
- {
- "items": [
- {
- "enum": [
- "never",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "beforeStatementContinuationChars": {
- "enum": [
- "always",
- "any",
- "never",
- ],
- },
- },
- "type": "object",
- },
- ],
- "maxItems": 2,
- "minItems": 0,
- "type": "array",
- },
- {
- "items": [
- {
- "enum": [
- "always",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "omitLastInOneLineBlock": {
- "type": "boolean",
- },
- "omitLastInOneLineClassBody": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "maxItems": 2,
- "minItems": 0,
- "type": "array",
- },
- ],
- },
- "type": "layout",
- },
- },
"sort-type-constituents": {
"create": [Function],
"defaultOptions": [
{
+ "caseSensitive": false,
"checkIntersections": true,
"checkUnions": true,
"groupOrder": [
@@ -31002,6 +25292,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
},
],
"meta": {
+ "deprecated": true,
"docs": {
"description": "Enforce constituents of a type union/intersection to be sorted alphabetically",
"url": "https://typescript-eslint.io/rules/sort-type-constituents",
@@ -31013,16 +25304,24 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"notSortedNamed": "{{type}} type {{name}} constituents must be sorted.",
"suggestFix": "Sort constituents of type (removes all comments).",
},
+ "replacedBy": [
+ "perfectionist/sort-intersection-types",
+ "perfectionist/sort-union-types",
+ ],
"schema": [
{
"additionalProperties": false,
"properties": {
+ "caseSensitive": {
+ "description": "Whether to sort using case sensitive string comparisons.",
+ "type": "boolean",
+ },
"checkIntersections": {
- "description": "Whether to check intersection types.",
+ "description": "Whether to check intersection types (\`&\`).",
"type": "boolean",
},
"checkUnions": {
- "description": "Whether to check union types.",
+ "description": "Whether to check union types (\`|\`).",
"type": "boolean",
},
"groupOrder": {
@@ -31053,172 +25352,6 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "suggestion",
},
},
- "space-before-blocks": {
- "create": [Function],
- "defaultOptions": [
- "always",
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce consistent spacing before blocks",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/space-before-blocks",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "missingSpace": "Missing space before opening brace.",
- "unexpectedSpace": "Unexpected space before opening brace.",
- },
- "replacedBy": [
- "@stylistic/ts/space-before-blocks",
- ],
- "schema": [
- {
- "oneOf": [
- {
- "enum": [
- "always",
- "never",
- ],
- },
- {
- "additionalProperties": false,
- "properties": {
- "classes": {
- "enum": [
- "always",
- "never",
- "off",
- ],
- },
- "functions": {
- "enum": [
- "always",
- "never",
- "off",
- ],
- },
- "keywords": {
- "enum": [
- "always",
- "never",
- "off",
- ],
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "layout",
- },
- },
- "space-before-function-paren": {
- "create": [Function],
- "defaultOptions": [
- "always",
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Enforce consistent spacing before function parenthesis",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/space-before-function-paren",
- },
- "fixable": "whitespace",
- "messages": {
- "missing": "Missing space before function parentheses.",
- "unexpected": "Unexpected space before function parentheses.",
- },
- "replacedBy": [
- "@stylistic/ts/space-before-function-paren",
- ],
- "schema": [
- {
- "oneOf": [
- {
- "enum": [
- "always",
- "never",
- ],
- "type": "string",
- },
- {
- "additionalProperties": false,
- "properties": {
- "anonymous": {
- "enum": [
- "always",
- "never",
- "ignore",
- ],
- "type": "string",
- },
- "asyncArrow": {
- "enum": [
- "always",
- "never",
- "ignore",
- ],
- "type": "string",
- },
- "named": {
- "enum": [
- "always",
- "never",
- "ignore",
- ],
- "type": "string",
- },
- },
- "type": "object",
- },
- ],
- },
- ],
- "type": "layout",
- },
- },
- "space-infix-ops": {
- "create": [Function],
- "defaultOptions": [
- {
- "int32Hint": false,
- },
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require spacing around infix operators",
- "extendsBaseRule": true,
- "url": "https://typescript-eslint.io/rules/space-infix-ops",
- },
- "fixable": "whitespace",
- "hasSuggestions": undefined,
- "messages": {
- "missingSpace": "Operator '{{operator}}' must be spaced.",
- },
- "replacedBy": [
- "@stylistic/ts/space-infix-ops",
- ],
- "schema": [
- {
- "additionalProperties": false,
- "properties": {
- "int32Hint": {
- "default": false,
- "type": "boolean",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
"strict-boolean-expressions": {
"create": [Function],
"defaultOptions": [
@@ -31272,30 +25405,39 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"allowAny": {
+ "description": "Whether to allow \`any\`s in a boolean context.",
"type": "boolean",
},
"allowNullableBoolean": {
+ "description": "Whether to allow nullable \`boolean\`s in a boolean context.",
"type": "boolean",
},
"allowNullableEnum": {
+ "description": "Whether to allow nullable \`enum\`s in a boolean context.",
"type": "boolean",
},
"allowNullableNumber": {
+ "description": "Whether to allow nullable \`number\`s in a boolean context.",
"type": "boolean",
},
"allowNullableObject": {
+ "description": "Whether to allow nullable \`object\`s, \`symbol\`s, and functions in a boolean context.",
"type": "boolean",
},
"allowNullableString": {
+ "description": "Whether to allow nullable \`string\`s in a boolean context.",
"type": "boolean",
},
"allowNumber": {
+ "description": "Whether to allow \`number\`s in a boolean context.",
"type": "boolean",
},
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": {
+ "description": "Unless this is set to \`true\`, the rule will error on every file whose \`tsconfig.json\` does _not_ have the \`strictNullChecks\` compiler option (or \`strict\`) set to \`true\`.",
"type": "boolean",
},
"allowString": {
+ "description": "Whether to allow \`string\`s in a boolean context.",
"type": "boolean",
},
},
@@ -31310,6 +25452,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"defaultOptions": [
{
"allowDefaultCaseForExhaustiveSwitch": true,
+ "considerDefaultExhaustiveForUnions": false,
"requireDefaultForNonUnion": false,
},
],
@@ -31333,6 +25476,10 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"description": "If 'true', allow 'default' cases on switch statements with exhaustive cases.",
"type": "boolean",
},
+ "considerDefaultExhaustiveForUnions": {
+ "description": "If 'true', the 'default' clause is used to determine whether the switch statement is exhaustive for union type",
+ "type": "boolean",
+ },
"requireDefaultForNonUnion": {
"description": "If 'true', require a 'default' clause for switches on non-union types.",
"type": "boolean",
@@ -31367,6 +25514,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"lib": {
+ "description": "What to enforce for \`/// \` references.",
"enum": [
"always",
"never",
@@ -31374,6 +25522,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "string",
},
"path": {
+ "description": "What to enforce for \`/// \` references.",
"enum": [
"always",
"never",
@@ -31381,6 +25530,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "string",
},
"types": {
+ "description": "What to enforce for \`/// \` references.",
"enum": [
"always",
"never",
@@ -31395,83 +25545,6 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"type": "suggestion",
},
},
- "type-annotation-spacing": {
- "create": [Function],
- "defaultOptions": [
- {},
- ],
- "meta": {
- "deprecated": true,
- "docs": {
- "description": "Require consistent spacing around type annotations",
- "url": "https://typescript-eslint.io/rules/type-annotation-spacing",
- },
- "fixable": "whitespace",
- "messages": {
- "expectedSpaceAfter": "Expected a space after the '{{type}}'.",
- "expectedSpaceBefore": "Expected a space before the '{{type}}'.",
- "unexpectedSpaceAfter": "Unexpected space after the '{{type}}'.",
- "unexpectedSpaceBefore": "Unexpected space before the '{{type}}'.",
- "unexpectedSpaceBetween": "Unexpected space between the '{{previousToken}}' and the '{{type}}'.",
- },
- "replacedBy": [
- "@stylistic/ts/type-annotation-spacing",
- ],
- "schema": [
- {
- "$defs": {
- "spacingConfig": {
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- },
- "type": "object",
- },
- },
- "additionalProperties": false,
- "properties": {
- "after": {
- "type": "boolean",
- },
- "before": {
- "type": "boolean",
- },
- "overrides": {
- "additionalProperties": false,
- "properties": {
- "arrow": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "colon": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "parameter": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "property": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "returnType": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- "variable": {
- "$ref": "#/items/0/$defs/spacingConfig",
- },
- },
- "type": "object",
- },
- },
- "type": "object",
- },
- ],
- "type": "layout",
- },
- },
"typedef": {
"create": [Function],
"defaultOptions": [
@@ -31500,27 +25573,35 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or
"additionalProperties": false,
"properties": {
"arrayDestructuring": {
+ "description": "Whether to enforce type annotations on variables declared using array destructuring.",
"type": "boolean",
},
"arrowParameter": {
+ "description": "Whether to enforce type annotations for parameters of arrow functions.",
"type": "boolean",
},
"memberVariableDeclaration": {
+ "description": "Whether to enforce type annotations on member variables of classes.",
"type": "boolean",
},
"objectDestructuring": {
+ "description": "Whether to enforce type annotations on variables declared using object destructuring.",
"type": "boolean",
},
"parameter": {
+ "description": "Whether to enforce type annotations for parameters of functions and methods.",
"type": "boolean",
},
"propertyDeclaration": {
+ "description": "Whether to enforce type annotations for properties of interfaces and types.",
"type": "boolean",
},
"variableDeclaration": {
+ "description": "Whether to enforce type annotations for variable declarations, excluding array and object destructuring.",
"type": "boolean",
},
"variableDeclarationIgnoreFunction": {
+ "description": "Whether to ignore variable declarations for non-arrow and arrow functions.",
"type": "boolean",
},
},
@@ -31602,7 +25683,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"defaultOptions": [],
"meta": {
"docs": {
- "description": "Enforce typing arguments in \`.catch()\` callbacks as \`unknown\`",
+ "description": "Enforce typing arguments in Promise rejection callbacks as \`unknown\`",
"recommended": "strict",
"requiresTypeChecking": true,
"url": "https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable",
@@ -31610,12 +25691,11 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"fixable": "code",
"hasSuggestions": true,
"messages": {
- "addUnknownRestTypeAnnotationSuggestion": "Add an explicit \`: [unknown]\` type annotation to the catch rest variable.",
- "addUnknownTypeAnnotationSuggestion": "Add an explicit \`: unknown\` type annotation to the catch variable.",
- "useUnknown": "Prefer the safe \`: unknown\` for a catch callback variable.",
- "useUnknownArrayDestructuringPattern": "Prefer the safe \`: unknown\` for a catch callback variable. The thrown error may not be iterable.",
- "useUnknownObjectDestructuringPattern": "Prefer the safe \`: unknown\` for a catch callback variable. The thrown error may be nullable, or may not have the expected shape.",
- "useUnknownSpreadArgs": "Prefer the safe \`: unknown\` for a catch callback variable. The argument list may contain a handler that does not use \`unknown\` for the catch callback variable.",
+ "addUnknownRestTypeAnnotationSuggestion": "Add an explicit \`: [unknown]\` type annotation to the rejection callback rest variable.",
+ "addUnknownTypeAnnotationSuggestion": "Add an explicit \`: unknown\` type annotation to the rejection callback variable.",
+ "useUnknown": "Prefer the safe \`: unknown\` for a \`{{method}}\`{{append}} callback variable.",
+ "useUnknownArrayDestructuringPattern": "Prefer the safe \`: unknown\` for a \`{{method}}\`{{append}} callback variable. The thrown error may not be iterable.",
+ "useUnknownObjectDestructuringPattern": "Prefer the safe \`: unknown\` for a \`{{method}}\`{{append}} callback variable. The thrown error may be nullable, or may not have the expected shape.",
"wrongRestTypeAnnotationSuggestion": "Change existing type annotation to \`: [unknown]\`.",
"wrongTypeAnnotationSuggestion": "Change existing type annotation to \`: unknown\`.",
},
@@ -31634,7 +25714,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"**/*.mts",
"**/*.cts",
],
- "name": "typescript-eslint/eslint-recommended",
+ "name": "jimmy.codes/typescript__typescript-eslint/eslint-recommended",
"rules": {
"constructor-super": "off",
"getter-return": "off",
@@ -31644,6 +25724,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"no-dupe-keys": "off",
"no-func-assign": "off",
"no-import-assign": "off",
+ "no-new-native-nonconstructor": "off",
"no-new-symbol": "off",
"no-obj-calls": "off",
"no-redeclare": "off",
@@ -31659,7 +25740,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
},
},
{
- "name": "typescript-eslint/stylistic-type-checked",
+ "name": "jimmy.codes/typescript__typescript-eslint/stylistic-type-checked",
"rules": {
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "error",
@@ -31672,14 +25753,15 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-empty-function": "error",
- "@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
+ "@typescript-eslint/prefer-find": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
- "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
+ "@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"dot-notation": "off",
"no-empty-function": "off",
@@ -31706,6 +25788,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"fixStyle": "inline-type-imports",
},
],
+ "@typescript-eslint/no-deprecated": "warn",
"@typescript-eslint/no-misused-promises": [
"error",
{
@@ -31731,6 +25814,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"parserOptions": {
"program": null,
"project": false,
+ "projectService": false,
},
},
"name": "typescript-eslint/disable-type-checked",
@@ -31743,6 +25827,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-array-delete": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
+ "@typescript-eslint/no-deprecated": "off",
"@typescript-eslint/no-duplicate-type-constituents": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-for-in-array": "off",
@@ -31751,12 +25836,13 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-mixed-enums": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
- "@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-qualifier": "off",
+ "@typescript-eslint/no-unnecessary-template-expression": "off",
"@typescript-eslint/no-unnecessary-type-arguments": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
+ "@typescript-eslint/no-unnecessary-type-parameters": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
@@ -31764,7 +25850,6 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-unary-minus": "off",
- "@typescript-eslint/no-useless-template-literals": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/only-throw-error": "off",
"@typescript-eslint/prefer-destructuring": "off",
diff --git a/src/configs/react.ts b/src/configs/react.ts
index 4479442..599e26c 100644
--- a/src/configs/react.ts
+++ b/src/configs/react.ts
@@ -1,4 +1,5 @@
-import * as reactQuery from "@tanstack/eslint-plugin-query";
+import queryPlugin from "@tanstack/eslint-plugin-query";
+import { type ESLint } from "eslint";
import jsxA11y from "eslint-plugin-jsx-a11y";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
@@ -51,7 +52,7 @@ const reactConfig = (
name: "jimmy.codes/react/query",
files: [GLOB_JSX, GLOB_TSX],
plugins: {
- "@tanstack/query": reactQuery,
+ "@tanstack/query": queryPlugin as unknown as ESLint.Plugin,
},
rules: {
"@tanstack/query/exhaustive-deps": "error",
diff --git a/src/configs/typescript.ts b/src/configs/typescript.ts
index e2e2963..65d9736 100644
--- a/src/configs/typescript.ts
+++ b/src/configs/typescript.ts
@@ -32,6 +32,7 @@ const typescriptConfig = (options: TypescriptOptions) => {
"error",
{ allowNumber: true },
],
+ "@typescript-eslint/no-deprecated": "warn",
},
},
{
diff --git a/src/rules.gen.d.ts b/src/rules.gen.d.ts
index ff50efa..847f6d7 100644
--- a/src/rules.gen.d.ts
+++ b/src/rules.gen.d.ts
@@ -3,6 +3,31 @@
import type { Linter } from 'eslint'
export interface RuleOptions {
+ /**
+ * Exhaustive deps rule for useQuery
+ * @see https://tanstack.com/query/latest/docs/eslint/exhaustive-deps
+ */
+ "@tanstack/query/exhaustive-deps"?: Linter.RuleEntry<[]>;
+ /**
+ * Ensure correct order of inference sensitive properties for infinite queries
+ * @see https://tanstack.com/query/latest/docs/eslint/infinite-query-property-order
+ */
+ "@tanstack/query/infinite-query-property-order"?: Linter.RuleEntry<[]>;
+ /**
+ * Disallows rest destructuring in queries
+ * @see https://tanstack.com/query/latest/docs/eslint/no-rest-destructuring
+ */
+ "@tanstack/query/no-rest-destructuring"?: Linter.RuleEntry<[]>;
+ /**
+ * Disallow putting the result of query hooks directly in a React hook dependency array
+ * @see https://tanstack.com/query/latest/docs/eslint/no-unstable-deps
+ */
+ "@tanstack/query/no-unstable-deps"?: Linter.RuleEntry<[]>;
+ /**
+ * Makes sure that QueryClient is stable
+ * @see https://tanstack.com/query/latest/docs/eslint/stable-query-client
+ */
+ "@tanstack/query/stable-query-client"?: Linter.RuleEntry<[]>;
/**
* Require that function overload signatures be consecutive
* @see https://typescript-eslint.io/rules/adjacent-overload-signatures
@@ -28,23 +53,6 @@ export interface RuleOptions {
* @see https://typescript-eslint.io/rules/ban-tslint-comment
*/
"@typescript-eslint/ban-tslint-comment"?: Linter.RuleEntry<[]>;
- /**
- * Disallow certain types
- * @see https://typescript-eslint.io/rules/ban-types
- */
- "@typescript-eslint/ban-types"?: Linter.RuleEntry;
- /**
- * Disallow or enforce spaces inside of blocks after opening block and before closing block
- * @see https://typescript-eslint.io/rules/block-spacing
- * @deprecated
- */
- "@typescript-eslint/block-spacing"?: Linter.RuleEntry;
- /**
- * Enforce consistent brace style for blocks
- * @see https://typescript-eslint.io/rules/brace-style
- * @deprecated
- */
- "@typescript-eslint/brace-style"?: Linter.RuleEntry;
/**
* Enforce that literals on classes are exposed in a consistent style
* @see https://typescript-eslint.io/rules/class-literal-property-style
@@ -55,18 +63,6 @@ export interface RuleOptions {
* @see https://typescript-eslint.io/rules/class-methods-use-this
*/
"@typescript-eslint/class-methods-use-this"?: Linter.RuleEntry;
- /**
- * Require or disallow trailing commas
- * @see https://typescript-eslint.io/rules/comma-dangle
- * @deprecated
- */
- "@typescript-eslint/comma-dangle"?: Linter.RuleEntry;
- /**
- * Enforce consistent spacing before and after commas
- * @see https://typescript-eslint.io/rules/comma-spacing
- * @deprecated
- */
- "@typescript-eslint/comma-spacing"?: Linter.RuleEntry;
/**
* Enforce specifying generic type arguments on type annotation or constructor name of a constructor call
* @see https://typescript-eslint.io/rules/consistent-generic-constructors
@@ -127,58 +123,16 @@ export interface RuleOptions {
* @see https://typescript-eslint.io/rules/explicit-module-boundary-types
*/
"@typescript-eslint/explicit-module-boundary-types"?: Linter.RuleEntry;
- /**
- * Require or disallow spacing between function identifiers and their invocations
- * @see https://typescript-eslint.io/rules/func-call-spacing
- * @deprecated
- */
- "@typescript-eslint/func-call-spacing"?: Linter.RuleEntry;
- /**
- * Enforce consistent indentation
- * @see https://typescript-eslint.io/rules/indent
- * @deprecated
- */
- "@typescript-eslint/indent"?: Linter.RuleEntry;
/**
* Require or disallow initialization in variable declarations
* @see https://typescript-eslint.io/rules/init-declarations
*/
"@typescript-eslint/init-declarations"?: Linter.RuleEntry;
- /**
- * Enforce consistent spacing between property names and type annotations in types and interfaces
- * @see https://typescript-eslint.io/rules/key-spacing
- * @deprecated
- */
- "@typescript-eslint/key-spacing"?: Linter.RuleEntry;
- /**
- * Enforce consistent spacing before and after keywords
- * @see https://typescript-eslint.io/rules/keyword-spacing
- * @deprecated
- */
- "@typescript-eslint/keyword-spacing"?: Linter.RuleEntry;
- /**
- * Require empty lines around comments
- * @see https://typescript-eslint.io/rules/lines-around-comment
- * @deprecated
- */
- "@typescript-eslint/lines-around-comment"?: Linter.RuleEntry;
- /**
- * Require or disallow an empty line between class members
- * @see https://typescript-eslint.io/rules/lines-between-class-members
- * @deprecated
- */
- "@typescript-eslint/lines-between-class-members"?: Linter.RuleEntry;
/**
* Enforce a maximum number of parameters in function definitions
* @see https://typescript-eslint.io/rules/max-params
*/
"@typescript-eslint/max-params"?: Linter.RuleEntry;
- /**
- * Require a specific member delimiter style for interfaces and type literals
- * @see https://typescript-eslint.io/rules/member-delimiter-style
- * @deprecated
- */
- "@typescript-eslint/member-delimiter-style"?: Linter.RuleEntry;
/**
* Require a consistent member declaration order
* @see https://typescript-eslint.io/rules/member-ordering
@@ -205,7 +159,7 @@ export interface RuleOptions {
*/
"@typescript-eslint/no-array-delete"?: Linter.RuleEntry<[]>;
/**
- * Require `.toString()` to only be called on objects which provide useful information when stringified
+ * Require `.toString()` and `.toLocaleString()` to only be called on objects which provide useful information when stringified
* @see https://typescript-eslint.io/rules/no-base-to-string
*/
"@typescript-eslint/no-base-to-string"?: Linter.RuleEntry;
@@ -219,6 +173,11 @@ export interface RuleOptions {
* @see https://typescript-eslint.io/rules/no-confusing-void-expression
*/
"@typescript-eslint/no-confusing-void-expression"?: Linter.RuleEntry;
+ /**
+ * Disallow using code marked as `@deprecated`
+ * @see https://typescript-eslint.io/rules/no-deprecated
+ */
+ "@typescript-eslint/no-deprecated"?: Linter.RuleEntry<[]>;
/**
* Disallow duplicate class members
* @see https://typescript-eslint.io/rules/no-dupe-class-members
@@ -247,8 +206,14 @@ export interface RuleOptions {
/**
* Disallow the declaration of empty interfaces
* @see https://typescript-eslint.io/rules/no-empty-interface
+ * @deprecated
*/
"@typescript-eslint/no-empty-interface"?: Linter.RuleEntry;
+ /**
+ * Disallow accidentally using the "empty object" type
+ * @see https://typescript-eslint.io/rules/no-empty-object-type
+ */
+ "@typescript-eslint/no-empty-object-type"?: Linter.RuleEntry;
/**
* Disallow the `any` type
* @see https://typescript-eslint.io/rules/no-explicit-any
@@ -259,18 +224,6 @@ export interface RuleOptions {
* @see https://typescript-eslint.io/rules/no-extra-non-null-assertion
*/
"@typescript-eslint/no-extra-non-null-assertion"?: Linter.RuleEntry<[]>;
- /**
- * Disallow unnecessary parentheses
- * @see https://typescript-eslint.io/rules/no-extra-parens
- * @deprecated
- */
- "@typescript-eslint/no-extra-parens"?: Linter.RuleEntry;
- /**
- * Disallow unnecessary semicolons
- * @see https://typescript-eslint.io/rules/no-extra-semi
- * @deprecated
- */
- "@typescript-eslint/no-extra-semi"?: Linter.RuleEntry<[]>;
/**
* Disallow classes used as namespaces
* @see https://typescript-eslint.io/rules/no-extraneous-class
@@ -319,6 +272,7 @@ export interface RuleOptions {
/**
* Disallow literal numbers that lose precision
* @see https://typescript-eslint.io/rules/no-loss-of-precision
+ * @deprecated
*/
"@typescript-eslint/no-loss-of-precision"?: Linter.RuleEntry<[]>;
/**
@@ -390,6 +344,11 @@ export interface RuleOptions {
* @see https://typescript-eslint.io/rules/no-restricted-imports
*/
"@typescript-eslint/no-restricted-imports"?: Linter.RuleEntry;
+ /**
+ * Disallow certain types
+ * @see https://typescript-eslint.io/rules/no-restricted-types
+ */
+ "@typescript-eslint/no-restricted-types"?: Linter.RuleEntry;
/**
* Disallow variable declarations from shadowing variables declared in the outer scope
* @see https://typescript-eslint.io/rules/no-shadow
@@ -400,12 +359,6 @@ export interface RuleOptions {
* @see https://typescript-eslint.io/rules/no-this-alias
*/
"@typescript-eslint/no-this-alias"?: Linter.RuleEntry;
- /**
- * Disallow throwing literals as exceptions
- * @see https://typescript-eslint.io/rules/no-throw-literal
- * @deprecated
- */
- "@typescript-eslint/no-throw-literal"?: Linter.RuleEntry;
/**
* Disallow type aliases
* @see https://typescript-eslint.io/rules/no-type-alias
@@ -422,11 +375,25 @@ export interface RuleOptions {
* @see https://typescript-eslint.io/rules/no-unnecessary-condition
*/
"@typescript-eslint/no-unnecessary-condition"?: Linter.RuleEntry;
+ /**
+ * Disallow unnecessary assignment of constructor property parameter
+ * @see https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment
+ */
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment"?: Linter.RuleEntry<
+ []
+ >;
/**
* Disallow unnecessary namespace qualifiers
* @see https://typescript-eslint.io/rules/no-unnecessary-qualifier
*/
"@typescript-eslint/no-unnecessary-qualifier"?: Linter.RuleEntry<[]>;
+ /**
+ * Disallow unnecessary template expressions
+ * @see https://typescript-eslint.io/rules/no-unnecessary-template-expression
+ */
+ "@typescript-eslint/no-unnecessary-template-expression"?: Linter.RuleEntry<
+ []
+ >;
/**
* Disallow type arguments that are equal to the default
* @see https://typescript-eslint.io/rules/no-unnecessary-type-arguments
@@ -442,6 +409,11 @@ export interface RuleOptions {
* @see https://typescript-eslint.io/rules/no-unnecessary-type-constraint
*/
"@typescript-eslint/no-unnecessary-type-constraint"?: Linter.RuleEntry<[]>;
+ /**
+ * Disallow type parameters that aren't used multiple times
+ * @see https://typescript-eslint.io/rules/no-unnecessary-type-parameters
+ */
+ "@typescript-eslint/no-unnecessary-type-parameters"?: Linter.RuleEntry<[]>;
/**
* Disallow calling a function with a value with type `any`
* @see https://typescript-eslint.io/rules/no-unsafe-argument
@@ -467,6 +439,11 @@ export interface RuleOptions {
* @see https://typescript-eslint.io/rules/no-unsafe-enum-comparison
*/
"@typescript-eslint/no-unsafe-enum-comparison"?: Linter.RuleEntry<[]>;
+ /**
+ * Disallow using the unsafe built-in Function type
+ * @see https://typescript-eslint.io/rules/no-unsafe-function-type
+ */
+ "@typescript-eslint/no-unsafe-function-type"?: Linter.RuleEntry<[]>;
/**
* Disallow member access on a value with type `any`
* @see https://typescript-eslint.io/rules/no-unsafe-member-access
@@ -507,38 +484,27 @@ export interface RuleOptions {
* @see https://typescript-eslint.io/rules/no-useless-empty-export
*/
"@typescript-eslint/no-useless-empty-export"?: Linter.RuleEntry<[]>;
- /**
- * Disallow unnecessary template literals
- * @see https://typescript-eslint.io/rules/no-useless-template-literals
- */
- "@typescript-eslint/no-useless-template-literals"?: Linter.RuleEntry<[]>;
/**
* Disallow `require` statements except in import statements
* @see https://typescript-eslint.io/rules/no-var-requires
+ * @deprecated
*/
"@typescript-eslint/no-var-requires"?: Linter.RuleEntry;
+ /**
+ * Disallow using confusing built-in primitive class wrappers
+ * @see https://typescript-eslint.io/rules/no-wrapper-object-types
+ */
+ "@typescript-eslint/no-wrapper-object-types"?: Linter.RuleEntry<[]>;
/**
* Enforce non-null assertions over explicit type casts
* @see https://typescript-eslint.io/rules/non-nullable-type-assertion-style
*/
"@typescript-eslint/non-nullable-type-assertion-style"?: Linter.RuleEntry<[]>;
- /**
- * Enforce consistent spacing inside braces
- * @see https://typescript-eslint.io/rules/object-curly-spacing
- * @deprecated
- */
- "@typescript-eslint/object-curly-spacing"?: Linter.RuleEntry;
/**
* Disallow throwing non-`Error` values as exceptions
* @see https://typescript-eslint.io/rules/only-throw-error
*/
"@typescript-eslint/only-throw-error"?: Linter.RuleEntry;
- /**
- * Require or disallow padding lines between statements
- * @see https://typescript-eslint.io/rules/padding-line-between-statements
- * @deprecated
- */
- "@typescript-eslint/padding-line-between-statements"?: Linter.RuleEntry;
/**
* Require or disallow parameter properties in class constructors
* @see https://typescript-eslint.io/rules/parameter-properties
@@ -637,6 +603,7 @@ export interface RuleOptions {
/**
* Enforce using `@ts-expect-error` over `@ts-ignore`
* @see https://typescript-eslint.io/rules/prefer-ts-expect-error
+ * @deprecated
*/
"@typescript-eslint/prefer-ts-expect-error"?: Linter.RuleEntry<[]>;
/**
@@ -644,19 +611,13 @@ export interface RuleOptions {
* @see https://typescript-eslint.io/rules/promise-function-async
*/
"@typescript-eslint/promise-function-async"?: Linter.RuleEntry;
- /**
- * Enforce the consistent use of either backticks, double, or single quotes
- * @see https://typescript-eslint.io/rules/quotes
- * @deprecated
- */
- "@typescript-eslint/quotes"?: Linter.RuleEntry;
/**
* Require `Array#sort` and `Array#toSorted` calls to always provide a `compareFunction`
* @see https://typescript-eslint.io/rules/require-array-sort-compare
*/
"@typescript-eslint/require-array-sort-compare"?: Linter.RuleEntry;
/**
- * Disallow async functions which have no `await` expression
+ * Disallow async functions which do not return promises and have no `await` expression
* @see https://typescript-eslint.io/rules/require-await
*/
"@typescript-eslint/require-await"?: Linter.RuleEntry<[]>;
@@ -671,39 +632,16 @@ export interface RuleOptions {
*/
"@typescript-eslint/restrict-template-expressions"?: Linter.RuleEntry;
/**
- * Enforce consistent returning of awaited values
+ * Enforce consistent awaiting of returned promises
* @see https://typescript-eslint.io/rules/return-await
*/
"@typescript-eslint/return-await"?: Linter.RuleEntry;
- /**
- * Require or disallow semicolons instead of ASI
- * @see https://typescript-eslint.io/rules/semi
- * @deprecated
- */
- "@typescript-eslint/semi"?: Linter.RuleEntry;
/**
* Enforce constituents of a type union/intersection to be sorted alphabetically
* @see https://typescript-eslint.io/rules/sort-type-constituents
- */
- "@typescript-eslint/sort-type-constituents"?: Linter.RuleEntry;
- /**
- * Enforce consistent spacing before blocks
- * @see https://typescript-eslint.io/rules/space-before-blocks
- * @deprecated
- */
- "@typescript-eslint/space-before-blocks"?: Linter.RuleEntry;
- /**
- * Enforce consistent spacing before function parenthesis
- * @see https://typescript-eslint.io/rules/space-before-function-paren
- * @deprecated
- */
- "@typescript-eslint/space-before-function-paren"?: Linter.RuleEntry;
- /**
- * Require spacing around infix operators
- * @see https://typescript-eslint.io/rules/space-infix-ops
* @deprecated
*/
- "@typescript-eslint/space-infix-ops"?: Linter.RuleEntry;
+ "@typescript-eslint/sort-type-constituents"?: Linter.RuleEntry;
/**
* Disallow certain types in boolean expressions
* @see https://typescript-eslint.io/rules/strict-boolean-expressions
@@ -719,12 +657,6 @@ export interface RuleOptions {
* @see https://typescript-eslint.io/rules/triple-slash-reference
*/
"@typescript-eslint/triple-slash-reference"?: Linter.RuleEntry;
- /**
- * Require consistent spacing around type annotations
- * @see https://typescript-eslint.io/rules/type-annotation-spacing
- * @deprecated
- */
- "@typescript-eslint/type-annotation-spacing"?: Linter.RuleEntry;
/**
* Require type annotations in certain places
* @see https://typescript-eslint.io/rules/typedef
@@ -741,7 +673,7 @@ export interface RuleOptions {
*/
"@typescript-eslint/unified-signatures"?: Linter.RuleEntry;
/**
- * Enforce typing arguments in `.catch()` callbacks as `unknown`
+ * Enforce typing arguments in Promise rejection callbacks as `unknown`
* @see https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable
*/
"@typescript-eslint/use-unknown-in-catch-callback-variable"?: Linter.RuleEntry<
@@ -4049,68 +3981,31 @@ type TypescriptEslintBanTsComment =
| []
| [
{
- "ts-expect-error"?:
+ "minimumDescriptionLength"?: number;
+ "ts-check"?:
| boolean
| "allow-with-description"
| {
descriptionFormat?: string;
};
- "ts-ignore"?:
+ "ts-expect-error"?:
| boolean
| "allow-with-description"
| {
descriptionFormat?: string;
};
- "ts-nocheck"?:
+ "ts-ignore"?:
| boolean
| "allow-with-description"
| {
descriptionFormat?: string;
};
- "ts-check"?:
+ "ts-nocheck"?:
| boolean
| "allow-with-description"
| {
descriptionFormat?: string;
};
- "minimumDescriptionLength"?: number;
- },
- ];
-// ----- @typescript-eslint/ban-types -----
-type TypescriptEslintBanTypes =
- | []
- | [
- {
- types?: {
- [k: string]:
- | (
- | null
- | false
- | true
- | string
- | {
- message?: string;
-
- fixWith?: string;
-
- suggest?: string[];
- }
- )
- | undefined;
- };
- extendDefaults?: boolean;
- },
- ];
-// ----- @typescript-eslint/block-spacing -----
-type TypescriptEslintBlockSpacing = [] | ["always" | "never"];
-// ----- @typescript-eslint/brace-style -----
-type TypescriptEslintBraceStyle =
- | []
- | ["1tbs" | "stroustrup" | "allman"]
- | [
- "1tbs" | "stroustrup" | "allman",
- {
- allowSingleLine?: boolean;
},
];
// ----- @typescript-eslint/class-literal-property-style -----
@@ -4120,49 +4015,13 @@ type TypescriptEslintClassMethodsUseThis =
| []
| [
{
- exceptMethods?: string[];
-
enforceForClassFields?: boolean;
- ignoreOverrideMethods?: boolean;
+ exceptMethods?: string[];
ignoreClassesThatImplementAnInterface?: boolean | "public-fields";
- },
- ];
-// ----- @typescript-eslint/comma-dangle -----
-type TypescriptEslintCommaDangle =
- | []
- | [
- | _TypescriptEslintCommaDangleValue
- | {
- arrays?: _TypescriptEslintCommaDangleValueWithIgnore;
- objects?: _TypescriptEslintCommaDangleValueWithIgnore;
- imports?: _TypescriptEslintCommaDangleValueWithIgnore;
- exports?: _TypescriptEslintCommaDangleValueWithIgnore;
- functions?: _TypescriptEslintCommaDangleValueWithIgnore;
- enums?: _TypescriptEslintCommaDangleValueWithIgnore;
- generics?: _TypescriptEslintCommaDangleValueWithIgnore;
- tuples?: _TypescriptEslintCommaDangleValueWithIgnore;
- },
- ];
-type _TypescriptEslintCommaDangleValue =
- | "always-multiline"
- | "always"
- | "never"
- | "only-multiline";
-type _TypescriptEslintCommaDangleValueWithIgnore =
- | "always-multiline"
- | "always"
- | "never"
- | "only-multiline"
- | "ignore";
-// ----- @typescript-eslint/comma-spacing -----
-type TypescriptEslintCommaSpacing =
- | []
- | [
- {
- before?: boolean;
- after?: boolean;
+
+ ignoreOverrideMethods?: boolean;
},
];
// ----- @typescript-eslint/consistent-generic-constructors -----
@@ -4190,6 +4049,7 @@ type TypescriptEslintConsistentTypeAssertions =
}
| {
assertionStyle: "as" | "angle-bracket";
+
objectLiteralTypeAssertions?:
| "allow"
| "allow-as-parameter"
@@ -4212,7 +4072,9 @@ type TypescriptEslintConsistentTypeImports =
| [
{
disallowTypeAnnotations?: boolean;
+
fixStyle?: "separate-type-imports" | "inline-type-imports";
+
prefer?: "type-imports" | "no-type-imports";
},
];
@@ -4221,11 +4083,15 @@ type TypescriptEslintDotNotation =
| []
| [
{
+ allowIndexSignaturePropertyAccess?: boolean;
+
allowKeywords?: boolean;
+
allowPattern?: string;
+
allowPrivateClassPropertyAccess?: boolean;
+
allowProtectedClassPropertyAccess?: boolean;
- allowIndexSignaturePropertyAccess?: boolean;
},
];
// ----- @typescript-eslint/explicit-function-return-type -----
@@ -4235,19 +4101,19 @@ type TypescriptEslintExplicitFunctionReturnType =
{
allowConciseArrowFunctionExpressionsStartingWithVoid?: boolean;
- allowExpressions?: boolean;
-
- allowHigherOrderFunctions?: boolean;
+ allowDirectConstAssertionInArrowFunctions?: boolean;
- allowTypedFunctionExpressions?: boolean;
+ allowedNames?: string[];
- allowDirectConstAssertionInArrowFunctions?: boolean;
+ allowExpressions?: boolean;
allowFunctionsWithoutTypeParameters?: boolean;
- allowedNames?: string[];
+ allowHigherOrderFunctions?: boolean;
allowIIFEs?: boolean;
+
+ allowTypedFunctionExpressions?: boolean;
},
];
// ----- @typescript-eslint/explicit-member-accessibility -----
@@ -4256,14 +4122,16 @@ type TypescriptEslintExplicitMemberAccessibility =
| [
{
accessibility?: "explicit" | "no-public" | "off";
+
+ ignoredMethodNames?: string[];
+
overrides?: {
accessors?: "explicit" | "no-public" | "off";
constructors?: "explicit" | "no-public" | "off";
methods?: "explicit" | "no-public" | "off";
- properties?: "explicit" | "no-public" | "off";
parameterProperties?: "explicit" | "no-public" | "off";
+ properties?: "explicit" | "no-public" | "off";
};
- ignoredMethodNames?: string[];
},
];
// ----- @typescript-eslint/explicit-module-boundary-types -----
@@ -4282,531 +4150,36 @@ type TypescriptEslintExplicitModuleBoundaryTypes =
allowTypedFunctionExpressions?: boolean;
},
];
-// ----- @typescript-eslint/func-call-spacing -----
-type TypescriptEslintFuncCallSpacing =
+// ----- @typescript-eslint/init-declarations -----
+type TypescriptEslintInitDeclarations =
+ | []
+ | ["always"]
| []
| ["never"]
+ | [
+ "never",
+ {
+ ignoreForLoopInit?: boolean;
+ },
+ ];
+// ----- @typescript-eslint/max-params -----
+type TypescriptEslintMaxParams =
| []
- | ["always"]
| [
- "always",
{
- allowNewlines?: boolean;
+ countVoidThis?: boolean;
+
+ max?: number;
+
+ maximum?: number;
},
];
-// ----- @typescript-eslint/indent -----
-type TypescriptEslintIndent =
+// ----- @typescript-eslint/member-ordering -----
+type TypescriptEslintMemberOrdering =
| []
- | ["tab" | number]
| [
- "tab" | number,
{
- SwitchCase?: number;
- VariableDeclarator?:
- | (number | ("first" | "off"))
- | {
- var?: number | ("first" | "off");
- let?: number | ("first" | "off");
- const?: number | ("first" | "off");
- };
- outerIIFEBody?: number | "off";
- MemberExpression?: number | "off";
- FunctionDeclaration?: {
- parameters?: number | ("first" | "off");
- body?: number;
- };
- FunctionExpression?: {
- parameters?: number | ("first" | "off");
- body?: number;
- };
- StaticBlock?: {
- body?: number;
- };
- CallExpression?: {
- arguments?: number | ("first" | "off");
- };
- ArrayExpression?: number | ("first" | "off");
- ObjectExpression?: number | ("first" | "off");
- ImportDeclaration?: number | ("first" | "off");
- flatTernaryExpressions?: boolean;
- offsetTernaryExpressions?: boolean;
- ignoredNodes?: string[];
- ignoreComments?: boolean;
- },
- ];
-// ----- @typescript-eslint/init-declarations -----
-type TypescriptEslintInitDeclarations =
- | []
- | ["always"]
- | []
- | ["never"]
- | [
- "never",
- {
- ignoreForLoopInit?: boolean;
- },
- ];
-// ----- @typescript-eslint/key-spacing -----
-type TypescriptEslintKeySpacing =
- | []
- | [
- | {
- align?:
- | ("colon" | "value")
- | {
- mode?: "strict" | "minimum";
- on?: "colon" | "value";
- beforeColon?: boolean;
- afterColon?: boolean;
- };
- mode?: "strict" | "minimum";
- beforeColon?: boolean;
- afterColon?: boolean;
- }
- | {
- singleLine?: {
- mode?: "strict" | "minimum";
- beforeColon?: boolean;
- afterColon?: boolean;
- };
- multiLine?: {
- align?:
- | ("colon" | "value")
- | {
- mode?: "strict" | "minimum";
- on?: "colon" | "value";
- beforeColon?: boolean;
- afterColon?: boolean;
- };
- mode?: "strict" | "minimum";
- beforeColon?: boolean;
- afterColon?: boolean;
- };
- }
- | {
- singleLine?: {
- mode?: "strict" | "minimum";
- beforeColon?: boolean;
- afterColon?: boolean;
- };
- multiLine?: {
- mode?: "strict" | "minimum";
- beforeColon?: boolean;
- afterColon?: boolean;
- };
- align?: {
- mode?: "strict" | "minimum";
- on?: "colon" | "value";
- beforeColon?: boolean;
- afterColon?: boolean;
- };
- },
- ];
-// ----- @typescript-eslint/keyword-spacing -----
-type TypescriptEslintKeywordSpacing =
- | []
- | [
- {
- before?: boolean;
- after?: boolean;
- overrides?: {
- abstract?: {
- before?: boolean;
- after?: boolean;
- };
- as?: {
- before?: boolean;
- after?: boolean;
- };
- async?: {
- before?: boolean;
- after?: boolean;
- };
- await?: {
- before?: boolean;
- after?: boolean;
- };
- boolean?: {
- before?: boolean;
- after?: boolean;
- };
- break?: {
- before?: boolean;
- after?: boolean;
- };
- byte?: {
- before?: boolean;
- after?: boolean;
- };
- case?: {
- before?: boolean;
- after?: boolean;
- };
- catch?: {
- before?: boolean;
- after?: boolean;
- };
- char?: {
- before?: boolean;
- after?: boolean;
- };
- class?: {
- before?: boolean;
- after?: boolean;
- };
- const?: {
- before?: boolean;
- after?: boolean;
- };
- continue?: {
- before?: boolean;
- after?: boolean;
- };
- debugger?: {
- before?: boolean;
- after?: boolean;
- };
- default?: {
- before?: boolean;
- after?: boolean;
- };
- delete?: {
- before?: boolean;
- after?: boolean;
- };
- do?: {
- before?: boolean;
- after?: boolean;
- };
- double?: {
- before?: boolean;
- after?: boolean;
- };
- else?: {
- before?: boolean;
- after?: boolean;
- };
- enum?: {
- before?: boolean;
- after?: boolean;
- };
- export?: {
- before?: boolean;
- after?: boolean;
- };
- extends?: {
- before?: boolean;
- after?: boolean;
- };
- false?: {
- before?: boolean;
- after?: boolean;
- };
- final?: {
- before?: boolean;
- after?: boolean;
- };
- finally?: {
- before?: boolean;
- after?: boolean;
- };
- float?: {
- before?: boolean;
- after?: boolean;
- };
- for?: {
- before?: boolean;
- after?: boolean;
- };
- from?: {
- before?: boolean;
- after?: boolean;
- };
- function?: {
- before?: boolean;
- after?: boolean;
- };
- get?: {
- before?: boolean;
- after?: boolean;
- };
- goto?: {
- before?: boolean;
- after?: boolean;
- };
- if?: {
- before?: boolean;
- after?: boolean;
- };
- implements?: {
- before?: boolean;
- after?: boolean;
- };
- import?: {
- before?: boolean;
- after?: boolean;
- };
- in?: {
- before?: boolean;
- after?: boolean;
- };
- instanceof?: {
- before?: boolean;
- after?: boolean;
- };
- int?: {
- before?: boolean;
- after?: boolean;
- };
- interface?: {
- before?: boolean;
- after?: boolean;
- };
- let?: {
- before?: boolean;
- after?: boolean;
- };
- long?: {
- before?: boolean;
- after?: boolean;
- };
- native?: {
- before?: boolean;
- after?: boolean;
- };
- new?: {
- before?: boolean;
- after?: boolean;
- };
- null?: {
- before?: boolean;
- after?: boolean;
- };
- of?: {
- before?: boolean;
- after?: boolean;
- };
- package?: {
- before?: boolean;
- after?: boolean;
- };
- private?: {
- before?: boolean;
- after?: boolean;
- };
- protected?: {
- before?: boolean;
- after?: boolean;
- };
- public?: {
- before?: boolean;
- after?: boolean;
- };
- return?: {
- before?: boolean;
- after?: boolean;
- };
- set?: {
- before?: boolean;
- after?: boolean;
- };
- short?: {
- before?: boolean;
- after?: boolean;
- };
- static?: {
- before?: boolean;
- after?: boolean;
- };
- super?: {
- before?: boolean;
- after?: boolean;
- };
- switch?: {
- before?: boolean;
- after?: boolean;
- };
- synchronized?: {
- before?: boolean;
- after?: boolean;
- };
- this?: {
- before?: boolean;
- after?: boolean;
- };
- throw?: {
- before?: boolean;
- after?: boolean;
- };
- throws?: {
- before?: boolean;
- after?: boolean;
- };
- transient?: {
- before?: boolean;
- after?: boolean;
- };
- true?: {
- before?: boolean;
- after?: boolean;
- };
- try?: {
- before?: boolean;
- after?: boolean;
- };
- typeof?: {
- before?: boolean;
- after?: boolean;
- };
- var?: {
- before?: boolean;
- after?: boolean;
- };
- void?: {
- before?: boolean;
- after?: boolean;
- };
- volatile?: {
- before?: boolean;
- after?: boolean;
- };
- while?: {
- before?: boolean;
- after?: boolean;
- };
- with?: {
- before?: boolean;
- after?: boolean;
- };
- yield?: {
- before?: boolean;
- after?: boolean;
- };
- type?: {
- before?: boolean;
- after?: boolean;
- };
- };
- },
- ];
-// ----- @typescript-eslint/lines-around-comment -----
-type TypescriptEslintLinesAroundComment =
- | []
- | [
- {
- beforeBlockComment?: boolean;
- afterBlockComment?: boolean;
- beforeLineComment?: boolean;
- afterLineComment?: boolean;
- allowBlockStart?: boolean;
- allowBlockEnd?: boolean;
- allowClassStart?: boolean;
- allowClassEnd?: boolean;
- allowObjectStart?: boolean;
- allowObjectEnd?: boolean;
- allowArrayStart?: boolean;
- allowArrayEnd?: boolean;
- allowInterfaceStart?: boolean;
- allowInterfaceEnd?: boolean;
- allowTypeStart?: boolean;
- allowTypeEnd?: boolean;
- allowEnumStart?: boolean;
- allowEnumEnd?: boolean;
- allowModuleStart?: boolean;
- allowModuleEnd?: boolean;
- ignorePattern?: string;
- applyDefaultIgnorePatterns?: boolean;
- },
- ];
-// ----- @typescript-eslint/lines-between-class-members -----
-type TypescriptEslintLinesBetweenClassMembers =
- | []
- | [
- | {
- enforce: [
- {
- blankLine: "always" | "never";
- prev: "method" | "field" | "*";
- next: "method" | "field" | "*";
- },
- ...{
- blankLine: "always" | "never";
- prev: "method" | "field" | "*";
- next: "method" | "field" | "*";
- }[],
- ];
- }
- | ("always" | "never"),
- ]
- | [
- (
- | {
- enforce: [
- {
- blankLine: "always" | "never";
- prev: "method" | "field" | "*";
- next: "method" | "field" | "*";
- },
- ...{
- blankLine: "always" | "never";
- prev: "method" | "field" | "*";
- next: "method" | "field" | "*";
- }[],
- ];
- }
- | ("always" | "never")
- ),
- {
- exceptAfterSingleLine?: boolean;
- exceptAfterOverload?: boolean;
- },
- ];
-// ----- @typescript-eslint/max-params -----
-type TypescriptEslintMaxParams =
- | []
- | [
- {
- maximum?: number;
- max?: number;
- countVoidThis?: boolean;
- },
- ];
-// ----- @typescript-eslint/member-delimiter-style -----
-type TypescriptEslintMemberDelimiterStyle =
- | []
- | [
- {
- multiline?: {
- delimiter?: "none" | "semi" | "comma";
- requireLast?: boolean;
- };
- singleline?: {
- delimiter?: "semi" | "comma";
- requireLast?: boolean;
- };
- overrides?: {
- interface?: _TypescriptEslintMemberDelimiterStyle_DelimiterConfig;
- typeLiteral?: _TypescriptEslintMemberDelimiterStyle_DelimiterConfig;
- };
- multilineDetection?: "brackets" | "last-member";
- },
- ];
-interface _TypescriptEslintMemberDelimiterStyle_DelimiterConfig {
- multiline?: {
- delimiter?: "none" | "semi" | "comma";
- requireLast?: boolean;
- };
- singleline?: {
- delimiter?: "semi" | "comma";
- requireLast?: boolean;
- };
-}
-// ----- @typescript-eslint/member-ordering -----
-type TypescriptEslintMemberOrdering =
- | []
- | [
- {
- default?:
+ classes?:
| "never"
| (
| (
@@ -5435,15 +4808,15 @@ type TypescriptEslintMemberOrdering =
)[]
)[]
| "never";
+ optionalityOrder?: "optional-first" | "required-first";
order?:
| "alphabetically"
| "alphabetically-case-insensitive"
| "as-written"
| "natural"
| "natural-case-insensitive";
- optionalityOrder?: "optional-first" | "required-first";
};
- classes?:
+ classExpressions?:
| "never"
| (
| (
@@ -6072,15 +5445,15 @@ type TypescriptEslintMemberOrdering =
)[]
)[]
| "never";
+ optionalityOrder?: "optional-first" | "required-first";
order?:
| "alphabetically"
| "alphabetically-case-insensitive"
| "as-written"
| "natural"
| "natural-case-insensitive";
- optionalityOrder?: "optional-first" | "required-first";
};
- classExpressions?:
+ default?:
| "never"
| (
| (
@@ -6709,13 +6082,13 @@ type TypescriptEslintMemberOrdering =
)[]
)[]
| "never";
+ optionalityOrder?: "optional-first" | "required-first";
order?:
| "alphabetically"
| "alphabetically-case-insensitive"
| "as-written"
| "natural"
| "natural-case-insensitive";
- optionalityOrder?: "optional-first" | "required-first";
};
interfaces?:
| "never"
@@ -6758,13 +6131,13 @@ type TypescriptEslintMemberOrdering =
)[]
)[]
| "never";
+ optionalityOrder?: "optional-first" | "required-first";
order?:
| "alphabetically"
| "alphabetically-case-insensitive"
| "as-written"
| "natural"
| "natural-case-insensitive";
- optionalityOrder?: "optional-first" | "required-first";
};
typeLiterals?:
| "never"
@@ -6807,13 +6180,13 @@ type TypescriptEslintMemberOrdering =
)[]
)[]
| "never";
+ optionalityOrder?: "optional-first" | "required-first";
order?:
| "alphabetically"
| "alphabetically-case-insensitive"
| "as-written"
| "natural"
| "natural-case-insensitive";
- optionalityOrder?: "optional-first" | "required-first";
};
},
];
@@ -6846,14 +6219,33 @@ type _TypescriptEslintNamingConventionTypeModifiers =
| "array";
type TypescriptEslintNamingConvention = (
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
+ modifiers?: (
+ | "const"
+ | "readonly"
+ | "static"
+ | "public"
+ | "protected"
+ | "private"
+ | "#private"
+ | "abstract"
+ | "destructured"
+ | "global"
+ | "exported"
+ | "unused"
+ | "requiresQuotes"
+ | "override"
+ | "async"
+ | "default"
+ | "namespace"
+ )[];
selector: (
| "default"
| "variableLike"
@@ -6882,35 +6274,16 @@ type TypescriptEslintNamingConvention = (
| "typeParameter"
| "import"
)[];
- modifiers?: (
- | "const"
- | "readonly"
- | "static"
- | "public"
- | "protected"
- | "private"
- | "#private"
- | "abstract"
- | "destructured"
- | "global"
- | "exported"
- | "unused"
- | "requiresQuotes"
- | "override"
- | "async"
- | "default"
- | "namespace"
- )[];
types?: _TypescriptEslintNamingConventionTypeModifiers[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "default";
modifiers?: (
@@ -6934,25 +6307,25 @@ type TypescriptEslintNamingConvention = (
)[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "variableLike";
modifiers?: ("unused" | "async")[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "variable";
modifiers?: (
@@ -6966,38 +6339,38 @@ type TypescriptEslintNamingConvention = (
types?: _TypescriptEslintNamingConventionTypeModifiers[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "function";
modifiers?: ("exported" | "global" | "unused" | "async")[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "parameter";
modifiers?: ("destructured" | "unused")[];
types?: _TypescriptEslintNamingConventionTypeModifiers[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "memberLike";
modifiers?: (
@@ -7014,13 +6387,13 @@ type TypescriptEslintNamingConvention = (
)[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "classProperty";
modifiers?: (
@@ -7037,52 +6410,52 @@ type TypescriptEslintNamingConvention = (
types?: _TypescriptEslintNamingConventionTypeModifiers[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "objectLiteralProperty";
modifiers?: ("public" | "requiresQuotes")[];
types?: _TypescriptEslintNamingConventionTypeModifiers[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "typeProperty";
modifiers?: ("public" | "readonly" | "requiresQuotes")[];
types?: _TypescriptEslintNamingConventionTypeModifiers[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "parameterProperty";
modifiers?: ("private" | "protected" | "public" | "readonly")[];
types?: _TypescriptEslintNamingConventionTypeModifiers[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "property";
modifiers?: (
@@ -7100,13 +6473,13 @@ type TypescriptEslintNamingConvention = (
types?: _TypescriptEslintNamingConventionTypeModifiers[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "classMethod";
modifiers?: (
@@ -7122,37 +6495,37 @@ type TypescriptEslintNamingConvention = (
)[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "objectLiteralMethod";
modifiers?: ("public" | "requiresQuotes" | "async")[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "typeMethod";
modifiers?: ("public" | "requiresQuotes")[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "method";
modifiers?: (
@@ -7168,13 +6541,13 @@ type TypescriptEslintNamingConvention = (
)[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "classicAccessor";
modifiers?: (
@@ -7189,13 +6562,13 @@ type TypescriptEslintNamingConvention = (
types?: _TypescriptEslintNamingConventionTypeModifiers[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "autoAccessor";
modifiers?: (
@@ -7210,13 +6583,13 @@ type TypescriptEslintNamingConvention = (
types?: _TypescriptEslintNamingConventionTypeModifiers[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "accessor";
modifiers?: (
@@ -7231,97 +6604,97 @@ type TypescriptEslintNamingConvention = (
types?: _TypescriptEslintNamingConventionTypeModifiers[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "enumMember";
modifiers?: "requiresQuotes"[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "typeLike";
modifiers?: ("abstract" | "exported" | "unused")[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "class";
modifiers?: ("abstract" | "exported" | "unused")[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "interface";
modifiers?: ("exported" | "unused")[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "typeAlias";
modifiers?: ("exported" | "unused")[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "enum";
modifiers?: ("exported" | "unused")[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "typeParameter";
modifiers?: "unused"[];
}
| {
- format: _TypescriptEslintNamingConventionFormatOptionsConfig;
custom?: _TypescriptEslintNamingConvention_MatchRegexConfig;
+ failureMessage?: string;
+ format: _TypescriptEslintNamingConventionFormatOptionsConfig;
leadingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
- trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
prefix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
suffix?: _TypescriptEslintNamingConvention_PrefixSuffixConfig;
- failureMessage?: string;
+ trailingUnderscore?: _TypescriptEslintNamingConventionUnderscoreOptions;
filter?: string | _TypescriptEslintNamingConvention_MatchRegexConfig;
selector: "import";
modifiers?: ("default" | "namespace")[];
@@ -7345,6 +6718,7 @@ type TypescriptEslintNoConfusingVoidExpression =
| [
{
ignoreArrowShorthand?: boolean;
+
ignoreVoidOperator?: boolean;
},
];
@@ -7354,6 +6728,7 @@ type TypescriptEslintNoDuplicateTypeConstituents =
| [
{
ignoreIntersections?: boolean;
+
ignoreUnions?: boolean;
},
];
@@ -7388,35 +6763,26 @@ type TypescriptEslintNoEmptyInterface =
allowSingleExtends?: boolean;
},
];
-// ----- @typescript-eslint/no-explicit-any -----
-type TypescriptEslintNoExplicitAny =
+// ----- @typescript-eslint/no-empty-object-type -----
+type TypescriptEslintNoEmptyObjectType =
| []
| [
{
- fixToUnknown?: boolean;
+ allowInterfaces?: "always" | "never" | "with-single-extends";
- ignoreRestArgs?: boolean;
+ allowObjectTypes?: "always" | "never";
+
+ allowWithName?: string;
},
];
-// ----- @typescript-eslint/no-extra-parens -----
-type TypescriptEslintNoExtraParens =
- | []
- | ["functions"]
+// ----- @typescript-eslint/no-explicit-any -----
+type TypescriptEslintNoExplicitAny =
| []
- | ["all"]
| [
- "all",
{
- conditionalAssign?: boolean;
- ternaryOperandBinaryExpressions?: boolean;
- nestedBinaryExpressions?: boolean;
- returnAssign?: boolean;
- ignoreJSX?: "none" | "all" | "single-line" | "multi-line";
- enforceForArrowConditionals?: boolean;
- enforceForSequenceExpressions?: boolean;
- enforceForNewInMemberExpressions?: boolean;
- enforceForFunctionPrototypeMethods?: boolean;
- allowParensAfterCommentPattern?: string;
+ fixToUnknown?: boolean;
+
+ ignoreRestArgs?: boolean;
},
];
// ----- @typescript-eslint/no-extraneous-class -----
@@ -7438,9 +6804,47 @@ type TypescriptEslintNoFloatingPromises =
| []
| [
{
- ignoreVoid?: boolean;
+ allowForKnownSafeCalls?: (
+ | string
+ | {
+ from: "file";
+ name: string | [string, ...string[]];
+ path?: string;
+ }
+ | {
+ from: "lib";
+ name: string | [string, ...string[]];
+ }
+ | {
+ from: "package";
+ name: string | [string, ...string[]];
+ package: string;
+ }
+ )[];
+
+ allowForKnownSafePromises?: (
+ | string
+ | {
+ from: "file";
+ name: string | [string, ...string[]];
+ path?: string;
+ }
+ | {
+ from: "lib";
+ name: string | [string, ...string[]];
+ }
+ | {
+ from: "package";
+ name: string | [string, ...string[]];
+ package: string;
+ }
+ )[];
+
+ checkThenables?: boolean;
ignoreIIFE?: boolean;
+
+ ignoreVoid?: boolean;
},
];
// ----- @typescript-eslint/no-inferrable-types -----
@@ -7449,6 +6853,7 @@ type TypescriptEslintNoInferrableTypes =
| [
{
ignoreParameters?: boolean;
+
ignoreProperties?: boolean;
},
];
@@ -7465,8 +6870,9 @@ type TypescriptEslintNoInvalidVoidType =
| []
| [
{
- allowInGenericTypeArguments?: boolean | [string, ...string[]];
allowAsThisParameter?: boolean;
+
+ allowInGenericTypeArguments?: boolean | [string, ...string[]];
},
];
// ----- @typescript-eslint/no-magic-numbers -----
@@ -7480,9 +6886,13 @@ type TypescriptEslintNoMagicNumbers =
ignoreArrayIndexes?: boolean;
ignoreDefaultValues?: boolean;
ignoreClassFieldInitialValues?: boolean;
- ignoreNumericLiteralTypes?: boolean;
+
ignoreEnums?: boolean;
+
+ ignoreNumericLiteralTypes?: boolean;
+
ignoreReadonlyClassProperties?: boolean;
+
ignoreTypeIndexes?: boolean;
},
];
@@ -7500,16 +6910,24 @@ type TypescriptEslintNoMisusedPromises =
| [
{
checksConditionals?: boolean;
+
+ checksSpreads?: boolean;
+
checksVoidReturn?:
| boolean
| {
arguments?: boolean;
+
attributes?: boolean;
+
+ inheritedMethods?: boolean;
+
properties?: boolean;
+
returns?: boolean;
+
variables?: boolean;
};
- checksSpreads?: boolean;
},
];
// ----- @typescript-eslint/no-namespace -----
@@ -7528,6 +6946,7 @@ type TypescriptEslintNoRedeclare =
| [
{
builtinGlobals?: boolean;
+
ignoreDeclarationMerge?: boolean;
},
];
@@ -7537,6 +6956,8 @@ type TypescriptEslintNoRequireImports =
| [
{
allow?: string[];
+
+ allowAsImport?: boolean;
},
];
// ----- @typescript-eslint/no-restricted-imports -----
@@ -7578,17 +6999,44 @@ type TypescriptEslintNoRestrictedImports =
}[];
},
];
+// ----- @typescript-eslint/no-restricted-types -----
+type TypescriptEslintNoRestrictedTypes =
+ | []
+ | [
+ {
+ types?: {
+ [k: string]:
+ | (
+ | true
+ | string
+ | {
+ fixWith?: string;
+
+ message?: string;
+
+ suggest?: string[];
+ }
+ )
+ | undefined;
+ };
+ },
+ ];
// ----- @typescript-eslint/no-shadow -----
type TypescriptEslintNoShadow =
| []
| [
{
+ allow?: string[];
+
builtinGlobals?: boolean;
+
hoist?: "all" | "functions" | "never";
- allow?: string[];
+
+ ignoreFunctionTypeParameterNameValueShadow?: boolean;
+
ignoreOnInitialization?: boolean;
+
ignoreTypeValueShadow?: boolean;
- ignoreFunctionTypeParameterNameValueShadow?: boolean;
},
];
// ----- @typescript-eslint/no-this-alias -----
@@ -7601,15 +7049,6 @@ type TypescriptEslintNoThisAlias =
allowedNames?: string[];
},
];
-// ----- @typescript-eslint/no-throw-literal -----
-type TypescriptEslintNoThrowLiteral =
- | []
- | [
- {
- allowThrowingAny?: boolean;
- allowThrowingUnknown?: boolean;
- },
- ];
// ----- @typescript-eslint/no-type-alias -----
type TypescriptEslintNoTypeAlias =
| []
@@ -7628,6 +7067,8 @@ type TypescriptEslintNoTypeAlias =
allowConstructors?: "always" | "never";
+ allowGenerics?: "always" | "never";
+
allowLiterals?:
| "always"
| "never"
@@ -7648,8 +7089,6 @@ type TypescriptEslintNoTypeAlias =
| "in-unions"
| "in-intersections"
| "in-unions-and-intersections";
-
- allowGenerics?: "always" | "never";
},
];
// ----- @typescript-eslint/no-unnecessary-boolean-literal-compare -----
@@ -7657,9 +7096,9 @@ type TypescriptEslintNoUnnecessaryBooleanLiteralCompare =
| []
| [
{
- allowComparingNullableBooleansToTrue?: boolean;
-
allowComparingNullableBooleansToFalse?: boolean;
+
+ allowComparingNullableBooleansToTrue?: boolean;
},
];
// ----- @typescript-eslint/no-unnecessary-condition -----
@@ -7670,6 +7109,8 @@ type TypescriptEslintNoUnnecessaryCondition =
allowConstantLoopConditions?: boolean;
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
+
+ checkTypePredicates?: boolean;
},
];
// ----- @typescript-eslint/no-unnecessary-type-assertion -----
@@ -7697,14 +7138,25 @@ type TypescriptEslintNoUnusedVars =
| [
| ("all" | "local")
| {
- vars?: "all" | "local";
- varsIgnorePattern?: string;
args?: "all" | "after-used" | "none";
- ignoreRestSiblings?: boolean;
+
argsIgnorePattern?: string;
+
caughtErrors?: "all" | "none";
+
caughtErrorsIgnorePattern?: string;
+
destructuredArrayIgnorePattern?: string;
+
+ ignoreClassWithStaticInitBlock?: boolean;
+
+ ignoreRestSiblings?: boolean;
+
+ reportUsedIgnorePattern?: boolean;
+
+ vars?: "all" | "local";
+
+ varsIgnorePattern?: string;
},
];
// ----- @typescript-eslint/no-use-before-define -----
@@ -7713,182 +7165,39 @@ type TypescriptEslintNoUseBeforeDefine =
| [
| "nofunc"
| {
- functions?: boolean;
- classes?: boolean;
- enums?: boolean;
- variables?: boolean;
- typedefs?: boolean;
- ignoreTypeReferences?: boolean;
allowNamedExports?: boolean;
- },
- ];
-// ----- @typescript-eslint/no-var-requires -----
-type TypescriptEslintNoVarRequires =
- | []
- | [
- {
- allow?: string[];
- },
- ];
-// ----- @typescript-eslint/object-curly-spacing -----
-type TypescriptEslintObjectCurlySpacing =
- | []
- | ["always" | "never"]
- | [
- "always" | "never",
- {
- arraysInObjects?: boolean;
- objectsInObjects?: boolean;
- },
- ];
-// ----- @typescript-eslint/only-throw-error -----
-type TypescriptEslintOnlyThrowError =
- | []
- | [
- {
- allowThrowingAny?: boolean;
- allowThrowingUnknown?: boolean;
- },
- ];
-// ----- @typescript-eslint/padding-line-between-statements -----
-type _TypescriptEslintPaddingLineBetweenStatementsPaddingType =
- | "any"
- | "never"
- | "always";
-type _TypescriptEslintPaddingLineBetweenStatementsStatementType =
- | (
- | "*"
- | "block-like"
- | "exports"
- | "require"
- | "directive"
- | "expression"
- | "iife"
- | "multiline-block-like"
- | "multiline-expression"
- | "multiline-const"
- | "multiline-let"
- | "multiline-var"
- | "singleline-const"
- | "singleline-let"
- | "singleline-var"
- | "block"
- | "empty"
- | "function"
- | "break"
- | "case"
- | "class"
- | "const"
- | "continue"
- | "debugger"
- | "default"
- | "do"
- | "export"
- | "for"
- | "if"
- | "import"
- | "let"
- | "return"
- | "switch"
- | "throw"
- | "try"
- | "var"
- | "while"
- | "with"
- | "interface"
- | "type"
- )
+
+ classes?: boolean;
+
+ enums?: boolean;
+
+ functions?: boolean;
+
+ ignoreTypeReferences?: boolean;
+
+ typedefs?: boolean;
+
+ variables?: boolean;
+ },
+ ];
+// ----- @typescript-eslint/no-var-requires -----
+type TypescriptEslintNoVarRequires =
+ | []
| [
- (
- | "*"
- | "block-like"
- | "exports"
- | "require"
- | "directive"
- | "expression"
- | "iife"
- | "multiline-block-like"
- | "multiline-expression"
- | "multiline-const"
- | "multiline-let"
- | "multiline-var"
- | "singleline-const"
- | "singleline-let"
- | "singleline-var"
- | "block"
- | "empty"
- | "function"
- | "break"
- | "case"
- | "class"
- | "const"
- | "continue"
- | "debugger"
- | "default"
- | "do"
- | "export"
- | "for"
- | "if"
- | "import"
- | "let"
- | "return"
- | "switch"
- | "throw"
- | "try"
- | "var"
- | "while"
- | "with"
- | "interface"
- | "type"
- ),
- ...(
- | "*"
- | "block-like"
- | "exports"
- | "require"
- | "directive"
- | "expression"
- | "iife"
- | "multiline-block-like"
- | "multiline-expression"
- | "multiline-const"
- | "multiline-let"
- | "multiline-var"
- | "singleline-const"
- | "singleline-let"
- | "singleline-var"
- | "block"
- | "empty"
- | "function"
- | "break"
- | "case"
- | "class"
- | "const"
- | "continue"
- | "debugger"
- | "default"
- | "do"
- | "export"
- | "for"
- | "if"
- | "import"
- | "let"
- | "return"
- | "switch"
- | "throw"
- | "try"
- | "var"
- | "while"
- | "with"
- | "interface"
- | "type"
- )[],
+ {
+ allow?: string[];
+ },
+ ];
+// ----- @typescript-eslint/only-throw-error -----
+type TypescriptEslintOnlyThrowError =
+ | []
+ | [
+ {
+ allowThrowingAny?: boolean;
+
+ allowThrowingUnknown?: boolean;
+ },
];
-type TypescriptEslintPaddingLineBetweenStatements = {
- blankLine: _TypescriptEslintPaddingLineBetweenStatementsPaddingType;
- prev: _TypescriptEslintPaddingLineBetweenStatementsStatementType;
- next: _TypescriptEslintPaddingLineBetweenStatementsStatementType;
-}[];
// ----- @typescript-eslint/parameter-properties -----
type TypescriptEslintParameterProperties =
| []
@@ -7903,6 +7212,7 @@ type TypescriptEslintParameterProperties =
| "protected readonly"
| "public readonly"
)[];
+
prefer?: "class-property" | "parameter-property";
},
];
@@ -7911,11 +7221,11 @@ type TypescriptEslintPreferDestructuring =
| []
| [
| {
- VariableDeclarator?: {
+ AssignmentExpression?: {
array?: boolean;
object?: boolean;
};
- AssignmentExpression?: {
+ VariableDeclarator?: {
array?: boolean;
object?: boolean;
};
@@ -7928,11 +7238,11 @@ type TypescriptEslintPreferDestructuring =
| [
(
| {
- VariableDeclarator?: {
+ AssignmentExpression?: {
array?: boolean;
object?: boolean;
};
- AssignmentExpression?: {
+ VariableDeclarator?: {
array?: boolean;
object?: boolean;
};
@@ -7943,8 +7253,9 @@ type TypescriptEslintPreferDestructuring =
}
),
{
- enforceForRenamedProperties?: boolean;
enforceForDeclarationWithTypeAnnotation?: boolean;
+
+ enforceForRenamedProperties?: boolean;
[k: string]: unknown | undefined;
},
];
@@ -7962,17 +7273,24 @@ type TypescriptEslintPreferNullishCoalescing =
| [
{
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
+
ignoreConditionalTests?: boolean;
+
ignoreMixedLogicalExpressions?: boolean;
+
ignorePrimitives?:
| {
bigint?: boolean;
+
boolean?: boolean;
+
number?: boolean;
+
string?: boolean;
[k: string]: unknown | undefined;
}
| true;
+
ignoreTernaryTests?: boolean;
},
];
@@ -7981,21 +7299,21 @@ type TypescriptEslintPreferOptionalChain =
| []
| [
{
+ allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing?: boolean;
+
checkAny?: boolean;
- checkUnknown?: boolean;
+ checkBigInt?: boolean;
- checkString?: boolean;
+ checkBoolean?: boolean;
checkNumber?: boolean;
- checkBoolean?: boolean;
+ checkString?: boolean;
- checkBigInt?: boolean;
+ checkUnknown?: boolean;
requireNullish?: boolean;
-
- allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing?: boolean;
},
];
// ----- @typescript-eslint/prefer-promise-reject-errors -----
@@ -8036,8 +7354,11 @@ type TypescriptEslintPreferReadonlyParameterTypes =
package: string;
}
)[];
+
checkParameterProperties?: boolean;
+
ignoreInferredTypes?: boolean;
+
treatMethodsAsReadonly?: boolean;
},
];
@@ -8057,26 +7378,16 @@ type TypescriptEslintPromiseFunctionAsync =
allowAny?: boolean;
allowedPromiseNames?: string[];
+
checkArrowFunctions?: boolean;
+
checkFunctionDeclarations?: boolean;
+
checkFunctionExpressions?: boolean;
+
checkMethodDeclarations?: boolean;
},
];
-// ----- @typescript-eslint/quotes -----
-type TypescriptEslintQuotes =
- | []
- | ["single" | "double" | "backtick"]
- | [
- "single" | "double" | "backtick",
- (
- | "avoid-escape"
- | {
- avoidEscape?: boolean;
- allowTemplateLiterals?: boolean;
- }
- ),
- ];
// ----- @typescript-eslint/require-array-sort-compare -----
type TypescriptEslintRequireArraySortCompare =
| []
@@ -8121,34 +7432,45 @@ type TypescriptEslintRestrictTemplateExpressions =
allowRegExp?: boolean;
allowNever?: boolean;
+
+ allow?: (
+ | string
+ | {
+ from: "file";
+ name: string | [string, ...string[]];
+ path?: string;
+ }
+ | {
+ from: "lib";
+ name: string | [string, ...string[]];
+ }
+ | {
+ from: "package";
+ name: string | [string, ...string[]];
+ package: string;
+ }
+ )[];
},
];
// ----- @typescript-eslint/return-await -----
-type TypescriptEslintReturnAwait = [] | ["in-try-catch" | "always" | "never"];
-// ----- @typescript-eslint/semi -----
-type TypescriptEslintSemi =
- | []
- | ["never"]
- | [
- "never",
- {
- beforeStatementContinuationChars?: "always" | "any" | "never";
- },
- ]
+type TypescriptEslintReturnAwait =
| []
- | ["always"]
| [
- "always",
- {
- omitLastInOneLineBlock?: boolean;
- omitLastInOneLineClassBody?: boolean;
- },
+ (
+ | "always"
+ | "error-handling-correctness-only"
+ | "in-try-catch"
+ | "never"
+ ) &
+ string,
];
// ----- @typescript-eslint/sort-type-constituents -----
type TypescriptEslintSortTypeConstituents =
| []
| [
{
+ caseSensitive?: boolean;
+
checkIntersections?: boolean;
checkUnions?: boolean;
@@ -8169,50 +7491,28 @@ type TypescriptEslintSortTypeConstituents =
)[];
},
];
-// ----- @typescript-eslint/space-before-blocks -----
-type TypescriptEslintSpaceBeforeBlocks =
- | []
- | [
- | ("always" | "never")
- | {
- keywords?: "always" | "never" | "off";
- functions?: "always" | "never" | "off";
- classes?: "always" | "never" | "off";
- },
- ];
-// ----- @typescript-eslint/space-before-function-paren -----
-type TypescriptEslintSpaceBeforeFunctionParen =
- | []
- | [
- | ("always" | "never")
- | {
- anonymous?: "always" | "never" | "ignore";
- named?: "always" | "never" | "ignore";
- asyncArrow?: "always" | "never" | "ignore";
- },
- ];
-// ----- @typescript-eslint/space-infix-ops -----
-type TypescriptEslintSpaceInfixOps =
- | []
- | [
- {
- int32Hint?: boolean;
- },
- ];
// ----- @typescript-eslint/strict-boolean-expressions -----
type TypescriptEslintStrictBooleanExpressions =
| []
| [
{
- allowString?: boolean;
- allowNumber?: boolean;
- allowNullableObject?: boolean;
+ allowAny?: boolean;
+
allowNullableBoolean?: boolean;
- allowNullableString?: boolean;
- allowNullableNumber?: boolean;
+
allowNullableEnum?: boolean;
- allowAny?: boolean;
+
+ allowNullableNumber?: boolean;
+
+ allowNullableObject?: boolean;
+
+ allowNullableString?: boolean;
+
+ allowNumber?: boolean;
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
+
+ allowString?: boolean;
},
];
// ----- @typescript-eslint/switch-exhaustiveness-check -----
@@ -8222,6 +7522,8 @@ type TypescriptEslintSwitchExhaustivenessCheck =
{
allowDefaultCaseForExhaustiveSwitch?: boolean;
+ considerDefaultExhaustiveForUnions?: boolean;
+
requireDefaultForNonUnion?: boolean;
},
];
@@ -8231,43 +7533,31 @@ type TypescriptEslintTripleSlashReference =
| [
{
lib?: "always" | "never";
+
path?: "always" | "never";
+
types?: "always" | "never" | "prefer-import";
},
];
-// ----- @typescript-eslint/type-annotation-spacing -----
-type TypescriptEslintTypeAnnotationSpacing =
- | []
- | [
- {
- before?: boolean;
- after?: boolean;
- overrides?: {
- colon?: _TypescriptEslintTypeAnnotationSpacing_SpacingConfig;
- arrow?: _TypescriptEslintTypeAnnotationSpacing_SpacingConfig;
- variable?: _TypescriptEslintTypeAnnotationSpacing_SpacingConfig;
- parameter?: _TypescriptEslintTypeAnnotationSpacing_SpacingConfig;
- property?: _TypescriptEslintTypeAnnotationSpacing_SpacingConfig;
- returnType?: _TypescriptEslintTypeAnnotationSpacing_SpacingConfig;
- };
- },
- ];
-interface _TypescriptEslintTypeAnnotationSpacing_SpacingConfig {
- before?: boolean;
- after?: boolean;
-}
// ----- @typescript-eslint/typedef -----
type TypescriptEslintTypedef =
| []
| [
{
arrayDestructuring?: boolean;
+
arrowParameter?: boolean;
+
memberVariableDeclaration?: boolean;
+
objectDestructuring?: boolean;
+
parameter?: boolean;
+
propertyDeclaration?: boolean;
+
variableDeclaration?: boolean;
+
variableDeclarationIgnoreFunction?: boolean;
},
];