Replace antfu's eslint config with xo#8766
Merged
Conversation
Co-authored-by: fregante <[email protected]>
Co-authored-by: fregante <[email protected]>
Co-authored-by: fregante <[email protected]>
Co-authored-by: fregante <[email protected]>
Copilot
AI
changed the title
[WIP] Replace antfu's eslint config with xo's
Replace antfu's eslint config with xo
Nov 12, 2025
fregante
reviewed
Nov 12, 2025
| // TODO: Integrate style better https://github.com/refined-github/refined-github/pull/8285/files#r1951911960 | ||
| side.after( | ||
| <a href={actionURL.href} className="d-block mb-2"> | ||
| <SearchIcon width={14} className="color-fg-default mr-2" />Usage examples |
Member
There was a problem hiding this comment.
@copilot disable the JSX quotes rule and revert all of its changes.
Also don't move the JSX right next to the opening and closing parens if it's on multiple lines. This file should be reverted in full, for example
Contributor
Author
There was a problem hiding this comment.
Disabled @stylistic/jsx-quotes and @stylistic/function-paren-newline rules in eslint config and reverted all 128 TSX files to their original state. The files now preserve double-quotes in JSX and keep JSX on separate lines from parens. Commit: c050158
|
Please add labels to this PR |
…fixed TSX files Co-authored-by: fregante <[email protected]>
fregante
reviewed
Nov 12, 2025
Co-authored-by: fregante <[email protected]>
fregante
approved these changes
Nov 16, 2025
| { | ||
| "source/background.ts": { | ||
| "@typescript-eslint/naming-convention": { | ||
| "count": 1 |
Member
There was a problem hiding this comment.
./source/background.ts
53:8 error Object Literal Method name `fetchJSON` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
./source/features/action-pr-link.tsx
20:16 error Function name `addForPR` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
28:16 error Function name `initForPRPage` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/action-used-by-link.tsx
9:10 error Function name `getActionURL` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
14:8 error Variable name `actionURL` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
26:8 error Variable name `actionURL` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/clean-conversation-headers.tsx
25:16 error Function name `highlightNonDefaultBranchPRs` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/comments-time-machine-links.tsx
27:16 error Function name `updateURLtoDatedSha` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/deep-reblame.tsx
29:8 error Variable name `associatedPR` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/embed-gist-inline.tsx
21:19 error Object Literal Property name `fetchJSON` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/html-preview-link.tsx
7:7 error Variable name `isSingleHTMLFile` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/linkify-branch-references.tsx
11:10 error Function name `linkifyQuickPR` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
44:16 error Function name `quickPRInit` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/list-prs-for-branch.tsx
14:2 error Object Literal Property name `OPEN` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
15:2 error Object Literal Property name `CLOSED` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
16:2 error Object Literal Property name `MERGED` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
17:2 error Object Literal Property name `DRAFT` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/list-prs-for-file.tsx
17:10 error Function name `getPRUrl` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
117:8 error Variable name `editingPRNumber` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/mark-merge-commits-in-list.tsx
58:8 error Variable name `isPRConversation` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/new-repo-disable-projects-and-wikis.tsx
22:4 error Object Literal Property name `has_projects` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
23:4 error Object Literal Property name `has_wiki` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/one-click-diff-options.tsx
40:10 error Function name `attachPRButtons` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
98:10 error Function name `initPR` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/pagination-hotkey.tsx
28:3 error Object Literal Property name `→` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
29:3 error Object Literal Property name `←` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/pr-first-commit-title.tsx
76:10 error Function name `hasUserAlteredThePR` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/pr-notification-link.tsx
8:17 error Function name `removeLinkToPRFilesTab` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/prevent-link-loss.tsx
39:10 error Function name `getUI` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
69:10 error Function name `updateUI` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
83:7 error Variable name `updateUIDebounced` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/quick-mention.tsx
147:8 error Variable name `isPROrOldView` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/quick-repo-deletion.tsx
36:16 error Function name `modifyUIAfterSuccessfulDeletion` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
39:8 error Variable name `restoreURL` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
42:8 error Variable name `otherForksURL` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/show-associated-branch-prs-on-fork.tsx
53:2 error Object Literal Property name `OPEN` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
54:2 error Object Literal Property name `CLOSED` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
55:2 error Object Literal Property name `MERGED` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
56:2 error Object Literal Property name `DRAFT` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/show-open-prs-of-forks.tsx
17:7 error Variable name `countPRs` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
41:16 error Function name `getPRs` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/sort-conversations-by-update-time.tsx
17:8 error Variable name `currentSearchURL` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/sync-pr-commit-title.tsx
38:10 error Function name `getUI` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
47:10 error Function name `updateUI` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
55:16 error Function name `updatePRTitle` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/update-pr-from-base-branch.tsx
52:3 error Object Literal Property name `ignoreHTTPStatus` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/useful-not-found-page.tsx
46:10 error Function name `parseCurrentURL` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
195:16 error Function name `initPRCommitOnce` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/features/user-profile-follower-badge.tsx
15:4 error Object Literal Property name `ignoreHTTPStatus` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/github-helpers/api.ts
40:6 error Type Alias name `GraphQLResponse` must match one of the following formats: StrictPascalCase @typescript-eslint/naming-convention
54:14 error Class name `RefinedGitHubAPIError` must match one of the following formats: StrictPascalCase @typescript-eslint/naming-convention
69:6 error Type Alias name `GHRestApiOptions` must match one of the following formats: StrictPascalCase @typescript-eslint/naming-convention
77:6 error Type Alias name `GHGraphQLApiOptions` must match one of the following formats: StrictPascalCase @typescript-eslint/naming-convention
83:2 error Object Literal Property name `ignoreHTTPStatus` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
97:9 error Variable name `ignoreHTTPStatus` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
111:4 error Object Literal Property name `Accept` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
113:25 error Object Literal Property name `Authorization` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
208:4 error Object Literal Property name `Authorization` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
./source/github-helpers/dom-formatters.tsx
13:14 error Variable name `linkifiedURLClass` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
14:7 error Variable name `linkifiedURLSelector` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
66:17 error Function name `linkifyURLs` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/github-helpers/get-default-branch.ts
13:16 error Function name `fromDOM` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
30:16 error Function name `fromAPI` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
./source/github-helpers/github-file-url.ts
5:22 error Class name `GitHubFileURL` must match one of the following formats: StrictPascalCase @typescript-eslint/naming-convention
./source/github-helpers/github-token.ts
25:5 error Object Literal Property name `Accept` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
26:5 error Object Literal Property name `Authorization` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
./source/github-helpers/index.ts
24:17 error Function name `buildRepoURL` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
128:14 error Variable name `userCanLikelyMergePR` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
./source/github-helpers/selectors.test.ts
44:4 error Object Literal Property name `Accept` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
./source/globals.d.ts
17:6 error Type Alias name `FeatureID` must match one of the following formats: StrictPascalCase @typescript-eslint/naming-convention
81:6 error Type Alias name `HTMLFormControlsCollection` must match one of the following formats: StrictPascalCase @typescript-eslint/naming-convention
./source/helpers/caller-id.ts
8:25 error Function name `getCallerID` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
./source/helpers/feature-helpers.ts
3:14 error Variable name `getFeatureID` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
./source/helpers/fetch-dom.ts
8:50 error Type Parameter name `TElement` must match one of the following formats: StrictPascalCase @typescript-eslint/naming-convention
11:8 error Variable name `absoluteURL` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
./source/helpers/hotfix.tsx
42:15 error Variable name `featureID` must match one of the following formats: strictCamelCase, StrictPascalCase @typescript-eslint/naming-convention
./source/helpers/show-whitespace-on-line.test.ts
11:10 error Function name `serializeDOM` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
./source/options-storage.ts
5:13 error Type Alias name `RGHOptions` must match one of the following formats: StrictPascalCase @typescript-eslint/naming-convention
9:2 error Object Literal Property name `customCSS` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
12:2 error Object Literal Property name `logHTTP` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
./source/resolve-conflicts.ts
58:5 error Object Literal Property name `noHScroll` must match one of the following formats: strictCamelCase @typescript-eslint/naming-convention
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces
@antfu/eslint-configwith xo'sxoToEslintConfig()as specified in https://github.com/xojs/xo#xotoeslintconfig. Restores baseline rules likeno-else-returnthat were missing.Key changes:
xo.xoToEslintConfig()with existing rule overrides@stylistic/jsx-quotesand@stylistic/function-paren-newline) to preserve original code stylequerySelectorandclosestcorrectly return| null(not| undefined) per DOM API specificationRemaining work:
Test URLs
Verified eslint runs successfully on entire codebase with
npm run lint:jsScreenshot
N/A - Configuration change only
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.