Skip to content

Commit

Permalink
More fixen
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgodbolt committed Nov 2, 2024
1 parent 5f31de9 commit f0c3d1c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 28 deletions.
62 changes: 35 additions & 27 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,44 +1,52 @@
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import {fileURLToPath} from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
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
allConfig: js.configs.all,
});

export default [{
ignores: ["**/dist", "test/_polyfills.js"],
}, ...compat.extends("eslint:recommended"), {
languageOptions: {
globals: {
...globals.browser,
...globals.mocha,
},

ecmaVersion: 2020,
sourceType: "module",
export default [
{
ignores: ["**/dist", "test/_polyfills.js"],
},
...compat.extends("eslint:recommended"),
{
languageOptions: {
globals: {
...globals.browser,
...globals.mocha,
},

rules: {
"no-var": "error",
semi: "error",
"no-control-regex": "off",
"no-unused-vars": ["error", {
"caughtErrorsIgnorePattern": "^e$"
}]
ecmaVersion: 2020,
sourceType: "module",
},

rules: {
"no-var": "error",
semi: "error",
"no-control-regex": "off",
"no-unused-vars": [
"error",
{
caughtErrorsIgnorePattern: "^e$",
},
],
},
},
}, {
files: ["**/webpack.config.js"],
{
files: ["**/webpack.config.js"],

languageOptions: {
globals: {
...globals.node,
languageOptions: {
globals: {
...globals.node,
},
},
},
}];
];
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"private": true,
"author": "",
"lint-staged": {
"*.m?js": [
"*.{mjs,js,ts}": [
"eslint --cache --fix",
"prettier --write"
],
Expand Down

0 comments on commit f0c3d1c

Please sign in to comment.