--- ruleName: one-line description: Requires the specified tokens to be on the same line as the expression preceding them. optionsDescription: |- Five arguments may be optionally provided: * `"check-catch"` checks that `catch` is on the same line as the closing brace for `try`. * `"check-finally"` checks that `finally` is on the same line as the closing brace for `catch`. * `"check-else"` checks that `else` is on the same line as the closing brace for `if`. * `"check-open-brace"` checks that an open brace falls on the same line as its preceding expression. * `"check-whitespace"` checks preceding whitespace for the specified tokens. options: type: array items: type: string enum: - check-catch - check-finally - check-else - check-open-brace - check-whitespace minLength: 0 maxLength: 5 optionExamples: - '[true, "check-catch", "check-finally", "check-else"]' type: style optionsJSON: |- { "type": "array", "items": { "type": "string", "enum": [ "check-catch", "check-finally", "check-else", "check-open-brace", "check-whitespace" ] }, "minLength": 0, "maxLength": 5 } layout: rule title: 'Rule: one-line' ---