From 9749a238c3af99b82c224c297e5f717ce4bb677f Mon Sep 17 00:00:00 2001 From: Aliaksandr Babrykovich Date: Sun, 18 Oct 2026 13:57:44 +0200 Subject: [PATCH] chore: stop linting and tracking local build artifacts `npm run lint` is bare `eslint .`, and ESLint only skips node_modules and dotfiles on its own - it does not read .gitignore. Any locally generated output therefore gets linted as if it were source. A `dist/bundle.js` from a web build reports 57,081 problems and `coverage/` another 3, which fails the pre-commit hook on an otherwise clean tree. CI never hits this: it lints a fresh checkout where neither directory exists, `npm test` runs without --coverage, and no committed script produces `dist/`. So the breakage only ever lands on a contributor's machine, and the obvious workaround is `--no-verify`, which defeats the hook entirely. Ignore the artifacts on both sides, since they fix different problems: ESLint's ignorePatterns stops the lint run from reading them, and .gitignore keeps them out of `git status`. .serena/ is a dotdir, so ESLint already skips it; it only needs the .gitignore entry. Co-Authored-By: Claude Opus 5 (1M context) --- .eslintrc.js | 4 ++++ .gitignore | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 187894b..35ccf37 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,8 @@ module.exports = { root: true, extends: '@react-native', + // `eslint .` only skips node_modules and dotfiles on its own, so generated output that is + // merely gitignored still gets linted - a local `dist/` bundle alone reports 57k problems and + // fails the pre-commit hook. Keep this in sync with the artifact entries in .gitignore. + ignorePatterns: ['dist/', 'coverage/'], }; diff --git a/.gitignore b/.gitignore index 0be1efb..ee6cced 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,8 @@ output/ # Generated E2E host app __e2e__/host/ + +# Local build and tooling artifacts +dist/ +coverage/ +.serena/