This repository was archived by the owner on Nov 14, 2025. It is now read-only.
eslint-plugin 1.0.14
Install from the command line:
Learn more about npm packages
$ npm install @incutonez/eslint-plugin@1.0.14
Install via package.json:
"@incutonez/eslint-plugin": "1.0.14"
About this version
I wanted my braces in objects (and arrays) to be on the same line as each other and the brackets of an array, so I had to alter 2 ESLint properties array-bracket-newline and array-element-newline. This repo contains those overrides. See also this SO Question.
I basically ported the ESLint code from here and here to TypeScript, added a new property bracesSameLine (which is a boolean), and modified the check functions to use this property and determine how to format properly.
It will correct braces that are on a different line as the open/close brace/bracket, like this:
const invalid = {
someFunction: function() {
},
arr: [
{
thing: 1
},
{
one: 2
}
]
};
const valid = {
someFunction: function() {
},
arr: [{
thing: 1,
}, {
one: 2,
}],
};