Skip to content

chore(migration): add linting config #2043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: posthog-js-lite-merge
Choose a base branch
from

Conversation

hpouillot
Copy link
Contributor

Base PR: #2042

Changes

  • update linting config
  • disable unused rules from posthog-js

Copy link

vercel bot commented Jun 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Jun 25, 2025 5:14pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Major updates to linting configuration across the posthog-js monorepo as part of the posthog-js-lite migration effort, introducing potential consistency issues and disabled rules that warrant attention.

  • Inconsistent tabWidth settings across packages (2 spaces vs 4 spaces in root), potentially leading to formatting discrepancies
  • Disabled important linting rules in .eslintrc.js including type checking and console restrictions could impact code quality
  • Added .nvmrc specifying Node.js version 20 for consistent development environments
  • Consolidated package-specific linting into a single pnpm lint command in CI workflow
  • Added individual .prettierrc files to packages (web, node, nextjs-config, etc.) with potentially conflicting configurations

23 files reviewed, 8 comments
Edit PR Review Bot Settings | Greptile

'no-console': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/naming-convention': 'off',
'posthog-js/no-direct-undefined-check': 'off',
Copy link
Contributor Author

@hpouillot hpouillot Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably clean linting after merging. posthog-js rules should only apply to posthog-js package

Copy link

github-actions bot commented Jun 25, 2025

@@ -0,0 +1,7 @@
{
"trailingComma": "es5",
"tabWidth": 2,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have the same tabWidth between posthog-js and posthog-js-lite. I will keep it inconsistent for now, to avoid too many file changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant