Skip to content
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

require-example linting #10862

Merged
merged 2 commits into from
Jul 15, 2021
Merged

require-example linting #10862

merged 2 commits into from
Jul 15, 2021

Conversation

karimnaaji
Copy link
Contributor

@karimnaaji karimnaaji commented Jul 15, 2021

Last public API examples, using glob rules in the main source folder of interest. Also promoted 'require-example' to an error instead of a warning for all public facing APIs.

@karimnaaji karimnaaji force-pushed the karim/require-examples branch from ff15905 to 870f057 Compare July 15, 2021 18:26
Copy link
Contributor

@HeyStenson HeyStenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These look right to me @karimnaaji! ✨

@karimnaaji karimnaaji merged commit a609ca7 into testing-tests Jul 15, 2021
@karimnaaji karimnaaji deleted the karim/require-examples branch July 15, 2021 19:59
HeyStenson added a commit that referenced this pull request Jul 28, 2021
* mapeventdata --> mapdataevent

* added require-property

* change warns to fails

* update tests

* ALL THE TESTS

* restore events.js

* updates and upgrades

* increase rigor of tests

* fix eslint errors for jsdoc examples (#10847)

* Add a few more examples (#10850)

* Add a few examples

* Update src/geo/mercator_coordinate.js

Co-authored-by: Ansis Brammanis <ansis@mapbox.com>

Co-authored-by: Ansis Brammanis <ansis@mapbox.com>

* Add some docs example (#10859)

* `require-example` linting (#10855)

* Add geojson source examples

* Add src/source/* inline examples

* Linter

* Lint

* Add camera examples

* Fixup

* Add camera examples

* Review comments

* Minor nit

* Apply jsdoc eslint rules only to public API files (#10854)

* `require-example` linting  (#10862)

* Last public facing examples

* Exclude private files from geo/ and promote require-example from warning to error

* `jsdoc/newline-after-description` linting (#10863)

* Update doc comments to conform to eslint-complete-sentences rule (#10851)

* Update doc comments to conform to eslint-complete-sentences rule

* Fix typo

* more detailed docs for return `this`

Extracted from Arindam's #10848

* Fix docs language

* Make complete-sentences an error

* Update eslintrc

* Cleanup

* Respond to feedback

Co-authored-by: Ansis Brammanis <ansis@mapbox.com>

* Non-test content updates (#10868)

* GL-JS --> Mapbox GL JS

* GL JS --> Mapbox GL JS

* remove e.g.

* remove i.e.

* Update src/ui/camera.js

* Resolves  `eslint-plugin-jsdoc` test failures  (#10858)

* Adds 'resource type' prefix for related items in GL JS API docs (#10837)
Co-authored-by: Asheem Mamoowala <asheem.mamoowala@mapbox.com>
Co-authored-by: Heather Stenson <heather.stenson@mapbox.com>
Co-authored-by: Karim Naaji <karim.naaji@gmail.com>
Co-authored-by: Arindam Bose <arindam.bose@mapbox.com>
Co-authored-by: Aidan H <aidan.hendrickson@mapbox.com>

* `jsdoc/check-types` linting (#10864)

* `jsdoc/check-types` linting: `Object` -> `object`
* Back to `Object` :|

* remove tests: check-indentation, check-alignment, check-tag-names, no-bad-blocks, valid-types, require-throws

* fix check-line-alignment and turn almost all tests to error

* change require-param-type to warn and fix that pesky sentence

* `jsdoc/require-param-type` linting (#10867)

* `jsdoc/require-param-type` linting

* Switch `Callback` to `Function` as per other callbacks defined in map.js

* Pin chrome to version 91 (#10887)

* Pin to chrome version 91

* Pin chrome version for test-browser

Co-authored-by: Dom Brassey <dom.brassey@mapbox.com>

* Add default values to some map API methods (#10823)

* Add default values to map methods

* Add default style value

* Add customAttribution default

* Add default value for container

* do not represent container as optional with value null

* do not represent style as optional with value null

* capitalize first letter

Co-authored-by: Dom Brassey <dom.brassey@mapbox.com>
Co-authored-by: HeyStenson <heather.stenson@mapbox.com>

* "jsdoc/require-property-description" rule and fixes to events.js (#10870)

* Merging

* Removed changes created by VSCode ESLint extension

* Update src/style/style_image.js

* object to Object and ryan's nits

* Update src/ui/events.js

Co-authored-by: Katy DeCorah <decorah@mapbox.com>

* Update src/style/style_image.js

Co-authored-by: Katy DeCorah <decorah@mapbox.com>

* Update src/style/style_image.js

Co-authored-by: Ricky Reusser <rreusser@users.noreply.github.com>

* Update src/ui/events.js

Co-authored-by: Ricky Reusser <rreusser@users.noreply.github.com>

* Update src/ui/events.js

Co-authored-by: Ricky Reusser <rreusser@users.noreply.github.com>

Co-authored-by: Dom Brassey <dom.brassey@mapbox.com>
Co-authored-by: Katy DeCorah <decorah@mapbox.com>
Co-authored-by: Ricky Reusser <rreusser@users.noreply.github.com>

* remove straggler instance of @Property {MapTouchEvent} data

* change 2 tests from warn to error

* Break down map methods and events into sections for docs (#10844)

* add map source sections, reorder some methods

* map sections fixes

* Fix @section causing `jsdoc/require-description-complete-sentence` to fail

* Cleanup reordered `events`

Co-authored-by: Arindam Bose <arindam.bose@mapbox.com>

* Apply suggestions from code review

* Update src/ui/map.js

* Update src/ui/map.js

* Update src/ui/map.js

* Update src/ui/map.js

* Update src/source/vector_tile_source.js

Co-authored-by: Dan Swick <dan.swick@gmail.com>

* Update src/geo/transform.js

Co-authored-by: Aidan H <aidan.hendrickson@mapbox.com>

Co-authored-by: Dom Brassey <dom.brassey@mapbox.com>
Co-authored-by: Ansis Brammanis <ansis@mapbox.com>
Co-authored-by: Karim Naaji <karim.naaji@gmail.com>
Co-authored-by: Ryan Hamley <ryan.hamley@mapbox.com>
Co-authored-by: Arindam Bose <arindam.bose@mapbox.com>
Co-authored-by: Ricky Reusser <rreusser@users.noreply.github.com>
Co-authored-by: Aidan H <aidan.hendrickson@mapbox.com>
Co-authored-by: Katy DeCorah <decorah@mapbox.com>
Co-authored-by: Vladimir Agafonkin <agafonkin@gmail.com>
Co-authored-by: Dan Swick <dan.swick@gmail.com>
arindam1993 pushed a commit that referenced this pull request Jul 30, 2021
* mapeventdata --> mapdataevent

* added require-property

* change warns to fails

* update tests

* ALL THE TESTS

* restore events.js

* updates and upgrades

* increase rigor of tests

* fix eslint errors for jsdoc examples (#10847)

* Add a few more examples (#10850)

* Add a few examples

* Update src/geo/mercator_coordinate.js

Co-authored-by: Ansis Brammanis <ansis@mapbox.com>

Co-authored-by: Ansis Brammanis <ansis@mapbox.com>

* Add some docs example (#10859)

* `require-example` linting (#10855)

* Add geojson source examples

* Add src/source/* inline examples

* Linter

* Lint

* Add camera examples

* Fixup

* Add camera examples

* Review comments

* Minor nit

* Apply jsdoc eslint rules only to public API files (#10854)

* `require-example` linting  (#10862)

* Last public facing examples

* Exclude private files from geo/ and promote require-example from warning to error

* `jsdoc/newline-after-description` linting (#10863)

* Update doc comments to conform to eslint-complete-sentences rule (#10851)

* Update doc comments to conform to eslint-complete-sentences rule

* Fix typo

* more detailed docs for return `this`

Extracted from Arindam's #10848

* Fix docs language

* Make complete-sentences an error

* Update eslintrc

* Cleanup

* Respond to feedback

Co-authored-by: Ansis Brammanis <ansis@mapbox.com>

* Non-test content updates (#10868)

* GL-JS --> Mapbox GL JS

* GL JS --> Mapbox GL JS

* remove e.g.

* remove i.e.

* Update src/ui/camera.js

* Resolves  `eslint-plugin-jsdoc` test failures  (#10858)

* Adds 'resource type' prefix for related items in GL JS API docs (#10837)
Co-authored-by: Asheem Mamoowala <asheem.mamoowala@mapbox.com>
Co-authored-by: Heather Stenson <heather.stenson@mapbox.com>
Co-authored-by: Karim Naaji <karim.naaji@gmail.com>
Co-authored-by: Arindam Bose <arindam.bose@mapbox.com>
Co-authored-by: Aidan H <aidan.hendrickson@mapbox.com>

* `jsdoc/check-types` linting (#10864)

* `jsdoc/check-types` linting: `Object` -> `object`
* Back to `Object` :|

* remove tests: check-indentation, check-alignment, check-tag-names, no-bad-blocks, valid-types, require-throws

* fix check-line-alignment and turn almost all tests to error

* change require-param-type to warn and fix that pesky sentence

* `jsdoc/require-param-type` linting (#10867)

* `jsdoc/require-param-type` linting

* Switch `Callback` to `Function` as per other callbacks defined in map.js

* Pin chrome to version 91 (#10887)

* Pin to chrome version 91

* Pin chrome version for test-browser

Co-authored-by: Dom Brassey <dom.brassey@mapbox.com>

* Add default values to some map API methods (#10823)

* Add default values to map methods

* Add default style value

* Add customAttribution default

* Add default value for container

* do not represent container as optional with value null

* do not represent style as optional with value null

* capitalize first letter

Co-authored-by: Dom Brassey <dom.brassey@mapbox.com>
Co-authored-by: HeyStenson <heather.stenson@mapbox.com>

* "jsdoc/require-property-description" rule and fixes to events.js (#10870)

* Merging

* Removed changes created by VSCode ESLint extension

* Update src/style/style_image.js

* object to Object and ryan's nits

* Update src/ui/events.js

Co-authored-by: Katy DeCorah <decorah@mapbox.com>

* Update src/style/style_image.js

Co-authored-by: Katy DeCorah <decorah@mapbox.com>

* Update src/style/style_image.js

Co-authored-by: Ricky Reusser <rreusser@users.noreply.github.com>

* Update src/ui/events.js

Co-authored-by: Ricky Reusser <rreusser@users.noreply.github.com>

* Update src/ui/events.js

Co-authored-by: Ricky Reusser <rreusser@users.noreply.github.com>

Co-authored-by: Dom Brassey <dom.brassey@mapbox.com>
Co-authored-by: Katy DeCorah <decorah@mapbox.com>
Co-authored-by: Ricky Reusser <rreusser@users.noreply.github.com>

* remove straggler instance of @Property {MapTouchEvent} data

* change 2 tests from warn to error

* Break down map methods and events into sections for docs (#10844)

* add map source sections, reorder some methods

* map sections fixes

* Fix @section causing `jsdoc/require-description-complete-sentence` to fail

* Cleanup reordered `events`

Co-authored-by: Arindam Bose <arindam.bose@mapbox.com>

* Apply suggestions from code review

* Update src/ui/map.js

* Update src/ui/map.js

* Update src/ui/map.js

* Update src/ui/map.js

* Update src/source/vector_tile_source.js

Co-authored-by: Dan Swick <dan.swick@gmail.com>

* Update src/geo/transform.js

Co-authored-by: Aidan H <aidan.hendrickson@mapbox.com>

Co-authored-by: Dom Brassey <dom.brassey@mapbox.com>
Co-authored-by: Ansis Brammanis <ansis@mapbox.com>
Co-authored-by: Karim Naaji <karim.naaji@gmail.com>
Co-authored-by: Ryan Hamley <ryan.hamley@mapbox.com>
Co-authored-by: Arindam Bose <arindam.bose@mapbox.com>
Co-authored-by: Ricky Reusser <rreusser@users.noreply.github.com>
Co-authored-by: Aidan H <aidan.hendrickson@mapbox.com>
Co-authored-by: Katy DeCorah <decorah@mapbox.com>
Co-authored-by: Vladimir Agafonkin <agafonkin@gmail.com>
Co-authored-by: Dan Swick <dan.swick@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants