Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
eslint-config-exchange-solutions
Advanced tools
ESLint Default configurations for Towers Watson Exchange Solutions
We are extending the Airbnb Style Guide, with overrides for things we do not plan to prescribe to.
npm install --save-dev eslint-config-exchange-solutions babel-eslint eslint-plugin-react
"extends": "exchange-solutions"
to your .eslintrcnpm install --save-dev eslint-config-exchange-solutions babel-eslint
"extends": "exchange-solutions/base"
to your .eslintrcnpm install --save-dev eslint-config-exchange-solutions
"extends": "exchange-solutions/es5"
to your .eslintrcSee Airbnb's Javascript styleguide, Towers Watson Exchange Solutions styleguide and the ESlint config docs for more information.
Airbnb [states] that this rule makes git diffs cleaner, though we don't really see any significant value in this especially for Arrays or Objects that only have one item.
// bad const hero = { firstName: 'Dana', lastName: 'Scully', };
const heroes = [ 'Batman', 'Superman', ];
// good const hero = { firstName: 'Dana', lastName: 'Scully' };
const heroes = [ 'Batman', 'Superman' ];
object-curly-newline { "consistent": true }
;++
for loops, but otherwise use += 1
or -= 1
syntax.The Airbnb example suggests that array methods such as
filter
andreduce
should be used over traditional loops. We agree that those options are often better. However, we find value, in cases where loops are necessary, to be allowed the convenience of unary increment statements for the loop declaration. Otherwise, we agree with their reasoning about unary increment and decrement statements.
// bad
const array = [1, 2, 3];
let num = 1;
num++;
--num;
// good
const array = [1, 2, 3];
let num = 1;
num += 1;
num -= 1;
for (let i = 0; i < array.length; i++) {
console.log(`The value at ${i} is ${array[i]}`);
}
FAQs
ESLint Default configurations for Towers Watson Exchange Solutions
The npm package eslint-config-exchange-solutions receives a total of 1 weekly downloads. As such, eslint-config-exchange-solutions popularity was classified as not popular.
We found that eslint-config-exchange-solutions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.