mirror of
https://github.com/DavidAnson/markdownlint-cli2-action.git
synced 2024-11-21 13:51:28 +01:00
Add @stylistic/eslint-plugin to ESLint configuration.
This commit is contained in:
parent
20384985f1
commit
235535bdb7
4 changed files with 21 additions and 7 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -57946,11 +57946,11 @@ var __webpack_exports__ = {};
|
||||||
|
|
||||||
|
|
||||||
const core = __nccwpck_require__(2186);
|
const core = __nccwpck_require__(2186);
|
||||||
const {"main": markdownlintCli2} = __nccwpck_require__(9247);
|
const { "main": markdownlintCli2 } = __nccwpck_require__(9247);
|
||||||
|
|
||||||
const logMessage = core.info;
|
const logMessage = core.info;
|
||||||
const outputFormatter = (options) => {
|
const outputFormatter = (options) => {
|
||||||
const {results} = options;
|
const { results } = options;
|
||||||
for (const lintError of results) {
|
for (const lintError of results) {
|
||||||
const {
|
const {
|
||||||
errorContext,
|
errorContext,
|
||||||
|
@ -58007,7 +58007,7 @@ const parameters = {
|
||||||
argv,
|
argv,
|
||||||
logMessage,
|
logMessage,
|
||||||
"optionsOverride": {
|
"optionsOverride": {
|
||||||
"outputFormatters": [[outputFormatter]]
|
"outputFormatters": [ [ outputFormatter ] ]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
markdownlintCli2(parameters).then(
|
markdownlintCli2(parameters).then(
|
||||||
|
|
|
@ -2,11 +2,20 @@
|
||||||
|
|
||||||
import js from "@eslint/js";
|
import js from "@eslint/js";
|
||||||
import eslintPluginNode from "eslint-plugin-n";
|
import eslintPluginNode from "eslint-plugin-n";
|
||||||
|
import eslintPluginStylistic from "@stylistic/eslint-plugin";
|
||||||
import eslintPluginUnicorn from "eslint-plugin-unicorn";
|
import eslintPluginUnicorn from "eslint-plugin-unicorn";
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
js.configs.all,
|
js.configs.all,
|
||||||
eslintPluginNode.configs["flat/recommended"],
|
eslintPluginNode.configs["flat/recommended"],
|
||||||
|
eslintPluginStylistic.configs.customize({
|
||||||
|
"arrowParens": true,
|
||||||
|
"commaDangle": "never",
|
||||||
|
"jsx": false,
|
||||||
|
"quoteProps": "always",
|
||||||
|
"quotes": "double",
|
||||||
|
"semi": true
|
||||||
|
}),
|
||||||
eslintPluginUnicorn.configs["flat/all"],
|
eslintPluginUnicorn.configs["flat/all"],
|
||||||
{
|
{
|
||||||
"languageOptions": {
|
"languageOptions": {
|
||||||
|
@ -22,7 +31,11 @@ export default [
|
||||||
"one-var": "off",
|
"one-var": "off",
|
||||||
"sort-imports": "off",
|
"sort-imports": "off",
|
||||||
"sort-keys": "off",
|
"sort-keys": "off",
|
||||||
|
|
||||||
|
"@stylistic/array-bracket-spacing": [ "error", "always" ],
|
||||||
|
"@stylistic/dot-location": [ "error", "object" ],
|
||||||
|
"@stylistic/operator-linebreak": [ "error", "after" ],
|
||||||
|
|
||||||
"unicorn/no-array-callback-reference": "off",
|
"unicorn/no-array-callback-reference": "off",
|
||||||
"unicorn/prefer-module": "off",
|
"unicorn/prefer-module": "off",
|
||||||
"unicorn/prefer-top-level-await": "off"
|
"unicorn/prefer-top-level-await": "off"
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const core = require("@actions/core");
|
const core = require("@actions/core");
|
||||||
const {"main": markdownlintCli2} = require("markdownlint-cli2");
|
const { "main": markdownlintCli2 } = require("markdownlint-cli2");
|
||||||
|
|
||||||
const logMessage = core.info;
|
const logMessage = core.info;
|
||||||
const outputFormatter = (options) => {
|
const outputFormatter = (options) => {
|
||||||
const {results} = options;
|
const { results } = options;
|
||||||
for (const lintError of results) {
|
for (const lintError of results) {
|
||||||
const {
|
const {
|
||||||
errorContext,
|
errorContext,
|
||||||
|
@ -64,7 +64,7 @@ const parameters = {
|
||||||
argv,
|
argv,
|
||||||
logMessage,
|
logMessage,
|
||||||
"optionsOverride": {
|
"optionsOverride": {
|
||||||
"outputFormatters": [[outputFormatter]]
|
"outputFormatters": [ [ outputFormatter ] ]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
markdownlintCli2(parameters).then(
|
markdownlintCli2(parameters).then(
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "9.9.1",
|
"@eslint/js": "9.9.1",
|
||||||
|
"@stylistic/eslint-plugin": "2.7.2",
|
||||||
"@vercel/ncc": "0.38.1",
|
"@vercel/ncc": "0.38.1",
|
||||||
"eslint": "9.9.1",
|
"eslint": "9.9.1",
|
||||||
"eslint-plugin-n": "17.10.2",
|
"eslint-plugin-n": "17.10.2",
|
||||||
|
|
Loading…
Reference in a new issue