-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Upgrade linting to 2.0.0-0 #3280
Conversation
@@ -19,3 +19,4 @@ website/src/_posts/2021-03-*.md | |||
website/src/_posts/2021-04-*.md | |||
website/src/_posts/2021-05-*.md | |||
website/src/_posts/2021-06-*.md | |||
website/src/docs/react-dashboard.md |
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.
Sadly, without this, eslint crashes on:
eslint:cli-engine Lint /home/kvz/code/uppy/website/src/docs/react-dashboard.md +368ms
Oops! Something went wrong! :(
ESLint: 8.0.1
Error: Rules with suggestions must set the `meta.hasSuggestions` property to `true`.
Occurred while linting /home/kvz/code/uppy/website/src/docs/react-dashboard.md/3_3.js:13
Rule: "react-hooks/exhaustive-deps"
at Object.report (/home/kvz/code/uppy/node_modules/eslint/lib/linter/linter.js:948:35)
at reportProblem (/home/kvz/code/uppy/node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js:760:15)
at visitFunctionWithDependencies (/home/kvz/code/uppy/node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js:1691:7)
at visitCallExpression (/home/kvz/code/uppy/node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js:1737:11)
at ruleErrorHandler (/home/kvz/code/uppy/node_modules/eslint/lib/linter/linter.js:966:28)
at /home/kvz/code/uppy/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (/home/kvz/code/uppy/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (/home/kvz/code/uppy/node_modules/eslint/lib/linter/node-event-generator.js:290:26)
at NodeEventGenerator.applySelectors (/home/kvz/code/uppy/node_modules/eslint/lib/linter/node-event-generator.js:319:22)
@@ -43,7 +43,6 @@ module.exports = { | |||
rules: { | |||
// transloadit rules we are actually ok with in the uppy repo | |||
'import/extensions': 'off', | |||
'no-await-in-loop': 'off', |
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 no longer enforce this in 2.0.0-0 as requested by Antoine
@@ -79,6 +78,7 @@ module.exports = { | |||
'global-require': ['warn'], | |||
'import/no-unresolved': ['warn'], | |||
'import/order': ['warn'], | |||
'max-classes-per-file': ['warn'], |
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 new, setting it to warn for now, hopefully we can fix this in later, smaller, custom rolled PRs, and save this one for automation and getting the upgrade out the door.
"eslint-plugin-react": "^7.22.0", | ||
"eslint-plugin-react-hooks": "^4.2.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.
Is this one still necessary even though we added the react docs to the ignore-list?
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.
What do you mean by "added the react docs to the ignore-list"?
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'm referring to #3280 (comment).
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 eslint plugin react hooks is needed for the rule of hooks rules to work.
@@ -237,7 +237,7 @@ const validateConfig = (companionOptions) => { | |||
fs.accessSync(`${companionOptions.filePath}`, fs.R_OK | fs.W_OK) // eslint-disable-line no-bitwise | |||
} catch (err) { | |||
throw new Error( | |||
`No access to "${companionOptions.filePath}". Please ensure the directory exists and with read/write permissions.` | |||
`No access to "${companionOptions.filePath}". Please ensure the directory exists and with read/write permissions.`, |
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 sure about more commas, is this for the same reason, to add new args easier?
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, less diff noise if args are added or removed from functions. Same as for object literals, but in v1 function argument comma enforcement was disabled
* main: Remove references of incorrect `options` argument for `companion.socket` (#3307) Upgrade linting to 2.0.0-0 (#3280) Release [email protected], @uppy/[email protected] @uppy/[email protected] meta: update version references in docs Release @uppy/[email protected] @uppy/[email protected] @uppy/aws-s3: use `Promise.allSettled` insead of custom utils (#3079) Convert sets to arrays prior to using spread operator to enable transpilation to ES5 (#3297) Add showRecordingLength to webcam types (#3303) Required meta fields UI (#3285) Update BACKLOG.md Release [email protected] @uppy/[email protected] fix: @uppy/utils - `getFileType()` always returns a string (#3294) Remove yarn file @uppy/companion: fix Dockerfiles (#3291) @uppy/companion: use Node.js 16.x for Dockerfile (#3289) if an item is checked, it can’t be disabled (#3288)
* main: Refactor locale scripts & generate types and docs (#3276) Remove references of incorrect `options` argument for `companion.socket` (#3307) Upgrade linting to 2.0.0-0 (#3280) Release [email protected], @uppy/[email protected] @uppy/[email protected] meta: update version references in docs Release @uppy/[email protected] @uppy/[email protected]
* main: (30 commits) Refactor locale scripts & generate types and docs (#3276) Remove references of incorrect `options` argument for `companion.socket` (#3307) Upgrade linting to 2.0.0-0 (#3280) Release [email protected], @uppy/[email protected] @uppy/[email protected] meta: update version references in docs Release @uppy/[email protected] @uppy/[email protected] @uppy/aws-s3: use `Promise.allSettled` insead of custom utils (#3079) Convert sets to arrays prior to using spread operator to enable transpilation to ES5 (#3297) Add showRecordingLength to webcam types (#3303) Required meta fields UI (#3285) Update BACKLOG.md Release [email protected] @uppy/[email protected] fix: @uppy/utils - `getFileType()` always returns a string (#3294) Remove yarn file @uppy/companion: fix Dockerfiles (#3291) @uppy/companion: use Node.js 16.x for Dockerfile (#3289) if an item is checked, it can’t be disabled (#3288) ...
| Package | Version | Package | Version | | ------------------------- | ------- | ------------------------- | ------- | | @uppy/angular | 0.2.6 | @uppy/locales | 2.0.4 | | @uppy/audio | 0.2.0 | @uppy/onedrive | 2.0.5 | | @uppy/aws-s3 | 2.0.6 | @uppy/provider-views | 2.0.6 | | @uppy/aws-s3-multipart | 2.2.0 | @uppy/react | 2.1.2 | | @uppy/box | 1.0.5 | @uppy/screen-capture | 2.0.5 | | @uppy/companion | 3.1.2 | @uppy/status-bar | 2.1.2 | | @uppy/companion-client | 2.0.4 | @uppy/store-default | 2.0.3 | | @uppy/core | 2.1.3 | @uppy/thumbnail-generator | 2.0.6 | | @uppy/dashboard | 2.1.2 | @uppy/transloadit | 2.0.5 | | @uppy/drag-drop | 2.0.5 | @uppy/tus | 2.1.2 | | @uppy/dropbox | 2.0.5 | @uppy/url | 2.0.5 | | @uppy/facebook | 2.0.5 | @uppy/utils | 4.0.4 | | @uppy/file-input | 2.0.5 | @uppy/webcam | 2.0.5 | | @uppy/golden-retriever | 2.0.6 | @uppy/xhr-upload | 2.0.6 | | @uppy/google-drive | 2.0.5 | @uppy/zoom | 1.0.5 | | @uppy/image-editor | 1.1.0 | @uppy/robodog | 2.1.4 | | @uppy/informer | 2.0.5 | uppy | 2.3.0 | | @uppy/instagram | 2.0.5 | | | - meta: add release automations (Antoine du Hamel / #3304) - @uppy/dashboard: Save meta fields when opening the image editor (Merlijn Vos / #3339) - @uppy/aws-s3-multipart: Drop `lockedCandidatesForBatch` and mark chunks as busy when preparing (Yegor Yarko / #3342) - @uppy/webcam: fix broken links in `webcam.md` (Antoine du Hamel / #3346) - @uppy/audio: new @uppy/audio plugin for recording with microphone (Artur Paikin / #2976) - build: force use of `@babel/plugin-proposal-optional-chaining` (Antoine du Hamel / #3335) - @uppy/companion: fix deploy Yarn version (Antoine du Hamel / #3327) - @uppy/companion: upgrade aws-sdk (Mikael Finstad / #3334) - @uppy/core: disable loose transpilation for legacy bundle (Antoine du Hamel / #3329) - @uppy/angular: examples: update `angular-example` to Angular v13 (Antoine du Hamel / #3325) - meta: Update BACKLOG.md (Artur Paikin, Merlijn Vos) - meta: Add disableLocalFiles to options summary (Steve Barker / #3323) - meta: Create SECURITY.md (Ziding Zhang / #3052) - @uppy/image-editor: Pass croppedCanvasOptions to getCroppedCanvas (Mohamed Boudra / #3320) - meta: finish `master`->`main` job (Mikael Finstad / #3315) - website: update documents that were out of date (Antoine du Hamel / #3317) - @uppy/status-bar: Status bar error state improvements (Merlijn Vos / #3299) - doc: Fix typo in `docs/drag-drop.md` (Ash Allen / #3319) - website: Update /support and docs about Transloadit-hosted Companion (Artur Paikin / #3243) - @uppy/aws-s3,@uppy/box,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/google-drive,@uppy/image-editor,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/screen-capture,@uppy/status-bar,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/url,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: Refactor locale scripts & generate types and docs (Merlijn Vos / #3276) - @uppy/companion: Remove references of incorrect `options` argument for `companion.socket` (Mikael Finstad / #3307) - @uppy/companion: Upgrade linting to 2.0.0-0 (Kevin van Zonneveld / #3280)
* main: (30 commits) Refactor locale scripts & generate types and docs (transloadit#3276) Remove references of incorrect `options` argument for `companion.socket` (transloadit#3307) Upgrade linting to 2.0.0-0 (transloadit#3280) Release [email protected], @uppy/[email protected] @uppy/[email protected] meta: update version references in docs Release @uppy/[email protected] @uppy/[email protected] @uppy/aws-s3: use `Promise.allSettled` insead of custom utils (transloadit#3079) Convert sets to arrays prior to using spread operator to enable transpilation to ES5 (transloadit#3297) Add showRecordingLength to webcam types (transloadit#3303) Required meta fields UI (transloadit#3285) Update BACKLOG.md Release [email protected] @uppy/[email protected] fix: @uppy/utils - `getFileType()` always returns a string (transloadit#3294) Remove yarn file @uppy/companion: fix Dockerfiles (transloadit#3291) @uppy/companion: use Node.js 16.x for Dockerfile (transloadit#3289) if an item is checked, it can’t be disabled (transloadit#3288) ...
* Upgrade linting to 2.0.0-0 * Adjust so we can pass without error * Fix linting * Update header-blacklist.js * Update index.js * Update Uppy.js * Update Components.js * Update StatusBar.js * Update Assembly.js * Upgrade to linting 2.0.0 (final release)
| Package | Version | Package | Version | | ------------------------- | ------- | ------------------------- | ------- | | @uppy/angular | 0.2.6 | @uppy/locales | 2.0.4 | | @uppy/audio | 0.2.0 | @uppy/onedrive | 2.0.5 | | @uppy/aws-s3 | 2.0.6 | @uppy/provider-views | 2.0.6 | | @uppy/aws-s3-multipart | 2.2.0 | @uppy/react | 2.1.2 | | @uppy/box | 1.0.5 | @uppy/screen-capture | 2.0.5 | | @uppy/companion | 3.1.2 | @uppy/status-bar | 2.1.2 | | @uppy/companion-client | 2.0.4 | @uppy/store-default | 2.0.3 | | @uppy/core | 2.1.3 | @uppy/thumbnail-generator | 2.0.6 | | @uppy/dashboard | 2.1.2 | @uppy/transloadit | 2.0.5 | | @uppy/drag-drop | 2.0.5 | @uppy/tus | 2.1.2 | | @uppy/dropbox | 2.0.5 | @uppy/url | 2.0.5 | | @uppy/facebook | 2.0.5 | @uppy/utils | 4.0.4 | | @uppy/file-input | 2.0.5 | @uppy/webcam | 2.0.5 | | @uppy/golden-retriever | 2.0.6 | @uppy/xhr-upload | 2.0.6 | | @uppy/google-drive | 2.0.5 | @uppy/zoom | 1.0.5 | | @uppy/image-editor | 1.1.0 | @uppy/robodog | 2.1.4 | | @uppy/informer | 2.0.5 | uppy | 2.3.0 | | @uppy/instagram | 2.0.5 | | | - meta: add release automations (Antoine du Hamel / transloadit#3304) - @uppy/dashboard: Save meta fields when opening the image editor (Merlijn Vos / transloadit#3339) - @uppy/aws-s3-multipart: Drop `lockedCandidatesForBatch` and mark chunks as busy when preparing (Yegor Yarko / transloadit#3342) - @uppy/webcam: fix broken links in `webcam.md` (Antoine du Hamel / transloadit#3346) - @uppy/audio: new @uppy/audio plugin for recording with microphone (Artur Paikin / transloadit#2976) - build: force use of `@babel/plugin-proposal-optional-chaining` (Antoine du Hamel / transloadit#3335) - @uppy/companion: fix deploy Yarn version (Antoine du Hamel / transloadit#3327) - @uppy/companion: upgrade aws-sdk (Mikael Finstad / transloadit#3334) - @uppy/core: disable loose transpilation for legacy bundle (Antoine du Hamel / transloadit#3329) - @uppy/angular: examples: update `angular-example` to Angular v13 (Antoine du Hamel / transloadit#3325) - meta: Update BACKLOG.md (Artur Paikin, Merlijn Vos) - meta: Add disableLocalFiles to options summary (Steve Barker / transloadit#3323) - meta: Create SECURITY.md (Ziding Zhang / transloadit#3052) - @uppy/image-editor: Pass croppedCanvasOptions to getCroppedCanvas (Mohamed Boudra / transloadit#3320) - meta: finish `master`->`main` job (Mikael Finstad / transloadit#3315) - website: update documents that were out of date (Antoine du Hamel / transloadit#3317) - @uppy/status-bar: Status bar error state improvements (Merlijn Vos / transloadit#3299) - doc: Fix typo in `docs/drag-drop.md` (Ash Allen / transloadit#3319) - website: Update /support and docs about Transloadit-hosted Companion (Artur Paikin / transloadit#3243) - @uppy/aws-s3,@uppy/box,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/google-drive,@uppy/image-editor,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/screen-capture,@uppy/status-bar,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/url,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: Refactor locale scripts & generate types and docs (Merlijn Vos / transloadit#3276) - @uppy/companion: Remove references of incorrect `options` argument for `companion.socket` (Mikael Finstad / transloadit#3307) - @uppy/companion: Upgrade linting to 2.0.0-0 (Kevin van Zonneveld / transloadit#3280)
Refs: transloadit/eslint-config-transloadit#13
Big diff due to commas being added every so and so lines, so this is merge conflict heavy. Here is a tip how to reduce the pain in heavily affected pending PRs https://gist.github.com/kvz/b205470849f0489549f43c7a27a406dd.