comma-style
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"comma-style": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
var foo = 1
,
bar = 2;
var foo = 1
, bar = 2;
var foo = ["apples"
, "oranges"];
function baz() {
return {
"a": 1
,"b:": 2
};
}var foo = 1,
bar = 2;
var foo = ["apples",
"oranges"];
function baz() {
return {
"a": 1,
"b:": 2
};
}var o = {},
a = [];var foo = 1, bar = 2;
var foo = 1,
bar = 2;
var foo = ["apples",
"oranges"];
function baz() {
return {
"a": 1,
"b:": 2
};
}var foo = 1, bar = 2;
var foo = 1
,bar = 2;
var foo = ["apples"
,"oranges"];
function baz() {
return {
"a": 1
,"b:": 2
};
}var o = {fst:1,
snd: [1,
2]}
, a = [];Examples from the ESLint documentation.
comma-style
eslint
export default [
{
rules: {
"comma-style": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce the use of variables within the scope they are defined
Disallow the use of alert, confirm, and prompt
Disallow certain properties on certain objects