-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
chore: Enable ESLint for apps and fix all errors #46082
base: master
Are you sure you want to change the base?
Conversation
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.
LGTM! There are npm build changes though.
@@ -54,7 +54,6 @@ import { showError } from '@nextcloud/dialogs' | |||
import axios from '@nextcloud/axios' | |||
import { generateOcsUrl } from '@nextcloud/router' | |||
import { confirmPassword } from '@nextcloud/password-confirmation' | |||
import '@nextcloud/password-confirmation/dist/style.css' |
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 think this line should stay.
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 are right, reason for ESLint to remove this is a typo in the password-confirmation package...
OC: any; | ||
OCA: any; | ||
OCP: any; | ||
OC: Nextcloud.v28.OC; |
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.
Should this be 30 on master?
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.
Not available yet. We do not even have types for v29, release still waits for approval:
nextcloud-libraries/nextcloud-typings#260
@@ -70,7 +70,6 @@ import moment from '@nextcloud/moment' | |||
import axios from '@nextcloud/axios' | |||
import { generateOcsUrl } from '@nextcloud/router' | |||
import { confirmPassword } from '@nextcloud/password-confirmation' | |||
import '@nextcloud/password-confirmation/dist/style.css' |
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 it added globally somewhere or still needed here?
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.
We can consider doing so but currently no it is not
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.
But it is then still needed?
Nice find 🙈 |
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!
Checked all the changes, looks good.
I expected much more changes 👀
The only thing I'm working about is removing the import. Having a file it is not easily possible to say if removing this line is safe. And strictly, each file with dialogs must have dialog styles.
import '@nextcloud/password-confirmation/dist/style.css'
"lint": "eslint $(for appdir in $(ls apps); do if ! $(git check-ignore -q $appdir); then printf \"apps/$appdir \"; fi; done) core --no-error-on-unmatched-pattern", | ||
"lint:fix": "eslint $(for appdir in $(ls apps); do if ! $(git check-ignore -q $appdir); then printf \"apps/$appdir \"; fi; done) core --no-error-on-unmatched-pattern --fix", |
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.
It's been worrying me for a year 🙈
735b77e
to
94fb548
Compare
Nevertheless this causes a huge amount of new warnings. Previously the shell script for directories to lint was wrong it was generating all app names to lint, but was missing the `apps/` prefix. Causing only `core` to be linted. Co-authored-by: Grigorii K. Shartsev <me@shgk.me> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
94fb548
to
b7cdf76
Compare
Summary
Nevertheless this causes a huge amount of new warnings. Previously the shell script for directories to lint was wrong it was generating all app names to lint, but was missing the
apps/
prefix. Causing onlycore
to be linted.Checklist