Skip to content

Commit

Permalink
chore: update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
thepiwo committed Nov 25, 2024
1 parent ef569b9 commit db4f3e5
Show file tree
Hide file tree
Showing 7 changed files with 436 additions and 429 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

23 changes: 0 additions & 23 deletions .eslintrc.json

This file was deleted.

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

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: [
"tests/**/*",
"src/init/artifacts/test/**/*",
"src/init/update-artifacts/test/**/*",
"build/**/*",
],
},
...compat.extends("plugin:prettier/recommended", "eslint:recommended"),
{
plugins: { vitest },
languageOptions: {
globals: {
...globals.node,
...vitest.environments.env.globals,
},
parser: babelParser,
ecmaVersion: 2020,
sourceType: "module",
parserOptions: {
requireConfigFile: false,
project: "./tsconfig.json",
ecmaFeatures: {
modules: true,
},
},
},
rules: {
...vitest.configs.recommended.rules,
"@typescript-eslint/no-use-before-define": "off",
"no-use-before-define": "off",
},
},
];
Loading

0 comments on commit db4f3e5

Please sign in to comment.