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)
18 lines
606 B
JavaScript
18 lines
606 B
JavaScript
const { readdirSync } = require('fs')
|
|
const { basename } = require('path')
|
|
|
|
const projectName = '@hanzo/insights'
|
|
const ruleFiles = readdirSync(__dirname).filter(
|
|
(file) => file.endsWith('.js') && file !== 'index.js' && file !== '.eslintrc.js' && !file.endsWith('test.js')
|
|
)
|
|
const configs = {
|
|
all: {
|
|
plugins: [projectName],
|
|
rules: Object.fromEntries(ruleFiles.map((file) => [`${projectName}/${basename(file, '.js')}`, 'error'])),
|
|
},
|
|
}
|
|
|
|
const rules = Object.fromEntries(ruleFiles.map((file) => [basename(file, '.js'), require('./' + file)]))
|
|
|
|
module.exports = { configs, rules }
|