sveltejs / eslint-config

An ESLint config for Svelte
14 stars 11 forks source link

[chrore] Standardize type declarations #17

Closed JeanJPNM closed 2 years ago

JeanJPNM commented 2 years ago

Most projects currently using this config don't have a standart set of guidelines to be followed when it comes to type declarations. This usually results in serious fragmentation of styles within a single repo.

While some choices really come to style, others can affect the development experience, such as using types over interfaces or vice versa (microsoft/TypeScript#15300) or the style of declaring methods as shown bellow.

Here handler is semantically a property of the object that happens to hold a function: semantics of property style

But here handler is semantically a method of the object, not just a regular field: semantics of method style