Skip to content

Add ESLint#81

Merged
marcochavezf merged 6 commits into
mainfrom
rory-peer-review-02b-eslint
Jul 3, 2026
Merged

Add ESLint#81
marcochavezf merged 6 commits into
mainfrom
rory-peer-review-02b-eslint

Conversation

@roryabraham

@roryabraham roryabraham commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Details

Adds ESLint tooling:

  • eslint.config.mjs — built on eslint-config-expensify/{node,typescript,scripts,jest} plus eslint-plugin-rulesdir.
  • .github/workflows/lint.yml — CI workflow that runs npm run lint on relevant file changes.
  • package.json/package-lock.json — adds the lint script and the eslint, eslint-config-expensify, eslint-plugin-rulesdir devDependencies.

eslint.config.mjs configures typescript-eslint with an explicit project: tsconfig.json parser option for type-aware linting of .ts files, so it requires a tsconfig.json to exist at the repo root. If this repo doesn't have a tsconfig.json yet, npm run lint will fail with Cannot read file 'tsconfig.json' until one is added — I verified the config itself is correct by temporarily adding a tsconfig.json (not committed here) and confirming npm run lint passes cleanly with it in place.

Also added --no-error-on-unmatched-pattern to the lint script (eslint --no-error-on-unmatched-pattern scripts tests) since this repo doesn't have a tests/ directory yet and ESLint's CLI otherwise hard-errors on an unmatched path pattern. This flag is forward-compatible and becomes a no-op once a tests/ directory exists.

Related Issues

https://github.com/Expensify/Expensify/issues/636197

Manual Tests

Ran npm install to regenerate package-lock.json, then verified eslint.config.mjs and lint.yml are correct by temporarily adding a tsconfig.json + @types/node (not committed) and confirming npm run lint exits 0 with no errors or warnings. Without a tsconfig.json present, npm run lint fails as described above.

Linked PRs

None.

Made with Cursor

Phase 2b of the #64 split: adds ESLint tooling (eslint-config-expensify
+ eslint-plugin-rulesdir) and a lint CI workflow, without any
typechecking, formatting, or test infrastructure (those land in
separate parallel PRs).

Co-authored-by: Cursor <cursoragent@cursor.com>
@roryabraham roryabraham changed the title Add ESLint (Phase 2b of #64 split) Add ESLint Jul 3, 2026
…eslint

# Conflicts:
#	package-lock.json
#	package.json
Use typescript-eslint recommended instead of eslint-config-expensify/typescript, which only needed rulesdir for custom App rules this repo does not use.
The repo is small enough that linting the whole tree is sufficient.
Re-enable Expensify TypeScript rules and document why rulesdir must be registered manually. Restore naming-convention disables for kebab-case CLI argument names.
@roryabraham
roryabraham marked this pull request as ready for review July 3, 2026 07:52
@roryabraham
roryabraham requested a review from marcochavezf July 3, 2026 07:52
@marcochavezf
marcochavezf merged commit 04dc162 into main Jul 3, 2026
8 checks passed
@marcochavezf
marcochavezf deleted the rory-peer-review-02b-eslint branch July 3, 2026 07:53
roryabraham added a commit that referenced this pull request Jul 9, 2026
Integrate the split peer-review infrastructure PRs (#76-#81) while
keeping the branch's verifyPeerReview implementation and tests.

Conflict resolution favors main for tooling (Oxfmt, ESLint, CI
workflows, pull_request_target workflow) and keeps branch logic for
the peer review script, libs, and policy tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

2 participants