mirror of
https://github.com/DavidAnson/markdownlint-cli2-action.git
synced 2026-08-06 14:32:26 +02:00
Refactor eslint.config.mjs to use defineConfig, change eslint-plugin-n from "recommended" to "all".
This commit is contained in:
+25
-14
@@ -1,23 +1,34 @@
|
||||
// @ts-check
|
||||
|
||||
/* eslint-disable n/no-unpublished-import */
|
||||
|
||||
import { defineConfig } from "eslint/config";
|
||||
import js from "@eslint/js";
|
||||
import eslintPluginNode from "eslint-plugin-n";
|
||||
import eslintPluginN from "eslint-plugin-n";
|
||||
import eslintPluginStylistic from "@stylistic/eslint-plugin";
|
||||
import eslintPluginUnicorn from "eslint-plugin-unicorn";
|
||||
|
||||
export default [
|
||||
js.configs.all,
|
||||
eslintPluginNode.configs["flat/recommended"],
|
||||
eslintPluginStylistic.configs.customize({
|
||||
"arrowParens": true,
|
||||
"commaDangle": "never",
|
||||
"jsx": false,
|
||||
"quoteProps": "always",
|
||||
"quotes": "double",
|
||||
"semi": true
|
||||
}),
|
||||
eslintPluginUnicorn.configs.all,
|
||||
export default defineConfig(
|
||||
{
|
||||
"plugins": {
|
||||
js,
|
||||
"n": eslintPluginN,
|
||||
"unicorn": eslintPluginUnicorn,
|
||||
"@stylistic": eslintPluginStylistic
|
||||
},
|
||||
"extends": [
|
||||
"js/all",
|
||||
"n/all",
|
||||
"unicorn/all",
|
||||
eslintPluginStylistic.configs.customize({
|
||||
"arrowParens": true,
|
||||
"commaDangle": "never",
|
||||
"jsx": false,
|
||||
"quoteProps": "always",
|
||||
"quotes": "double",
|
||||
"semi": true
|
||||
})
|
||||
],
|
||||
"linterOptions": {
|
||||
"reportUnusedDisableDirectives": true
|
||||
},
|
||||
@@ -40,4 +51,4 @@ export default [
|
||||
"unicorn/prefer-top-level-await": "off"
|
||||
}
|
||||
}
|
||||
];
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user