no-trailing-spaces
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"no-trailing-spaces": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
var foo = 0;/* trailing whitespace */
var baz = 5;/* trailing whitespace */
/* trailing whitespace */var foo = 0;
var baz = 5;Examples from the ESLint documentation.
no-trailing-spaces
eslint
export default [
{
rules: {
"no-trailing-spaces": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow certain properties on certain objects
Disallow the use of alert, confirm, and prompt
Enforce consistent brace style for all control statements