-
Notifications
You must be signed in to change notification settings - Fork 17
Conversation
Deploy preview for hsds-react ready! Built with commit 4e5f1cd |
Pull Request Test Coverage Report for Build 2249
💛 - Coveralls |
@tinkertrain This is awesome!! 😍 I was wondering what y'alls thoughts are on adding a project specific
The ESLint stuff only kicked in for TS files for me after I added this. |
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.
thank you for taking care of this 🚀
I am in for the vscode config
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.
@tinkertrain Amazing work! 🚀 🚢 from me!
Glad @plbabin is on board. If you could add the .vscode
local settings, that would be awesome!
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.
I support these changes and adding the VS Code config.
Cool! Thank you all for looking at this. I've added the vscode file 👍 |
Adds TypeScript linting
This updates some of the code quality tools used in HSDS, specifically adds support for linting TypeScript.
Issue: #616
Previously HSDS was using Create React App's ESLint configuration: https://www.npmjs.com/package/eslint-config-react-app
I removed this dependency and instead based our configuration off of it and https://dev.to/robertcoopercode/using-eslint-and-prettier-in-a-typescript-project-53jb, the main reason is that the CRA config uses flow under the hood for .js files and a separate config (override) for .ts files.
It's a bit more manual work, but we shouldn't need to touch the rules often if at all (until we adopt Hooks 😈).
I tested that ESLint is working by running
npm run lint
(which was updated to run on both .js and .ts|.tsx files) and on VSCode.VSCode recommended settings
The eslint configuration plus these vscode specific settings allows you to use the eslint and prettier automatic fixing when possible: