Skip to content

[Linting Rule] Naming Convention

github-actions[bot] edited this page Nov 8, 2026 · 1 revision

Generated from 'wiki-linter.ts' on 2026-11-08, 14:25:27 UTC (v2.17.4), do not edit directly.

Naming Convention [overview]

style quickfix

This rule is a over-approximative rule.

Finds symbols that do not follow the naming convention of the code.
This linting rule is implemented in src/linter/rules/naming-convention.ts.

Configuration

Linting rules can be configured by passing a configuration object to the linter query as shown in the example below. The naming-convention rule accepts the following configuration options:

  • caseing
    which casing convention to enforce
  • ignoreNonAlpha
    if true non alphabetic characters are ignored

Examples

testVar <- 5
testVarTwo <- 5
other_var <- 5

The linting query can be used to run this rule on the above example:

[ { "type": "linter",   "rules": [ { "name": "naming-convention",     "config": {} } ] } ]

Results (prettified and summarized):

Query: linter (5 ms)
   ╰ Naming Convention (naming-convention):
       ╰ certain:
           ╰ Identifier 'other_var' at 4.1-9 (snake_case) (1 quick fix(es) available)

More examples are the test cases in test/functionality/linter/lint-naming-convention.test.ts.

Clone this wiki locally

⌂ 换网址