@ntnyq/eslint-config 3.10.0 → 3.10.1
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/dist/index.cjs +3 -5
- package/dist/index.d.cts +144 -123
- package/dist/index.d.ts +144 -123
- package/dist/index.js +0 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
DEFAULT_PRETTIER_OPTIONS: () => DEFAULT_PRETTIER_OPTIONS,
|
|
34
34
|
GLOB_ALL_SRC: () => GLOB_ALL_SRC,
|
|
35
35
|
GLOB_ASTRO: () => GLOB_ASTRO,
|
|
@@ -149,7 +149,7 @@ __export(src_exports, {
|
|
|
149
149
|
vue: () => vue,
|
|
150
150
|
yml: () => yml
|
|
151
151
|
});
|
|
152
|
-
module.exports = __toCommonJS(
|
|
152
|
+
module.exports = __toCommonJS(index_exports);
|
|
153
153
|
|
|
154
154
|
// src/core.ts
|
|
155
155
|
var import_eslint_flat_config_utils = require("eslint-flat-config-utils");
|
|
@@ -1143,8 +1143,6 @@ var vitest = (options = {}) => [
|
|
|
1143
1143
|
// src/configs/svgo.ts
|
|
1144
1144
|
var import_eslint_plugin_svgo2 = require("eslint-plugin-svgo");
|
|
1145
1145
|
var svgo = (options = {}) => [
|
|
1146
|
-
// TODO: remove after fix type
|
|
1147
|
-
// @ts-expect-error type
|
|
1148
1146
|
{
|
|
1149
1147
|
...(0, import_eslint_plugin_svgo2.config)(options),
|
|
1150
1148
|
name: "ntnyq/svgo"
|
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
|
3
3
|
import { ESLintPluginCommandOptions } from 'eslint-plugin-command/types';
|
|
4
4
|
import { RecommendedOptions } from 'eslint-plugin-github-action';
|
|
5
5
|
export { default as pluginGitHubAction } from 'eslint-plugin-github-action';
|
|
6
|
-
import {
|
|
6
|
+
import { RuleOptions as RuleOptions$1 } from 'eslint-plugin-svgo/rule-options';
|
|
7
7
|
import { Options } from 'eslint-processor-vue-blocks';
|
|
8
8
|
export { default as processorVueBlocks } from 'eslint-processor-vue-blocks';
|
|
9
9
|
import { Linter } from 'eslint';
|
|
@@ -15040,7 +15040,7 @@ type SvgoSvgo = [] | [
|
|
|
15040
15040
|
doctypeStart?: string;
|
|
15041
15041
|
eol?: ("lf" | "crlf");
|
|
15042
15042
|
finalNewline?: boolean;
|
|
15043
|
-
indent?: number;
|
|
15043
|
+
indent?: (string | number);
|
|
15044
15044
|
pretty?: boolean;
|
|
15045
15045
|
procInstEnd?: string;
|
|
15046
15046
|
procInstStart?: string;
|
|
@@ -15053,33 +15053,34 @@ type SvgoSvgo = [] | [
|
|
|
15053
15053
|
textEnd?: string;
|
|
15054
15054
|
textStart?: string;
|
|
15055
15055
|
useShortTags?: boolean;
|
|
15056
|
-
[k: string]: unknown | undefined;
|
|
15057
15056
|
};
|
|
15058
|
-
plugins?: (("preset-default" | "cleanupAttrs" | "cleanupEnableBackground" | "cleanupIds" | "cleanupNumericValues" | "collapseGroups" | "convertColors" | "convertEllipseToCircle" | "convertPathData" | "convertShapeToPath" | "convertTransform" | "inlineStyles" | "mergePaths" | "mergeStyles" | "minifyStyles" | "moveElemsAttrsToGroup" | "moveGroupAttrsToElems" | "removeComments" | "removeDesc" | "removeDoctype" | "removeEditorsNSData" | "removeEmptyAttrs" | "removeEmptyContainers" | "removeEmptyText" | "removeHiddenElems" | "removeMetadata" | "removeNonInheritableGroupAttrs" | "removeTitle" | "removeUnknownsAndDefaults" | "removeUnusedNS" | "removeUselessDefs" | "removeUselessStrokeAndFill" | "removeViewBox" | "removeXMLProcInst" | "sortAttrs" | "sortDefsChildren" | "addAttributesToSVGElement" | "addClassesToSVGElement" | "cleanupListOfValues" | "convertOneStopGradients" | "convertStyleToAttrs" | "prefixIds" | "removeAttributesBySelector" | "removeAttrs" | "removeDimensions" | "removeElementsByAttr" | "removeOffCanvasPaths" | "removeRasterImages" | "
|
|
15059
|
-
name
|
|
15057
|
+
plugins?: (("preset-default" | "cleanupAttrs" | "cleanupEnableBackground" | "cleanupIds" | "cleanupNumericValues" | "collapseGroups" | "convertColors" | "convertEllipseToCircle" | "convertPathData" | "convertShapeToPath" | "convertTransform" | "inlineStyles" | "mergePaths" | "mergeStyles" | "minifyStyles" | "moveElemsAttrsToGroup" | "moveGroupAttrsToElems" | "removeComments" | "removeDesc" | "removeDoctype" | "removeEditorsNSData" | "removeEmptyAttrs" | "removeEmptyContainers" | "removeEmptyText" | "removeHiddenElems" | "removeMetadata" | "removeNonInheritableGroupAttrs" | "removeTitle" | "removeUnknownsAndDefaults" | "removeUnusedNS" | "removeUselessDefs" | "removeUselessStrokeAndFill" | "removeViewBox" | "removeXMLProcInst" | "sortAttrs" | "sortDefsChildren" | "addAttributesToSVGElement" | "addClassesToSVGElement" | "cleanupListOfValues" | "convertOneStopGradients" | "convertStyleToAttrs" | "prefixIds" | "removeAttributesBySelector" | "removeAttrs" | "removeDeprecatedAttrs" | "removeDimensions" | "removeElementsByAttr" | "removeOffCanvasPaths" | "removeRasterImages" | "removeScripts" | "removeStyleElement" | "removeXlink" | "removeXMLNS" | "reusePaths") | {
|
|
15058
|
+
name: "addAttributesToSVGElement";
|
|
15060
15059
|
params?: {
|
|
15061
|
-
|
|
15062
|
-
[k: string]:
|
|
15063
|
-
}
|
|
15060
|
+
attribute?: (string | {
|
|
15061
|
+
[k: string]: (string | null);
|
|
15062
|
+
});
|
|
15063
|
+
attributes?: (string | {
|
|
15064
|
+
[k: string]: (string | null);
|
|
15065
|
+
})[];
|
|
15064
15066
|
};
|
|
15065
15067
|
} | {
|
|
15066
|
-
name
|
|
15068
|
+
name: "addClassesToSVGElement";
|
|
15067
15069
|
params?: {
|
|
15068
|
-
classNames?: string[];
|
|
15069
15070
|
className?: string;
|
|
15071
|
+
classNames?: string[];
|
|
15070
15072
|
};
|
|
15071
15073
|
} | {
|
|
15072
|
-
name
|
|
15074
|
+
name: "cleanupAttrs";
|
|
15073
15075
|
params?: {
|
|
15074
15076
|
newlines?: boolean;
|
|
15075
15077
|
trim?: boolean;
|
|
15076
15078
|
spaces?: boolean;
|
|
15077
15079
|
};
|
|
15078
15080
|
} | {
|
|
15079
|
-
name
|
|
15080
|
-
params?: {};
|
|
15081
|
+
name: "cleanupEnableBackground";
|
|
15081
15082
|
} | {
|
|
15082
|
-
name
|
|
15083
|
+
name: "cleanupIds";
|
|
15083
15084
|
params?: {
|
|
15084
15085
|
remove?: boolean;
|
|
15085
15086
|
minify?: boolean;
|
|
@@ -15088,7 +15089,7 @@ type SvgoSvgo = [] | [
|
|
|
15088
15089
|
preservePrefixes?: string[];
|
|
15089
15090
|
};
|
|
15090
15091
|
} | {
|
|
15091
|
-
name
|
|
15092
|
+
name: "cleanupListOfValues";
|
|
15092
15093
|
params?: {
|
|
15093
15094
|
floatPrecision?: number;
|
|
15094
15095
|
leadingZero?: boolean;
|
|
@@ -15096,7 +15097,7 @@ type SvgoSvgo = [] | [
|
|
|
15096
15097
|
convertToPx?: boolean;
|
|
15097
15098
|
};
|
|
15098
15099
|
} | {
|
|
15099
|
-
name
|
|
15100
|
+
name: "cleanupNumericValues";
|
|
15100
15101
|
params?: {
|
|
15101
15102
|
floatPrecision?: number;
|
|
15102
15103
|
leadingZero?: boolean;
|
|
@@ -15104,56 +15105,59 @@ type SvgoSvgo = [] | [
|
|
|
15104
15105
|
convertToPx?: boolean;
|
|
15105
15106
|
};
|
|
15106
15107
|
} | {
|
|
15107
|
-
name
|
|
15108
|
-
params?: {};
|
|
15108
|
+
name: "collapseGroups";
|
|
15109
15109
|
} | {
|
|
15110
|
-
name
|
|
15110
|
+
name: "convertColors";
|
|
15111
15111
|
params?: {
|
|
15112
|
-
currentColor?: boolean;
|
|
15112
|
+
currentColor?: (boolean | string);
|
|
15113
15113
|
names2hex?: boolean;
|
|
15114
15114
|
rgb2hex?: boolean;
|
|
15115
|
-
convertCase?: (
|
|
15115
|
+
convertCase?: (false | ("lower" | "upper"));
|
|
15116
15116
|
shorthex?: boolean;
|
|
15117
15117
|
shortname?: boolean;
|
|
15118
15118
|
};
|
|
15119
15119
|
} | {
|
|
15120
|
-
name
|
|
15121
|
-
params?: {};
|
|
15120
|
+
name: "convertEllipseToCircle";
|
|
15122
15121
|
} | {
|
|
15123
|
-
name
|
|
15124
|
-
params?: {};
|
|
15122
|
+
name: "convertOneStopGradients";
|
|
15125
15123
|
} | {
|
|
15126
|
-
name
|
|
15124
|
+
name: "convertPathData";
|
|
15127
15125
|
params?: {
|
|
15128
15126
|
applyTransforms?: boolean;
|
|
15129
15127
|
applyTransformsStroked?: boolean;
|
|
15128
|
+
makeArcs?: {
|
|
15129
|
+
threshold?: number;
|
|
15130
|
+
tolerance?: number;
|
|
15131
|
+
};
|
|
15130
15132
|
straightCurves?: boolean;
|
|
15131
15133
|
convertToQ?: boolean;
|
|
15132
15134
|
lineShorthands?: boolean;
|
|
15133
15135
|
convertToZ?: boolean;
|
|
15134
15136
|
curveSmoothShorthands?: boolean;
|
|
15135
|
-
floatPrecision?: number;
|
|
15137
|
+
floatPrecision?: (false | number);
|
|
15136
15138
|
transformPrecision?: number;
|
|
15137
15139
|
smartArcRounding?: boolean;
|
|
15138
15140
|
removeUseless?: boolean;
|
|
15139
15141
|
collapseRepeated?: boolean;
|
|
15140
15142
|
utilizeAbsolute?: boolean;
|
|
15143
|
+
leadingZero?: boolean;
|
|
15141
15144
|
negativeExtraSpace?: boolean;
|
|
15145
|
+
noSpaceAfterFlags?: boolean;
|
|
15142
15146
|
forceAbsolutePath?: boolean;
|
|
15143
15147
|
};
|
|
15144
15148
|
} | {
|
|
15145
|
-
name
|
|
15149
|
+
name: "convertShapeToPath";
|
|
15146
15150
|
params?: {
|
|
15147
15151
|
convertArcs?: boolean;
|
|
15148
15152
|
floatPrecision?: number;
|
|
15149
15153
|
};
|
|
15150
15154
|
} | {
|
|
15151
|
-
name
|
|
15155
|
+
name: "convertStyleToAttrs";
|
|
15152
15156
|
params?: {
|
|
15153
15157
|
keepImportant?: boolean;
|
|
15154
15158
|
};
|
|
15155
15159
|
} | {
|
|
15156
|
-
name
|
|
15160
|
+
name: "convertTransform";
|
|
15157
15161
|
params?: {
|
|
15158
15162
|
convertToShorts?: boolean;
|
|
15159
15163
|
floatPrecision?: number;
|
|
@@ -15166,42 +15170,49 @@ type SvgoSvgo = [] | [
|
|
|
15166
15170
|
collapseIntoOne?: boolean;
|
|
15167
15171
|
};
|
|
15168
15172
|
} | {
|
|
15169
|
-
name
|
|
15173
|
+
name: "inlineStyles";
|
|
15170
15174
|
params?: {
|
|
15171
15175
|
onlyMatchedOnce?: boolean;
|
|
15172
15176
|
removeMatchedSelectors?: boolean;
|
|
15177
|
+
useMqs?: string[];
|
|
15178
|
+
usePseudos?: string[];
|
|
15173
15179
|
};
|
|
15174
15180
|
} | {
|
|
15175
|
-
name
|
|
15181
|
+
name: "mergePaths";
|
|
15176
15182
|
params?: {
|
|
15177
15183
|
force?: boolean;
|
|
15178
15184
|
floatPrecision?: number;
|
|
15179
15185
|
noSpaceAfterFlags?: boolean;
|
|
15180
15186
|
};
|
|
15181
15187
|
} | {
|
|
15182
|
-
name
|
|
15183
|
-
params?: {};
|
|
15188
|
+
name: "mergeStyles";
|
|
15184
15189
|
} | {
|
|
15185
|
-
name
|
|
15190
|
+
name: "minifyStyles";
|
|
15186
15191
|
params?: {
|
|
15187
|
-
|
|
15192
|
+
restructure?: boolean;
|
|
15193
|
+
forceMediaMerge?: boolean;
|
|
15194
|
+
comments?: (boolean | string);
|
|
15195
|
+
usage?: (boolean | {
|
|
15196
|
+
force?: boolean;
|
|
15197
|
+
ids?: boolean;
|
|
15198
|
+
classes?: boolean;
|
|
15199
|
+
tags?: boolean;
|
|
15200
|
+
});
|
|
15188
15201
|
};
|
|
15189
15202
|
} | {
|
|
15190
|
-
name
|
|
15191
|
-
params?: {};
|
|
15203
|
+
name: "moveElemsAttrsToGroup";
|
|
15192
15204
|
} | {
|
|
15193
|
-
name
|
|
15194
|
-
params?: {};
|
|
15205
|
+
name: "moveGroupAttrsToElems";
|
|
15195
15206
|
} | {
|
|
15196
|
-
name
|
|
15207
|
+
name: "prefixIds";
|
|
15197
15208
|
params?: {
|
|
15198
15209
|
delim?: string;
|
|
15199
|
-
prefix?: string;
|
|
15210
|
+
prefix?: (boolean | string);
|
|
15200
15211
|
prefixIds?: boolean;
|
|
15201
15212
|
prefixClassNames?: boolean;
|
|
15202
15213
|
};
|
|
15203
15214
|
} | {
|
|
15204
|
-
name
|
|
15215
|
+
name: "preset-default";
|
|
15205
15216
|
params?: {
|
|
15206
15217
|
overrides?: {
|
|
15207
15218
|
cleanupAttrs?: (boolean | {
|
|
@@ -15209,7 +15220,7 @@ type SvgoSvgo = [] | [
|
|
|
15209
15220
|
trim?: boolean;
|
|
15210
15221
|
spaces?: boolean;
|
|
15211
15222
|
});
|
|
15212
|
-
cleanupEnableBackground?:
|
|
15223
|
+
cleanupEnableBackground?: false;
|
|
15213
15224
|
cleanupIds?: (boolean | {
|
|
15214
15225
|
remove?: boolean;
|
|
15215
15226
|
minify?: boolean;
|
|
@@ -15223,23 +15234,38 @@ type SvgoSvgo = [] | [
|
|
|
15223
15234
|
defaultPx?: boolean;
|
|
15224
15235
|
convertToPx?: boolean;
|
|
15225
15236
|
});
|
|
15226
|
-
collapseGroups?:
|
|
15237
|
+
collapseGroups?: false;
|
|
15227
15238
|
convertColors?: (boolean | {
|
|
15228
|
-
currentColor?: boolean;
|
|
15239
|
+
currentColor?: (boolean | string);
|
|
15229
15240
|
names2hex?: boolean;
|
|
15230
15241
|
rgb2hex?: boolean;
|
|
15231
|
-
convertCase?: (
|
|
15242
|
+
convertCase?: (false | ("lower" | "upper"));
|
|
15232
15243
|
shorthex?: boolean;
|
|
15233
15244
|
shortname?: boolean;
|
|
15234
15245
|
});
|
|
15235
|
-
convertEllipseToCircle?:
|
|
15246
|
+
convertEllipseToCircle?: false;
|
|
15236
15247
|
convertPathData?: (boolean | {
|
|
15237
|
-
|
|
15238
|
-
|
|
15239
|
-
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15248
|
+
applyTransforms?: boolean;
|
|
15249
|
+
applyTransformsStroked?: boolean;
|
|
15250
|
+
makeArcs?: {
|
|
15251
|
+
threshold?: number;
|
|
15252
|
+
tolerance?: number;
|
|
15253
|
+
};
|
|
15254
|
+
straightCurves?: boolean;
|
|
15255
|
+
convertToQ?: boolean;
|
|
15256
|
+
lineShorthands?: boolean;
|
|
15257
|
+
convertToZ?: boolean;
|
|
15258
|
+
curveSmoothShorthands?: boolean;
|
|
15259
|
+
floatPrecision?: (false | number);
|
|
15260
|
+
transformPrecision?: number;
|
|
15261
|
+
smartArcRounding?: boolean;
|
|
15262
|
+
removeUseless?: boolean;
|
|
15263
|
+
collapseRepeated?: boolean;
|
|
15264
|
+
utilizeAbsolute?: boolean;
|
|
15265
|
+
leadingZero?: boolean;
|
|
15266
|
+
negativeExtraSpace?: boolean;
|
|
15267
|
+
noSpaceAfterFlags?: boolean;
|
|
15268
|
+
forceAbsolutePath?: boolean;
|
|
15243
15269
|
});
|
|
15244
15270
|
convertShapeToPath?: (boolean | {
|
|
15245
15271
|
convertArcs?: boolean;
|
|
@@ -15259,20 +15285,30 @@ type SvgoSvgo = [] | [
|
|
|
15259
15285
|
inlineStyles?: (boolean | {
|
|
15260
15286
|
onlyMatchedOnce?: boolean;
|
|
15261
15287
|
removeMatchedSelectors?: boolean;
|
|
15288
|
+
useMqs?: string[];
|
|
15289
|
+
usePseudos?: string[];
|
|
15262
15290
|
});
|
|
15263
15291
|
mergePaths?: (boolean | {
|
|
15264
15292
|
force?: boolean;
|
|
15265
15293
|
floatPrecision?: number;
|
|
15266
15294
|
noSpaceAfterFlags?: boolean;
|
|
15267
15295
|
});
|
|
15268
|
-
mergeStyles?:
|
|
15296
|
+
mergeStyles?: false;
|
|
15269
15297
|
minifyStyles?: (boolean | {
|
|
15270
|
-
|
|
15298
|
+
restructure?: boolean;
|
|
15299
|
+
forceMediaMerge?: boolean;
|
|
15300
|
+
comments?: (boolean | string);
|
|
15301
|
+
usage?: (boolean | {
|
|
15302
|
+
force?: boolean;
|
|
15303
|
+
ids?: boolean;
|
|
15304
|
+
classes?: boolean;
|
|
15305
|
+
tags?: boolean;
|
|
15306
|
+
});
|
|
15271
15307
|
});
|
|
15272
|
-
moveElemsAttrsToGroup?:
|
|
15273
|
-
moveGroupAttrsToElems?:
|
|
15308
|
+
moveElemsAttrsToGroup?: false;
|
|
15309
|
+
moveGroupAttrsToElems?: false;
|
|
15274
15310
|
removeComments?: (boolean | {
|
|
15275
|
-
preservePatterns?: (
|
|
15311
|
+
preservePatterns?: (false | string[]);
|
|
15276
15312
|
});
|
|
15277
15313
|
removeDesc?: (boolean | {
|
|
15278
15314
|
removeAny?: boolean;
|
|
@@ -15281,8 +15317,8 @@ type SvgoSvgo = [] | [
|
|
|
15281
15317
|
removeEditorsNSData?: (boolean | {
|
|
15282
15318
|
additionalNamespaces?: string[];
|
|
15283
15319
|
});
|
|
15284
|
-
removeEmptyAttrs?:
|
|
15285
|
-
removeEmptyContainers?:
|
|
15320
|
+
removeEmptyAttrs?: false;
|
|
15321
|
+
removeEmptyContainers?: false;
|
|
15286
15322
|
removeEmptyText?: (boolean | {
|
|
15287
15323
|
text?: boolean;
|
|
15288
15324
|
tspan?: boolean;
|
|
@@ -15305,9 +15341,9 @@ type SvgoSvgo = [] | [
|
|
|
15305
15341
|
polylineEmptyPoints?: boolean;
|
|
15306
15342
|
polygonEmptyPoints?: boolean;
|
|
15307
15343
|
});
|
|
15308
|
-
removeMetadata?:
|
|
15309
|
-
removeNonInheritableGroupAttrs?:
|
|
15310
|
-
removeTitle?:
|
|
15344
|
+
removeMetadata?: false;
|
|
15345
|
+
removeNonInheritableGroupAttrs?: false;
|
|
15346
|
+
removeTitle?: false;
|
|
15311
15347
|
removeUnknownsAndDefaults?: (boolean | {
|
|
15312
15348
|
unknownContent?: boolean;
|
|
15313
15349
|
unknownAttrs?: boolean;
|
|
@@ -15318,24 +15354,24 @@ type SvgoSvgo = [] | [
|
|
|
15318
15354
|
keepAriaAttrs?: boolean;
|
|
15319
15355
|
keepRoleAttr?: boolean;
|
|
15320
15356
|
});
|
|
15321
|
-
removeUnusedNS?:
|
|
15322
|
-
removeUselessDefs?:
|
|
15357
|
+
removeUnusedNS?: false;
|
|
15358
|
+
removeUselessDefs?: false;
|
|
15323
15359
|
removeUselessStrokeAndFill?: (boolean | {
|
|
15324
15360
|
stroke?: boolean;
|
|
15325
15361
|
fill?: boolean;
|
|
15326
15362
|
removeNone?: boolean;
|
|
15327
15363
|
});
|
|
15328
|
-
removeViewBox?:
|
|
15329
|
-
removeXMLProcInst?:
|
|
15364
|
+
removeViewBox?: false;
|
|
15365
|
+
removeXMLProcInst?: false;
|
|
15330
15366
|
sortAttrs?: (boolean | {
|
|
15331
15367
|
order?: string[];
|
|
15332
|
-
xmlnsOrder?: "front";
|
|
15368
|
+
xmlnsOrder?: ("front" | "alphabetical");
|
|
15333
15369
|
});
|
|
15334
|
-
sortDefsChildren?:
|
|
15370
|
+
sortDefsChildren?: false;
|
|
15335
15371
|
};
|
|
15336
15372
|
};
|
|
15337
15373
|
} | {
|
|
15338
|
-
name
|
|
15374
|
+
name: "removeAttributesBySelector";
|
|
15339
15375
|
params?: {
|
|
15340
15376
|
selectors?: {
|
|
15341
15377
|
selector?: string;
|
|
@@ -15344,59 +15380,57 @@ type SvgoSvgo = [] | [
|
|
|
15344
15380
|
}[];
|
|
15345
15381
|
};
|
|
15346
15382
|
} | {
|
|
15347
|
-
name
|
|
15383
|
+
name: "removeAttrs";
|
|
15348
15384
|
params?: {
|
|
15349
|
-
attrs?: string;
|
|
15385
|
+
attrs?: (string | string[]);
|
|
15350
15386
|
elemSeparator?: string;
|
|
15351
15387
|
preserveCurrentColor?: boolean;
|
|
15352
15388
|
};
|
|
15353
15389
|
} | {
|
|
15354
|
-
name
|
|
15390
|
+
name: "removeComments";
|
|
15355
15391
|
params?: {
|
|
15356
|
-
preservePatterns?: (
|
|
15392
|
+
preservePatterns?: (false | string[]);
|
|
15357
15393
|
};
|
|
15358
15394
|
} | {
|
|
15359
|
-
name
|
|
15395
|
+
name: "removeDeprecatedAttrs";
|
|
15360
15396
|
params?: {
|
|
15361
15397
|
removeAny?: boolean;
|
|
15362
15398
|
};
|
|
15363
15399
|
} | {
|
|
15364
|
-
name
|
|
15400
|
+
name: "removeDesc";
|
|
15365
15401
|
params?: {
|
|
15366
15402
|
removeAny?: boolean;
|
|
15367
15403
|
};
|
|
15368
15404
|
} | {
|
|
15369
|
-
name
|
|
15405
|
+
name: "removeDimensions";
|
|
15370
15406
|
params?: {};
|
|
15371
15407
|
} | {
|
|
15372
|
-
name
|
|
15408
|
+
name: "removeDoctype";
|
|
15373
15409
|
params?: {};
|
|
15374
15410
|
} | {
|
|
15375
|
-
name
|
|
15411
|
+
name: "removeEditorsNSData";
|
|
15376
15412
|
params?: {
|
|
15377
15413
|
additionalNamespaces?: string[];
|
|
15378
15414
|
};
|
|
15379
15415
|
} | {
|
|
15380
|
-
name
|
|
15416
|
+
name: "removeElementsByAttr";
|
|
15381
15417
|
params?: {
|
|
15382
|
-
id?: string[];
|
|
15383
|
-
class?: string[];
|
|
15418
|
+
id?: (string | string[]);
|
|
15419
|
+
class?: (string | string[]);
|
|
15384
15420
|
};
|
|
15385
15421
|
} | {
|
|
15386
|
-
name
|
|
15387
|
-
params?: {};
|
|
15422
|
+
name: "removeEmptyAttrs";
|
|
15388
15423
|
} | {
|
|
15389
|
-
name
|
|
15390
|
-
params?: {};
|
|
15424
|
+
name: "removeEmptyContainers";
|
|
15391
15425
|
} | {
|
|
15392
|
-
name
|
|
15426
|
+
name: "removeEmptyText";
|
|
15393
15427
|
params?: {
|
|
15394
15428
|
text?: boolean;
|
|
15395
15429
|
tspan?: boolean;
|
|
15396
15430
|
tref?: boolean;
|
|
15397
15431
|
};
|
|
15398
15432
|
} | {
|
|
15399
|
-
name
|
|
15433
|
+
name: "removeHiddenElems";
|
|
15400
15434
|
params?: {
|
|
15401
15435
|
isHidden?: boolean;
|
|
15402
15436
|
displayNone?: boolean;
|
|
@@ -15415,28 +15449,21 @@ type SvgoSvgo = [] | [
|
|
|
15415
15449
|
polygonEmptyPoints?: boolean;
|
|
15416
15450
|
};
|
|
15417
15451
|
} | {
|
|
15418
|
-
name
|
|
15419
|
-
params?: {};
|
|
15452
|
+
name: "removeMetadata";
|
|
15420
15453
|
} | {
|
|
15421
|
-
name
|
|
15422
|
-
params?: {};
|
|
15454
|
+
name: "removeNonInheritableGroupAttrs";
|
|
15423
15455
|
} | {
|
|
15424
|
-
name
|
|
15425
|
-
params?: {};
|
|
15456
|
+
name: "removeOffCanvasPaths";
|
|
15426
15457
|
} | {
|
|
15427
|
-
name
|
|
15428
|
-
params?: {};
|
|
15458
|
+
name: "removeRasterImages";
|
|
15429
15459
|
} | {
|
|
15430
|
-
name
|
|
15431
|
-
params?: {};
|
|
15460
|
+
name: "removeScripts";
|
|
15432
15461
|
} | {
|
|
15433
|
-
name
|
|
15434
|
-
params?: {};
|
|
15462
|
+
name: "removeStyleElement";
|
|
15435
15463
|
} | {
|
|
15436
|
-
name
|
|
15437
|
-
params?: {};
|
|
15464
|
+
name: "removeTitle";
|
|
15438
15465
|
} | {
|
|
15439
|
-
name
|
|
15466
|
+
name: "removeUnknownsAndDefaults";
|
|
15440
15467
|
params?: {
|
|
15441
15468
|
unknownContent?: boolean;
|
|
15442
15469
|
unknownAttrs?: boolean;
|
|
@@ -15448,45 +15475,39 @@ type SvgoSvgo = [] | [
|
|
|
15448
15475
|
keepRoleAttr?: boolean;
|
|
15449
15476
|
};
|
|
15450
15477
|
} | {
|
|
15451
|
-
name
|
|
15452
|
-
params?: {};
|
|
15478
|
+
name: "removeUnusedNS";
|
|
15453
15479
|
} | {
|
|
15454
|
-
name
|
|
15455
|
-
params?: {};
|
|
15480
|
+
name: "removeUselessDefs";
|
|
15456
15481
|
} | {
|
|
15457
|
-
name
|
|
15482
|
+
name: "removeUselessStrokeAndFill";
|
|
15458
15483
|
params?: {
|
|
15459
15484
|
stroke?: boolean;
|
|
15460
15485
|
fill?: boolean;
|
|
15461
15486
|
removeNone?: boolean;
|
|
15462
15487
|
};
|
|
15463
15488
|
} | {
|
|
15464
|
-
name
|
|
15465
|
-
params?: {};
|
|
15489
|
+
name: "removeViewBox";
|
|
15466
15490
|
} | {
|
|
15467
|
-
name
|
|
15491
|
+
name: "removeXlink";
|
|
15468
15492
|
params?: {
|
|
15469
15493
|
includeLegacy?: boolean;
|
|
15470
15494
|
};
|
|
15471
15495
|
} | {
|
|
15472
|
-
name
|
|
15473
|
-
params?: {};
|
|
15496
|
+
name: "removeXMLNS";
|
|
15474
15497
|
} | {
|
|
15475
|
-
name
|
|
15476
|
-
params?: {};
|
|
15498
|
+
name: "removeXMLProcInst";
|
|
15477
15499
|
} | {
|
|
15478
|
-
name
|
|
15479
|
-
params?: {};
|
|
15500
|
+
name: "reusePaths";
|
|
15480
15501
|
} | {
|
|
15481
|
-
name
|
|
15502
|
+
name: "sortAttrs";
|
|
15482
15503
|
params?: {
|
|
15483
15504
|
order?: string[];
|
|
15484
|
-
xmlnsOrder?: "front";
|
|
15505
|
+
xmlnsOrder?: ("front" | "alphabetical");
|
|
15485
15506
|
};
|
|
15486
15507
|
} | {
|
|
15487
|
-
name
|
|
15488
|
-
params?: {};
|
|
15508
|
+
name: "sortDefsChildren";
|
|
15489
15509
|
})[];
|
|
15510
|
+
svgoConfig?: (boolean | string);
|
|
15490
15511
|
}
|
|
15491
15512
|
];
|
|
15492
15513
|
type SwitchColonSpacing = [] | [
|
|
@@ -17810,7 +17831,7 @@ interface ConfigSpecialsOptions {
|
|
|
17810
17831
|
}
|
|
17811
17832
|
interface ConfigStylisticOptions extends OptionsOverrides {
|
|
17812
17833
|
}
|
|
17813
|
-
type ConfigSVGOOptions = ESLintConfig<
|
|
17834
|
+
type ConfigSVGOOptions = ESLintConfig<RuleOptions$1>;
|
|
17814
17835
|
interface ConfigTestOptions extends OptionsOverrides {
|
|
17815
17836
|
/**
|
|
17816
17837
|
* Overrides built-in vitest rules
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
|
3
3
|
import { ESLintPluginCommandOptions } from 'eslint-plugin-command/types';
|
|
4
4
|
import { RecommendedOptions } from 'eslint-plugin-github-action';
|
|
5
5
|
export { default as pluginGitHubAction } from 'eslint-plugin-github-action';
|
|
6
|
-
import {
|
|
6
|
+
import { RuleOptions as RuleOptions$1 } from 'eslint-plugin-svgo/rule-options';
|
|
7
7
|
import { Options } from 'eslint-processor-vue-blocks';
|
|
8
8
|
export { default as processorVueBlocks } from 'eslint-processor-vue-blocks';
|
|
9
9
|
import { Linter } from 'eslint';
|
|
@@ -15040,7 +15040,7 @@ type SvgoSvgo = [] | [
|
|
|
15040
15040
|
doctypeStart?: string;
|
|
15041
15041
|
eol?: ("lf" | "crlf");
|
|
15042
15042
|
finalNewline?: boolean;
|
|
15043
|
-
indent?: number;
|
|
15043
|
+
indent?: (string | number);
|
|
15044
15044
|
pretty?: boolean;
|
|
15045
15045
|
procInstEnd?: string;
|
|
15046
15046
|
procInstStart?: string;
|
|
@@ -15053,33 +15053,34 @@ type SvgoSvgo = [] | [
|
|
|
15053
15053
|
textEnd?: string;
|
|
15054
15054
|
textStart?: string;
|
|
15055
15055
|
useShortTags?: boolean;
|
|
15056
|
-
[k: string]: unknown | undefined;
|
|
15057
15056
|
};
|
|
15058
|
-
plugins?: (("preset-default" | "cleanupAttrs" | "cleanupEnableBackground" | "cleanupIds" | "cleanupNumericValues" | "collapseGroups" | "convertColors" | "convertEllipseToCircle" | "convertPathData" | "convertShapeToPath" | "convertTransform" | "inlineStyles" | "mergePaths" | "mergeStyles" | "minifyStyles" | "moveElemsAttrsToGroup" | "moveGroupAttrsToElems" | "removeComments" | "removeDesc" | "removeDoctype" | "removeEditorsNSData" | "removeEmptyAttrs" | "removeEmptyContainers" | "removeEmptyText" | "removeHiddenElems" | "removeMetadata" | "removeNonInheritableGroupAttrs" | "removeTitle" | "removeUnknownsAndDefaults" | "removeUnusedNS" | "removeUselessDefs" | "removeUselessStrokeAndFill" | "removeViewBox" | "removeXMLProcInst" | "sortAttrs" | "sortDefsChildren" | "addAttributesToSVGElement" | "addClassesToSVGElement" | "cleanupListOfValues" | "convertOneStopGradients" | "convertStyleToAttrs" | "prefixIds" | "removeAttributesBySelector" | "removeAttrs" | "removeDimensions" | "removeElementsByAttr" | "removeOffCanvasPaths" | "removeRasterImages" | "
|
|
15059
|
-
name
|
|
15057
|
+
plugins?: (("preset-default" | "cleanupAttrs" | "cleanupEnableBackground" | "cleanupIds" | "cleanupNumericValues" | "collapseGroups" | "convertColors" | "convertEllipseToCircle" | "convertPathData" | "convertShapeToPath" | "convertTransform" | "inlineStyles" | "mergePaths" | "mergeStyles" | "minifyStyles" | "moveElemsAttrsToGroup" | "moveGroupAttrsToElems" | "removeComments" | "removeDesc" | "removeDoctype" | "removeEditorsNSData" | "removeEmptyAttrs" | "removeEmptyContainers" | "removeEmptyText" | "removeHiddenElems" | "removeMetadata" | "removeNonInheritableGroupAttrs" | "removeTitle" | "removeUnknownsAndDefaults" | "removeUnusedNS" | "removeUselessDefs" | "removeUselessStrokeAndFill" | "removeViewBox" | "removeXMLProcInst" | "sortAttrs" | "sortDefsChildren" | "addAttributesToSVGElement" | "addClassesToSVGElement" | "cleanupListOfValues" | "convertOneStopGradients" | "convertStyleToAttrs" | "prefixIds" | "removeAttributesBySelector" | "removeAttrs" | "removeDeprecatedAttrs" | "removeDimensions" | "removeElementsByAttr" | "removeOffCanvasPaths" | "removeRasterImages" | "removeScripts" | "removeStyleElement" | "removeXlink" | "removeXMLNS" | "reusePaths") | {
|
|
15058
|
+
name: "addAttributesToSVGElement";
|
|
15060
15059
|
params?: {
|
|
15061
|
-
|
|
15062
|
-
[k: string]:
|
|
15063
|
-
}
|
|
15060
|
+
attribute?: (string | {
|
|
15061
|
+
[k: string]: (string | null);
|
|
15062
|
+
});
|
|
15063
|
+
attributes?: (string | {
|
|
15064
|
+
[k: string]: (string | null);
|
|
15065
|
+
})[];
|
|
15064
15066
|
};
|
|
15065
15067
|
} | {
|
|
15066
|
-
name
|
|
15068
|
+
name: "addClassesToSVGElement";
|
|
15067
15069
|
params?: {
|
|
15068
|
-
classNames?: string[];
|
|
15069
15070
|
className?: string;
|
|
15071
|
+
classNames?: string[];
|
|
15070
15072
|
};
|
|
15071
15073
|
} | {
|
|
15072
|
-
name
|
|
15074
|
+
name: "cleanupAttrs";
|
|
15073
15075
|
params?: {
|
|
15074
15076
|
newlines?: boolean;
|
|
15075
15077
|
trim?: boolean;
|
|
15076
15078
|
spaces?: boolean;
|
|
15077
15079
|
};
|
|
15078
15080
|
} | {
|
|
15079
|
-
name
|
|
15080
|
-
params?: {};
|
|
15081
|
+
name: "cleanupEnableBackground";
|
|
15081
15082
|
} | {
|
|
15082
|
-
name
|
|
15083
|
+
name: "cleanupIds";
|
|
15083
15084
|
params?: {
|
|
15084
15085
|
remove?: boolean;
|
|
15085
15086
|
minify?: boolean;
|
|
@@ -15088,7 +15089,7 @@ type SvgoSvgo = [] | [
|
|
|
15088
15089
|
preservePrefixes?: string[];
|
|
15089
15090
|
};
|
|
15090
15091
|
} | {
|
|
15091
|
-
name
|
|
15092
|
+
name: "cleanupListOfValues";
|
|
15092
15093
|
params?: {
|
|
15093
15094
|
floatPrecision?: number;
|
|
15094
15095
|
leadingZero?: boolean;
|
|
@@ -15096,7 +15097,7 @@ type SvgoSvgo = [] | [
|
|
|
15096
15097
|
convertToPx?: boolean;
|
|
15097
15098
|
};
|
|
15098
15099
|
} | {
|
|
15099
|
-
name
|
|
15100
|
+
name: "cleanupNumericValues";
|
|
15100
15101
|
params?: {
|
|
15101
15102
|
floatPrecision?: number;
|
|
15102
15103
|
leadingZero?: boolean;
|
|
@@ -15104,56 +15105,59 @@ type SvgoSvgo = [] | [
|
|
|
15104
15105
|
convertToPx?: boolean;
|
|
15105
15106
|
};
|
|
15106
15107
|
} | {
|
|
15107
|
-
name
|
|
15108
|
-
params?: {};
|
|
15108
|
+
name: "collapseGroups";
|
|
15109
15109
|
} | {
|
|
15110
|
-
name
|
|
15110
|
+
name: "convertColors";
|
|
15111
15111
|
params?: {
|
|
15112
|
-
currentColor?: boolean;
|
|
15112
|
+
currentColor?: (boolean | string);
|
|
15113
15113
|
names2hex?: boolean;
|
|
15114
15114
|
rgb2hex?: boolean;
|
|
15115
|
-
convertCase?: (
|
|
15115
|
+
convertCase?: (false | ("lower" | "upper"));
|
|
15116
15116
|
shorthex?: boolean;
|
|
15117
15117
|
shortname?: boolean;
|
|
15118
15118
|
};
|
|
15119
15119
|
} | {
|
|
15120
|
-
name
|
|
15121
|
-
params?: {};
|
|
15120
|
+
name: "convertEllipseToCircle";
|
|
15122
15121
|
} | {
|
|
15123
|
-
name
|
|
15124
|
-
params?: {};
|
|
15122
|
+
name: "convertOneStopGradients";
|
|
15125
15123
|
} | {
|
|
15126
|
-
name
|
|
15124
|
+
name: "convertPathData";
|
|
15127
15125
|
params?: {
|
|
15128
15126
|
applyTransforms?: boolean;
|
|
15129
15127
|
applyTransformsStroked?: boolean;
|
|
15128
|
+
makeArcs?: {
|
|
15129
|
+
threshold?: number;
|
|
15130
|
+
tolerance?: number;
|
|
15131
|
+
};
|
|
15130
15132
|
straightCurves?: boolean;
|
|
15131
15133
|
convertToQ?: boolean;
|
|
15132
15134
|
lineShorthands?: boolean;
|
|
15133
15135
|
convertToZ?: boolean;
|
|
15134
15136
|
curveSmoothShorthands?: boolean;
|
|
15135
|
-
floatPrecision?: number;
|
|
15137
|
+
floatPrecision?: (false | number);
|
|
15136
15138
|
transformPrecision?: number;
|
|
15137
15139
|
smartArcRounding?: boolean;
|
|
15138
15140
|
removeUseless?: boolean;
|
|
15139
15141
|
collapseRepeated?: boolean;
|
|
15140
15142
|
utilizeAbsolute?: boolean;
|
|
15143
|
+
leadingZero?: boolean;
|
|
15141
15144
|
negativeExtraSpace?: boolean;
|
|
15145
|
+
noSpaceAfterFlags?: boolean;
|
|
15142
15146
|
forceAbsolutePath?: boolean;
|
|
15143
15147
|
};
|
|
15144
15148
|
} | {
|
|
15145
|
-
name
|
|
15149
|
+
name: "convertShapeToPath";
|
|
15146
15150
|
params?: {
|
|
15147
15151
|
convertArcs?: boolean;
|
|
15148
15152
|
floatPrecision?: number;
|
|
15149
15153
|
};
|
|
15150
15154
|
} | {
|
|
15151
|
-
name
|
|
15155
|
+
name: "convertStyleToAttrs";
|
|
15152
15156
|
params?: {
|
|
15153
15157
|
keepImportant?: boolean;
|
|
15154
15158
|
};
|
|
15155
15159
|
} | {
|
|
15156
|
-
name
|
|
15160
|
+
name: "convertTransform";
|
|
15157
15161
|
params?: {
|
|
15158
15162
|
convertToShorts?: boolean;
|
|
15159
15163
|
floatPrecision?: number;
|
|
@@ -15166,42 +15170,49 @@ type SvgoSvgo = [] | [
|
|
|
15166
15170
|
collapseIntoOne?: boolean;
|
|
15167
15171
|
};
|
|
15168
15172
|
} | {
|
|
15169
|
-
name
|
|
15173
|
+
name: "inlineStyles";
|
|
15170
15174
|
params?: {
|
|
15171
15175
|
onlyMatchedOnce?: boolean;
|
|
15172
15176
|
removeMatchedSelectors?: boolean;
|
|
15177
|
+
useMqs?: string[];
|
|
15178
|
+
usePseudos?: string[];
|
|
15173
15179
|
};
|
|
15174
15180
|
} | {
|
|
15175
|
-
name
|
|
15181
|
+
name: "mergePaths";
|
|
15176
15182
|
params?: {
|
|
15177
15183
|
force?: boolean;
|
|
15178
15184
|
floatPrecision?: number;
|
|
15179
15185
|
noSpaceAfterFlags?: boolean;
|
|
15180
15186
|
};
|
|
15181
15187
|
} | {
|
|
15182
|
-
name
|
|
15183
|
-
params?: {};
|
|
15188
|
+
name: "mergeStyles";
|
|
15184
15189
|
} | {
|
|
15185
|
-
name
|
|
15190
|
+
name: "minifyStyles";
|
|
15186
15191
|
params?: {
|
|
15187
|
-
|
|
15192
|
+
restructure?: boolean;
|
|
15193
|
+
forceMediaMerge?: boolean;
|
|
15194
|
+
comments?: (boolean | string);
|
|
15195
|
+
usage?: (boolean | {
|
|
15196
|
+
force?: boolean;
|
|
15197
|
+
ids?: boolean;
|
|
15198
|
+
classes?: boolean;
|
|
15199
|
+
tags?: boolean;
|
|
15200
|
+
});
|
|
15188
15201
|
};
|
|
15189
15202
|
} | {
|
|
15190
|
-
name
|
|
15191
|
-
params?: {};
|
|
15203
|
+
name: "moveElemsAttrsToGroup";
|
|
15192
15204
|
} | {
|
|
15193
|
-
name
|
|
15194
|
-
params?: {};
|
|
15205
|
+
name: "moveGroupAttrsToElems";
|
|
15195
15206
|
} | {
|
|
15196
|
-
name
|
|
15207
|
+
name: "prefixIds";
|
|
15197
15208
|
params?: {
|
|
15198
15209
|
delim?: string;
|
|
15199
|
-
prefix?: string;
|
|
15210
|
+
prefix?: (boolean | string);
|
|
15200
15211
|
prefixIds?: boolean;
|
|
15201
15212
|
prefixClassNames?: boolean;
|
|
15202
15213
|
};
|
|
15203
15214
|
} | {
|
|
15204
|
-
name
|
|
15215
|
+
name: "preset-default";
|
|
15205
15216
|
params?: {
|
|
15206
15217
|
overrides?: {
|
|
15207
15218
|
cleanupAttrs?: (boolean | {
|
|
@@ -15209,7 +15220,7 @@ type SvgoSvgo = [] | [
|
|
|
15209
15220
|
trim?: boolean;
|
|
15210
15221
|
spaces?: boolean;
|
|
15211
15222
|
});
|
|
15212
|
-
cleanupEnableBackground?:
|
|
15223
|
+
cleanupEnableBackground?: false;
|
|
15213
15224
|
cleanupIds?: (boolean | {
|
|
15214
15225
|
remove?: boolean;
|
|
15215
15226
|
minify?: boolean;
|
|
@@ -15223,23 +15234,38 @@ type SvgoSvgo = [] | [
|
|
|
15223
15234
|
defaultPx?: boolean;
|
|
15224
15235
|
convertToPx?: boolean;
|
|
15225
15236
|
});
|
|
15226
|
-
collapseGroups?:
|
|
15237
|
+
collapseGroups?: false;
|
|
15227
15238
|
convertColors?: (boolean | {
|
|
15228
|
-
currentColor?: boolean;
|
|
15239
|
+
currentColor?: (boolean | string);
|
|
15229
15240
|
names2hex?: boolean;
|
|
15230
15241
|
rgb2hex?: boolean;
|
|
15231
|
-
convertCase?: (
|
|
15242
|
+
convertCase?: (false | ("lower" | "upper"));
|
|
15232
15243
|
shorthex?: boolean;
|
|
15233
15244
|
shortname?: boolean;
|
|
15234
15245
|
});
|
|
15235
|
-
convertEllipseToCircle?:
|
|
15246
|
+
convertEllipseToCircle?: false;
|
|
15236
15247
|
convertPathData?: (boolean | {
|
|
15237
|
-
|
|
15238
|
-
|
|
15239
|
-
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15248
|
+
applyTransforms?: boolean;
|
|
15249
|
+
applyTransformsStroked?: boolean;
|
|
15250
|
+
makeArcs?: {
|
|
15251
|
+
threshold?: number;
|
|
15252
|
+
tolerance?: number;
|
|
15253
|
+
};
|
|
15254
|
+
straightCurves?: boolean;
|
|
15255
|
+
convertToQ?: boolean;
|
|
15256
|
+
lineShorthands?: boolean;
|
|
15257
|
+
convertToZ?: boolean;
|
|
15258
|
+
curveSmoothShorthands?: boolean;
|
|
15259
|
+
floatPrecision?: (false | number);
|
|
15260
|
+
transformPrecision?: number;
|
|
15261
|
+
smartArcRounding?: boolean;
|
|
15262
|
+
removeUseless?: boolean;
|
|
15263
|
+
collapseRepeated?: boolean;
|
|
15264
|
+
utilizeAbsolute?: boolean;
|
|
15265
|
+
leadingZero?: boolean;
|
|
15266
|
+
negativeExtraSpace?: boolean;
|
|
15267
|
+
noSpaceAfterFlags?: boolean;
|
|
15268
|
+
forceAbsolutePath?: boolean;
|
|
15243
15269
|
});
|
|
15244
15270
|
convertShapeToPath?: (boolean | {
|
|
15245
15271
|
convertArcs?: boolean;
|
|
@@ -15259,20 +15285,30 @@ type SvgoSvgo = [] | [
|
|
|
15259
15285
|
inlineStyles?: (boolean | {
|
|
15260
15286
|
onlyMatchedOnce?: boolean;
|
|
15261
15287
|
removeMatchedSelectors?: boolean;
|
|
15288
|
+
useMqs?: string[];
|
|
15289
|
+
usePseudos?: string[];
|
|
15262
15290
|
});
|
|
15263
15291
|
mergePaths?: (boolean | {
|
|
15264
15292
|
force?: boolean;
|
|
15265
15293
|
floatPrecision?: number;
|
|
15266
15294
|
noSpaceAfterFlags?: boolean;
|
|
15267
15295
|
});
|
|
15268
|
-
mergeStyles?:
|
|
15296
|
+
mergeStyles?: false;
|
|
15269
15297
|
minifyStyles?: (boolean | {
|
|
15270
|
-
|
|
15298
|
+
restructure?: boolean;
|
|
15299
|
+
forceMediaMerge?: boolean;
|
|
15300
|
+
comments?: (boolean | string);
|
|
15301
|
+
usage?: (boolean | {
|
|
15302
|
+
force?: boolean;
|
|
15303
|
+
ids?: boolean;
|
|
15304
|
+
classes?: boolean;
|
|
15305
|
+
tags?: boolean;
|
|
15306
|
+
});
|
|
15271
15307
|
});
|
|
15272
|
-
moveElemsAttrsToGroup?:
|
|
15273
|
-
moveGroupAttrsToElems?:
|
|
15308
|
+
moveElemsAttrsToGroup?: false;
|
|
15309
|
+
moveGroupAttrsToElems?: false;
|
|
15274
15310
|
removeComments?: (boolean | {
|
|
15275
|
-
preservePatterns?: (
|
|
15311
|
+
preservePatterns?: (false | string[]);
|
|
15276
15312
|
});
|
|
15277
15313
|
removeDesc?: (boolean | {
|
|
15278
15314
|
removeAny?: boolean;
|
|
@@ -15281,8 +15317,8 @@ type SvgoSvgo = [] | [
|
|
|
15281
15317
|
removeEditorsNSData?: (boolean | {
|
|
15282
15318
|
additionalNamespaces?: string[];
|
|
15283
15319
|
});
|
|
15284
|
-
removeEmptyAttrs?:
|
|
15285
|
-
removeEmptyContainers?:
|
|
15320
|
+
removeEmptyAttrs?: false;
|
|
15321
|
+
removeEmptyContainers?: false;
|
|
15286
15322
|
removeEmptyText?: (boolean | {
|
|
15287
15323
|
text?: boolean;
|
|
15288
15324
|
tspan?: boolean;
|
|
@@ -15305,9 +15341,9 @@ type SvgoSvgo = [] | [
|
|
|
15305
15341
|
polylineEmptyPoints?: boolean;
|
|
15306
15342
|
polygonEmptyPoints?: boolean;
|
|
15307
15343
|
});
|
|
15308
|
-
removeMetadata?:
|
|
15309
|
-
removeNonInheritableGroupAttrs?:
|
|
15310
|
-
removeTitle?:
|
|
15344
|
+
removeMetadata?: false;
|
|
15345
|
+
removeNonInheritableGroupAttrs?: false;
|
|
15346
|
+
removeTitle?: false;
|
|
15311
15347
|
removeUnknownsAndDefaults?: (boolean | {
|
|
15312
15348
|
unknownContent?: boolean;
|
|
15313
15349
|
unknownAttrs?: boolean;
|
|
@@ -15318,24 +15354,24 @@ type SvgoSvgo = [] | [
|
|
|
15318
15354
|
keepAriaAttrs?: boolean;
|
|
15319
15355
|
keepRoleAttr?: boolean;
|
|
15320
15356
|
});
|
|
15321
|
-
removeUnusedNS?:
|
|
15322
|
-
removeUselessDefs?:
|
|
15357
|
+
removeUnusedNS?: false;
|
|
15358
|
+
removeUselessDefs?: false;
|
|
15323
15359
|
removeUselessStrokeAndFill?: (boolean | {
|
|
15324
15360
|
stroke?: boolean;
|
|
15325
15361
|
fill?: boolean;
|
|
15326
15362
|
removeNone?: boolean;
|
|
15327
15363
|
});
|
|
15328
|
-
removeViewBox?:
|
|
15329
|
-
removeXMLProcInst?:
|
|
15364
|
+
removeViewBox?: false;
|
|
15365
|
+
removeXMLProcInst?: false;
|
|
15330
15366
|
sortAttrs?: (boolean | {
|
|
15331
15367
|
order?: string[];
|
|
15332
|
-
xmlnsOrder?: "front";
|
|
15368
|
+
xmlnsOrder?: ("front" | "alphabetical");
|
|
15333
15369
|
});
|
|
15334
|
-
sortDefsChildren?:
|
|
15370
|
+
sortDefsChildren?: false;
|
|
15335
15371
|
};
|
|
15336
15372
|
};
|
|
15337
15373
|
} | {
|
|
15338
|
-
name
|
|
15374
|
+
name: "removeAttributesBySelector";
|
|
15339
15375
|
params?: {
|
|
15340
15376
|
selectors?: {
|
|
15341
15377
|
selector?: string;
|
|
@@ -15344,59 +15380,57 @@ type SvgoSvgo = [] | [
|
|
|
15344
15380
|
}[];
|
|
15345
15381
|
};
|
|
15346
15382
|
} | {
|
|
15347
|
-
name
|
|
15383
|
+
name: "removeAttrs";
|
|
15348
15384
|
params?: {
|
|
15349
|
-
attrs?: string;
|
|
15385
|
+
attrs?: (string | string[]);
|
|
15350
15386
|
elemSeparator?: string;
|
|
15351
15387
|
preserveCurrentColor?: boolean;
|
|
15352
15388
|
};
|
|
15353
15389
|
} | {
|
|
15354
|
-
name
|
|
15390
|
+
name: "removeComments";
|
|
15355
15391
|
params?: {
|
|
15356
|
-
preservePatterns?: (
|
|
15392
|
+
preservePatterns?: (false | string[]);
|
|
15357
15393
|
};
|
|
15358
15394
|
} | {
|
|
15359
|
-
name
|
|
15395
|
+
name: "removeDeprecatedAttrs";
|
|
15360
15396
|
params?: {
|
|
15361
15397
|
removeAny?: boolean;
|
|
15362
15398
|
};
|
|
15363
15399
|
} | {
|
|
15364
|
-
name
|
|
15400
|
+
name: "removeDesc";
|
|
15365
15401
|
params?: {
|
|
15366
15402
|
removeAny?: boolean;
|
|
15367
15403
|
};
|
|
15368
15404
|
} | {
|
|
15369
|
-
name
|
|
15405
|
+
name: "removeDimensions";
|
|
15370
15406
|
params?: {};
|
|
15371
15407
|
} | {
|
|
15372
|
-
name
|
|
15408
|
+
name: "removeDoctype";
|
|
15373
15409
|
params?: {};
|
|
15374
15410
|
} | {
|
|
15375
|
-
name
|
|
15411
|
+
name: "removeEditorsNSData";
|
|
15376
15412
|
params?: {
|
|
15377
15413
|
additionalNamespaces?: string[];
|
|
15378
15414
|
};
|
|
15379
15415
|
} | {
|
|
15380
|
-
name
|
|
15416
|
+
name: "removeElementsByAttr";
|
|
15381
15417
|
params?: {
|
|
15382
|
-
id?: string[];
|
|
15383
|
-
class?: string[];
|
|
15418
|
+
id?: (string | string[]);
|
|
15419
|
+
class?: (string | string[]);
|
|
15384
15420
|
};
|
|
15385
15421
|
} | {
|
|
15386
|
-
name
|
|
15387
|
-
params?: {};
|
|
15422
|
+
name: "removeEmptyAttrs";
|
|
15388
15423
|
} | {
|
|
15389
|
-
name
|
|
15390
|
-
params?: {};
|
|
15424
|
+
name: "removeEmptyContainers";
|
|
15391
15425
|
} | {
|
|
15392
|
-
name
|
|
15426
|
+
name: "removeEmptyText";
|
|
15393
15427
|
params?: {
|
|
15394
15428
|
text?: boolean;
|
|
15395
15429
|
tspan?: boolean;
|
|
15396
15430
|
tref?: boolean;
|
|
15397
15431
|
};
|
|
15398
15432
|
} | {
|
|
15399
|
-
name
|
|
15433
|
+
name: "removeHiddenElems";
|
|
15400
15434
|
params?: {
|
|
15401
15435
|
isHidden?: boolean;
|
|
15402
15436
|
displayNone?: boolean;
|
|
@@ -15415,28 +15449,21 @@ type SvgoSvgo = [] | [
|
|
|
15415
15449
|
polygonEmptyPoints?: boolean;
|
|
15416
15450
|
};
|
|
15417
15451
|
} | {
|
|
15418
|
-
name
|
|
15419
|
-
params?: {};
|
|
15452
|
+
name: "removeMetadata";
|
|
15420
15453
|
} | {
|
|
15421
|
-
name
|
|
15422
|
-
params?: {};
|
|
15454
|
+
name: "removeNonInheritableGroupAttrs";
|
|
15423
15455
|
} | {
|
|
15424
|
-
name
|
|
15425
|
-
params?: {};
|
|
15456
|
+
name: "removeOffCanvasPaths";
|
|
15426
15457
|
} | {
|
|
15427
|
-
name
|
|
15428
|
-
params?: {};
|
|
15458
|
+
name: "removeRasterImages";
|
|
15429
15459
|
} | {
|
|
15430
|
-
name
|
|
15431
|
-
params?: {};
|
|
15460
|
+
name: "removeScripts";
|
|
15432
15461
|
} | {
|
|
15433
|
-
name
|
|
15434
|
-
params?: {};
|
|
15462
|
+
name: "removeStyleElement";
|
|
15435
15463
|
} | {
|
|
15436
|
-
name
|
|
15437
|
-
params?: {};
|
|
15464
|
+
name: "removeTitle";
|
|
15438
15465
|
} | {
|
|
15439
|
-
name
|
|
15466
|
+
name: "removeUnknownsAndDefaults";
|
|
15440
15467
|
params?: {
|
|
15441
15468
|
unknownContent?: boolean;
|
|
15442
15469
|
unknownAttrs?: boolean;
|
|
@@ -15448,45 +15475,39 @@ type SvgoSvgo = [] | [
|
|
|
15448
15475
|
keepRoleAttr?: boolean;
|
|
15449
15476
|
};
|
|
15450
15477
|
} | {
|
|
15451
|
-
name
|
|
15452
|
-
params?: {};
|
|
15478
|
+
name: "removeUnusedNS";
|
|
15453
15479
|
} | {
|
|
15454
|
-
name
|
|
15455
|
-
params?: {};
|
|
15480
|
+
name: "removeUselessDefs";
|
|
15456
15481
|
} | {
|
|
15457
|
-
name
|
|
15482
|
+
name: "removeUselessStrokeAndFill";
|
|
15458
15483
|
params?: {
|
|
15459
15484
|
stroke?: boolean;
|
|
15460
15485
|
fill?: boolean;
|
|
15461
15486
|
removeNone?: boolean;
|
|
15462
15487
|
};
|
|
15463
15488
|
} | {
|
|
15464
|
-
name
|
|
15465
|
-
params?: {};
|
|
15489
|
+
name: "removeViewBox";
|
|
15466
15490
|
} | {
|
|
15467
|
-
name
|
|
15491
|
+
name: "removeXlink";
|
|
15468
15492
|
params?: {
|
|
15469
15493
|
includeLegacy?: boolean;
|
|
15470
15494
|
};
|
|
15471
15495
|
} | {
|
|
15472
|
-
name
|
|
15473
|
-
params?: {};
|
|
15496
|
+
name: "removeXMLNS";
|
|
15474
15497
|
} | {
|
|
15475
|
-
name
|
|
15476
|
-
params?: {};
|
|
15498
|
+
name: "removeXMLProcInst";
|
|
15477
15499
|
} | {
|
|
15478
|
-
name
|
|
15479
|
-
params?: {};
|
|
15500
|
+
name: "reusePaths";
|
|
15480
15501
|
} | {
|
|
15481
|
-
name
|
|
15502
|
+
name: "sortAttrs";
|
|
15482
15503
|
params?: {
|
|
15483
15504
|
order?: string[];
|
|
15484
|
-
xmlnsOrder?: "front";
|
|
15505
|
+
xmlnsOrder?: ("front" | "alphabetical");
|
|
15485
15506
|
};
|
|
15486
15507
|
} | {
|
|
15487
|
-
name
|
|
15488
|
-
params?: {};
|
|
15508
|
+
name: "sortDefsChildren";
|
|
15489
15509
|
})[];
|
|
15510
|
+
svgoConfig?: (boolean | string);
|
|
15490
15511
|
}
|
|
15491
15512
|
];
|
|
15492
15513
|
type SwitchColonSpacing = [] | [
|
|
@@ -17810,7 +17831,7 @@ interface ConfigSpecialsOptions {
|
|
|
17810
17831
|
}
|
|
17811
17832
|
interface ConfigStylisticOptions extends OptionsOverrides {
|
|
17812
17833
|
}
|
|
17813
|
-
type ConfigSVGOOptions = ESLintConfig<
|
|
17834
|
+
type ConfigSVGOOptions = ESLintConfig<RuleOptions$1>;
|
|
17814
17835
|
interface ConfigTestOptions extends OptionsOverrides {
|
|
17815
17836
|
/**
|
|
17816
17837
|
* Overrides built-in vitest rules
|
package/dist/index.js
CHANGED
|
@@ -990,8 +990,6 @@ var vitest = (options = {}) => [
|
|
|
990
990
|
// src/configs/svgo.ts
|
|
991
991
|
import { config as createSVGOConfig } from "eslint-plugin-svgo";
|
|
992
992
|
var svgo = (options = {}) => [
|
|
993
|
-
// TODO: remove after fix type
|
|
994
|
-
// @ts-expect-error type
|
|
995
993
|
{
|
|
996
994
|
...createSVGOConfig(options),
|
|
997
995
|
name: "ntnyq/svgo"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.10.
|
|
4
|
+
"version": "3.10.1",
|
|
5
5
|
"packageManager": "pnpm@9.15.1",
|
|
6
6
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
7
7
|
"keywords": [
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"eslint-plugin-pinia": "^0.4.1",
|
|
80
80
|
"eslint-plugin-prettier": "^5.2.1",
|
|
81
81
|
"eslint-plugin-regexp": "^2.7.0",
|
|
82
|
-
"eslint-plugin-svgo": "^0.
|
|
82
|
+
"eslint-plugin-svgo": "^0.2.0",
|
|
83
83
|
"eslint-plugin-toml": "^0.12.0",
|
|
84
84
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
85
85
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@ntnyq/prettier-config": "^1.22.0",
|
|
100
100
|
"@types/node": "^22.10.2",
|
|
101
|
-
"bumpp": "^9.9.
|
|
101
|
+
"bumpp": "^9.9.2",
|
|
102
102
|
"eslint": "^9.17.0",
|
|
103
103
|
"eslint-typegen": "^0.3.2",
|
|
104
104
|
"husky": "^9.1.7",
|