Skip to content

Commit

Permalink
Upgrade ESLint.
Browse files Browse the repository at this point in the history
  • Loading branch information
nosferatu500 committed Aug 26, 2024
1 parent 630150e commit ad62245
Show file tree
Hide file tree
Showing 4 changed files with 253 additions and 293 deletions.
18 changes: 0 additions & 18 deletions .eslintrc.json

This file was deleted.

42 changes: 42 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
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 [
{
ignores: ['node_modules/**'],
},
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
), {
plugins: {
"@typescript-eslint": typescriptEslint,
},
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parser: tsParser,
ecmaVersion: 5,
sourceType: "script",

parserOptions: {
project: true,
},
},

rules: {
"@typescript-eslint/no-explicit-any": "off",
},
}];
Loading

0 comments on commit ad62245

Please sign in to comment.