Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@fp51/eslint-config
Advanced tools
fp51 javascript eslint rules, based on airbnb
Opiniated eslint config based on airbnb config and prettier.
Add this dependency to your repository with its peer-dependency:
npm add --save-dev @fp51/eslint-config eslint
Create a .eslintrc file in your project root with this content
{
"extends": [
"@fp51/eslint-config",
// or
"@fp51/eslint-config/<special-config>"
]
}
The package provide multiple configs whether you need simple javascript linting of full typescript + javascript + react linting with type-aware rules.
The details are here:
config | javascript | react | typescript | with types |
---|---|---|---|---|
@fp51/eslint-config/javascript | ✔️ | |||
@fp51/eslint-config/javascript-react | ✔️ | ✔️ | ||
@fp51/eslint-config/light-typescript | ✔️ | ✔️ | ||
@fp51/eslint-config/light-typescript-react | ✔️ | ✔️ | ✔️ | |
@fp51/eslint-config/typescript | ✔️ | ✔️ | ✔️ | |
@fp51/eslint-config/typescript-react | ✔️ | ✔️ | ✔️ | ✔️ |
The @fp51/eslint-config
links to @fp51/eslint-config/typescript-react
.
Note that all configs can be used on JSON files too.
You will need to install a peer-dependency @typescript-eslint/parser
as it is required by eslint-plugin-import
internally.
We lint typescript files with @typescript-eslint/eslint-plugin that provide rules that replace default eslint ones.
Some of these rules are
type-aware and use tsc
under the hood to compile each file before lint.
As this can drastically affect performance for big code base, we provide
light-typescript
configs that do not use type-aware rules.
If you decide to give @fp51/eslint-config/typescript
or
@fp51/eslint-config/typescript-react
a try, you will need a
tsconfig.json
file at the root of your project for type-aware rules to work.
Because we also lint JSON files, you need to include them like so:
"include": [
"**/*",
"**/*.json"
],
"exclude": ["node_modules"]
It's probably better for you to define one special .eslint.tsconfig.json
like
so:
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true
},
"include": [
"**/*",
"**/*.json"
]
}
Then, in you .eslintrc
"parserOptions": {
"project": "./.eslint.tsconfig.json"
}
The lib also provide a workaround for https://github.com/eslint/eslint/issues/3458
When needed, start by requiring the patch in your config entry point.
require('@fp51/eslint-config/patch');
module.exports = {
extends: [
'eslint-config-airbnb-base',
...
FAQs
fp51 javascript eslint rules, based on airbnb
We found that @fp51/eslint-config 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.