Skip to content

Commit

Permalink
Merge pull request #148 from Cyberbeni/eslint-config-update
Browse files Browse the repository at this point in the history
Migrate to new config format instead of just using FlatCompat
  • Loading branch information
Cyberbeni authored Oct 14, 2024
2 parents cd0b697 + 1cf2cdd commit 59e9268
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 93 deletions.
37 changes: 0 additions & 37 deletions eslint.config.js

This file was deleted.

32 changes: 32 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import globals from "globals"
import js from "@eslint/js"
import ts from "typescript-eslint"

export default [
js.configs.recommended,
...ts.configs.recommended,
{
files: ["src/**/*.ts"],
ignores: ["**/vendor/**/*.ts"],
languageOptions: {
parser: ts.parser,
parserOptions: {
sourceType: "script",
project: "tsconfig.json"
},
globals: {
...globals.node
}
},
plugins: {
ts: ts.plugin
},
rules: {
"max-len": ["warn", { "code": 140 }],
"indent": ["warn", "tab"],
"quotes": ["warn", "single"],
"semi": ["warn", "never"],
"ts/no-floating-promises": ["error", { "ignoreVoid": true }]
}
}
]
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"url": "github:Cyberbeni/install-swift-tool.git"
},
"scripts": {
"format": "eslint --max-warnings=0 --no-warn-ignored --fix src/**/*.ts",
"lint": "eslint --no-warn-ignored src/**/*.ts",
"format": "eslint --max-warnings=0 --fix ./src",
"lint": "eslint ./src",
"build": "ncc build --minify --out dist src/main.ts",
"test": "jest"
},
Expand All @@ -23,20 +23,18 @@
"uuid": "^10.0.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.11.1",
"@tsconfig/node20": "^20.1.4",
"@types/jest": "^29.5.13",
"@types/node": "^22.7.4",
"@types/semver": "^7.5.8",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.7.0",
"@typescript-eslint/parser": "^8.7.0",
"@vercel/ncc": "^0.38.2",
"eslint": "^9.11.1",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"ts-jest": "^29.2.5",
"typescript": "^5.6.2"
"typescript": "^5.6.2",
"typescript-eslint": "^8.8.1"
}
}
109 changes: 59 additions & 50 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -951,85 +951,85 @@
dependencies:
"@types/yargs-parser" "*"

"@typescript-eslint/eslint-plugin@^8.7.0":
version "8.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz#d0070f206daad26253bf00ca5b80f9b54f9e2dd0"
integrity sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==
"@typescript-eslint/eslint-plugin@8.9.0":
version "8.9.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.9.0.tgz#bf0b25305b0bf014b4b194a6919103d7ac2a7907"
integrity sha512-Y1n621OCy4m7/vTXNlCbMVp87zSd7NH0L9cXD8aIpOaNlzeWxIK4+Q19A68gSmTNRZn92UjocVUWDthGxtqHFg==
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.9.0"
"@typescript-eslint/type-utils" "8.9.0"
"@typescript-eslint/utils" "8.9.0"
"@typescript-eslint/visitor-keys" "8.9.0"
graphemer "^1.4.0"
ignore "^5.3.1"
natural-compare "^1.4.0"
ts-api-utils "^1.3.0"

"@typescript-eslint/parser@^8.7.0":
version "8.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.7.0.tgz#a567b0890d13db72c7348e1d88442ea8ab4e9173"
integrity sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==
"@typescript-eslint/parser@8.9.0":
version "8.9.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.9.0.tgz#0cecda6def8aef95d7c7098359c0fda5a362d6ad"
integrity sha512-U+BLn2rqTTHnc4FL3FJjxaXptTxmf9sNftJK62XLz4+GxG3hLHm/SUNaaXP5Y4uTiuYoL5YLy4JBCJe3+t8awQ==
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.9.0"
"@typescript-eslint/types" "8.9.0"
"@typescript-eslint/typescript-estree" "8.9.0"
"@typescript-eslint/visitor-keys" "8.9.0"
debug "^4.3.4"

"@typescript-eslint/scope-manager@8.7.0":
version "8.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz#90ee7bf9bc982b9260b93347c01a8bc2b595e0b8"
integrity sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==
"@typescript-eslint/scope-manager@8.9.0":
version "8.9.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.9.0.tgz#c98fef0c4a82a484e6a1eb610a55b154d14d46f3"
integrity sha512-bZu9bUud9ym1cabmOYH9S6TnbWRzpklVmwqICeOulTCZ9ue2/pczWzQvt/cGj2r2o1RdKoZbuEMalJJSYw3pHQ==
dependencies:
"@typescript-eslint/types" "8.7.0"
"@typescript-eslint/visitor-keys" "8.7.0"
"@typescript-eslint/types" "8.9.0"
"@typescript-eslint/visitor-keys" "8.9.0"

