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

Make small changes to ESLint config #993

Merged
merged 1 commit into from
May 10, 2024
Merged

Make small changes to ESLint config #993

merged 1 commit into from
May 10, 2024

Conversation

matthew-white
Copy link
Member

I noticed that the default ESLint config from Vite has a few changes from ours (related: #671). This PR pulls in some of those changes now.

What has been done to verify that this works as intended?

Linting continues to pass.

Before submitting this PR, please make sure you have:

  • run npm run test and npm run lint and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced

Comment on lines -10 to -12
env: {
node: true
},
Copy link
Member Author

Choose a reason for hiding this comment

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

env tells ESLint which variables are global variables so it doesn't flag them. However, Frontend isn't a Node project, so specifying node here doesn't make sense. The actual global variables that we use are listed below under globals.

ecmaVersion: 2020
ecmaVersion: 'latest'
Copy link
Member Author

Choose a reason for hiding this comment

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

We target the latest two browser versions, so I think latest makes sense. We certainly aren't targeting 2020.

@matthew-white matthew-white requested a review from ktuite May 9, 2024 21:27
@matthew-white matthew-white merged commit 50dca1c into master May 10, 2024
1 check passed
@matthew-white matthew-white deleted the lint-changes branch May 10, 2024 03:21
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