Skip to content

Commit

Permalink
Merge pull request #2093 from timbeadle/build/eslint-flat-config
Browse files Browse the repository at this point in the history
build: eslint flat config
  • Loading branch information
timbeadle authored Aug 5, 2024
2 parents 4e4912c + acfb8fc commit ee4c414
Show file tree
Hide file tree
Showing 4 changed files with 225 additions and 52 deletions.
14 changes: 0 additions & 14 deletions .eslintrc.yml

This file was deleted.

31 changes: 31 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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 [...compat.extends("xo"), {
languageOptions: {
globals: {
...globals.browser,
},

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

rules: {
"arrow-parens": 0,
"object-curly-spacing": 0,
},
}, {
files: ["**/*.spec.js"],
}];
Loading

0 comments on commit ee4c414

Please sign in to comment.