linter-bundle 6.2.2 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.linter-bundle.js +27 -17
- package/.linter-bundle.schema.json +45 -0
- package/CHANGELOG.md +149 -4
- package/README.md +60 -63
- package/eslint/gatsby.mjs +95 -0
- package/eslint/index.mjs +1127 -0
- package/eslint/javascript-lazy.mjs +24 -0
- package/eslint/javascript.mjs +126 -0
- package/eslint/jest.mjs +172 -0
- package/eslint/jsdoc.mjs +103 -0
- package/eslint/react.mjs +232 -0
- package/eslint/rules/no-unnecessary-typeof.md +1 -1
- package/eslint/rules/{no-unnecessary-typeof.js → no-unnecessary-typeof.mjs} +9 -11
- package/eslint/rules/restricted-filenames.md +4 -4
- package/eslint/rules/{restricted-filenames.js → restricted-filenames.mjs} +7 -6
- package/eslint/storybook.mjs +42 -0
- package/eslint/type-declarations.mjs +49 -0
- package/eslint/{overrides-worker.cjs → worker.mjs} +12 -14
- package/eslint.mjs +5 -0
- package/files/index.js +3 -3
- package/helper/{ensure-type.cjs → ensure-type.mjs} +1 -5
- package/helper/get-outdated-dependencies.js +4 -4
- package/helper/get-outdated-overrides.js +2 -2
- package/helper/get-stylelint-path.js +4 -3
- package/helper/is-npm-or-yarn.js +2 -2
- package/helper/linter-bundle-config.d.ts +24 -0
- package/helper/linter-bundle-config.js +9 -14
- package/helper/run-process.js +1 -1
- package/lint.js +21 -16
- package/package.json +31 -29
- package/stylelint/index.mjs +1111 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/html-tags/{index.cjs → index.mjs} +1 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/reference/{selectors.cjs → selectors.mjs} +15 -31
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-case/{index.cjs → index.mjs} +6 -12
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-space-after/{index.cjs → index.mjs} +11 -13
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-newline-after/{index.cjs → index.mjs} +18 -22
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-space-before/{index.cjs → index.mjs} +10 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{atRuleNameSpaceChecker.cjs → atRuleNameSpaceChecker.mjs} +4 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-empty-line-before/{index.cjs → index.mjs} +16 -30
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-after/{index.cjs → index.mjs} +13 -35
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-before/{index.cjs → index.mjs} +11 -40
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-space-before/{index.cjs → index.mjs} +10 -27
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-newline-after/{index.cjs → index.mjs} +14 -65
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-after/{index.cjs → index.mjs} +13 -30
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-before/{index.cjs → index.mjs} +14 -27
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/color-hex-case/{index.cjs → index.mjs} +10 -16
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/index.mjs +93 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-before/{index.cjs → index.mjs} +11 -12
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-after/{index.cjs → index.mjs} +11 -29
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-before/{index.cjs → index.mjs} +9 -8
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-after/{index.cjs → index.mjs} +10 -23
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-before/{index.cjs → index.mjs} +11 -36
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-trailing-semicolon/{index.cjs → index.mjs} +9 -27
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-newline-after/{index.cjs → index.mjs} +9 -25
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-after/{index.cjs → index.mjs} +8 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-before/{index.cjs → index.mjs} +8 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{declarationBangSpaceChecker.cjs → declarationBangSpaceChecker.mjs} +5 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{declarationColonSpaceChecker.cjs → declarationColonSpaceChecker.mjs} +5 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{findMediaOperator.cjs → findMediaOperator.mjs} +2 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-after/{index.cjs → index.mjs} +8 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-before/{index.cjs → index.mjs} +8 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-after/{index.cjs → index.mjs} +8 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-before/{index.cjs → index.mjs} +8 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-max-empty-lines/{index.cjs → index.mjs} +19 -39
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-newline-inside/{index.cjs → index.mjs} +19 -54
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-space-inside/{index.cjs → index.mjs} +21 -68
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-whitespace-after/{index.cjs → index.mjs} +16 -31
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{functionCommaSpaceChecker.cjs → functionCommaSpaceChecker.mjs} +8 -7
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{functionCommaSpaceFix.cjs → functionCommaSpaceFix.mjs} +1 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/indentation/{index.cjs → index.mjs} +39 -64
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/linebreaks/{index.cjs → index.mjs} +15 -44
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-empty-lines/{index.cjs → index.mjs} +10 -49
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-line-length/{index.cjs → index.mjs} +10 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-after/{index.cjs → index.mjs} +8 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-before/{index.cjs → index.mjs} +8 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-name-case/{index.cjs → index.mjs} +9 -16
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-parentheses-space-inside/{index.cjs → index.mjs} +8 -21
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-after/{index.cjs → index.mjs} +10 -11
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-before/{index.cjs → index.mjs} +10 -11
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-after/{index.cjs → index.mjs} +8 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-before/{index.cjs → index.mjs} +6 -6
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-after/{index.cjs → index.mjs} +8 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-before/{index.cjs → index.mjs} +8 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{mediaFeatureColonSpaceChecker.cjs → mediaFeatureColonSpaceChecker.mjs} +5 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{mediaQueryListCommaWhitespaceChecker.cjs → mediaQueryListCommaWhitespaceChecker.mjs} +6 -5
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-empty-first-line/{index.cjs → index.mjs} +6 -20
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-eol-whitespace/{index.cjs → index.mjs} +13 -16
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-extra-semicolons/{index.cjs → index.mjs} +10 -33
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-missing-end-of-source-newline/{index.cjs → index.mjs} +7 -13
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-leading-zero/{index.cjs → index.mjs} +13 -31
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/{index.cjs → index.mjs} +9 -18
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/property-case/{index.cjs → index.mjs} +10 -16
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-brackets-space-inside/{index.cjs → index.mjs} +9 -36
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-after/{index.cjs → index.mjs} +7 -8
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-before/{index.cjs → index.mjs} +7 -8
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-after/{index.cjs → index.mjs} +7 -8
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-before/{index.cjs → index.mjs} +7 -8
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-descendant-combinator-no-non-space/{index.cjs → index.mjs} +9 -20
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-after/{index.cjs → index.mjs} +9 -14
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-before/{index.cjs → index.mjs} +7 -8
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-after/{index.cjs → index.mjs} +7 -8
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-before/{index.cjs → index.mjs} +7 -8
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-max-empty-lines/{index.cjs → index.mjs} +10 -21
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-case/{index.cjs → index.mjs} +10 -24
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-parentheses-space-inside/{index.cjs → index.mjs} +12 -35
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-element-case/{index.cjs → index.mjs} +10 -15
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{selectorAttributeOperatorSpaceChecker.cjs → selectorAttributeOperatorSpaceChecker.mjs} +6 -5
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{selectorCombinatorSpaceChecker.cjs → selectorCombinatorSpaceChecker.mjs} +12 -11
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{selectorListCommaWhitespaceChecker.cjs → selectorListCommaWhitespaceChecker.mjs} +5 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/string-quotes/{index.cjs → index.mjs} +43 -65
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unicode-bom/{index.cjs → index.mjs} +5 -5
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unit-case/{index.cjs → index.mjs} +17 -34
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-after/{index.cjs → index.mjs} +11 -12
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-before/{index.cjs → index.mjs} +6 -6
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-after/{index.cjs → index.mjs} +10 -11
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-before/{index.cjs → index.mjs} +10 -11
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-max-empty-lines/{index.cjs → index.mjs} +12 -18
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{valueListCommaWhitespaceChecker.cjs → valueListCommaWhitespaceChecker.mjs} +6 -5
- package/stylelint/plugins/stylelint-15.11.0-stylistic/style-search/{index.cjs → index.mjs} +1 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{addEmptyLineAfter.cjs → addEmptyLineAfter.mjs} +1 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{hasEmptyBlock.cjs → hasEmptyBlock.mjs} +2 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{nextNonCommentNode.cjs → nextNonCommentNode.mjs} +1 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{removeEmptyLinesAfter.cjs → removeEmptyLinesAfter.mjs} +1 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/transformSelector.mjs +19 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{whitespaceChecker.cjs → whitespaceChecker.mjs} +5 -5
- package/stylelint/plugins/stylelint-selector-no-empty.js +2 -0
- package/stylelint/plugins/stylelint-selector-tag-no-without-class.js +2 -2
- package/stylelint.mjs +6 -0
- package/TODO.md +0 -58
- package/eslint/index.cjs +0 -1065
- package/eslint/overrides-gatsby.cjs +0 -108
- package/eslint/overrides-javascript-lazy.cjs +0 -27
- package/eslint/overrides-javascript.cjs +0 -121
- package/eslint/overrides-jest.cjs +0 -144
- package/eslint/overrides-jsdoc.cjs +0 -94
- package/eslint/overrides-react.cjs +0 -220
- package/eslint/overrides-storybook.cjs +0 -44
- package/eslint/overrides-type-declarations.cjs +0 -51
- package/eslint/rules/no-global-undefined-check.js +0 -85
- package/eslint/rules/no-global-undefined-check.md +0 -34
- package/eslint.cjs +0 -5
- package/stylelint/index.cjs +0 -1104
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/index.cjs +0 -95
- package/stylelint.cjs +0 -5
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* eslint-disable -- We want to keep as much of the original code as possible */
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
import valueParser from 'postcss-value-parser';
|
|
5
|
+
import stylelint from 'stylelint';
|
|
6
|
+
import { declarationValueIndex } from 'stylelint/lib/utils/nodeFieldIndices.mjs';
|
|
7
|
+
import getDeclarationValue from 'stylelint/lib/utils/getDeclarationValue.mjs';
|
|
8
|
+
import isSingleLineString from 'stylelint/lib/utils/isSingleLineString.mjs';
|
|
9
|
+
import isStandardSyntaxFunction from 'stylelint/lib/utils/isStandardSyntaxFunction.mjs';
|
|
10
|
+
import report from 'stylelint/lib/utils/report.mjs';
|
|
11
|
+
import ruleMessages from 'stylelint/lib/utils/ruleMessages.mjs';
|
|
12
|
+
import setDeclarationValue from 'stylelint/lib/utils/setDeclarationValue.mjs';
|
|
13
|
+
import validateOptions from 'stylelint/lib/utils/validateOptions.mjs';
|
|
14
14
|
|
|
15
15
|
const ruleName = 'plugin/function-parentheses-newline-inside';
|
|
16
16
|
|
|
@@ -67,33 +67,15 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
|
67
67
|
const checkBefore = getCheckBefore(valueNode);
|
|
68
68
|
|
|
69
69
|
if (primary === 'always' && !containsNewline(checkBefore)) {
|
|
70
|
-
|
|
71
|
-
hasFixed = true;
|
|
72
|
-
fixBeforeForAlways(valueNode, context.newline || '');
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
complain(messages.expectedOpening, openingIndex);
|
|
76
|
-
}
|
|
70
|
+
complain(messages.expectedOpening, openingIndex);
|
|
77
71
|
}
|
|
78
72
|
|
|
79
73
|
if (isMultiLine && primary === 'always-multi-line' && !containsNewline(checkBefore)) {
|
|
80
|
-
|
|
81
|
-
hasFixed = true;
|
|
82
|
-
fixBeforeForAlways(valueNode, context.newline || '');
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
complain(messages.expectedOpeningMultiLine, openingIndex);
|
|
86
|
-
}
|
|
74
|
+
complain(messages.expectedOpeningMultiLine, openingIndex);
|
|
87
75
|
}
|
|
88
76
|
|
|
89
77
|
if (isMultiLine && primary === 'never-multi-line' && checkBefore !== '') {
|
|
90
|
-
|
|
91
|
-
hasFixed = true;
|
|
92
|
-
fixBeforeForNever(valueNode);
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
complain(messages.rejectedOpeningMultiLine, openingIndex);
|
|
96
|
-
}
|
|
78
|
+
complain(messages.rejectedOpeningMultiLine, openingIndex);
|
|
97
79
|
}
|
|
98
80
|
|
|
99
81
|
// Check closing ...
|
|
@@ -102,33 +84,15 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
|
102
84
|
const checkAfter = getCheckAfter(valueNode);
|
|
103
85
|
|
|
104
86
|
if (primary === 'always' && !containsNewline(checkAfter)) {
|
|
105
|
-
|
|
106
|
-
hasFixed = true;
|
|
107
|
-
fixAfterForAlways(valueNode, context.newline || '');
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
complain(messages.expectedClosing, closingIndex);
|
|
111
|
-
}
|
|
87
|
+
complain(messages.expectedClosing, closingIndex);
|
|
112
88
|
}
|
|
113
89
|
|
|
114
90
|
if (isMultiLine && primary === 'always-multi-line' && !containsNewline(checkAfter)) {
|
|
115
|
-
|
|
116
|
-
hasFixed = true;
|
|
117
|
-
fixAfterForAlways(valueNode, context.newline || '');
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
complain(messages.expectedClosingMultiLine, closingIndex);
|
|
121
|
-
}
|
|
91
|
+
complain(messages.expectedClosingMultiLine, closingIndex);
|
|
122
92
|
}
|
|
123
93
|
|
|
124
94
|
if (isMultiLine && primary === 'never-multi-line' && checkAfter !== '') {
|
|
125
|
-
|
|
126
|
-
hasFixed = true;
|
|
127
|
-
fixAfterForNever(valueNode);
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
complain(messages.rejectedClosingMultiLine, closingIndex);
|
|
131
|
-
}
|
|
95
|
+
complain(messages.rejectedClosingMultiLine, closingIndex);
|
|
132
96
|
}
|
|
133
97
|
});
|
|
134
98
|
|
|
@@ -146,7 +110,8 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
|
146
110
|
result,
|
|
147
111
|
message,
|
|
148
112
|
node: decl,
|
|
149
|
-
index: declarationValueIndex(decl) + offset
|
|
113
|
+
index: declarationValueIndex(decl) + offset,
|
|
114
|
+
endIndex: declarationValueIndex(decl) + offset
|
|
150
115
|
});
|
|
151
116
|
}
|
|
152
117
|
});
|
|
@@ -279,4 +244,4 @@ function fixAfterForNever (valueNode) {
|
|
|
279
244
|
rule.ruleName = ruleName;
|
|
280
245
|
rule.messages = messages;
|
|
281
246
|
rule.meta = meta;
|
|
282
|
-
|
|
247
|
+
export default stylelint.createPlugin(ruleName, rule);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* eslint-disable -- We want to keep as much of the original code as possible */
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
import valueParser from 'postcss-value-parser';
|
|
5
|
+
import stylelint from 'stylelint';
|
|
6
|
+
import { declarationValueIndex } from 'stylelint/lib/utils/nodeFieldIndices.mjs';
|
|
7
|
+
import getDeclarationValue from 'stylelint/lib/utils/getDeclarationValue.mjs';
|
|
8
|
+
import isSingleLineString from 'stylelint/lib/utils/isSingleLineString.mjs';
|
|
9
|
+
import isStandardSyntaxFunction from 'stylelint/lib/utils/isStandardSyntaxFunction.mjs';
|
|
10
|
+
import report from 'stylelint/lib/utils/report.mjs';
|
|
11
|
+
import ruleMessages from 'stylelint/lib/utils/ruleMessages.mjs';
|
|
12
|
+
import setDeclarationValue from 'stylelint/lib/utils/setDeclarationValue.mjs';
|
|
13
|
+
import validateOptions from 'stylelint/lib/utils/validateOptions.mjs';
|
|
14
14
|
|
|
15
15
|
const ruleName = 'plugin/function-parentheses-space-inside';
|
|
16
16
|
|
|
@@ -72,43 +72,19 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
|
72
72
|
const openingIndex = valueNode.sourceIndex + valueNode.value.length + 1;
|
|
73
73
|
|
|
74
74
|
if (primary === 'always' && valueNode.before !== ' ') {
|
|
75
|
-
|
|
76
|
-
hasFixed = true;
|
|
77
|
-
valueNode.before = ' ';
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
complain(messages.expectedOpening, openingIndex);
|
|
81
|
-
}
|
|
75
|
+
complain(messages.expectedOpening, openingIndex);
|
|
82
76
|
}
|
|
83
77
|
|
|
84
78
|
if (primary === 'never' && valueNode.before !== '') {
|
|
85
|
-
|
|
86
|
-
hasFixed = true;
|
|
87
|
-
valueNode.before = '';
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
complain(messages.rejectedOpening, openingIndex);
|
|
91
|
-
}
|
|
79
|
+
complain(messages.rejectedOpening, openingIndex);
|
|
92
80
|
}
|
|
93
81
|
|
|
94
82
|
if (isSingleLine && primary === 'always-single-line' && valueNode.before !== ' ') {
|
|
95
|
-
|
|
96
|
-
hasFixed = true;
|
|
97
|
-
valueNode.before = ' ';
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
complain(messages.expectedOpeningSingleLine, openingIndex);
|
|
101
|
-
}
|
|
83
|
+
complain(messages.expectedOpeningSingleLine, openingIndex);
|
|
102
84
|
}
|
|
103
85
|
|
|
104
86
|
if (isSingleLine && primary === 'never-single-line' && valueNode.before !== '') {
|
|
105
|
-
|
|
106
|
-
hasFixed = true;
|
|
107
|
-
valueNode.before = '';
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
complain(messages.rejectedOpeningSingleLine, openingIndex);
|
|
111
|
-
}
|
|
87
|
+
complain(messages.rejectedOpeningSingleLine, openingIndex);
|
|
112
88
|
}
|
|
113
89
|
|
|
114
90
|
// Check closing ...
|
|
@@ -116,43 +92,19 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
|
116
92
|
const closingIndex = valueNode.sourceIndex + functionString.length - 2;
|
|
117
93
|
|
|
118
94
|
if (primary === 'always' && valueNode.after !== ' ') {
|
|
119
|
-
|
|
120
|
-
hasFixed = true;
|
|
121
|
-
valueNode.after = ' ';
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
complain(messages.expectedClosing, closingIndex);
|
|
125
|
-
}
|
|
95
|
+
complain(messages.expectedClosing, closingIndex);
|
|
126
96
|
}
|
|
127
97
|
|
|
128
98
|
if (primary === 'never' && valueNode.after !== '') {
|
|
129
|
-
|
|
130
|
-
hasFixed = true;
|
|
131
|
-
valueNode.after = '';
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
complain(messages.rejectedClosing, closingIndex);
|
|
135
|
-
}
|
|
99
|
+
complain(messages.rejectedClosing, closingIndex);
|
|
136
100
|
}
|
|
137
101
|
|
|
138
102
|
if (isSingleLine && primary === 'always-single-line' && valueNode.after !== ' ') {
|
|
139
|
-
|
|
140
|
-
hasFixed = true;
|
|
141
|
-
valueNode.after = ' ';
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
complain(messages.expectedClosingSingleLine, closingIndex);
|
|
145
|
-
}
|
|
103
|
+
complain(messages.expectedClosingSingleLine, closingIndex);
|
|
146
104
|
}
|
|
147
105
|
|
|
148
106
|
if (isSingleLine && primary === 'never-single-line' && valueNode.after !== '') {
|
|
149
|
-
|
|
150
|
-
hasFixed = true;
|
|
151
|
-
valueNode.after = '';
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
complain(messages.rejectedClosingSingleLine, closingIndex);
|
|
155
|
-
}
|
|
107
|
+
complain(messages.rejectedClosingSingleLine, closingIndex);
|
|
156
108
|
}
|
|
157
109
|
});
|
|
158
110
|
|
|
@@ -170,7 +122,8 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
|
170
122
|
result,
|
|
171
123
|
message,
|
|
172
124
|
node: decl,
|
|
173
|
-
index: declarationValueIndex(decl) + offset
|
|
125
|
+
index: declarationValueIndex(decl) + offset,
|
|
126
|
+
endIndex: declarationValueIndex(decl) + offset
|
|
174
127
|
});
|
|
175
128
|
}
|
|
176
129
|
});
|
|
@@ -179,4 +132,4 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
|
179
132
|
rule.ruleName = ruleName;
|
|
180
133
|
rule.messages = messages;
|
|
181
134
|
rule.meta = meta;
|
|
182
|
-
|
|
135
|
+
export default stylelint.createPlugin(ruleName, rule);
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/* eslint-disable -- We want to keep as much of the original code as possible */
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const styleSearch = require('../../style-search/index.cjs');
|
|
4
|
+
import stylelint from 'stylelint';
|
|
5
|
+
import { atRuleParamIndex, declarationValueIndex } from 'stylelint/lib/utils/nodeFieldIndices.mjs';
|
|
6
|
+
import getDeclarationValue from 'stylelint/lib/utils/getDeclarationValue.mjs';
|
|
7
|
+
import isWhitespace from 'stylelint/lib/utils/isWhitespace.mjs';
|
|
8
|
+
import report from 'stylelint/lib/utils/report.mjs';
|
|
9
|
+
import ruleMessages from 'stylelint/lib/utils/ruleMessages.mjs';
|
|
10
|
+
import setDeclarationValue from 'stylelint/lib/utils/setDeclarationValue.mjs';
|
|
11
|
+
import validateOptions from 'stylelint/lib/utils/validateOptions.mjs';
|
|
12
|
+
|
|
13
|
+
import styleSearch from '../../style-search/index.mjs';
|
|
15
14
|
|
|
16
15
|
const ruleName = 'plugin/function-whitespace-after';
|
|
17
16
|
|
|
@@ -98,6 +97,7 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
|
98
97
|
message: messages.expected,
|
|
99
98
|
node,
|
|
100
99
|
index: nodeIndex + index,
|
|
100
|
+
endIndex: nodeIndex + index,
|
|
101
101
|
result,
|
|
102
102
|
ruleName
|
|
103
103
|
});
|
|
@@ -113,6 +113,7 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
|
113
113
|
message: messages.rejected,
|
|
114
114
|
node,
|
|
115
115
|
index: nodeIndex + index,
|
|
116
|
+
endIndex: nodeIndex + index,
|
|
116
117
|
result,
|
|
117
118
|
ruleName
|
|
118
119
|
});
|
|
@@ -130,7 +131,7 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
|
130
131
|
|
|
131
132
|
if (primary === 'always') {
|
|
132
133
|
applyFix = (index) => {
|
|
133
|
-
|
|
134
|
+
|
|
134
135
|
fixed += value.slice(lastIndex, index) + ' ';
|
|
135
136
|
lastIndex = index;
|
|
136
137
|
};
|
|
@@ -167,32 +168,16 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
|
167
168
|
|
|
168
169
|
root.walkAtRules(/^import$/i, (atRule) => {
|
|
169
170
|
const parameter = (atRule.raws.params?.raw) || atRule.params;
|
|
170
|
-
const fixer = context.fix && createFixer(parameter);
|
|
171
|
-
|
|
172
|
-
check(atRule, parameter, atRuleParamIndex(atRule), fixer ? fixer.applyFix : undefined);
|
|
173
171
|
|
|
174
|
-
|
|
175
|
-
if (atRule.raws.params) {
|
|
176
|
-
atRule.raws.params.raw = fixer.fixed;
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
atRule.params = fixer.fixed;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
172
|
+
check(atRule, parameter, atRuleParamIndex(atRule), undefined);
|
|
182
173
|
});
|
|
183
174
|
root.walkDecls((decl) => {
|
|
184
175
|
const value = getDeclarationValue(decl);
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
check(decl, value, declarationValueIndex(decl), fixer ? fixer.applyFix : undefined);
|
|
188
|
-
|
|
189
|
-
if (fixer && fixer.hasFixed) {
|
|
190
|
-
setDeclarationValue(decl, fixer.fixed);
|
|
191
|
-
}
|
|
176
|
+
check(decl, value, declarationValueIndex(decl), undefined);
|
|
192
177
|
});
|
|
193
178
|
};
|
|
194
179
|
|
|
195
180
|
rule.ruleName = ruleName;
|
|
196
181
|
rule.messages = messages;
|
|
197
182
|
rule.meta = meta;
|
|
198
|
-
|
|
183
|
+
export default stylelint.createPlugin(ruleName, rule);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* eslint-disable -- We want to keep as much of the original code as possible */
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import valueParser from 'postcss-value-parser';
|
|
5
|
+
import { declarationValueIndex } from 'stylelint/lib/utils/nodeFieldIndices.mjs';
|
|
6
|
+
import getDeclarationValue from 'stylelint/lib/utils/getDeclarationValue.mjs';
|
|
7
|
+
import isStandardSyntaxFunction from 'stylelint/lib/utils/isStandardSyntaxFunction.mjs';
|
|
8
|
+
import report from 'stylelint/lib/utils/report.mjs';
|
|
9
|
+
import setDeclarationValue from 'stylelint/lib/utils/setDeclarationValue.mjs';
|
|
10
10
|
|
|
11
11
|
/** @typedef {import('postcss-value-parser').Node} ValueParserNode */
|
|
12
12
|
/** @typedef {import('postcss-value-parser').DivNode} ValueParserDivNode */
|
|
@@ -22,7 +22,7 @@ const setDeclarationValue = require('stylelint/lib/utils/setDeclarationValue.cjs
|
|
|
22
22
|
* }} opts
|
|
23
23
|
* @param options
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
export default function functionCommaSpaceChecker (options) {
|
|
26
26
|
options.root.walkDecls((decl) => {
|
|
27
27
|
const declValue = getDeclarationValue(decl);
|
|
28
28
|
|
|
@@ -108,6 +108,7 @@ module.exports = function functionCommaSpaceChecker (options) {
|
|
|
108
108
|
|
|
109
109
|
report({
|
|
110
110
|
index,
|
|
111
|
+
endIndex: index,
|
|
111
112
|
message,
|
|
112
113
|
node: decl,
|
|
113
114
|
result: options.result,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @param parameters
|
|
14
14
|
* @returns {boolean}
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
export default function functionCommaSpaceFix (parameters) {
|
|
17
17
|
const { div, index, nodes, expectation, position, symb } = parameters;
|
|
18
18
|
|
|
19
19
|
if (expectation.startsWith('always')) {
|
package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/indentation/{index.cjs → index.mjs}
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/* eslint-disable -- We want to keep as much of the original code as possible */
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
import stylelint from 'stylelint';
|
|
5
|
+
import beforeBlockString from 'stylelint/lib/utils/beforeBlockString.mjs';
|
|
6
|
+
import hasBlock from 'stylelint/lib/utils/hasBlock.mjs';
|
|
7
|
+
import optionsMatches from 'stylelint/lib/utils/optionsMatches.mjs';
|
|
8
|
+
import report from 'stylelint/lib/utils/report.mjs';
|
|
9
|
+
import ruleMessages from 'stylelint/lib/utils/ruleMessages.mjs';
|
|
10
|
+
import { isAtRule, isDeclaration, isRoot, isRule } from 'stylelint/lib/utils/typeGuards.mjs';
|
|
11
|
+
import validateOptions from 'stylelint/lib/utils/validateOptions.mjs';
|
|
12
|
+
import { isBoolean, isNumber, isString, assertString } from 'stylelint/lib/utils/validateTypes.mjs';
|
|
13
|
+
|
|
14
|
+
import styleSearch from '../../style-search/index.mjs';
|
|
15
15
|
|
|
16
16
|
const ruleName = 'plugin/indentation';
|
|
17
17
|
const messages = ruleMessages(ruleName, {
|
|
@@ -105,24 +105,12 @@ const rule = (primary, secondaryOptions = {}, context) => (root, result) => {
|
|
|
105
105
|
(parent.raws.codeBefore?.endsWith('\n'))))) &&
|
|
106
106
|
before.slice(lastIndexOfNewline + 1) !== expectedOpeningBraceIndentation
|
|
107
107
|
) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
node.raws.before = fixIndentation(node.raws.before, expectedOpeningBraceIndentation);
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
report({
|
|
120
|
-
message: messages.expected(legibleExpectation(nodeLevel)),
|
|
121
|
-
node,
|
|
122
|
-
result,
|
|
123
|
-
ruleName
|
|
124
|
-
});
|
|
125
|
-
}
|
|
108
|
+
report({
|
|
109
|
+
message: messages.expected(legibleExpectation(nodeLevel)),
|
|
110
|
+
node,
|
|
111
|
+
result,
|
|
112
|
+
ruleName
|
|
113
|
+
});
|
|
126
114
|
}
|
|
127
115
|
|
|
128
116
|
// Only blocks have the `after` string to check.
|
|
@@ -139,18 +127,14 @@ const rule = (primary, secondaryOptions = {}, context) => (root, result) => {
|
|
|
139
127
|
after.includes('\n') &&
|
|
140
128
|
after.slice(after.lastIndexOf('\n') + 1) !== expectedClosingBraceIndentation
|
|
141
129
|
) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
result,
|
|
151
|
-
ruleName
|
|
152
|
-
});
|
|
153
|
-
}
|
|
130
|
+
report({
|
|
131
|
+
message: messages.expected(legibleExpectation(closingBraceLevel)),
|
|
132
|
+
node,
|
|
133
|
+
index: node.toString().length - 1,
|
|
134
|
+
endIndex: node.toString().length - 1,
|
|
135
|
+
result,
|
|
136
|
+
ruleName
|
|
137
|
+
});
|
|
154
138
|
}
|
|
155
139
|
|
|
156
140
|
// If this is a declaration, check the value
|
|
@@ -278,26 +262,26 @@ const rule = (primary, secondaryOptions = {}, context) => (root, result) => {
|
|
|
278
262
|
// Sass maps are ignored to allow for arbitrary indentation
|
|
279
263
|
let parentheticalDepth = 0;
|
|
280
264
|
|
|
281
|
-
const
|
|
265
|
+
const ignoreInsideParams = optionsMatches(secondaryOptions, 'ignore', 'inside-parens');
|
|
282
266
|
|
|
283
267
|
styleSearch(
|
|
284
268
|
{
|
|
285
269
|
source,
|
|
286
270
|
target: '\n',
|
|
287
271
|
// @ts-expect-error -- The `outsideParens` option is unsupported. Why?
|
|
288
|
-
outsideParens:
|
|
272
|
+
outsideParens: ignoreInsideParams
|
|
289
273
|
},
|
|
290
274
|
(match, matchCount) => {
|
|
291
275
|
const precedesClosingParenthesis = (/^[\t ]*\)/).test(source.slice(match.startIndex + 1));
|
|
292
276
|
|
|
293
|
-
if (
|
|
277
|
+
if (ignoreInsideParams && (precedesClosingParenthesis || match.insideParens)) {
|
|
294
278
|
return;
|
|
295
279
|
}
|
|
296
280
|
|
|
297
281
|
let expectedIndentLevel = newlineIndentLevel;
|
|
298
282
|
|
|
299
|
-
//
|
|
300
|
-
if (!
|
|
283
|
+
// Modifications for parenthetical content
|
|
284
|
+
if (!ignoreInsideParams && match.insideParens) {
|
|
301
285
|
// If the first match in is within parentheses, reduce the parenthesis penalty
|
|
302
286
|
if (matchCount === 1) { parentheticalDepth -= 1; }
|
|
303
287
|
|
|
@@ -377,23 +361,14 @@ const rule = (primary, secondaryOptions = {}, context) => (root, result) => {
|
|
|
377
361
|
);
|
|
378
362
|
|
|
379
363
|
if (afterNewlineSpace !== expectedIndentation) {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
}
|
|
388
|
-
else {
|
|
389
|
-
report({
|
|
390
|
-
message: messages.expected(legibleExpectation(expectedIndentLevel)),
|
|
391
|
-
node,
|
|
392
|
-
index: match.startIndex + afterNewlineSpace.length + 1,
|
|
393
|
-
result,
|
|
394
|
-
ruleName
|
|
395
|
-
});
|
|
396
|
-
}
|
|
364
|
+
report({
|
|
365
|
+
message: messages.expected(legibleExpectation(expectedIndentLevel)),
|
|
366
|
+
node,
|
|
367
|
+
index: match.startIndex + afterNewlineSpace.length + 1,
|
|
368
|
+
endIndex: match.startIndex + afterNewlineSpace.length + 1,
|
|
369
|
+
result,
|
|
370
|
+
ruleName
|
|
371
|
+
});
|
|
397
372
|
}
|
|
398
373
|
}
|
|
399
374
|
);
|
|
@@ -740,4 +715,4 @@ function replaceIndentation (input, searchString, replaceString, startIndex) {
|
|
|
740
715
|
rule.ruleName = ruleName;
|
|
741
716
|
rule.messages = messages;
|
|
742
717
|
rule.meta = meta;
|
|
743
|
-
|
|
718
|
+
export default stylelint.createPlugin(ruleName, rule);
|
package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/linebreaks/{index.cjs → index.mjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable -- We want to keep as much of the original code as possible */
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import postcss from 'postcss';
|
|
5
|
+
import stylelint from 'stylelint';
|
|
6
|
+
import report from 'stylelint/lib/utils/report.mjs';
|
|
7
|
+
import ruleMessages from 'stylelint/lib/utils/ruleMessages.mjs';
|
|
8
|
+
import validateOptions from 'stylelint/lib/utils/validateOptions.mjs';
|
|
9
9
|
|
|
10
10
|
const ruleName = 'plugin/linebreaks';
|
|
11
11
|
|
|
@@ -31,49 +31,20 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
|
31
31
|
|
|
32
32
|
const shouldHaveCR = primary === 'windows';
|
|
33
33
|
|
|
34
|
-
if (
|
|
35
|
-
root.walk((node) => {
|
|
36
|
-
if ('selector' in node) {
|
|
37
|
-
node.selector = fixData(node.selector);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if ('value' in node) {
|
|
41
|
-
node.value = fixData(node.value);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if ('text' in node) {
|
|
45
|
-
node.text = fixData(node.text);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (node.raws.before) {
|
|
49
|
-
node.raws.before = fixData(node.raws.before);
|
|
50
|
-
}
|
|
34
|
+
if (root.source == null) { throw new Error('The root node must have a source'); }
|
|
51
35
|
|
|
52
|
-
|
|
53
|
-
node.raws.after = fixData(node.raws.after);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
36
|
+
const lines = root.source.input.css.split('\n');
|
|
56
37
|
|
|
57
|
-
|
|
58
|
-
|
|
38
|
+
for (let [i, line] of lines.entries()) {
|
|
39
|
+
if (i < lines.length - 1 && !line.includes('\r')) {
|
|
40
|
+
line += '\n';
|
|
59
41
|
}
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
if (root.source == null) { throw new Error('The root node must have a source'); }
|
|
63
42
|
|
|
64
|
-
|
|
43
|
+
if (hasError(line)) {
|
|
44
|
+
const lineNum = i + 1;
|
|
45
|
+
const colNumber = line.length;
|
|
65
46
|
|
|
66
|
-
|
|
67
|
-
if (i < lines.length - 1 && !line.includes('\r')) {
|
|
68
|
-
line += '\n';
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (hasError(line)) {
|
|
72
|
-
const lineNum = i + 1;
|
|
73
|
-
const colNumber = line.length;
|
|
74
|
-
|
|
75
|
-
reportNewlineError(lineNum, colNumber);
|
|
76
|
-
}
|
|
47
|
+
reportNewlineError(lineNum, colNumber);
|
|
77
48
|
}
|
|
78
49
|
}
|
|
79
50
|
|
|
@@ -129,4 +100,4 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
|
129
100
|
rule.ruleName = ruleName;
|
|
130
101
|
rule.messages = messages;
|
|
131
102
|
rule.meta = meta;
|
|
132
|
-
|
|
103
|
+
export default stylelint.createPlugin(ruleName, rule);
|