Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@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
The npm package @revolut/eslint-config-react receives a total of 0 weekly downloads. As such, @revolut/eslint-config-react popularity was classified as not popular.
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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.