Skip to content

Commit

Permalink
ESLINT Upgraded Eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
hrai committed Jul 8, 2024
1 parent 589bbd9 commit 759e7f3
Show file tree
Hide file tree
Showing 7 changed files with 25,035 additions and 1,297 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

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

This file was deleted.

49 changes: 49 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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";

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: [
"distribution/dependencies/*.css",
"distribution/dependencies/*.js",
"**/lib/",
"**/jest.config.js",
"**/test-env.js",
],
}, ...compat.extends("eslint:recommended"), {
languageOptions: {
globals: {
...globals.jest,
...globals.browser,
...globals.webextensions,
...globals.jquery,
...globals.node,
},

parser: babelParser,
ecmaVersion: 7,
sourceType: "module",

parserOptions: {
ecmaFeatures: {
modules: true,
},
},
},

rules: {
"linebreak-style": ["error", "unix"],
"no-console": "off",
},
}];
Loading

0 comments on commit 759e7f3

Please sign in to comment.