1
1
mirror of https://github.com/theoludwig/eslint-config-conventions.git synced 2024-12-18 21:45:04 +01:00

Compare commits

..

12 Commits

Author SHA1 Message Date
f258d5ab41
fix: relax @typescript-eslint/dot-notation 2024-09-28 20:10:49 +02:00
424235bd4f
docs: specify TypeScript version with ~ to avoid issues with semver 2024-09-28 18:52:46 +02:00
7486e3aab6
build(deps): update latest
BREAKING CHANGE: peerDependencies:
`@typescript-eslint/eslint-plugin@^8.3.0`
`@typescript-eslint/parser@^8.3.0`
2024-09-28 18:50:44 +02:00
12f37d01b3
feat: add @typescript-eslint/no-unnecessary-condition
BREAKING CHANGE: New rule introduced
2024-09-25 18:02:43 +02:00
6af4b4f6ac
feat: add @typescript-eslint/no-deprecated
BREAKING CHANGE: New rule introduced

Fixes #5
2024-09-25 17:52:28 +02:00
b4f1c0b8dd
feat: add @typescript-eslint/no-redundant-type-constituents
BREAKING CHANGE: New rule introduced
2024-09-25 16:44:52 +02:00
116c3c600a
feat: add @typescript-eslint/no-unsafe-declaration-merging
BREAKING CHANGE: New rule introduced
2024-09-25 16:30:23 +02:00
4115843cc1
feat: add @typescript-eslint/unbound-method
BREAKING CHANGE: New rule introduced
2024-09-25 16:22:08 +02:00
14d3e0ba30
chore: usage of projectService for tsconfig.json 2024-09-18 00:32:33 +02:00
921aacdc9b
test: easier to debug in case of failures 2024-09-18 00:29:14 +02:00
a03e2bd109
fix: relax @typescript-eslint/return-await 2024-09-18 00:26:51 +02:00
2db017e805
test: ensure we do not use deprecated rules 2024-09-18 00:20:22 +02:00
6 changed files with 147 additions and 108 deletions

View File

