Remove all other StatSig mentions

This commit is contained in:
Eric Bailey
2026-01-21 17:39:13 -06:00
parent d33e474f47
commit a55f380ac0
11 changed files with 8 additions and 106 deletions
-1
View File
@@ -8,7 +8,6 @@ const plugin = {
rules: {
'avoid-unwrapped-text': require('./avoid-unwrapped-text'),
'use-exact-imports': require('./use-exact-imports'),
'use-typed-gates': require('./use-typed-gates'),
'use-prefixed-imports': require('./use-prefixed-imports'),
},
}
-41
View File
@@ -1,41 +0,0 @@
'use strict'
module.exports = {
meta: {
type: 'suggestion',
docs: {
description:
'Enforce using internal statsig wrapper instead of npm package',
},
schema: [],
},
create(context) {
return {
ImportSpecifier(node) {
if (
!node.local ||
node.local.type !== 'Identifier' ||
node.local.name !== 'useGate'
) {
return
}
if (
node.parent.type !== 'ImportDeclaration' ||
!node.parent.source ||
node.parent.source.type !== 'Literal'
) {
return
}
const source = node.parent.source.value
if (source.startsWith('statsig') || source.startsWith('@statsig')) {
context.report({
node,
message:
"Use useGate() from '#/lib/statsig/statsig' instead of the one on npm.",
})
}
// TODO: Verify gate() call results aren't stored in variables.
},
}
},
}