Skip to content

Commit

Permalink
Migrate from .eslintignore to eslint.config.js file
Browse files Browse the repository at this point in the history
.eslintignore is now deprecated, so I have migrated that file to eslint.config.js as per https://eslint.org/docs/latest/use/configure/migration-guide
  • Loading branch information
patrickjfl authored and jdudley1123 committed Sep 27, 2024
1 parent 968e49a commit fba86ec
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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: ["log/", "tmp/", "vendor/", "public/assets", "coverage"],
}, ...compat.extends("eslint:recommended", "prettier"), {
languageOptions: {
globals: {
...globals.browser,
},
},
}];

0 comments on commit fba86ec

Please sign in to comment.