Skip to content

TSLint rules #11

@einari

Description

@einari

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

  • Require Copyright header (https://palantir.github.io/tslint/rules/file-header/) according to our standard (same as for C# defined here, see below for expected header)
  • Single empty line between copyright header and import statements
  • Single empty line between import statements and code
  • Single empty line between end of method/function and next.
  • JSDoc documentation - see below for more details.

JSDoc

  • All documentation lines should end with a . (Think of them as sentences on a page)
  • Require all parameters and return values be documented
  • Require a - separator when documenting parameters and return values
  • Allow for /** @inheritdoc */

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].
  */

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions