From c5cc50f49a645108fa83711a2e7e314dc5e3f188 Mon Sep 17 00:00:00 2001 From: Tony Jiang Date: Sat, 1 Jun 2024 12:58:54 +1000 Subject: [PATCH] feat: add `^_` to `allowed` option for `camselcase` rule --- src/configs/javascript.ts | 1 + src/configs/vue.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/configs/javascript.ts b/src/configs/javascript.ts index c0cf308..c060a53 100644 --- a/src/configs/javascript.ts +++ b/src/configs/javascript.ts @@ -14,6 +14,7 @@ function javascriptRules(isInEditor: boolean): TypedFlatConfigItem['rules'] { ignoreDestructuring: true, ignoreImports: false, ignoreGlobals: false, + allow: ['^_'], }, ], 'dot-notation': ['error', { allowKeywords: true }], diff --git a/src/configs/vue.ts b/src/configs/vue.ts index 9b663a5..1dbf537 100644 --- a/src/configs/vue.ts +++ b/src/configs/vue.ts @@ -91,6 +91,7 @@ function vueRules(eslintPlugin: any, options: OptionsVue): TypedFlatConfigItem[' ignoreDestructuring: true, ignoreImports: false, ignoreGlobals: false, + allow: ['^_'], }, ], 'vue/dot-notation': ['error', { allowKeywords: true }],