-
Notifications
You must be signed in to change notification settings - Fork 189
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
refactor eslint configuration #3253
Conversation
The ESLint test is expected to fail because it's still using the old config. |
src/web/package.json
Outdated
@@ -38,7 +38,8 @@ | |||
"react-use": "17.3.2", | |||
"smoothscroll-polyfill": "0.4.4", | |||
"swr": "1.2.2", | |||
"yup": "0.32.11" | |||
"yup": "0.32.11", | |||
"@testing-library/react": "12.1.4" |
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.
Just a nit but @
precedes alpha letters
src/web/package.json
Outdated
"@typescript-eslint/eslint-plugin": "4.33.0", | ||
"@typescript-eslint/parser": "4.33.0" |
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.
Same here
@@ -38,7 +38,8 @@ | |||
"react-use": "17.3.2", | |||
"smoothscroll-polyfill": "0.4.4", | |||
"swr": "1.2.2", | |||
"yup": "0.32.11" | |||
"yup": "0.32.11", | |||
"@testing-library/react": "12.1.4" | |||
}, | |||
"devDependencies": { | |||
"@senecacdot/eslint-config-telescope": "1.0.1", |
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.
The ESLint is failing but it's expected due to the tools/eslint/index.js
changes in this PR
telescope/tools/eslint/index.js
Lines 14 to 16 in 4d411c6
'import/resolver': { | |
node: { | |
extensions: ['.js', '.jsx', '.ts', '.tsx'], |
This import/resolver
will resolve the 155 errors. To pass ESLint locally, change this line to
"@senecacdot/eslint-config-telescope": "workspace:1.0.1",
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.
Thanks @cindy.
Or you can manually link eslint: cd <subdir> && pnpm link ./<relativepath-to-eslint>
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.
Err you tagged angry-raccoon-python-developer-cindy. Also good to know the pnpm link method. Knowing CLI commands makes things shorter :)
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.
lol, those names are always taken
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.
Unfortunately, I don't have an SEO-friendly name. Maybe when I'm married
I tried rerunning the CI. It looks like the |
See @cindyledev's comment above |
Rebased. |
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.
eslint in CI is unhappy
@humphd, because it's using [email protected], once this goes in we'll release a new version. |
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.
You can increase the version of eslint-config-telescope
here. I don't think we need to do it in a separate PR
What's the appropriate version of the package do you think. |
|
Ok I updated the version, I assume it will be automatically published? Then, we can trigger a Renovate bot for bump v1.0.1 -> v1.1.0 in sub-packages. |
Correct. Merging on master will update it. |
I try my best to refactor our shared ESlint configuration.
Changes made:
@senecacdot/eslint-config-telescope
as a package, other eslint configure can extend it just likeairbnb-config
, for example. Other configuration doesn't have to go intooverrides
**/*
(which might include outside files) to./**/*
src/web
only