Skip to content

Make lint runnable on a clean install and clear the backlog - #786

Merged
oristanovic merged 1 commit into
mainfrom
fix/lint-clean-install
Oct 28, 2026
Merged

oristanovic merged 1 commit into
mainfrom
fix/lint-clean-install

Conversation

@oristanovic

Copy link
Copy Markdown
Contributor

What do these changes do?

Add eslint-plugin-ft-flow as a direct devDependency so lint can start, then
clear the backlog it had never been able to report.

Why are these changes necessary?

@react-native/eslint-config depends on eslint-plugin-ft-flow, npm nests it
under that package, and FlatCompat resolves plugins from the project root. So
eslint aborted before linting anything, and the lint script has never run.

I reproduced it from a clean npm ci against the committed lockfile: the
plugin is installed only at
node_modules/@react-native/eslint-config/node_modules/eslint-plugin-ft-flow,
and npm run lint exits with "the plugin isn't installed correctly".

How did you verify these changes?

From the same clean install: npm run lint now completes with 0 errors and
exits 0. 32 warnings remain — mostly inline styles and unstable nested
components — and do not fail the run.

Anything else a reviewer should know?

Most of the diff is --fix reformatting; it cleared 356 of the 404 problems.
The hand-written part is the unused catch bindings and one unused prop.

Two of the catch (error) blocks do use the error, so they keep their binding.
Lint was happy either way — typecheck is what caught it.

The preset carries ft-flow 2.0.3 and this pins ^3.0.11. The preset's rules
resolve against 3.x with no rule-definition errors.

🤖 Generated with Claude Code

@react-native/eslint-config depends on eslint-plugin-ft-flow, npm nests it
under that package, and FlatCompat resolves plugins from the project root, so
eslint aborted before linting anything. Reproduced from a clean npm ci against
the committed lockfile: the plugin is present only at
node_modules/@react-native/eslint-config/node_modules.

Adding it as a direct devDependency hoists it. The preset carries 2.0.3 and
this pins ^3.0.11; the preset's rules resolve against 3.x with no
rule-definition errors.

That left 404 problems. --fix cleared 356, and the rest were unused catch
bindings and an unused prop, fixed here. Two of the catch blocks do use the
error, so they keep their binding. 32 warnings remain and do not fail the run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@oristanovic
oristanovic merged commit 8851e2e into main Oct 28, 2026
1 check passed
@oristanovic
oristanovic deleted the fix/lint-clean-install branch October 28, 2026 16:49
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.

4 participants