mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-10-30 18:34:19 +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)
22 lines
834 B
JavaScript
22 lines
834 B
JavaScript
module.exports = {
|
|
create(context) {
|
|
return {
|
|
BinaryExpression: function (node) {
|
|
// Check if either the left or right operand is a null literal
|
|
if (
|
|
(node.left.type === 'Literal' && node.left.value === null) ||
|
|
(node.right.type === 'Literal' && node.right.value === null)
|
|
) {
|
|
// 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 isNull() instead of direct null checks.',
|
|
})
|
|
}
|
|
}
|
|
},
|
|
}
|
|
},
|
|
}
|