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

Compare commits

..

No commits in common. "f258d5ab415aa7b4db0b6d5aa676c56a0ca10e11" and "19f74fc6a2e42754e9c67349b199d32a4f77619a" have entirely different histories.

6 changed files with 108 additions and 147 deletions

View File

@ -84,6 +84,7 @@
"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": [
@ -128,6 +129,7 @@
"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" }],
@ -202,6 +204,8 @@
], ],
"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",
@ -225,12 +229,6 @@
"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": [
@ -255,7 +253,6 @@
} }
], ],
"@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",
{ {
@ -266,10 +263,8 @@
} }
], ],
"@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 }
@ -288,7 +283,6 @@
"@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",
@ -320,6 +314,8 @@
"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.5.4" \ "typescript@^5.6.2" \
"@typescript-eslint/eslint-plugin@^8.3.0" \ "@typescript-eslint/eslint-plugin@^8.0.0" \
"@typescript-eslint/parser@^8.3.0" "@typescript-eslint/parser@^8.0.0"
``` ```
Dependencies are: Dependencies are:

View File

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

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.7.4", "@types/node": "22.5.5",
"@typescript-eslint/eslint-plugin": "8.7.0", "@typescript-eslint/eslint-plugin": "8.6.0",
"@typescript-eslint/parser": "8.7.0", "@typescript-eslint/parser": "8.6.0",
"editorconfig-checker": "6.0.0", "editorconfig-checker": "5.1.8",
"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.4", "version": "11.3.3",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.4.tgz", "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.3.tgz",
"integrity": "sha512-lqBHWiuI468XJ/o06Eg6hgACGXwikyHUzoYs/Y3gA1uVzPldxSeuEiCLAZRy4ovaAJozjds18ni2wgdT1oWtDQ==", "integrity": "sha512-o4WRoOJZlKqEEgj+i9CpcmnByvtzoUYC6I8PD2SA95M+BJ2x8h7oLcVOg9qcowWXBOdcTRsMZiwvM3EyLm9AfA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@octokit/types": "^13.6.0" "@octokit/types": "^13.5.0"
}, },
"engines": { "engines": {
"node": ">= 18" "node": ">= 18"
@ -427,9 +427,9 @@
} }
}, },
"node_modules/@octokit/plugin-retry": { "node_modules/@octokit/plugin-retry": {
"version": "7.1.2", "version": "7.1.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-7.1.2.tgz", "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-7.1.1.tgz",
"integrity": "sha512-XOWnPpH2kJ5VTwozsxGurw+svB2e61aWlmk5EVIYZPwFK5F9h4cyPyj9CIKRyMXMHSwpIsI3mPOdpMmrRhe7UQ==", "integrity": "sha512-G9Ue+x2odcb8E1XIPhaFBnTTIrrUDfXN05iFXiqhR+SeeeDMMILcAnysOsxUpEWcQp2e5Ft397FCXTcPkiPkLw==",
"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.5", "version": "6.1.4",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.5.tgz", "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.4.tgz",
"integrity": "sha512-IlBTfGX8Yn/oFPMwSfvugfncK2EwRLjzbrpifNaMY8o/HTEAFqCA1FZxjD9cWvSKBHgrIhc4CSBIzMxiLsbzFQ==", "integrity": "sha512-VpAhIUxwhWZQImo/dWAN/NpPqqojR6PSLgLYAituLM6U+ddx9hCioFGwBr5Mi+oi5CLeJkcAs3gJ0PYYzU6wUg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@ -491,9 +491,9 @@
} }
}, },
"node_modules/@octokit/types": { "node_modules/@octokit/types": {
"version": "13.6.0", "version": "13.5.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.0.tgz", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.5.0.tgz",
"integrity": "sha512-CrooV/vKCXqwLa+osmHLIMUb87brpgUqlqkPGc6iE2wCkUvTrHiXFMhAKoDDaAAYJrtKtrFTgSQTg5nObBEaew==", "integrity": "sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ==",
"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.5", "version": "10.3.4",
"resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-10.3.5.tgz", "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-10.3.4.tgz",
"integrity": "sha512-svvRglGmvqvxjmDgkXhrjf0lC88oZowFhOfifTldbgX9Dzj0inEtMLaC+3/MkDEmxmaQjWmF5Q/0CMIvPNSVdQ==", "integrity": "sha512-JghCkEk7e2u+iauMje8lgHH11pbtaz9yTdMn/PyfulCdBshIwpp+Mu/NR8Ml216auEUtvmBpQX5+Cth2TsVUVw==",
"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.6", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
"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.7.4", "version": "22.5.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz",
"integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==", "integrity": "sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==",
"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.7.0", "version": "8.6.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.6.0.tgz",
"integrity": "sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==", "integrity": "sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg==",
"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.7.0", "@typescript-eslint/scope-manager": "8.6.0",
"@typescript-eslint/type-utils": "8.7.0", "@typescript-eslint/type-utils": "8.6.0",
"@typescript-eslint/utils": "8.7.0", "@typescript-eslint/utils": "8.6.0",
"@typescript-eslint/visitor-keys": "8.7.0", "@typescript-eslint/visitor-keys": "8.6.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.7.0", "version": "8.6.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.6.0.tgz",
"integrity": "sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==", "integrity": "sha512-eQcbCuA2Vmw45iGfcyG4y6rS7BhWfz9MQuk409WD47qMM+bKCGQWXxvoOs1DUp+T7UBMTtRTVT+kXr7Sh4O9Ow==",
"dev": true, "dev": true,
"license": "BSD-2-Clause", "license": "BSD-2-Clause",
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "8.7.0", "@typescript-eslint/scope-manager": "8.6.0",
"@typescript-eslint/types": "8.7.0", "@typescript-eslint/types": "8.6.0",
"@typescript-eslint/typescript-estree": "8.7.0", "@typescript-eslint/typescript-estree": "8.6.0",
"@typescript-eslint/visitor-keys": "8.7.0", "@typescript-eslint/visitor-keys": "8.6.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.7.0", "version": "8.6.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.6.0.tgz",
"integrity": "sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==", "integrity": "sha512-ZuoutoS5y9UOxKvpc/GkvF4cuEmpokda4wRg64JEia27wX+PysIE9q+lzDtlHHgblwUWwo5/Qn+/WyTUvDwBHw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.7.0", "@typescript-eslint/types": "8.6.0",
"@typescript-eslint/visitor-keys": "8.7.0" "@typescript-eslint/visitor-keys": "8.6.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.7.0", "version": "8.6.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.6.0.tgz",
"integrity": "sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==", "integrity": "sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/typescript-estree": "8.7.0", "@typescript-eslint/typescript-estree": "8.6.0",
"@typescript-eslint/utils": "8.7.0", "@typescript-eslint/utils": "8.6.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.7.0", "version": "8.6.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.6.0.tgz",
"integrity": "sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==", "integrity": "sha512-rojqFZGd4MQxw33SrOy09qIDS8WEldM8JWtKQLAjf/X5mGSeEFh5ixQlxssMNyPslVIk9yzWqXCsV2eFhYrYUw==",
"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.7.0", "version": "8.6.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.6.0.tgz",
"integrity": "sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==", "integrity": "sha512-MOVAzsKJIPIlLK239l5s06YXjNqpKTVhBVDnqUumQJja5+Y94V3+4VUFRA0G60y2jNnTVwRCkhyGQpavfsbq/g==",
"dev": true, "dev": true,
"license": "BSD-2-Clause", "license": "BSD-2-Clause",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.7.0", "@typescript-eslint/types": "8.6.0",
"@typescript-eslint/visitor-keys": "8.7.0", "@typescript-eslint/visitor-keys": "8.6.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.7.0", "version": "8.6.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.6.0.tgz",
"integrity": "sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==", "integrity": "sha512-eNp9cWnYf36NaOVjkEUznf6fEgVy1TWpE0o52e4wtojjBx7D1UV2WAWGzR+8Y5lVFtpMLPwNbC67T83DWSph4A==",
"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.7.0", "@typescript-eslint/scope-manager": "8.6.0",
"@typescript-eslint/types": "8.7.0", "@typescript-eslint/types": "8.6.0",
"@typescript-eslint/typescript-estree": "8.7.0" "@typescript-eslint/typescript-estree": "8.6.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.7.0", "version": "8.6.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.6.0.tgz",
"integrity": "sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==", "integrity": "sha512-wapVFfZg9H0qOYh4grNVQiMklJGluQrOUiOhYRrQWhx7BY/+I1IYb8BczWNbbUpO+pqy0rDciv3lQH5E1bCLrg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.7.0", "@typescript-eslint/types": "8.6.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.24.0", "version": "4.23.3",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz",
"integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@ -1341,8 +1341,8 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"caniuse-lite": "^1.0.30001663", "caniuse-lite": "^1.0.30001646",
"electron-to-chromium": "^1.5.28", "electron-to-chromium": "^1.5.4",
"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.30001664", "version": "1.0.30001660",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz",
"integrity": "sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==", "integrity": "sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@ -1898,9 +1898,9 @@
} }
}, },
"node_modules/editorconfig-checker": { "node_modules/editorconfig-checker": {
"version": "6.0.0", "version": "5.1.8",
"resolved": "https://registry.npmjs.org/editorconfig-checker/-/editorconfig-checker-6.0.0.tgz", "resolved": "https://registry.npmjs.org/editorconfig-checker/-/editorconfig-checker-5.1.8.tgz",
"integrity": "sha512-uyTOwLJzR/k7ugiu7ITjCzkLKBhXeirQZ8hGlUkt1u/hq2Qu1E8EslgFZDN+lxZoQc97eiI87sUFgVILK4P+YQ==", "integrity": "sha512-GM/qCbXA8GajSqqjXiWZN49i0nizQV5PjkVKIwWB9rtsm/pztjnBC+4dts5wW2KdrP2zyMPEltWHtWQwoCadqg==",
"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": ">=20.11.0" "node": ">=18.0.0"
}, },
"funding": { "funding": {
"type": "buymeacoffee", "type": "buymeacoffee",
@ -1916,9 +1916,9 @@
} }
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.5.29", "version": "1.5.24",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.24.tgz",
"integrity": "sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==", "integrity": "sha512-0x0wLCmpdKFCi9ulhvYZebgcPmHTkFVUfU2wzDykadkslKwT4oAmDTHEKLnlrDsMGZe4B+ksn8quZfZjYsBetA==",
"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.1", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz",
"integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@ -8157,8 +8157,8 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"escalade": "^3.2.0", "escalade": "^3.1.2",
"picocolors": "^1.1.0" "picocolors": "^1.0.1"
}, },
"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.7.4", "@types/node": "22.5.5",
"@typescript-eslint/eslint-plugin": "8.7.0", "@typescript-eslint/eslint-plugin": "8.6.0",
"@typescript-eslint/parser": "8.7.0", "@typescript-eslint/parser": "8.6.0",
"editorconfig-checker": "6.0.0", "editorconfig-checker": "5.1.8",
"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,31 +16,8 @@ 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, JSON.stringify(noErrors, null, 2)) assert.strictEqual(noErrors?.errorCount, 0)
assert.strictEqual( assert.strictEqual(withErrors?.errorCount, 3)
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 () => {
@ -50,32 +27,20 @@ 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, JSON.stringify(noErrors, null, 2)) assert.strictEqual(noErrors?.errorCount, 0)
assert.strictEqual( assert.strictEqual(withErrors?.errorCount, 3)
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( assert.strictEqual(lintResult?.errorCount, 0)
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( assert.strictEqual(lintResult?.errorCount, 0)
lintResult?.errorCount,
0,
JSON.stringify(lintResult, null, 2),
)
}) })