dolittle / TypeScript.Build

Holds common building blocks for building TypeScript applications and libraries
MIT License
0 stars 1 forks source link

TSLint rules #11

Open einari opened 4 years ago

einari commented 4 years ago

Suggestions to additional rules for consistency on our own code-base:

JSDoc

Header

// Copyright (c) Dolittle. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

Expected texts in documentation

For consistency, we’re expecting documentation to follow suit.

Constructor

/**
  * Initializes a new instance of the {YourClass} class.
  */

Interface

/**
  * Defines...
  */

Implementations

/**
  * Represents an implementation of {IInterface} [for a specific purpose, if any].
  */
woksin commented 4 years ago

Sounds great. Just a heads up, I think that the rules related to the jsdocs is really time consuming. I will check it out and find out what can work

einari commented 4 years ago

Depends on what the object model provides. If it's similar to the C# Roslyn model, it should be fairly straight forward.

Example: https://github.com/dolittle-tools/DotNET.Common/blob/master/Source/CodeAnalysis/ExceptionDescriptionShouldFollowStandard/Analyzer.cs

woksin commented 4 years ago

@einari Not time consuming as in amount of work required, I meant that the linting will be really slow

einari commented 4 years ago

Ahh.. I see.. 😊 Could be, for Roslyn you hardly notice - that compiler is super efficient in running things concurrently.