Security News
Combatting Alert Fatigue by Prioritizing Malicious Intent
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
@lokalise/eslint-config-lokalise-frontend
Advanced tools
Shareable eslint config for frontend codebases
Shareable eslint config for frontend codebases
Install the config in your repo:
npm add -D eslint @lokalise/eslint-config-lokalise-frontend
Then add the following to .eslintrc.json
in the root of your project:
{
"extends": "@lokalise/eslint-config-lokalise-frontend"
}
Finally add a package script in your package.json
as follows:
"scripts": {
"lint": "eslint . --ext .js,.ts,.jsx,.tsx,.cjs",
},
Feel free to customize the --ext
CLI arg according to your project needs.
Note that this shareable config needs to know where your tsconfig
is located in order to be able to parse TypeScript code. By default it will assume that your tsconfig
is in the same directory as your eslint config. If that's the case, it'll work without any additional configuration. However if that is not the case, you will need to explicitly tell it where the tsconfig
in your repo is. For example:
{
"extends": "@lokalise/eslint-config-lokalise-frontend",
"parserOptions": {
"project": "../tsconfig.json"
}
}
The default config assumes that you have a stack including:
However you can pick and choose just the parts you like.
The following modular configs are available:
@lokalise/eslint-config-lokalise-frontend/core
@lokalise/eslint-config-lokalise-frontend/typescript
@lokalise/eslint-config-lokalise-frontend/react
@lokalise/eslint-config-lokalise-frontend/jest
We recommend you always pick core
, but suppose the only other one you need is typescript
, then you would add the following to your eslint config:
{
"extends": [
"@lokalise/eslint-config-lokalise-frontend/core",
"@lokalise/eslint-config-lokalise-frontend/typescript"
]
}
FAQs
Shareable eslint config for frontend codebases
The npm package @lokalise/eslint-config-lokalise-frontend receives a total of 0 weekly downloads. As such, @lokalise/eslint-config-lokalise-frontend popularity was classified as not popular.
We found that @lokalise/eslint-config-lokalise-frontend demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 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
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.