Skip to content

Commit

Permalink
Update ESLint (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
EFanZh authored Oct 1, 2024
1 parent 6713f7a commit 0d79d86
Show file tree
Hide file tree
Showing 25 changed files with 636 additions and 1,417 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.json

This file was deleted.

47 changes: 47 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import esLintJs from "@eslint/js";
import eslintTs from "typescript-eslint";

export default [
esLintJs.configs.recommended,
...eslintTs.configs.strictTypeChecked,
...eslintTs.configs.stylisticTypeChecked,
{
files: ["**/*.ts"],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/explicit-member-accessibility": "warn",
"@typescript-eslint/no-confusing-void-expression": "off", // Temporary.
"@typescript-eslint/no-floating-promises": "off", // Temporary.
"@typescript-eslint/no-invalid-void-type": "off", // Temporary.
"@typescript-eslint/no-misused-promises": "off", // Temporary.
"@typescript-eslint/no-unnecessary-condition": "off", // Temporary.
"@typescript-eslint/require-await": "off", // Temporary.
"@typescript-eslint/restrict-plus-operands": "off", // Temporary.
"@typescript-eslint/restrict-template-expressions": "off", // Temporary.
"no-duplicate-imports": "warn",
"no-multi-spaces": "warn",
"no-multiple-empty-lines": [
"warn",
{
max: 1,
},
],
"padded-blocks": ["warn", "never"],
quotes: [
"warn",
"double",
{
avoidEscape: true,
},
],
semi: "warn",
"sort-imports": "warn",
},
},
];
Loading

0 comments on commit 0d79d86

Please sign in to comment.