mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-11-02 14:31:14 +00:00
Bulk rename across 989 files: - Package names: posthog-js → @hanzo/insights, posthog-node → @hanzo/insights-node, etc. - Repository URLs: posthog/posthog-js → hanzoai/insights-js - Brand names: PostHog → Insights - File renames: 259 reference JSON files, source files, workflow files - Directory rename: eslint-plugin-posthog-js → eslint-plugin-insights Remaining: 8 refs to @posthog/rrweb-* (real npm deps, need fork+publish)
21 lines
783 B
JavaScript
21 lines
783 B
JavaScript
module.exports = {
|
|
create(context) {
|
|
return {
|
|
BinaryExpression: function (node) {
|
|
if (
|
|
(node.left.type === 'Identifier' && node.left.name === 'undefined') ||
|
|
(node.right.type === 'Identifier' && node.right.name === 'undefined')
|
|
) {
|
|
// Check the operator to ensure it's a comparison (you can expand this list if needed)
|
|
if (node.operator === '===' || node.operator === '!==') {
|
|
context.report({
|
|
node,
|
|
message: 'Use isUndefined() instead of direct undefined checks.',
|
|
})
|
|
}
|
|
}
|
|
},
|
|
}
|
|
},
|
|
}
|