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

Re-enable eslint rules, reformat files with prettier. #5817

Merged
merged 21 commits into from
Nov 28, 2022

Conversation

johnshaughnessy
Copy link
Contributor

@johnshaughnessy johnshaughnessy commented Nov 26, 2022

This PR re-enables eslint rules (or removes them from our eslint config to restore them to their defaults, and formats files according to prettier rules.

We relaxed eslint rules when we upgraded to webpack 5. More context can be found in that PR summary.

Several inline configs (eslint-disable and eslint-disable-next-line) were added to silence warnings/errors, which we prefer to disabling those rules across the whole project. Reports that ignore inline configs can still be generated with the --no-inline-config flag, for example:

npx eslint --no-inline-config '*.js' 'scripts/**/*.js' 'src/**/*.js'

Prettier rules were re-enabled and many files were reformatted with npm run prettier. We should expect to have to resolve some formatting-related merge conflicts with outstanding branches. Unfortunately, we don't see a way around this if we want to conform to the prettier rule.

```
src/react-components/banner/Banner.js
   65:20  warning  React Hook useCallback does nothing when called with only one argument. Did you forget to pass an array of dependencies?  react-hooks/exhaustive-deps
  106:21  warning  React Hook useCallback does nothing when called with only one argument. Did you forget to pass an array of dependencies?  react-hooks/exhaustive-deps
  130:24  warning  'status' is missing in props validation                                                                                   react/prop-types
```
@johnshaughnessy johnshaughnessy changed the base branch from feature/delint to master November 26, 2022 23:49
@johnshaughnessy johnshaughnessy changed the title npm run prettier Re-enable eslint rules, reformat files with prettier. Nov 28, 2022
@johnshaughnessy johnshaughnessy merged commit 8d33372 into master Nov 28, 2022
@johnshaughnessy johnshaughnessy deleted the feature/prettier branch November 28, 2022 20:59
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

1 participant