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)
29 lines
890 B
JavaScript
29 lines
890 B
JavaScript
module.exports = {
|
|
meta: {
|
|
type: 'problem',
|
|
docs: {
|
|
description:
|
|
'Disallow direct use of MutationObserver and enforce importing NativeMutationObserver from global.ts',
|
|
category: 'Best Practices',
|
|
recommended: false,
|
|
},
|
|
schema: [],
|
|
messages: {
|
|
noDirectMutationObserver:
|
|
'Direct use of MutationObserver is not allowed. Use NativeMutationObserver from global.ts instead.',
|
|
},
|
|
},
|
|
create(context) {
|
|
return {
|
|
NewExpression(node) {
|
|
if (node.callee.type === 'Identifier' && node.callee.name === 'MutationObserver') {
|
|
context.report({
|
|
node,
|
|
messageId: 'noDirectMutationObserver',
|
|
})
|
|
}
|
|
},
|
|
}
|
|
},
|
|
}
|