Skip to content

Commit

Permalink
Upgrade eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
nvuillam committed Aug 23, 2024
1 parent 973f3e2 commit 3fbb095
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 46 deletions.
46 changes: 46 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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 [...compat.extends("eslint:recommended"), {
languageOptions: {
globals: {
...globals.browser,
Atomics: "readonly",
SharedArrayBuffer: "readonly",
module: true,
require: true,
process: true,
__dirname: true,
describe: true,
it: true,
globalThis: true,
beforeEach: true,
app: true,
Tablesort: true,
},

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

parserOptions: {
requireConfigFile: false,
},
},

rules: {
indent: "off",
},
}];
79 changes: 33 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@
"devDependencies": {
"@babel/core": "^7.23.2",
"@babel/eslint-parser": "^7.22.15",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.9.1",
"adm-zip": "^0.5.10",
"diff": "^5.0.0",
"eslint": "^9.0.0",
"globals": "^15.9.0",
"handlebars": "^4.7.8",
"mocha": "^10.2.0",
"npm-run-all2": "^6.0.0",
Expand Down

0 comments on commit 3fbb095

Please sign in to comment.