diff options
author | dan <dan.abramov@gmail.com> | 2024-04-11 23:59:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 23:59:02 +0100 |
commit | 491116ca66564d9940f32602294ee0d743ea4756 (patch) | |
tree | 243869dfd2a87ca17780ecffe9f46913a0092ee9 /eslint | |
parent | 4e517720030184ef8c003ffad9b3ca5100619d2e (diff) | |
download | voidsky-491116ca66564d9940f32602294ee0d743ea4756.tar.zst |
Fix useGate lint rule (#3486)
Diffstat (limited to 'eslint')
-rw-r--r-- | eslint/use-typed-gates.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/eslint/use-typed-gates.js b/eslint/use-typed-gates.js index 3625a7da3..6c0331afe 100644 --- a/eslint/use-typed-gates.js +++ b/eslint/use-typed-gates.js @@ -18,14 +18,13 @@ exports.create = function create(context) { return } const source = node.parent.source.value - if (source.startsWith('.') || source.startsWith('#')) { - return + if (source.startsWith('statsig') || source.startsWith('@statsig')) { + context.report({ + node, + message: + "Use useGate() from '#/lib/statsig/statsig' instead of the one on npm.", + }) } - context.report({ - node, - message: - "Use useGate() from '#/lib/statsig/statsig' instead of the one on npm.", - }) }, } } |