forked from hmarr/openai-chat-tokens
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ⬆️ Upgrade to ESLint 9 * 🔧 Lint eslint.config.js
- Loading branch information
Showing
6 changed files
with
1,467 additions
and
1,277 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
], | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.