-
Notifications
You must be signed in to change notification settings - Fork 55
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
Remove flow type annotations, set up ESLint #623
Merged
Commits on Jun 7, 2024
-
I did this by running: ``` npm init @eslint/config@latest ```
Configuration menu - View commit details
-
Copy full SHA for 97d8e2d - Browse repository at this point
Copy the full SHA 97d8e2dView commit details -
We know that we do not want to use flow anymore. We may want to adopt TypeScript, but it is unclear if we will in the near term. #593 I want to re-introduce ESLint, and instead of setting up ESLint to be able to parse flow syntax, I decided that we should just remove it. #608 I removed these annotations by running the following command: ``` npx flow-remove-types lib/ -d lib/ ``` Then I formatted the files by running prettier on everything: ``` node_modules/.bin/prettier -w lib/ ``` I think if we wanted to introduce TypeScript that it might be easier to do it from scratch anyway instead of attempting to convert the flow types over to a different type system.
Configuration menu - View commit details
-
Copy full SHA for 0e5eeb5 - Browse repository at this point
Copy the full SHA 0e5eeb5View commit details -
TypeScript pretty much won, and we've removed Flow annotations from this repo.
Configuration menu - View commit details
-
Copy full SHA for 7d5c1c9 - Browse repository at this point
Copy the full SHA 7d5c1c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 98c8ec3 - Browse repository at this point
Copy the full SHA 98c8ec3View commit details -
This is a node project, not a browser project, so we need to use the node globals. And we also need to tell ESLint about our tests, and how to ignore the stuff that used to be in the .eslintignore file. This resolves most of the errors.
Configuration menu - View commit details
-
Copy full SHA for 3806e32 - Browse repository at this point
Copy the full SHA 3806e32View commit details -
Now that we have ESLint set up, we need to fix the things it complained about. This handles all of that in one commit.
Configuration menu - View commit details
-
Copy full SHA for 73b24eb - Browse repository at this point
Copy the full SHA 73b24ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for fd0c5e7 - Browse repository at this point
Copy the full SHA fd0c5e7View commit details
Commits on Jun 9, 2024
-
This will make it easier for folks to catch errors as they work.
Configuration menu - View commit details
-
Copy full SHA for bc3bd79 - Browse repository at this point
Copy the full SHA bc3bd79View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.