Skip to content

chore: add e18e lint plugin#1019

Merged
43081j merged 9 commits intomainfrom
jg/lint-perf
Feb 5, 2026
Merged

chore: add e18e lint plugin#1019
43081j merged 9 commits intomainfrom
jg/lint-perf

Conversation

@43081j
Copy link
Collaborator

@43081j 43081j commented Feb 5, 2026

This also disables no-console since pretty much everything in this
repo can run server-side, where console logs are valuable when done
right.

@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 5, 2026 2:47pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 5, 2026 2:47pm
npmx-lunaria Ignored Ignored Feb 5, 2026 2:47pm

Request Review

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

Adds @e18e/eslint-plugin as a devDependency and updates .oxlintrc.json to register several e18e/* rules as error and disable no-console for specific file groups. Removes scripts/lint.ts and updates CI: install root deps (no scripts) and run pnpm lint. Small code edits: replace spread+map with Array.from(resolved.values(), ...) in server/utils/dependency-analysis.ts; extract a top-level prefixId(tagName, attribs) used by sanitizeHtml in server/utils/readme.ts; switch /readme/i.test(pathname) in test/e2e/test-utils.ts; add @e18e/eslint-plugin to knip.ts ignore list; mutate authors via Object.assign in server/api/atproto/author-profiles.get.ts.

Possibly related PRs

🚥 Pre-merge checks | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description addresses one key aspect of the changeset—disabling no-console—but omits several significant changes including adding the e18e lint plugin, refactoring dependency analysis code, and restructuring linting infrastructure. Expand the description to cover the full scope of changes, particularly the addition of the e18e lint plugin and the refactoring of the linting workflow infrastructure.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jg/lint-perf

Comment @coderabbitai help to get the list of available commands and usage tips.

This also disables `no-console` since pretty much everything in this
repo can run server-side, where console logs are valuable when done
right.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
server/utils/readme.ts (1)

448-452: ⚠️ Potential issue | 🟡 Minor

The section and article transforms are ineffective.

The prefixId transform is applied to section and article tags, but these tags are not included in ALLOWED_TAGS (lines 102-139). Since sanitize-html strips tags not in the allowed list, these transforms will never execute.

Either add section and article to ALLOWED_TAGS if they should be permitted, or remove them from transformTags to avoid confusion.

🔧 Option A: Remove ineffective transforms
       div: prefixId,
       p: prefixId,
       span: prefixId,
-      section: prefixId,
-      article: prefixId,
     },
🔧 Option B: Add tags to ALLOWED_TAGS (around line 139)
   'button',
+  'section',
+  'article',
 ]
🧹 Nitpick comments (2)
.oxlintrc.json (1)

22-22: Consider removing the empty overrides array.

The empty overrides array serves no functional purpose. If it's a placeholder for future configuration, consider adding a comment to clarify intent; otherwise, it can be removed to reduce noise.

🧹 Suggested removal
-  "overrides": [],
scripts/lint.ts (1)

14-16: Pre-existing issue: error message is inconsistent with actual command.

The error message references pnpm info ${dependencyName} version, but the actual command executed is npm pkg get devDependencies.${dependencyName}. Consider updating the message for accurate debugging.

📝 Suggested fix
   if (result.status) {
-    throw new Error(`Command failed: pnpm info ${dependencyName} version`)
+    throw new Error(`Command failed: npm pkg get devDependencies.${dependencyName}`)
   }

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/lint.ts (1)

19-21: ⚠️ Potential issue | 🟡 Minor

Error message does not match the actual command.

The error message references pnpm info but the command executed on line 15 is npm pkg get. This would be misleading when debugging failures.

🐛 Proposed fix
   if (result.status) {
-    throw new Error(`Command failed: pnpm info ${dependencyName} version`)
+    throw new Error(`Command failed: npm pkg get devDependencies.${dependencyName}`)
   }

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/lint.ts (1)

19-21: ⚠️ Potential issue | 🟡 Minor

Error message does not match the actual command.

The error message references pnpm info but the command being executed is npm pkg get. This will cause confusion when debugging failures.

🐛 Proposed fix
   if (result.status) {
-    throw new Error(`Command failed: pnpm info ${dependencyName} version`)
+    throw new Error(`Command failed: npm pkg get devDependencies.${dependencyName}`)
   }

.oxlintrc.json Outdated
},
"rules": {
"no-console": "warn",
"no-console": "off",
Copy link
Collaborator

@serhalp serhalp Feb 5, 2026

Choose a reason for hiding this comment

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

I never understood the purpose of warns, so I'm good with this 😁. Longer term should we be using a li'l logger module and turning this to "error"? (maybe keep off for scripts/)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we really need to review logging overall.

only truly error-level things should be logged at error level, for example. this isn't currently the case iirc

i'll start a discussion around this 👍

Copy link
Member

Choose a reason for hiding this comment

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

would it be possible to disable this just on a per-directory case? so we disable it for server/ and cli/ but keep it for app/ ?

Copy link
Collaborator

@serhalp serhalp left a comment

Choose a reason for hiding this comment

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

LGTM

@43081j
Copy link
Collaborator Author

43081j commented Feb 5, 2026

FYI this does mean the lint job can often take longer now (if it is the first to populate the cache)

but having the workaround lint.ts was causing a lot of friction and means we can't use lint plugins. we should revisit how we can speed it back up

@danielroe
Copy link
Member

@43081j are you happy with those small tweaks?

@43081j
Copy link
Collaborator Author

43081j commented Feb 5, 2026

looks good to me 👍

@43081j 43081j added this pull request to the merge queue Feb 5, 2026
Merged via the queue into main with commit 18bcb8a Feb 5, 2026
20 checks passed
@43081j 43081j deleted the jg/lint-perf branch February 5, 2026 14:56
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.

3 participants