Skip to content

Commit d765f8a

Browse files
feat: more tweaks
1 parent efda7bd commit d765f8a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/configs/functional.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export async function functional(
2222
stylistic = true,
2323
filesTypeAware = defaultFilesTypesAware,
2424
functionalEnforcement = "none",
25+
ignoreNamePattern = ["^mutable", "^[mM]_"],
26+
// ignoreTypePattern = [],
2527
} = options;
2628

2729
if (functionalEnforcement === "none") {
@@ -71,7 +73,7 @@ export async function functional(
7173
"error",
7274
{
7375
allowInForLoopInit: true,
74-
ignoreIdentifierPattern: ["^mutable", "^m_"],
76+
ignoreIdentifierPattern: ignoreNamePattern,
7577
},
7678
],
7779
"functional/no-loop-statements": "error",
@@ -123,7 +125,7 @@ export async function functional(
123125
],
124126
options: {
125127
ignoreInferredTypes: true,
126-
ignoreNamePattern: ["^[mM]_"],
128+
ignoreNamePattern,
127129
parameters: { enforcement: "ReadonlyShallow" },
128130
suggestions: {
129131
ReadonlyShallow: [

src/types.ts

+2
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ export type OptionsUnoCSS = {
149149

150150
export type OptionsFunctional = {
151151
functionalEnforcement?: "none" | "lite" | "default" | "strict";
152+
ignoreNamePattern?: string[];
153+
// ignoreTypePattern?: string[];
152154
};
153155

154156
export type OptionsIgnores =

0 commit comments

Comments
 (0)