Skip to content

Commit

Permalink
➕ bump eslint version. See #192
Browse files Browse the repository at this point in the history
  • Loading branch information
ebullient committed Oct 7, 2024
1 parent 2f9d5d9 commit 6559b2e
Show file tree
Hide file tree
Showing 4 changed files with 487 additions and 720 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

46 changes: 46 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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 [...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
), {
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
parser: tsParser,
ecmaVersion: 5,
sourceType: "module",
},

rules: {
"@typescript-eslint/no-unused-vars": ["error", {
args: "none",
varsIgnorePattern: "_",
}],

"@typescript-eslint/ban-ts-comment": "off",
"no-prototype-builtins": "off",
"@typescript-eslint/no-empty-function": "off",

"@typescript-eslint/no-this-alias": ["error", {
allowDestructuring: false,
allowedNames: ["self"],
}],
},
}];
Loading

0 comments on commit 6559b2e

Please sign in to comment.