Globally I'd like to force {key: value} except in a few places where the following will be valid:
schema = {
id: Joi.string(),
title: Joi.string(),
description: Joi.string(),
start: Joi.date().iso(),
end: Joi.date().iso(),
creator: Joi.object(),
archived: Joi.boolean(),
_actions: Joi.array()
};
Looking through the docs (http://eslint.org/docs/rules/key-spacing.html) I can't see if there's a combination of align and beforeColon, afterColon that works.
My config file rule is:
"key-spacing": [2, {"beforeColon": false, "afterColon": true}]
I've trying to override it for a given file with:
/* eslint key-spacing: ????? */
Is this rule possible?
Set the mode option to minimum to require one or more spaces:
"key-spacing": [2, {"beforeColon": false, "afterColon": true, "mode": "minimum"}]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With