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

Update eslint #36

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
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