
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@bonniernews/eslint-config
Advanced tools
Basic ESLint rules used by Bonnier News. The configuration works both with CommonJS and ES6 modules,
and the appropriate setup will be used by looking at the projects package.json
type property.
For Node versions that support it (version 16 and above), the es2022
environment will also be activated. Otherwise es2021
will be used.
Install eslint
and @bonniernews/eslint-config
:
npm install --save-dev eslint @bonniernews/eslint-config
To activate the config, you need to add the following to your .eslintrc.json
-file:
{
"root": true,
"extends": [ "@bonniernews" ]
}
To activate the config, you need to add the following to your .eslintrc.json
-file:
{
"root": true,
"extends": [ "@bonniernews/eslint-config/react" ]
}
This will enable the react plugin for *.jsx
-files.
To activate the config, you need to add the following to your .eslintrc.json
-file:
{
"root": true,
"extends": [ "@bonniernews/eslint-config/typescript" ]
}
This will enable the typescript plugin for *.ts
-files.
To activate the config, you need to add the following to your .eslintrc.json
-file:
{
"root": true,
"extends": [ "@bonniernews/eslint-config/typescript-react" ]
}
This will enable the typescript and react plugin for *.tsx
-files.
You can also choose to use the test config, which is adapted to testing using mocha
, mocha-cakes-2
and chai
. To also enable this,
either add a separate test configuration file extending from "@bonniernews/eslint-config/test"
, or use the "@bonniernews/eslint-config/all"
in your root configuration to activate everything together:
{
"root": true,
"extends": [ "@bonniernews/eslint-config/all" ]
}
This will activate the test configuration for all files inside directories named test
or tests
.
Run with:
npx eslint .
husky
hooks that uses libraries such as pretty-quick
from your package.json
pretty-quick
if possible.package.json
, i.e.:
eslint-config-airbnb
eslint-config-google
eslint-config-prettier
eslint-plugin-prettier
from package.json
eslint
dependancy.
npm
(if you use nvm nvm install-latest-npm
) & prettier
as-welleslint-plugin-chai-friendly
is used in test).mocha-cakes-2
in your test configuration, they already exist
in the @bonniernews/eslint-config/test
and @bonniernews/eslint-config/all
configs.Once you complete the steps above run the following:
npx eslint . --fix
If you want to use Prettier, run it before eslint. ESLint should be the final judge, i.e. run:
npx prettier --save .
npx eslint . --fix
This will format the entire code base according to the rules of Prettier and the config.
Can be found here.
Released under the MIT license.
1.2.0
typescript
to 5.4.3 and @typescript-eslint
to 7.4.0.FAQs
ESLint config
The npm package @bonniernews/eslint-config receives a total of 546 weekly downloads. As such, @bonniernews/eslint-config popularity was classified as not popular.
We found that @bonniernews/eslint-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 33 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.