key-spacing
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"key-spacing": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
Enforce consistent spacing between keys and values in object literal properties
var obj = { "foo" : 42 };var obj = { "foo": 42 };var obj = { "foo":42 };var obj = { "foo": 42 };var obj = { "foo" : 42 };var obj = { "foo": 42 };Examples from the ESLint documentation.
key-spacing
eslint
export default [
{
rules: {
"key-spacing": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce consistent spacing between keys and values in object literal properties in <template>
Disallow the use of alert, confirm, and prompt
Enforce the use of variables within the scope they are defined