Skip to content

Commit

Permalink
Migrate to eslint.config.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
dkphm committed Nov 27, 2024
1 parent 099d10f commit 29ad79f
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import globals from "globals";
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: ["**/dist/"],
}, ...compat.extends("eslint:recommended"), {
languageOptions: {
globals: {
...globals.commonjs,
...globals.jest,
...globals.node,
},

ecmaVersion: 2021,
sourceType: "module",
},

rules: {},
}];

0 comments on commit 29ad79f

Please sign in to comment.