multiline-comment-style
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"multiline-comment-style": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
// this line
// calls foo()
foo();
/* this line
calls foo() */
foo();
/* this comment
* is missing a newline after /*
*/
/*
* this comment
* is missing a newline at the end */
/*
* the star in this line should have a space before it
*/
/*
* the star on the following line should have a space before it
*/// this line
// calls foo()
foo();
/*
* this line
* calls foo()
*/
foo();/* This line
calls foo() */
foo();
/*
* This line
* calls foo()
*/
foo();/*
* this line
* calls foo()
*/
foo();
// single-line comment/* this line
calls foo() */
foo();// This line
// calls foo()
foo();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.
multiline-comment-style
eslint
export default [
{
rules: {
"multiline-comment-style": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.