Security News
RubyGems.org Adds New Maintainer Role
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.
@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.0.2
@typescript-eslint/eslint-plugin
and @typescript-eslint/parser
.FAQs
ESLint config
The npm package @bonniernews/eslint-config receives a total of 1,054 weekly downloads. As such, @bonniernews/eslint-config popularity was classified as 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
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.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.