Skip to content

Commit

Permalink
ESLINT Upgraded Eslint (#262)
Browse files Browse the repository at this point in the history
* ESLINT Upgraded Eslint

* ESLINT Cleanup

* ESLINT Cleanup

---------

Co-authored-by: Hangjit Rai <hangjit.rai@outlook.com>
  • Loading branch information
hangjit-domain and hrai committed Jul 9, 2024
1 parent 4d1103b commit 14411a0
Show file tree
Hide file tree
Showing 9 changed files with 25,007 additions and 1,285 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

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

This file was deleted.

7 changes: 7 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/bash

# Bash sets the BASH environment variable, so if it is not set, then we
# are running in a different shell, so manually run ourselves in BASH.
if [ -z "${BASH:-}" ]; then
exec bash "$0" "$@"
fi

# Include any branches for which you wish to disable this script
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop staging test)
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v21.1.0
v20.15.0
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 14411a0

Please sign in to comment.