Skip to content

Commit

Permalink
enforce no wrapIndent for jsdoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswhong committed Apr 5, 2024
1 parent 118e87d commit 03207af
Show file tree
Hide file tree
Showing 12 changed files with 320 additions and 319 deletions.
5 changes: 3 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@
"jsdoc/require-property-description": "off",
"jsdoc/require-property-name": "off",
"jsdoc/require-property-type": "off",
"jsdoc/require-returns-type": "off",
"jsdoc/require-returns-type": "off"

}
},
{
Expand Down Expand Up @@ -161,7 +162,7 @@
"matchingFileName": "src/fake_filename_for_jsdoc_examples",
"rejectExampleCodeRegex": "<script>"
}],
"jsdoc/check-line-alignment": ["error", "any", {"wrapIndent": " "}],
"jsdoc/check-line-alignment": ["error"],
"jsdoc/check-property-names": "error",
"jsdoc/check-types": "error",
"jsdoc/tag-lines": ["error", "any", {"startLines": 1}],
Expand Down
4 changes: 2 additions & 2 deletions src/geo/lng_lat_bounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class LngLatBounds {
* Returns the bounding box represented as an array.
*
* @returns {Array<Array<number>>} The bounding box represented as an array, consisting of the
* southwest and northeast coordinates of the bounding represented as arrays of numbers.
* southwest and northeast coordinates of the bounding represented as arrays of numbers.
* @example
* const llb = new mapboxgl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);
* llb.toArray(); // = [[-73.9876, 40.7661], [-73.9397, 40.8002]]
Expand All @@ -234,7 +234,7 @@ class LngLatBounds {
* Return the bounding box represented as a string.
*
* @returns {string} The bounding box represents as a string of the format
* `'LngLatBounds(LngLat(lng, lat), LngLat(lng, lat))'`.
* `'LngLatBounds(LngLat(lng, lat), LngLat(lng, lat))'`.
* @example
* const llb = new mapboxgl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);
* llb.toString(); // = "LngLatBounds(LngLat(-73.9876, 40.7661), LngLat(-73.9397, 40.8002))"
Expand Down
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ Debug.extend(exported, {isSafari, getPerformanceMetrics: PerformanceUtils.getPer
* @function supported
* @param {Object} [options]
* @param {boolean} [options.failIfMajorPerformanceCaveat=false] If `true`,
* the function will return `false` if the performance of Mapbox GL JS would
* be dramatically worse than expected (for example, a software WebGL renderer
* would be used).
* the function will return `false` if the performance of Mapbox GL JS would
* be dramatically worse than expected (for example, a software WebGL renderer
* would be used).
* @return {boolean}
* @example
* // Show an alert if the browser does not support Mapbox GL
Expand All @@ -289,7 +289,7 @@ Debug.extend(exported, {isSafari, getPerformanceMetrics: PerformanceUtils.getPer
* @param {string} pluginURL URL pointing to the Mapbox RTL text plugin source.
* @param {Function} callback Called with an error argument if there is an error, or no arguments if the plugin loads successfully.
* @param {boolean} lazy If set to `true`, MapboxGL will defer loading the plugin until right-to-left text is encountered, and
* right-to-left text will be rendered only after the plugin finishes loading.
* right-to-left text will be rendered only after the plugin finishes loading.
* @example
* mapboxgl.setRTLTextPlugin('https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.0/mapbox-gl-rtl-text.js');
* @see [Example: Add support for right-to-left scripts](https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-rtl-text/)
Expand Down
6 changes: 3 additions & 3 deletions src/source/canvas_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ class CanvasSource extends ImageSource {
* @instance
* @memberof CanvasSource
* @param {Array<Array<number>>} coordinates Four geographical coordinates,
* represented as arrays of longitude and latitude numbers, which define the corners of the canvas.
* The coordinates start at the top left corner of the canvas and proceed in clockwise order.
* They do not have to represent a rectangle.
* represented as arrays of longitude and latitude numbers, which define the corners of the canvas.
* The coordinates start at the top left corner of the canvas and proceed in clockwise order.
* They do not have to represent a rectangle.
* @returns {CanvasSource} Returns itself to allow for method chaining.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/source/custom_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function isRaster(data: any): boolean {
* @param {Object} options Options.
* @param {AbortSignal} options.signal A signal object that communicates when the map cancels the tile loading request.
* @returns {Promise<TextureImage | undefined | null>} The promise that resolves to the tile image data as an `HTMLCanvasElement`, `HTMLImageElement`, `ImageData`, `ImageBitmap` or object with `width`, `height`, and `data`.
* If `loadTile` resolves to `undefined`, a map will render an overscaled parent tile in the tile’s space. If `loadTile` resolves to `null`, a map will render nothing in the tile’s space.
* If `loadTile` resolves to `undefined`, a map will render an overscaled parent tile in the tile’s space. If `loadTile` resolves to `null`, a map will render nothing in the tile’s space.
*/
export type CustomSourceInterface<T> = {
id: string;
Expand Down
12 changes: 6 additions & 6 deletions src/source/image_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ class ImageSource extends Evented implements Source {
* @param {Object} options Options object.
* @param {string} [options.url] Required image URL.
* @param {Array<Array<number>>} [options.coordinates] Four geographical coordinates,
* represented as arrays of longitude and latitude numbers, which define the corners of the image.
* The coordinates start at the top left corner of the image and proceed in clockwise order.
* They do not have to represent a rectangle.
* represented as arrays of longitude and latitude numbers, which define the corners of the image.
* The coordinates start at the top left corner of the image and proceed in clockwise order.
* They do not have to represent a rectangle.
* @returns {ImageSource} Returns itself to allow for method chaining.
* @example
* // Add to an image source to the map with some initial URL and coordinates
Expand Down Expand Up @@ -279,9 +279,9 @@ class ImageSource extends Evented implements Source {
* Sets the image's coordinates and re-renders the map.
*
* @param {Array<Array<number>>} coordinates Four geographical coordinates,
* represented as arrays of longitude and latitude numbers, which define the corners of the image.
* The coordinates start at the top left corner of the image and proceed in clockwise order.
* They do not have to represent a rectangle.
* represented as arrays of longitude and latitude numbers, which define the corners of the image.
* The coordinates start at the top left corner of the image and proceed in clockwise order.
* They do not have to represent a rectangle.
* @returns {ImageSource} Returns itself to allow for method chaining.
* @example
* // Add an image source to the map with some initial coordinates
Expand Down

0 comments on commit 03207af

Please sign in to comment.