Package Exports
- eslint-plugin-newline-destructuring
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-plugin-newline-destructuring) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
eslint-plugin-newline-destructuring
Eslint plugin for enforcing newlines in object destructuring assignment past a certain number of properties.
Usage
Add newline-destructuring
to the plugins section of your eslint configuration file.
plugins: [
'newline-destructuring'
]
Then add the rule in the rules section
rules: {
'newline-destructuring/newline': 'error'
}
Options
The rule accepts an option object with the following properties:
items
[number] (default:3
) - Specifies the maximum number of properties before the plugin requires breaking up the statement to multiple lines.itemsWithRest
[number] (default:2
) - Specifies the maximum number of properties contain rest pattern before the plugin requires breaking up the statement to multiple lines.maxLength
[number] (default:Infinity
) - Specifies the maximum length for source code lines in your project, the plugin will split long destructuring lines even if they contains properties less than value initems
oritemsWithRest