From 4259d319254c0ab0184c75b3b2e1db1454fef624 Mon Sep 17 00:00:00 2001 From: jeddy3 Date: Fri, 30 Jun 2023 10:11:15 +0100 Subject: [PATCH] Fix function-name-case performance --- .changeset/bright-suits-reflect.md | 5 +++++ lib/rules/function-name-case/index.js | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/bright-suits-reflect.md diff --git a/.changeset/bright-suits-reflect.md b/.changeset/bright-suits-reflect.md new file mode 100644 index 0000000000..4dac0b16e0 --- /dev/null +++ b/.changeset/bright-suits-reflect.md @@ -0,0 +1,5 @@ +--- +"stylelint": patch +--- + +Fixed: `function-name-case` performance diff --git a/lib/rules/function-name-case/index.js b/lib/rules/function-name-case/index.js index 40a8db5cc0..45c9ceccf2 100644 --- a/lib/rules/function-name-case/index.js +++ b/lib/rules/function-name-case/index.js @@ -54,6 +54,8 @@ const rule = (primary, secondaryOptions, context) => { } root.walkDecls((decl) => { + if (!decl.value.includes('(')) return; + if (!isStandardSyntaxValue(decl.value)) return; let needFix = false;