Skip to content

Commit

Permalink
dependency: update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
MeilCli committed Nov 23, 2024
1 parent 2942d81 commit e7ed383
Show file tree
Hide file tree
Showing 5 changed files with 647 additions and 679 deletions.
32 changes: 0 additions & 32 deletions .eslintrc.json

This file was deleted.

59 changes: 59 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier",
),
{
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
globals: {
...globals.node,
},

parser: tsParser,
ecmaVersion: 5,
sourceType: "module",

parserOptions: {
project: "./tsconfig.eslint.json",
},
},

rules: {
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": ["off"],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/explicit-function-return-type": "off",

"prettier/prettier": [
"error",
{
tabWidth: 4,
endOfLine: "auto",
},
],
},
},
];
Loading

0 comments on commit e7ed383

Please sign in to comment.