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

View File

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

View File

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

176
package-lock.json generated
View File

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

View File

@ -49,10 +49,10 @@
},
"devDependencies": {
"@types/eslint": "8.56.12",
"@types/node": "22.7.4",
"@typescript-eslint/eslint-plugin": "8.7.0",
"@typescript-eslint/parser": "8.7.0",
"editorconfig-checker": "6.0.0",
"@types/node": "22.5.5",
"@typescript-eslint/eslint-plugin": "8.6.0",
"@typescript-eslint/parser": "8.6.0",
"editorconfig-checker": "5.1.8",
"eslint": "8.57.1",
"eslint-plugin-promise": "7.1.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(
"test/fixtures/javascript-with-errors.js",
)
assert.strictEqual(noErrors?.errorCount, 0, JSON.stringify(noErrors, null, 2))
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),
)
assert.strictEqual(noErrors?.errorCount, 0)
assert.strictEqual(withErrors?.errorCount, 3)
})
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(
"test/fixtures/javascript-with-errors.js",
)
assert.strictEqual(noErrors?.errorCount, 0, JSON.stringify(noErrors, null, 2))
assert.strictEqual(
withErrors?.errorCount,
3,
JSON.stringify(withErrors, null, 2),
)
assert.strictEqual(noErrors?.errorCount, 0)
assert.strictEqual(withErrors?.errorCount, 3)
})
test("ensure we allow top-level await", async () => {
const [lintResult] = await eslint.lintFiles(
"test/fixtures/top-level-await.mjs",
)
assert.strictEqual(
lintResult?.errorCount,
0,
JSON.stringify(lintResult, null, 2),
)
assert.strictEqual(lintResult?.errorCount, 0)
})
test("ensure we allow to ignore floating promise with void operator (@typescript-eslint/no-floating-promises)", async () => {
const [lintResult] = await eslint.lintFiles(
"test/fixtures/typescript-no-errors-ignore-promise.ts",
)
assert.strictEqual(
lintResult?.errorCount,
0,
JSON.stringify(lintResult, null, 2),
)
assert.strictEqual(lintResult?.errorCount, 0)
})