目录

@typescript-eslint/naming-convention

Enforce naming conventions for everything across a codebase.

Rule Configuration

// code-linter.json5
{
  "rules": {
    "@typescript-eslint/naming-convention": "error"
  }
}

Options

For details, see @typescript-eslint/naming-convention.

Example of Correct Code

// By default, class names follow the UpperCamelCase naming convention, while function names follow the lowerCamelCase naming convention.
export class Bar {
  public meth() {
    console.info('method');
  }
}

export function foo() {
  console.info('function');
}

Example of Incorrect Code

// By default, class names follow the UpperCamelCase naming convention, while function names follow the lowerCamelCase naming convention.
export class bar {
  public Meth() {
    console.info('method');
  }
}

export function Foo() {
  console.info('function');
}

Rule Set

plugin:@typescript-eslint/all

For details about how to configure Code Linter check rules, see Code Linter.