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

Enable ESLint; add ESLint/Prettier to CI #91

Closed
wants to merge 4 commits into from

Conversation

maxatdetroit
Copy link
Member

This PR

See context in CityOfDetroit/detroitmi#1099. This PR:

  • Adds ESLint to the package
  • Codemods a suppression for existing lint errors (this way past errors are forgiven but no new lint errors can be added to the repo)
  • Creates yarn scripts to check the lint config and format/lint source code
  • Adds a GH action workflow to run format/lint on push or PR against dev branch

Testing

Run formatter, linter, and tests locally.

$ yarn lint && yarn test-storybook
Checking formatting...
All matched files use Prettier code style!
 PASS   browser: chromium  src/stories/offcanvas.stories.js
 PASS   browser: chromium  src/stories/accordion.stories.js
 PASS   browser: chromium  src/stories/modal.stories.js
 PASS   browser: chromium  src/stories/listgroup.stories.js
 PASS   browser: chromium  src/stories/card.stories.js
 PASS   browser: chromium  src/stories/dropdown.stories.js
 PASS   browser: chromium  src/stories/formcheck.stories.js
 PASS   browser: chromium  src/stories/pagination.stories.js
 PASS   browser: chromium  src/stories/formcheckgroup.stories.js
 PASS   browser: chromium  src/stories/carousel.stories.js
 PASS   browser: chromium  src/stories/loader.stories.js
 PASS   browser: chromium  src/stories/buttongroup.stories.js
 PASS   browser: chromium  src/stories/navbar.stories.js
 PASS   browser: chromium  src/stories/button.stories.js
 PASS   browser: chromium  src/stories/progress.stories.js
 PASS   browser: chromium  src/stories/formlabel.stories.js
 PASS   browser: chromium  src/stories/container.stories.js
 PASS   browser: chromium  src/stories/nav.stories.js
 PASS   browser: chromium  src/stories/alert.stories.js
 PASS   browser: chromium  src/stories/badge.stories.js
 PASS   browser: chromium  src/stories/geocoder.stories.js
 PASS   browser: chromium  src/stories/icon.stories.js
 PASS   browser: chromium  src/stories/breadcrumb.stories.js
 PASS   browser: chromium  src/stories/formcontrol.stories.js
 PASS   browser: chromium  src/stories/formselect.stories.js
 PASS   browser: chromium  src/stories/spinner.stories.js
 PASS   browser: chromium  src/stories/image.stories.js
 PASS   browser: chromium  src/stories/form.stories.js
 PASS   browser: chromium  src/stories/range.stories.js
 PASS   browser: chromium  src/stories/table.stories.js (6.543 s)

Test Suites: 30 passed, 30 total
Tests:       154 passed, 154 total
Snapshots:   0 total
Time:        7.518 s
Ran all test suites.

@jedgar1mx
Copy link
Member

We just need to resolve those conflicts and we should be good.

@maxatdetroit
Copy link
Member Author

I'm going to abandon this PR in favor of creating one directly from the source repo (instead of fork), since I've already deleted my local, forked repos and merge conflicts are hard.

See #99.

@maxatdetroit maxatdetroit deleted the Cleanup.2 branch September 29, 2023 14:15
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