- Issue created by @brianperry
- ๐บ๐ธUnited States mitchellmarkoff
On their own, Drupal Coreโs JS Standards should mostly suffice as a starting point for this project. The usage of the eslint-config-airbnb is already familiar to most in the JS ecosystem and is well documented.
Unfortunately, the AirBnb style guide does not officially offer TypeScript support. However, there is a very popular
npm
package eslint-config-airbnb-typescript (Git Repo) that gives us an easy way to add TypeScript support to these design standards.Since we are planning on building on top of the existing Drupal JS Coding Standards with only a minor adjustment for now, I donโt think a follow up issue is needed to socialize a new set of standards.
As this project will be using TypeScript, it makes the most sense to use TSDoc over the current doc standard โ of JSDoc3. TSDoc will provide better integration with the TS type system, enabling support for advanced types. It will also ensure a consistent type interface which will keep this codebase clean and easy to maintain.
- ๐บ๐ธUnited States brianperry
That all makes sense to me @mitchellmarkoff
When we implement this, in the project readme I think we should document anywhere we diverge from Drupal's JS Standards / AirBnb. Based on what you outlined that would at least be eslint-config-airbnb-typescript and tsdoc.
- Status changed to Fixed
about 1 year ago 6:02pm 1 November 2023 - ๐บ๐ธUnited States brianperry
Marking as fixed as we have outlined our standards in the readme: https://git.drupalcode.org/project/api_client/-/blob/canary/README.md#co... and implemented them in the project. As of now the only adjustments we have made to the default AirBNB standards were related to TypeScript support.
Automatically closed - issue fixed for 2 weeks with no activity.