eslint/rules/naming
Naming: Names of identifiers, the naming convention of TypeScript and forbidden abbreviations. Rules of ESLint, typescript-eslint and SonarJS (the Sonar way profile of SonarQube) on this subject, every rule listed; the TypeScript rules apply to TypeScript files only.
13 rules, 5 on. Source: lint/eslint/rules/naming.mjs.
| Rule | Setting | Files | What it checks | Why |
|---|---|---|---|---|
func-name-matching | info | JS + TS | Require function names to match the name of the variable or property to which they are assigned | — |
func-names | off | JS + TS | Require or disallow named function expressions | Off: callbacks are arrow functions by convention. |
id-denylist | off | JS + TS | Disallow specified identifiers | — |
id-match | off | JS + TS | Require identifiers to match a specified regular expression | — |
new-cap | warn | JS + TS | Require constructor names to begin with a capital letter | — |
no-shadow-restricted-names | error | JS + TS | Disallow identifiers from shadowing restricted names | — |
no-underscore-dangle | off | JS + TS | Disallow dangling underscores in identifiers | Off: _ prefix is allowed (private members, unused params). |
sonarjs/class-name | off | JS + TS | Class names should comply with a naming convention | Off: duplicate of @typescript-eslint/naming-convention. |
sonarjs/file-name-differ-from-class | off | JS + TS | Default export names and file names should match | Off: not in the Sonar way profile of SonarQube. |
sonarjs/function-name | off | JS + TS | Function and method names should comply with a naming convention | Off: not in the Sonar way profile of SonarQube. |
sonarjs/future-reserved-words | warn | JS + TS | Future reserved words should not be used as identifiers | — |
sonarjs/variable-name | off | JS + TS | Variable, property and parameter names should comply with a naming convention | Off: not in the Sonar way profile of SonarQube. |
@typescript-eslint/naming-convention | warn, [{"selector":"default","format":["camelCase"],"leadingUnd… | TS | Enforce naming conventions for everything across a codebase | Custom: the most specific selector wins (see namingConventionSelectors). Warn: external names (JSON keys, HTTP headers) keep their spelling. |