"@typescript-eslint/type-utils@8.7.0":
version "8.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz#d56b104183bdcffcc434a23d1ce26cde5e42df93"
integrity sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==
"@typescript-eslint/type-utils@8.9.0":
version "8.9.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.9.0.tgz#aa86da3e4555fe7c8b42ab75e13561c4b5a8dfeb"
integrity sha512-JD+/pCqlKqAk5961vxCluK+clkppHY07IbV3vett97KOV+8C6l+CPEPwpUuiMwgbOz/qrN3Ke4zzjqbT+ls+1Q==
dependencies:
"@typescript-eslint/typescript-estree" "8.7.0"
"@typescript-eslint/utils" "8.7.0"
"@typescript-eslint/typescript-estree" "8.9.0"
"@typescript-eslint/utils" "8.9.0"
debug "^4.3.4"
ts-api-utils "^1.3.0"

"@typescript-eslint/types@8.7.0":
version "8.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.7.0.tgz#21d987201c07b69ce7ddc03451d7196e5445ad19"
integrity sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==
"@typescript-eslint/types@8.9.0":
version "8.9.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.9.0.tgz#b733af07fb340b32e962c6c63b1062aec2dc0fe6"
integrity sha512-SjgkvdYyt1FAPhU9c6FiYCXrldwYYlIQLkuc+LfAhCna6ggp96ACncdtlbn8FmnG72tUkXclrDExOpEYf1nfJQ==

"@typescript-eslint/typescript-estree@8.7.0":
version "8.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz#6c7db6baa4380b937fa81466c546d052f362d0e8"
integrity sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==
"@typescript-eslint/typescript-estree@8.9.0":
version "8.9.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.9.0.tgz#1714f167e9063062dc0df49c1d25afcbc7a96199"
integrity sha512-9iJYTgKLDG6+iqegehc5+EqE6sqaee7kb8vWpmHZ86EqwDjmlqNNHeqDVqb9duh+BY6WCNHfIGvuVU3Tf9Db0g==
dependencies:
"@typescript-eslint/types" "8.7.0"
"@typescript-eslint/visitor-keys" "8.7.0"
"@typescript-eslint/types" "8.9.0"
"@typescript-eslint/visitor-keys" "8.9.0"
debug "^4.3.4"
fast-glob "^3.3.2"
is-glob "^4.0.3"
minimatch "^9.0.4"
semver "^7.6.0"
ts-api-utils "^1.3.0"

"@typescript-eslint/utils@8.7.0":
version "8.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.7.0.tgz#cef3f70708b5b5fd7ed8672fc14714472bd8a011"
integrity sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==
"@typescript-eslint/utils@8.9.0":
version "8.9.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.9.0.tgz#748bbe3ea5bee526d9786d9405cf1b0df081c299"
integrity sha512-PKgMmaSo/Yg/F7kIZvrgrWa1+Vwn036CdNUvYFEkYbPwOH4i8xvkaRlu148W3vtheWK9ckKRIz7PBP5oUlkrvQ==
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.9.0"
"@typescript-eslint/types" "8.9.0"
"@typescript-eslint/typescript-estree" "8.9.0"

"@typescript-eslint/visitor-keys@8.7.0":
version "8.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz#5e46f1777f9d69360a883c1a56ac3c511c9659a8"
integrity sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==
"@typescript-eslint/visitor-keys@8.9.0":
version "8.9.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.9.0.tgz#5f11f4d9db913f37da42776893ffe0dd1ae78f78"
integrity sha512-Ht4y38ubk4L5/U8xKUBfKNYGmvKvA1CANoxiTRMM+tOLk3lbF3DvzZCxJCRSE+2GdCMSh6zq9VZJc3asc1XuAA==
dependencies:
"@typescript-eslint/types" "8.7.0"
"@typescript-eslint/types" "8.9.0"
eslint-visitor-keys "^3.4.3"

"@vercel/ncc@^0.38.2":
Expand Down Expand Up @@ -3018,6 +3018,15 @@ type-fest@^0.21.3:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37"
integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==

typescript-eslint@^8.8.1:
version "8.9.0"
resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.9.0.tgz#20a9b8125c57f3de962080ebebf366697f75bf79"
integrity sha512-AuD/FXGYRQyqyOBCpNLldMlsCGvmDNxptQ3Dp58/NXeB+FqyvTfXmMyba3PYa0Vi9ybnj7G8S/yd/4Cw8y47eA==
dependencies:
"@typescript-eslint/eslint-plugin" "8.9.0"
"@typescript-eslint/parser" "8.9.0"
"@typescript-eslint/utils" "8.9.0"

typescript@^5.6.2:
version "5.6.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0"
Expand Down

0 comments on commit 59e9268

Please sign in to comment.