lines-around-comment
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"lines-around-comment": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
var night = "long";
/* what a great and wonderful day */
var day = "great"var night = "long";
/* what a great and wonderful day */
var day = "great"var night = "long";
// what a great and wonderful day
var day = "great"var night = "long";
/* what a great and wonderful day */
var day = "great"var night = "long";
/* what a great and wonderful day */
var day = "great"var night = "long";
// what a great and wonderful day
var day = "great"Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
lines-around-comment
eslint
export default [
{
rules: {
"lines-around-comment": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.