Skip to content

Commit

Permalink
⬆️ Upgrade to ESLint 9 (#25)
Browse files Browse the repository at this point in the history
* ⬆️ Upgrade to ESLint 9

* 🔧 Lint eslint.config.js
  • Loading branch information
NatoBoram authored Jun 3, 2024
1 parent a4abc9a commit 4481516
Show file tree
Hide file tree
Showing 6 changed files with 1,467 additions and 1,277 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

43 changes: 0 additions & 43 deletions .eslintrc.yaml

This file was deleted.

69 changes: 69 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import eslint from "@eslint/js"
import prettier from "eslint-config-prettier"
import tseslint from "typescript-eslint"

export default tseslint.config(
{
languageOptions: {
parserOptions: { project: "./tsconfig.eslint.json" },
},
},

// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
prettier,

{
rules: {
"@typescript-eslint/class-methods-use-this": [
"error",
{
ignoreClassesThatImplementAnInterface: true,
ignoreOverrideMethods: true,
},
],
"@typescript-eslint/consistent-type-exports": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{ fixStyle: "separate-type-imports" },
],
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{ accessibility: "no-public" },
],
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/prefer-nullish-coalescing": [
"error",
{ ignorePrimitives: true },
],
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/promise-function-async": [
"error",
{ checkArrowFunctions: false },
],
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/return-await": "error",
"@typescript-eslint/sort-type-constituents": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"func-style": ["error", "declaration"],
},
},
{
ignores: [
".pnpm-store/",
"dist/",
"docs/",
"node_modules/",
"package-lock.json",
"pnpm-lock.yaml",
],
},
)
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"test:watch": "vitest --watch"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"eslint": "^8.57.0",
"@eslint/js": "^9.4.0",
"eslint": "^9.4.0",
"eslint-config-prettier": "^9.1.0",
"openai": "^4.29.2",
"prettier": "^3.1.0",
"typedoc": "^0.25.12",
"typescript": "^5.4.3",
"typescript-eslint": "^7.12.0",
"vite": "^5.2.6",
"vitest": "^1.4.0"
},
Expand Down
Loading

0 comments on commit 4481516

Please sign in to comment.