Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use login.gov shared ESLint configuration #245

Merged
merged 3 commits into from Sep 8, 2021
Merged

Conversation

aduth
Copy link
Member

@aduth aduth commented Sep 3, 2021

Related: 18F/identity-idp#5359, GSA-TTS/identity-reporting#12

Why: So that we can use a common standard ruleset across all repositories where JavaScript is used.

Observations:

  • This project uses Jest, so the Mocha rules aren't applicable
  • This project doesn't use React (yet), so the React rules aren't applicable
  • gulp-eslint is pinned to ESLint 6.x, which is very out-of-date, and replaced here with manual Gulp handling (see Upgrade to ESLint 8 adametry/gulp-eslint#250).
  • Babel rules trigger an error by absence of Babel configuration. Good idea to include anyways, so ESLint parsing is accurate.

So Babel ESLint parser can parse
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

**Why**: Because Jest (via babel-jest) automatically picks up this file and should be configured appropriately.

See:

- https://jestjs.io/docs/getting-started#using-babel
- https://github.com/facebook/jest/blob/master/packages/babel-jest/README.md#usage
@aduth aduth marked this pull request as ready for review September 7, 2021 21:03
@aduth aduth merged commit c8a23da into main Sep 8, 2021
@aduth aduth deleted the aduth-shared-eslint-config branch September 8, 2021 12:17
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.

None yet

2 participants