spaced-comment
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"spaced-comment": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
//This is a comment with no whitespace at the beginning
/*This is a comment with no whitespace at the beginning *//* This is a comment with whitespace at the beginning but not the end*/// This is a comment with a whitespace at the beginning
/* This is a comment with a whitespace at the beginning */
/* \nThis is a comment with a whitespace at the beginning */// This is a comment with a whitespace at the beginning
/* This is a comment with a whitespace at the beginning */
/*
* This is a comment with a whitespace at the beginning
*/
/*
This comment has a newline
*//**
* I am jsdoc
*//*This is a comment with no whitespace at the beginning */Examples from the ESLint documentation.
spaced-comment
eslint
export default [
{
rules: {
"spaced-comment": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow the use of alert, confirm, and prompt
Enforce the use of variables within the scope they are defined
Disallow certain properties on certain objects