Skip to content

Commit

Permalink
Update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuajaco committed Jul 28, 2024
1 parent 606e87f commit d2c96f0
Show file tree
Hide file tree
Showing 6 changed files with 210 additions and 227 deletions.
28 changes: 0 additions & 28 deletions .eslintrc.json

This file was deleted.

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

export default [
js.configs.recommended,
node.configs["flat/recommended"],
eslintPlugin.configs["flat/all"],
prettier,
{
languageOptions: { globals: { ...globals.mocha, ...globals.node } },
linterOptions: { reportUnusedDisableDirectives: true },
rules: {
"arrow-body-style": "error",
strict: "error",
"n/prefer-global/buffer": "error",
"n/prefer-global/console": "error",
"n/prefer-global/process": "error",
"n/prefer-global/text-decoder": "error",
"n/prefer-global/url": "error",
"n/prefer-global/url-search-params": "error",
"eslint-plugin/require-meta-docs-url": [
"error",
{
pattern:
"https://github.com/joshuajaco/eslint-plugin-workspaces/blob/main/docs/rules/{{name}}.md",
},
],
},
},
{
files: ["**/*.mjs"],
languageOptions: { sourceType: "module" },
},
];
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"scripts": {
"format": "prettier . --write",
"format:check": "prettier . --check",
"lint": "eslint . --ignore-path=.gitignore --max-warnings=0",
"lint": "eslint . --max-warnings=0",
"lint:fix": "npm run lint -- --fix",
"test": "nyc -r=lcov -r=text mocha tests --recursive --file tests/setup.js"
},
Expand All @@ -37,10 +37,12 @@
},
"devDependencies": {
"@babel/eslint-parser": "^7.25.0",
"eslint": "^8.56.0",
"@eslint/js": "^9.8.0",
"eslint": "^9.8.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-eslint-plugin": "^6.2.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-n": "^17.10.1",
"globals": "^15.8.0",
"mocha": "^10.7.0",
"nyc": "^17.0.0",
"prettier": "^3.3.3",
Expand Down
Loading

0 comments on commit d2c96f0

Please sign in to comment.