-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: custom eslint configuration #77
base: main
Are you sure you want to change the base?
Conversation
ccf1261
to
2a7b792
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 50 out of 65 changed files in this pull request and generated no suggestions.
Files not reviewed (15)
- .prettierrc: Language not supported
- package.json: Language not supported
- src/common/app-link/app-link.stories.tsx: Evaluated as low risk
- src/common/badge/badge.tsx: Evaluated as low risk
- README.md: Evaluated as low risk
- src/common/avatar/avatar.test.tsx: Evaluated as low risk
- src/app.test.tsx: Evaluated as low risk
- src/common/button/button.tsx: Evaluated as low risk
- src/app.tsx: Evaluated as low risk
- src/common/base-button/base-button.test.tsx: Evaluated as low risk
- src/common/badge/badge.stories.tsx: Evaluated as low risk
- src/common/app-link/app-link.tsx: Evaluated as low risk
- src/common/error-boundary/error-boundary.test.tsx: Evaluated as low risk
- src/common/button/button.stories.tsx: Evaluated as low risk
- src/common/avatar/avatar.stories.tsx: Evaluated as low risk
} | ||
export const getExamples = async (): Promise<Example[]> => { | ||
const response = await ApiService.get<RawExample[]>(API_ROUTES.EXAMPLE); | ||
return response.map<Example>(deSerialize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to update these examples in the README? This one in particular in the Networking section
Ticket/Card
Description of the change
This PR updates our Eslint rules. Most importantly, I've removed the Airbnb Eslint configuration packages. Let's break this down.
Removal of
eslint-config-airbnb
andeslint-config-airbnb-typescript
The rationale here is that our linting rules are hidden behind a package which is not owned by us, and so it's hard to know what our actual standards are and have an open discussion around them. Another argument against using those packages is that we're fully dependent on those packages being updated in order to update our Eslint version (and even plugin versions).
Finally, this forces us to understand what plugins we have installed and it's much easier to make changes to the configuration.
Rule changes
I've tried to keep as much of our rules as possible, but also have taken the chance to make some changes I think are necessary.
As far as plugins go, I've ported the React, React Hooks and JSX A11y plugins from Airbnb's configuration.
Other changes
.prettierrc
file since I was having a conflict with VS Code and format-before-save.ParamsHelper
.Next Steps