Skip to content

Commit

Permalink
Update dependency eslint to v9 (#367)
Browse files Browse the repository at this point in the history
ESLint 9.x introduced a new format for the configuration file. The old
configuration file has been migrated to the new format using the guide
and provided CLI[^1].

[^1]: https://eslint.org/docs/latest/use/configure/migration-guide#migrate-your-config-file

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jan David <[email protected]>
  • Loading branch information
renovate[bot] and jdno authored Oct 21, 2024
1 parent f071dd8 commit a01cf34
Show file tree
Hide file tree
Showing 4 changed files with 285 additions and 256 deletions.
18 changes: 0 additions & 18 deletions .eslintrc.json

This file was deleted.

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

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

parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
},

rules: {},
},
];
Loading

0 comments on commit a01cf34

Please sign in to comment.