vera-l / eslint-plugin-secure-names

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Secure names eslint rule

A variable name should be secure and contain at least {minLength} symbols: letters (uppercase and lowercase), digits and special symbols ("$" or "_").

Options

{
  "rules": {
    // ...
    "secure-names/secure-names": ["error", {
      minLength: 10, // minimum allowed variable name length (default: 8)
    }],
  }
}

Valid

var AbCd35$0;
let At84_567Sd;
const jsP32__920;

Invalid

const aC$ = 123; // too short
let $var_name123; // there is no at least one uppercase letter
var VAR_NAME_3; // there is no at least one special symbol

About


Languages

Language:JavaScript 100.0%