Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLINT Upgraded Eslint #262

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading