-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to ESLint 9's "flat" configuration file format.
- Loading branch information
1 parent
d31d508
commit 4660753
Showing
5 changed files
with
64 additions
and
95 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import js from "@eslint/js"; | ||
import eslintPluginJsdoc from "eslint-plugin-jsdoc"; | ||
import eslintPluginNode from "eslint-plugin-n"; | ||
import eslintPluginUnicorn from "eslint-plugin-unicorn"; | ||
|
||
export default [ | ||
js.configs.all, | ||
eslintPluginJsdoc.configs['flat/recommended'], | ||
eslintPluginNode.configs["flat/recommended"], | ||
eslintPluginUnicorn.configs["flat/all"], | ||
{ | ||
"ignores": [ | ||
"test/*/**", | ||
"webworker/markdownlint-cli2-webworker.js", | ||
"webworker/setImmediate.js" | ||
] | ||
}, | ||
{ | ||
"languageOptions": { | ||
"sourceType": "commonjs" | ||
}, | ||
"linterOptions": { | ||
"reportUnusedDisableDirectives": true | ||
}, | ||
"rules": { | ||
"capitalized-comments": "off", | ||
"complexity": "off", | ||
"guard-for-in": "off", | ||
"id-length": "off", | ||
"max-lines-per-function": "off", | ||
"max-lines": "off", | ||
"max-params": "off", | ||
"max-statements": "off", | ||
"multiline-comment-style": [ "error", "separate-lines" ], | ||
"no-console": "off", | ||
"no-magic-numbers": "off", | ||
"no-plusplus": "off", | ||
"no-ternary": "off", | ||
"no-undef-init": "off", | ||
"no-undefined": "off", | ||
"no-useless-assignment": "off", | ||
"one-var": "off", | ||
"require-atomic-updates": "off", | ||
"sort-keys": "off", | ||
"sort-imports": "off", | ||
|
||
"unicorn/no-null": "off", | ||
"unicorn/prefer-module": "off", | ||
"unicorn/prefer-string-replace-all": "off", | ||
"unicorn/prevent-abbreviations": "off" | ||
} | ||
}, | ||
{ | ||
"files": [ | ||
"**/*.mjs" | ||
], | ||
"languageOptions": { | ||
"sourceType": "module" | ||
} | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
// @ts-check | ||
|
||
/* eslint-disable n/prefer-promises/fs */ | ||
|
||
"use strict"; | ||
|
||
const fs = require("node:fs"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters