Skip to content

Commit

Permalink
Add @stylistic/eslint-plugin to ESLint configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAnson committed Sep 1, 2024
1 parent 2038498 commit 235535b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57946,11 +57946,11 @@ var __webpack_exports__ = {};


const core = __nccwpck_require__(2186);
const {"main": markdownlintCli2} = __nccwpck_require__(9247);
const { "main": markdownlintCli2 } = __nccwpck_require__(9247);

const logMessage = core.info;
const outputFormatter = (options) => {
const {results} = options;
const { results } = options;
for (const lintError of results) {
const {
errorContext,
Expand Down Expand Up @@ -58007,7 +58007,7 @@ const parameters = {
argv,
logMessage,
"optionsOverride": {
"outputFormatters": [[outputFormatter]]
"outputFormatters": [ [ outputFormatter ] ]
}
};
markdownlintCli2(parameters).then(
Expand Down
15 changes: 14 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@

import js from "@eslint/js";
import eslintPluginNode 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["flat/all"],
{
"languageOptions": {
Expand All @@ -22,7 +31,11 @@ export default [
"one-var": "off",
"sort-imports": "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/prefer-module": "off",
"unicorn/prefer-top-level-await": "off"
Expand Down
6 changes: 3 additions & 3 deletions markdownlint-cli2-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"use strict";

const core = require("@actions/core");
const {"main": markdownlintCli2} = require("markdownlint-cli2");
const { "main": markdownlintCli2 } = require("markdownlint-cli2");

const logMessage = core.info;
const outputFormatter = (options) => {
const {results} = options;
const { results } = options;
for (const lintError of results) {
const {
errorContext,
Expand Down Expand Up @@ -64,7 +64,7 @@ const parameters = {
argv,
logMessage,
"optionsOverride": {
"outputFormatters": [[outputFormatter]]
"outputFormatters": [ [ outputFormatter ] ]
}
};
markdownlintCli2(parameters).then(
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"devDependencies": {
"@eslint/js": "9.9.1",
"@stylistic/eslint-plugin": "2.7.2",
"@vercel/ncc": "0.38.1",
"eslint": "9.9.1",
"eslint-plugin-n": "17.10.2",
Expand Down

0 comments on commit 235535b

Please sign in to comment.