meta: remove CJS-related hack in build:locale-pack script (#3764)

This commit is contained in:
Antoine du Hamel 2022-05-23 12:02:47 +02:00 committed by GitHub
parent 5a8a8d35be
commit f10745ec27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 1 additions and 71 deletions

View file

@ -93,18 +93,11 @@ async function generateLocaleDocs (pluginName) {
// Replace all nodes after the locale heading until the next heading (or eof)
headingRange(tree, rangeOptions, (start, _, end) => [
start,
{
type: 'html',
// `module.exports` is not allowed by eslint in our docs.
// The script outputs an extra newline which also isn't excepted by eslint
// TODO: remove the no-restricted-globals when switch to ESM is completed.
value: '<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->',
},
{
type: 'code',
lang: 'js',
meta: null,
value: fs.readFileSync(localePath, 'utf-8'),
value: fs.readFileSync(localePath, 'utf-8').trimEnd(),
},
end,
])

View file

@ -65,8 +65,6 @@ Configures whether to show a dropdown which enables to choose the audio device t
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
@ -98,5 +96,4 @@ export default {
discardRecordedFile: 'Discard recorded file',
},
}
```

View file

@ -115,15 +115,12 @@ This option is useful when uploading to an S3-like service that doesnt reply
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
timedOut: 'Upload stalled for %{seconds} seconds, aborting.',
},
}
```
## S3 Bucket configuration

View file

@ -127,13 +127,10 @@ This option correlates to the [RequestCredentials value](https://developer.mozil
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
pluginNameBox: 'Box',
},
}
```

View file

@ -277,8 +277,6 @@ const uppy = new Uppy({
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
@ -338,7 +336,6 @@ export default {
},
},
}
```
### `store: defaultStore()`

View file

@ -334,8 +334,6 @@ Dashboard ships with the `ThumbnailGenerator` plugin that adds small resized ima
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
@ -425,7 +423,6 @@ export default {
},
},
}
```
### `theme: 'light'`

View file

@ -86,8 +86,6 @@ Optionally, specify a string of text that explains something about the upload fo
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
@ -98,7 +96,6 @@ export default {
browse: 'browse',
},
}
```
### `onDragOver(event)`

View file

@ -127,13 +127,10 @@ This option correlates to the [RequestCredentials value](https://developer.mozil
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
pluginNameDropbox: 'Dropbox',
},
}
```

View file

@ -86,13 +86,10 @@ This option correlates to the [RequestCredentials value](https://developer.mozil
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
pluginNameFacebook: 'Facebook',
},
}
```

View file

@ -84,8 +84,6 @@ The `name` attribute for the `<input type="file">` element.
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
@ -95,7 +93,6 @@ export default {
chooseFiles: 'Choose files',
},
}
```
## Custom file input

View file

@ -122,13 +122,10 @@ This option correlates to the [RequestCredentials value](https://developer.mozil
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
pluginNameGoogleDrive: 'Google Drive',
},
}
```

View file

@ -123,8 +123,6 @@ uppy.on('file-editor:complete', (updatedFile) => {
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
@ -138,5 +136,4 @@ export default {
aspectRatioPortrait: 'Crop portrait (9:16)',
},
}
```

View file

@ -92,13 +92,10 @@ This option correlates to the [RequestCredentials value](https://developer.mozil
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
pluginNameInstagram: 'Instagram',
},
}
```

View file

@ -86,13 +86,10 @@ This option correlates to the [RequestCredentials value](https://developer.mozil
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
pluginNameOneDrive: 'OneDrive',
},
}
```

View file

@ -102,8 +102,6 @@ If no preferred video mime type is given, the ScreenCapture plugin will prefer t
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
@ -116,5 +114,4 @@ export default {
recording: 'Recording',
},
}
```

View file

@ -120,8 +120,6 @@ const doneButtonHandler = () => {
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
@ -172,7 +170,6 @@ export default {
showErrorDetails: 'Show error details',
},
}
```
[`@uppy/file-input`]: /docs/file-input

View file

@ -60,15 +60,12 @@ A unique identifier for this plugin. It defaults to `'ThumbnailGenerator'`.
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
generatingThumbnails: 'Generating thumbnails...',
},
}
```
### `thumbnailWidth: 200`

View file

@ -302,8 +302,6 @@ Limit the amount of uploads going on at the same time. Setting this to `0` means
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
@ -316,7 +314,6 @@ export default {
encoding: 'Encoding...',
},
}
```
## Errors

View file

@ -84,8 +84,6 @@ This option correlates to the [RequestCredentials value](https://developer.mozil
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
@ -99,7 +97,6 @@ export default {
enterCorrectUrl: 'Incorrect URL: Please make sure you are entering a direct link to a file',
},
}
```
## Methods

View file

@ -158,8 +158,6 @@ If no preferred image mime type is given, the Webcam plugin will prefer types li
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
@ -189,5 +187,4 @@ export default {
allowAccessDescription: 'In order to take pictures or record video with your camera, please allow camera access for this site.',
},
}
```

View file

@ -231,8 +231,6 @@ Indicates whether cross-site Access-Control requests should be made using creden
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
@ -240,7 +238,6 @@ export default {
timedOut: 'Upload stalled for %{seconds} seconds, aborting.',
},
}
```
## POST Parameters / Form Fields

View file

@ -90,15 +90,12 @@ This option correlates to the [RequestCredentials value](https://developer.mozil
### `locale: {}`
<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->
```js
export default {
strings: {
pluginNameZoom: 'Zoom',
},
}
```
## Zoom Marketplace