Page MenuHomePhabricator

allow eslint to recongnize jest syntax
AbandonedPublic

Authored by darn-it-dan on Jan 11 2022, 03:50.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Summary

Allow eslint to recongnize jest syntax.

I use vscode and test files had scary red squigglys all over the test files.

This is because eslint does not recongnize jest syntax since it is not explicitly imported.

Test Plan

Open npm tests in an IDE that supports eslint hinting errors. Make sure there isn't any.
This is just a more quality of life improvement for developers.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
jest-support-eslint
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17869
Build 35564: Build Diffcashtab-tests
Build 35563: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Jan 11 2022, 03:50
bytesofman added a subscriber: bytesofman.

Parallel effort to fix this is underway here: https://reviews.bitcoinabc.org/D10770

Ultimate goal is to get ESLint to run as part of arc lint, so that a diff cannot get up with linting errors.

Let me know if there is a reason to include your overrides approach in addition to (or instead of) the approach taken in D10770 / any other improvements that could be made in D10770

This revision now requires changes to proceed.Jan 11 2022, 22:34

Parallel effort to fix this is underway here: https://reviews.bitcoinabc.org/D10770

Ultimate goal is to get ESLint to run as part of arc lint, so that a diff cannot get up with linting errors.

Let me know if there is a reason to include your overrides approach in addition to (or instead of) the approach taken in D10770 / any other improvements that could be made in D10770

Actually I like D10770 approach better.

Didn't realize this change was already underway.

I will abandon this revision.

However might I suggest using husky, it lint's your react code when you run git commit and only lets you commit the code if it fits the linting standards.

Of course the husky command will fail/never run if you don't have the npm devDependencies installed, which is the only flaw of this approach.