-
Notifications
You must be signed in to change notification settings - Fork 90
feat: add eslint #90
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: add eslint #90
Conversation
|
|
Updated the PR to use the alpha version that was released. |
package.json
Outdated
@@ -11,11 +11,13 @@ | |||
"docs:build": "pnpm run --filter=tutorialkit.dev build", | |||
"demo": "pnpm run --filter=demo.tutorialkit.dev dev", | |||
"demo:build": "pnpm run --filter=demo.tutorialkit.dev build", | |||
"lint": "eslint \"{packages,docs}/**/*.{ts,tsx,js,json,jsonc,js,mjs,cjs}\"", |
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.
Is eslint covering prettier as well?
Any reason we don't include all files and folders?
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.
Yes, our eslint plugin always included the eslint recommended rules and it also takes the prettier config into account.
Any reason we don't include all files and folders?
I only did this to reduce the number of files to be checked and to be more specific. Other than that there's no particular reason. Cause those extensions are the only files that our plugin covers, but I think it would be fine to remove the extensions since the plugin contains the file extensions too and it would ignore other files.
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.
Great work @d3lm 🙏 . Love to see the consistency!
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.
Looks pretty good!
import { TutorialStore } from '@tutorialkit/runtime'; | ||
import { auth, WebContainer } from '@webcontainer/api'; | ||
import { useAuth } from './setup.js'; |
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.
Oh this import should always be first as it sets a global read by the @webcontainer/api
package.
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.
This is amazing!! Really good work both here and on the eslint plugin @d3lm
🎉 🎉
This PR adds our eslint plugin to enforce our coding convention across the monorepo.
I have already fixed all linting issues that were reported and streamlined some of the CSS files as well to match our conventions. We should definitely add some style (CSS, SCSS) linting as well at some point.
ℹ️
Note that running this won't work as of right now because the new version of the eslint plugin is not yet published.✅