
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
eslint-plugin-object-pattern-newline
Advanced tools
ESLint plugin to enforce newlines in ES6 object pattern
ESLint plugin to enforce newlines in ES6 object pattern.
There is only one rule in this plugin which will report when there are more than 4 values in a line by default.
$ npm install eslint-plugin-object-pattern-newline --save-dev
Or
$ yarn add eslint-plugin-object-pattern-newline -D
Add object-newline
to the plugins section of your .eslintrc
configuration file.
{
"plugins": [
"object-newline"
]
}
Then add the rule in the rules section.
{
"rules": {
"object-newline/enforce": "error"
}
}
The first and most readable way is to use an object which allows you to specify any of the available options, leaving everything that's not specified as the default.
{
"rules": {
"max-len": ["error", 100],
"object-newline/enforce": [
"error",
{
"items": 2,
"max-len": 100
}
]
}
}
items
[number] (default: 4
)Specifies the maximum number of items before the plugin requires breaking items to multiple lines.
max-len
[number] (default: Infinity
)Specifies the maximum length for source code lines in your project. This allows the plugin to prevent quick fixes that would cause your code to violate this limit from being applied. The rule will also automatically split lines for you should they exceed the limit.
Tests can be run via npm run test
, make sure these pass after every change. Be sure to add tests for new features.
FAQs
ESLint plugin to enforce newlines in ES6 object pattern
The npm package eslint-plugin-object-pattern-newline receives a total of 1 weekly downloads. As such, eslint-plugin-object-pattern-newline popularity was classified as not popular.
We found that eslint-plugin-object-pattern-newline demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.