My rule enforces a thing
my-new-rule
, my-other-rule
and third-rule
instead.
⚙️ This rule is enabled in plugin:my-plugin/recommended
with [{"myOption":true}]
options.
⚙️ This rule is enabled in plugin:my-plugin/strict
.
🔧 The --fix
option on the command line can automatically fix some of the problems reported by this rule.
❌ Examples of incorrect code:
var x = '1.23';
var y = '4.5678';
multi
.line
.case;
multi.line.case;
singleAfterMulti;
✔️ Examples of correct code:
var x = '123';
var y = '45678';
var z = { a: 3, ...b };
✔️ Examples of correct code with [{"myOption":true}]
options and [{"lang":"fr"}]
settings:
var z1 = '1,23';
❌ Examples of incorrect code with [{"myOption":true}]
options:
var z1 = '1.23';
var z2 = '1.23';
✔️ Examples of correct code with [{"myOption":true}]
options:
var z1 = '123';
var z2 = '123';
✔️ Examples of correct code with [{"lang":"fr"}]
settings:
var x = '1,23';
🔧 Examples of code fixed by this rule:
var x = '1.23'; /* → */ var x = '123';
var y = '4.5678'; /* → */ var y = '45678';
multi /* → */ Multi
.line /* → */ .Line.Case;
.case; /* → */
multi.line.case; /* → */ Multi
/* → */ .Line
/* → */ .Case;
singleAfterMulti; /* → */ SingleAfterMulti;
🔧 Examples of code fixed by this rule with [{"myOption":true}]
options:
var z1 = '1.23'; /* → */ var z1 = '123';
var z2 = '1.23'; /* → */ var z2 = '123';