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.
@revolut/eslint-config-react
Advanced tools
#@revolut/eslint-config-react
Note that this config already included in @revolut/cra-overrides
so if you're using yarn v1
and not npm
you should be good to go from the version >=1.0.0
Before installation make your .eslintrc.json
, .eslintrc
into .eslintrc.js
and paste that in
require('@revolut/eslint-config-react')
module.exports = {
extends: ['@revolut/react'],
}
What is this patch? Read here.
Add these dependencies to the package.json
with constraints below. Although, try to avoid major bumps.
"eslint": "^8.6.1",
"@revolut/eslint-config-react": "^1.0.0"
"prettier": "^2.5.1"
You can search and replace >=
symbol with ^
:)
@revolut/cra-overrides
Having @revolut/cra-overrides
should be sufficient. Version 1.0.0
and onward.
Don't forget to bump prettier
so you have >2
0.x.x
or @revolut/cra-override@0.x.x
or any version of revolut-react-scripts
)yarn, npm
@revolut/cra-overrides
users@revolut/cra-overrides
to version 1.0.0
or higherSKIP_PREFLIGHT_CHECK=true
as ESLint will be bumped above version 6 up to >=7.3.1
and CRA will complain (this is temporary until CRA updated)resolutions
to enforce particular versions of the eslint plugins, parsers etc. (this is temporary until CRA updated){
"resolutions": {
"eslint": "8.6.0" // Whatever is the latest 7
}
}
pnpm
users (yes, even if you're using @revolut/cra-overrides
with pnpm
)You can check this PR for full example
package.json
{
"devDependencies": {
"eslint": "8.6.0",
"@revolut/eslint-config-react": "1.0.0",
"prettier": "2.5.1"
}
}
npx eslint ./src --ext js,jsx,ts,tsx --fix --rule 'jest-dom/prefer-to-have-attribute: off' --rule 'jest-dom/prefer-to-have-text-content: off' --rule 'jest-dom/prefer-empty: off' --rule 'jest-dom/prefer-enabled-disabled: off' --rule 'jest-dom/prefer-enabled-disabled: off' --rule 'jest-dom/prefer-checked: off' --rule 'testing-library/prefer-find-by: off' --rule 'jest-dom/prefer-focus: off'
eslint /src --ext js,jsx,ts,tsx --max-warnings 0
to eslint /src --ext js,jsx,ts,tsx
.lint-staged
setup tho still have zero tolerance to warnings, to foster gradual adoption of new rules.jest-dom
and testing-library
plugins rarely have some false positives. Also, their fixes are destructive sometimes. (all bugs mostly reported)
You can and should apply auto-fixes file by file, it helps A LOT, but never on whole codebase as it will lead to broken tests
and a lot of unused variables etc. (if rules auto-fixes are still not fixed, if they are fixed, please contribute to this README!)
FAQs
Revolut eslint config for react web applications
We found that @revolut/eslint-config-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.