Skip to content

Commit

Permalink
Migrate eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
crypticmind committed Jul 2, 2024
1 parent 3ba2233 commit 7a56636
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 20 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

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

This file was deleted.

34 changes: 34 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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.node,
...globals.jest,
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},

ecmaVersion: 2018,
sourceType: "commonjs",
},

rules: {
indent: 2,
},
}];

0 comments on commit 7a56636

Please sign in to comment.