@ -84,7 +84,6 @@
"consistent-this": "error", "consistent-this": "error",
"default-param-last": "error", "default-param-last": "error",
"default-case-last": "error", "default-case-last": "error",
"dot-notation": ["error", { "allowKeywords": true }],
"eqeqeq": ["error", "always", { "null": "ignore" }], "eqeqeq": ["error", "always", { "null": "ignore" }],
"grouped-accessor-pairs": "error", "grouped-accessor-pairs": "error",
"new-cap": [ "new-cap": [
@ -129,7 +128,6 @@
"no-var": "error", "no-var": "error",
"no-void": ["error", { "allowAsStatement": true }], "no-void": ["error", { "allowAsStatement": true }],
"no-with": "error", "no-with": "error",
"no-return-await": "error",
"object-shorthand": ["error", "properties"], "object-shorthand": ["error", "properties"],
"one-var": ["error", { "initialized": "never" }], "one-var": ["error", { "initialized": "never" }],
"prefer-const": ["error", { "destructuring": "all" }], "prefer-const": ["error", { "destructuring": "all" }],
@ -204,8 +202,6 @@
], ],
"default-param-last": "off", "default-param-last": "off",
"@typescript-eslint/default-param-last": "error", "@typescript-eslint/default-param-last": "error",
"dot-notation": "off",
"@typescript-eslint/dot-notation": ["error", { "allowKeywords": true }],
"no-array-constructor": "off", "no-array-constructor": "off",
"@typescript-eslint/no-array-constructor": "error", "@typescript-eslint/no-array-constructor": "error",
"no-implied-eval": "off", "no-implied-eval": "off",
@ -229,6 +225,12 @@
"no-useless-constructor": "off", "no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": "error", "@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-unnecessary-template-expression": "error", "@typescript-eslint/no-unnecessary-template-expression": "error",
"@typescript-eslint/no-unnecessary-condition": [
"error",
{
"allowConstantLoopConditions": true
}
],
"@typescript-eslint/adjacent-overload-signatures": "error", "@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": [ "@typescript-eslint/array-type": [
@ -253,6 +255,7 @@
} }
], ],
"@typescript-eslint/method-signature-style": "error", "@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/naming-convention": [ "@typescript-eslint/naming-convention": [
"error", "error",
{ {
@ -263,8 +266,10 @@
} }
], ],
"@typescript-eslint/no-base-to-string": "error", "@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-deprecated": "error",
"@typescript-eslint/no-dynamic-delete": "error", "@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error", "@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-redundant-type-constituents": "error",
"@typescript-eslint/no-extraneous-class": [ "@typescript-eslint/no-extraneous-class": [
"error", "error",
{ "allowWithDecorator": true } { "allowWithDecorator": true }
@ -283,6 +288,7 @@
"@typescript-eslint/no-unnecessary-type-assertion": "error", "@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-require-imports": "error", "@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-unsafe-unary-minus": "error", "@typescript-eslint/no-unsafe-unary-minus": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-array-delete": "error", "@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/prefer-as-const": "error", "@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-function-type": "error", "@typescript-eslint/prefer-function-type": "error",
@ -314,8 +320,6 @@
"error", "error",
{ "allowNumber": true } { "allowNumber": true }
], ],
"no-return-await": "off",
"@typescript-eslint/return-await": "error",
"@typescript-eslint/strict-boolean-expressions": [ "@typescript-eslint/strict-boolean-expressions": [
"error", "error",
{ {

View File

@ -55,9 +55,9 @@ If you want to use **TypeScript**, you also need to install:
```sh ```sh
npm install --save-dev \ npm install --save-dev \
"typescript@^5.6.2" \ "typescript@~5.5.4" \
"@typescript-eslint/eslint-plugin@^8.0.0" \ "@typescript-eslint/eslint-plugin@^8.3.0" \
"@typescript-eslint/parser@^8.0.0" "@typescript-eslint/parser@^8.3.0"
``` ```
Dependencies are: Dependencies are:

View File

@ -1,6 +1,6 @@
{ {
"extends": "./index.js", "extends": "./index.js",
"parserOptions": { "parserOptions": {
"project": "./tsconfig.json" "projectService": true
} }
} }

176
package-lock.json generated
View File

@ -10,10 +10,10 @@
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@types/eslint": "8.56.12", "@types/eslint": "8.56.12",
"@types/node": "22.5.5", "@types/node": "22.7.4",
"@typescript-eslint/eslint-plugin": "8.6.0", "@typescript-eslint/eslint-plugin": "8.7.0",
"@typescript-eslint/parser": "8.6.0", "@typescript-eslint/parser": "8.7.0",
"editorconfig-checker": "5.1.8", "editorconfig-checker": "6.0.0",
"eslint": "8.57.1", "eslint": "8.57.1",
"eslint-plugin-promise": "7.1.0", "eslint-plugin-promise": "7.1.0",
"eslint-plugin-unicorn": "55.0.0", "eslint-plugin-unicorn": "55.0.0",
@ -411,13 +411,13 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@octokit/plugin-paginate-rest": { "node_modules/@octokit/plugin-paginate-rest": {
"version": "11.3.3", "version": "11.3.4",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.3.tgz", "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.4.tgz",
"integrity": "sha512-o4WRoOJZlKqEEgj+i9CpcmnByvtzoUYC6I8PD2SA95M+BJ2x8h7oLcVOg9qcowWXBOdcTRsMZiwvM3EyLm9AfA==", "integrity": "sha512-lqBHWiuI468XJ/o06Eg6hgACGXwikyHUzoYs/Y3gA1uVzPldxSeuEiCLAZRy4ovaAJozjds18ni2wgdT1oWtDQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@octokit/types": "^13.5.0" "@octokit/types": "^13.6.0"
}, },
"engines": { "engines": {
"node": ">= 18" "node": ">= 18"
@ -427,9 +427,9 @@
} }
}, },
"node_modules/@octokit/plugin-retry": { "node_modules/@octokit/plugin-retry": {
"version": "7.1.1", "version": "7.1.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-7.1.1.tgz", "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-7.1.2.tgz",
"integrity": "sha512-G9Ue+x2odcb8E1XIPhaFBnTTIrrUDfXN05iFXiqhR+SeeeDMMILcAnysOsxUpEWcQp2e5Ft397FCXTcPkiPkLw==", "integrity": "sha512-XOWnPpH2kJ5VTwozsxGurw+svB2e61aWlmk5EVIYZPwFK5F9h4cyPyj9CIKRyMXMHSwpIsI3mPOdpMmrRhe7UQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@ -478,9 +478,9 @@
} }
}, },
"node_modules/@octokit/request-error": { "node_modules/@octokit/request-error": {
"version": "6.1.4", "version": "6.1.5",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.4.tgz", "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.5.tgz",
"integrity": "sha512-VpAhIUxwhWZQImo/dWAN/NpPqqojR6PSLgLYAituLM6U+ddx9hCioFGwBr5Mi+oi5CLeJkcAs3gJ0PYYzU6wUg==", "integrity": "sha512-IlBTfGX8Yn/oFPMwSfvugfncK2EwRLjzbrpifNaMY8o/HTEAFqCA1FZxjD9cWvSKBHgrIhc4CSBIzMxiLsbzFQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@ -491,9 +491,9 @@
} }
}, },
"node_modules/@octokit/types": { "node_modules/@octokit/types": {
"version": "13.5.0", "version": "13.6.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.5.0.tgz", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.0.tgz",
"integrity": "sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ==", "integrity": "sha512-CrooV/vKCXqwLa+osmHLIMUb87brpgUqlqkPGc6iE2wCkUvTrHiXFMhAKoDDaAAYJrtKtrFTgSQTg5nObBEaew==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@ -585,9 +585,9 @@
} }
}, },
"node_modules/@semantic-release/github": { "node_modules/@semantic-release/github": {
"version": "10.3.4", "version": "10.3.5",
"resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-10.3.4.tgz", "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-10.3.5.tgz",
"integrity": "sha512-JghCkEk7e2u+iauMje8lgHH11pbtaz9yTdMn/PyfulCdBshIwpp+Mu/NR8Ml216auEUtvmBpQX5+Cth2TsVUVw==", "integrity": "sha512-svvRglGmvqvxjmDgkXhrjf0lC88oZowFhOfifTldbgX9Dzj0inEtMLaC+3/MkDEmxmaQjWmF5Q/0CMIvPNSVdQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@ -896,9 +896,9 @@
} }
}, },
"node_modules/@types/estree": { "node_modules/@types/estree": {
"version": "1.0.5", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
@ -910,9 +910,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "22.5.5", "version": "22.7.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz",
"integrity": "sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==", "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@ -927,17 +927,17 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.6.0", "version": "8.7.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.6.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz",
"integrity": "sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg==", "integrity": "sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.10.0", "@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "8.6.0", "@typescript-eslint/scope-manager": "8.7.0",
"@typescript-eslint/type-utils": "8.6.0", "@typescript-eslint/type-utils": "8.7.0",
"@typescript-eslint/utils": "8.6.0", "@typescript-eslint/utils": "8.7.0",
"@typescript-eslint/visitor-keys": "8.6.0", "@typescript-eslint/visitor-keys": "8.7.0",
"graphemer": "^1.4.0", "graphemer": "^1.4.0",
"ignore": "^5.3.1", "ignore": "^5.3.1",
"natural-compare": "^1.4.0", "natural-compare": "^1.4.0",
@ -961,16 +961,16 @@
} }
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "8.6.0", "version": "8.7.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.6.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.7.0.tgz",
"integrity": "sha512-eQcbCuA2Vmw45iGfcyG4y6rS7BhWfz9MQuk409WD47qMM+bKCGQWXxvoOs1DUp+T7UBMTtRTVT+kXr7Sh4O9Ow==", "integrity": "sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==",
"dev": true, "dev": true,
"license": "BSD-2-Clause", "license": "BSD-2-Clause",
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "8.6.0", "@typescript-eslint/scope-manager": "8.7.0",
"@typescript-eslint/types": "8.6.0", "@typescript-eslint/types": "8.7.0",
"@typescript-eslint/typescript-estree": "8.6.0", "@typescript-eslint/typescript-estree": "8.7.0",
"@typescript-eslint/visitor-keys": "8.6.0", "@typescript-eslint/visitor-keys": "8.7.0",
"debug": "^4.3.4" "debug": "^4.3.4"
}, },
"engines": { "engines": {
@ -990,14 +990,14 @@
} }
}, },
"node_modules/@typescript-eslint/scope-manager": { "node_modules/@typescript-eslint/scope-manager": {
"version": "8.6.0", "version": "8.7.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.6.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz",
"integrity": "sha512-ZuoutoS5y9UOxKvpc/GkvF4cuEmpokda4wRg64JEia27wX+PysIE9q+lzDtlHHgblwUWwo5/Qn+/WyTUvDwBHw==", "integrity": "sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.6.0", "@typescript-eslint/types": "8.7.0",
"@typescript-eslint/visitor-keys": "8.6.0" "@typescript-eslint/visitor-keys": "8.7.0"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@ -1008,14 +1008,14 @@
} }
}, },
"node_modules/@typescript-eslint/type-utils": { "node_modules/@typescript-eslint/type-utils": {
"version": "8.6.0", "version": "8.7.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.6.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz",
"integrity": "sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg==", "integrity": "sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/typescript-estree": "8.6.0", "@typescript-eslint/typescript-estree": "8.7.0",
"@typescript-eslint/utils": "8.6.0", "@typescript-eslint/utils": "8.7.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"ts-api-utils": "^1.3.0" "ts-api-utils": "^1.3.0"
}, },
@ -1033,9 +1033,9 @@
} }
}, },
"node_modules/@typescript-eslint/types": { "node_modules/@typescript-eslint/types": {
"version": "8.6.0", "version": "8.7.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.6.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.7.0.tgz",
"integrity": "sha512-rojqFZGd4MQxw33SrOy09qIDS8WEldM8JWtKQLAjf/X5mGSeEFh5ixQlxssMNyPslVIk9yzWqXCsV2eFhYrYUw==", "integrity": "sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@ -1047,14 +1047,14 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree": { "node_modules/@typescript-eslint/typescript-estree": {
"version": "8.6.0", "version": "8.7.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.6.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz",
"integrity": "sha512-MOVAzsKJIPIlLK239l5s06YXjNqpKTVhBVDnqUumQJja5+Y94V3+4VUFRA0G60y2jNnTVwRCkhyGQpavfsbq/g==", "integrity": "sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==",
"dev": true, "dev": true,
"license": "BSD-2-Clause", "license": "BSD-2-Clause",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.6.0", "@typescript-eslint/types": "8.7.0",
"@typescript-eslint/visitor-keys": "8.6.0", "@typescript-eslint/visitor-keys": "8.7.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"fast-glob": "^3.3.2", "fast-glob": "^3.3.2",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
@ -1076,16 +1076,16 @@
} }
}, },
"node_modules/@typescript-eslint/utils": { "node_modules/@typescript-eslint/utils": {
"version": "8.6.0", "version": "8.7.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.6.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.7.0.tgz",
"integrity": "sha512-eNp9cWnYf36NaOVjkEUznf6fEgVy1TWpE0o52e4wtojjBx7D1UV2WAWGzR+8Y5lVFtpMLPwNbC67T83DWSph4A==", "integrity": "sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.4.0", "@eslint-community/eslint-utils": "^4.4.0",
"@typescript-eslint/scope-manager": "8.6.0", "@typescript-eslint/scope-manager": "8.7.0",
"@typescript-eslint/types": "8.6.0", "@typescript-eslint/types": "8.7.0",
"@typescript-eslint/typescript-estree": "8.6.0" "@typescript-eslint/typescript-estree": "8.7.0"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@ -1099,13 +1099,13 @@
} }
}, },
"node_modules/@typescript-eslint/visitor-keys": { "node_modules/@typescript-eslint/visitor-keys": {
"version": "8.6.0", "version": "8.7.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.6.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz",
"integrity": "sha512-wapVFfZg9H0qOYh4grNVQiMklJGluQrOUiOhYRrQWhx7BY/+I1IYb8BczWNbbUpO+pqy0rDciv3lQH5E1bCLrg==", "integrity": "sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.6.0", "@typescript-eslint/types": "8.7.0",
"eslint-visitor-keys": "^3.4.3" "eslint-visitor-keys": "^3.4.3"
}, },
"engines": { "engines": {
@ -1321,9 +1321,9 @@
} }
}, },
"node_modules/browserslist": { "node_modules/browserslist": {
"version": "4.23.3", "version": "4.24.0",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz",
"integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@ -1341,8 +1341,8 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"caniuse-lite": "^1.0.30001646", "caniuse-lite": "^1.0.30001663",
"electron-to-chromium": "^1.5.4", "electron-to-chromium": "^1.5.28",
"node-releases": "^2.0.18", "node-releases": "^2.0.18",
"update-browserslist-db": "^1.1.0" "update-browserslist-db": "^1.1.0"
}, },
@ -1377,9 +1377,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001660", "version": "1.0.30001664",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz",
"integrity": "sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==", "integrity": "sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@ -1898,9 +1898,9 @@
} }
}, },
"node_modules/editorconfig-checker": { "node_modules/editorconfig-checker": {
"version": "5.1.8", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/editorconfig-checker/-/editorconfig-checker-5.1.8.tgz", "resolved": "https://registry.npmjs.org/editorconfig-checker/-/editorconfig-checker-6.0.0.tgz",
"integrity": "sha512-GM/qCbXA8GajSqqjXiWZN49i0nizQV5PjkVKIwWB9rtsm/pztjnBC+4dts5wW2KdrP2zyMPEltWHtWQwoCadqg==", "integrity": "sha512-uyTOwLJzR/k7ugiu7ITjCzkLKBhXeirQZ8hGlUkt1u/hq2Qu1E8EslgFZDN+lxZoQc97eiI87sUFgVILK4P+YQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
@ -1908,7 +1908,7 @@
"editorconfig-checker": "dist/index.js" "editorconfig-checker": "dist/index.js"
}, },
"engines": { "engines": {
"node": ">=18.0.0" "node": ">=20.11.0"
}, },
"funding": { "funding": {
"type": "buymeacoffee", "type": "buymeacoffee",
@ -1916,9 +1916,9 @@
} }
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.5.24", "version": "1.5.29",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.24.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz",
"integrity": "sha512-0x0wLCmpdKFCi9ulhvYZebgcPmHTkFVUfU2wzDykadkslKwT4oAmDTHEKLnlrDsMGZe4B+ksn8quZfZjYsBetA==", "integrity": "sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==",
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
@ -8137,9 +8137,9 @@
} }
}, },
"node_modules/update-browserslist-db": { "node_modules/update-browserslist-db": {
"version": "1.1.0", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz",
"integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@ -8157,8 +8157,8 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"escalade": "^3.1.2", "escalade": "^3.2.0",
"picocolors": "^1.0.1" "picocolors": "^1.1.0"
}, },
"bin": { "bin": {
"update-browserslist-db": "cli.js" "update-browserslist-db": "cli.js"

View File

@ -49,10 +49,10 @@
}, },
"devDependencies": { "devDependencies": {
"@types/eslint": "8.56.12", "@types/eslint": "8.56.12",
"@types/node": "22.5.5", "@types/node": "22.7.4",
"@typescript-eslint/eslint-plugin": "8.6.0", "@typescript-eslint/eslint-plugin": "8.7.0",
"@typescript-eslint/parser": "8.6.0", "@typescript-eslint/parser": "8.7.0",
"editorconfig-checker": "5.1.8", "editorconfig-checker": "6.0.0",
"eslint": "8.57.1", "eslint": "8.57.1",
"eslint-plugin-promise": "7.1.0", "eslint-plugin-promise": "7.1.0",
"eslint-plugin-unicorn": "55.0.0", "eslint-plugin-unicorn": "55.0.0",

View File

@ -16,8 +16,31 @@ test("ensure we validate correctly JavaScript files", async () => {
const [withErrors] = await eslint.lintFiles( const [withErrors] = await eslint.lintFiles(
"test/fixtures/javascript-with-errors.js", "test/fixtures/javascript-with-errors.js",
) )
assert.strictEqual(noErrors?.errorCount, 0) assert.strictEqual(noErrors?.errorCount, 0, JSON.stringify(noErrors, null, 2))
assert.strictEqual(withErrors?.errorCount, 3) assert.strictEqual(
withErrors?.errorCount,
3,
JSON.stringify(withErrors, null, 2),
)
})
test("ensure we do not use deprecated rules", async () => {
const [javascriptLintResult] = await eslint.lintFiles(
"test/fixtures/javascript-no-errors.js",
)
const [typescriptLintResult] = await eslint.lintFiles(
"test/fixtures/typescript-no-errors.ts",
)
assert.strictEqual(
javascriptLintResult.usedDeprecatedRules.length,
0,
JSON.stringify(javascriptLintResult, null, 2),
)
assert.strictEqual(
typescriptLintResult.usedDeprecatedRules.length,
0,
JSON.stringify(typescriptLintResult, null, 2),
)
}) })
test("ensure we validate correctly TypeScript files", async () => { test("ensure we validate correctly TypeScript files", async () => {
@ -27,20 +50,32 @@ test("ensure we validate correctly TypeScript files", async () => {
const [withErrors] = await eslint.lintFiles( const [withErrors] = await eslint.lintFiles(
"test/fixtures/javascript-with-errors.js", "test/fixtures/javascript-with-errors.js",
) )
assert.strictEqual(noErrors?.errorCount, 0) assert.strictEqual(noErrors?.errorCount, 0, JSON.stringify(noErrors, null, 2))
assert.strictEqual(withErrors?.errorCount, 3) assert.strictEqual(
withErrors?.errorCount,
3,
JSON.stringify(withErrors, null, 2),
)
}) })
test("ensure we allow top-level await", async () => { test("ensure we allow top-level await", async () => {
const [lintResult] = await eslint.lintFiles( const [lintResult] = await eslint.lintFiles(
"test/fixtures/top-level-await.mjs", "test/fixtures/top-level-await.mjs",
) )
assert.strictEqual(lintResult?.errorCount, 0) assert.strictEqual(
lintResult?.errorCount,
0,
JSON.stringify(lintResult, null, 2),
)
}) })
test("ensure we allow to ignore floating promise with void operator (@typescript-eslint/no-floating-promises)", async () => { test("ensure we allow to ignore floating promise with void operator (@typescript-eslint/no-floating-promises)", async () => {
const [lintResult] = await eslint.lintFiles( const [lintResult] = await eslint.lintFiles(
"test/fixtures/typescript-no-errors-ignore-promise.ts", "test/fixtures/typescript-no-errors-ignore-promise.ts",
) )
assert.strictEqual(lintResult?.errorCount, 0) assert.strictEqual(
lintResult?.errorCount,
0,
JSON.stringify(lintResult, null, 2),
)
}) })