![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
eslint-config-schibsted
Advanced tools
A module to contain the Schibsted JavaScript linting rules for ESLint.
yarn add eslint-config-schibsted eslint@^5.6.1 eslint-plugin-import@^2.14.0 eslint-plugin-prettier@^3.0.0 eslint-plugin-unicorn@^6.0.1 prettier@^1.14.3 -D
Then add the extends
option to your .eslintrc.*
:
{
"extends": "schibsted",
"root": true
}
You can override specific settings by specifying them as normal. See http://eslint.org/docs/developer-guide/shareable-configs for more details.
There are several configurations available:
eslint-config-schibsted
, which is the base and standaloneeslint-config-schibsted-chai
for inclusion with chai fileseslint-config-schibsted-flow
for inclusion with flow typed fileseslint-config-schibsted-modules
for inclusion with ES6 module fileseslint-config-schibsted-node
for inclusion with Node files.eslint-config-schibsted-react
for inclusion with React files, and requires eslint-plugin-react
The additional packages should be included as extends
in directories containing
the relevant source type files.
The intent of these packages is to provide a common set of rules for coding within the Schibsted codebases. It is made up from a number of different packages with predefined settings. This will make transitioning between projects a smoother experience.
While AirBnB is a popular configuration, there are a lot of valuable rules that
are not included in it. Instead of having every project need to source these
additional rules, the eslint-config-schibsted-*
packages provide these for you.
AirBnB is one of the included configurations in these packages.
Linting usually happens in two places.
By default this config uses Prettier in relaxed mode. This means that errors will not show for rules that are covered by running prettier --write
. This allows people to code in their own style.
However, it means that build tools, by default, also don't include the errors. You may want errors to show in your build tools so you will need to specify the prettier-strict
config as appropriate. e.g. using the cli add --config ./packages/eslint-config-schibsted/prettier-strict.js
.
If you would like code editors to show the errors as well, simply add prettier-strict
to the extends
config.
{
"extends": [
"schibsted",
"schibsted/prettier-strict"
],
"root": true
}
FAQs
Schibsted ESLint settings
The npm package eslint-config-schibsted receives a total of 84 weekly downloads. As such, eslint-config-schibsted popularity was classified as not popular.
We found that eslint-config-schibsted demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.