Skip to content

Commit

Permalink
Merge pull request #139 from babel/eslint-9
Browse files Browse the repository at this point in the history
Update to ESLint 9
  • Loading branch information
jviereck authored Sep 13, 2024
2 parents 38b304d + 2c97fe9 commit 0ae5fbe
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 19 deletions.
17 changes: 0 additions & 17 deletions .eslintrc.js

This file was deleted.

39 changes: 39 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import globals from "globals";
import js from "@eslint/js";

export default [
{
files: ["**/*.js", "**/*.mjs"],
},
js.configs.recommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},

rules: {
indent: [
"warn",
2,
{
SwitchCase: 1,
},
],

"space-infix-ops": [
"warn",
{
int32Hint: false,
},
],

"no-cond-assign": ["off"],
"no-useless-escape": ["off"],
"no-empty": ["off"],
"no-unused-vars": ["error", { "caughtErrors": "none" }],
},
},
];
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"url": "[email protected]:jviereck/regjsparser.git"
},
"scripts": {
"lint": "eslint --ext .js --max-warnings 0 .",
"lint": "eslint --max-warnings 0 .",
"test": "run-p test:* && npm run lint",
"test:src": "node test/index.js",
"test:types": "tsc test/types.ts --noEmit"
Expand All @@ -28,7 +28,8 @@
"jsesc": "~0.5.0"
},
"devDependencies": {
"eslint": "^8.8.0",
"eslint": "^9.10.0",
"globals": "^15.9.0",
"npm-run-all": "^4.1.5",
"regenerate": "~1.0.1",
"typescript": "^4.5.2",
Expand Down

0 comments on commit 0ae5fbe

Please sign in to comment.