Skip to content

Commit 235535b

Browse files
committed
Add @stylistic/eslint-plugin to ESLint configuration.
1 parent 2038498 commit 235535b

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

dist/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -57946,11 +57946,11 @@ var __webpack_exports__ = {};
5794657946

5794757947

5794857948
const core = __nccwpck_require__(2186);
57949-
const {"main": markdownlintCli2} = __nccwpck_require__(9247);
57949+
const { "main": markdownlintCli2 } = __nccwpck_require__(9247);
5795057950

5795157951
const logMessage = core.info;
5795257952
const outputFormatter = (options) => {
57953-
const {results} = options;
57953+
const { results } = options;
5795457954
for (const lintError of results) {
5795557955
const {
5795657956
errorContext,
@@ -58007,7 +58007,7 @@ const parameters = {
5800758007
argv,
5800858008
logMessage,
5800958009
"optionsOverride": {
58010-
"outputFormatters": [[outputFormatter]]
58010+
"outputFormatters": [ [ outputFormatter ] ]
5801158011
}
5801258012
};
5801358013
markdownlintCli2(parameters).then(

eslint.config.mjs

+14-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22

33
import js from "@eslint/js";
44
import eslintPluginNode from "eslint-plugin-n";
5+
import eslintPluginStylistic from "@stylistic/eslint-plugin";
56
import eslintPluginUnicorn from "eslint-plugin-unicorn";
67

78
export default [
89
js.configs.all,
910
eslintPluginNode.configs["flat/recommended"],
11+
eslintPluginStylistic.configs.customize({
12+
"arrowParens": true,
13+
"commaDangle": "never",
14+
"jsx": false,
15+
"quoteProps": "always",
16+
"quotes": "double",
17+
"semi": true
18+
}),
1019
eslintPluginUnicorn.configs["flat/all"],
1120
{
1221
"languageOptions": {
@@ -22,7 +31,11 @@ export default [
2231
"one-var": "off",
2332
"sort-imports": "off",
2433
"sort-keys": "off",
25-
34+
35+
"@stylistic/array-bracket-spacing": [ "error", "always" ],
36+
"@stylistic/dot-location": [ "error", "object" ],
37+
"@stylistic/operator-linebreak": [ "error", "after" ],
38+
2639
"unicorn/no-array-callback-reference": "off",
2740
"unicorn/prefer-module": "off",
2841
"unicorn/prefer-top-level-await": "off"

markdownlint-cli2-action.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"use strict";
44

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

88
const logMessage = core.info;
99
const outputFormatter = (options) => {
10-
const {results} = options;
10+
const { results } = options;
1111
for (const lintError of results) {
1212
const {
1313
errorContext,
@@ -64,7 +64,7 @@ const parameters = {
6464
argv,
6565
logMessage,
6666
"optionsOverride": {
67-
"outputFormatters": [[outputFormatter]]
67+
"outputFormatters": [ [ outputFormatter ] ]
6868
}
6969
};
7070
markdownlintCli2(parameters).then(

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
},
3030
"devDependencies": {
3131
"@eslint/js": "9.9.1",
32+
"@stylistic/eslint-plugin": "2.7.2",
3233
"@vercel/ncc": "0.38.1",
3334
"eslint": "9.9.1",
3435
"eslint-plugin-n": "17.10.2",

0 commit comments

Comments
 (0)