Skip to content
Search

ESLint:Rules

lastmod 2022-04-12created 2022-04-123 edits

Add Config

Rules can be added to rules in the .eslintrc configuration. Taking #SwitchCase as an example:

    "rules": {
      "indent": [
        "error",
        2,
        {
          "SwitchCase": 1
        }
      ],

Indent

SwitchCase

Setting for the indent size of switch and case in switch statements.

switch(a){
    case "a":
        break;
    case "b":
        break;
}

See also

author Zer0 sitemap