![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.
@workleap/eslint-plugin
Advanced tools
@workleap/eslint-plugin
Workleap’s ESLint configs.
Install the package.
With pnpm
pnpm add -D @workleap/eslint-plugin
This package provides ESLint configurations by project type. By providing configurations by project type, the burden of composing ESLint configurations is shifted from the consumer to the package maintainers. This approach allows for more accurate defaults and assumptions about the target environment. Additionally, it simplifies the process for consumers who only need to configure a single ESLint plugin.
The following configurations are available:
The web-application
configuration is suitable for a web application developed in React with TypeScript.
To use this configuration, add the following to your .eslintrc.json
file:
{
"$schema": "https://json.schemastore.org/eslintrc",
"root": true,
"extends": "plugin:@workleap/web-application"
}
The react-library
configuration is suitable for a React component library developed with TypeScript.
To use this configuration, add the following to your .eslintrc.json
file:
{
"$schema": "https://json.schemastore.org/eslintrc",
"root": true,
"extends": "plugin:@workleap/react-library"
}
The typescript-library
configuration is suitable for a TypeScript library developed without React.
To use this configuration, add the following to your .eslintrc.json
file:
{
"$schema": "https://json.schemastore.org/eslintrc",
"root": true,
"extends": "plugin:@workleap/typescript-library"
}
The monorepo-root
configuration is suitable for the root tsconfig
file of a monorepo project.
To use this configuration, add the following to your .eslintrc.json
file:
{
"$schema": "https://json.schemastore.org/eslintrc",
"root": true,
"extends": "plugin:@workleap/typescript-library"
}
You can configure ESLint to ignore certain files and directories while linting by specifying one or more glob patterns. Heres the ESLint ignore file we usually use at Workleap:
// .eslintignore
**/dist/*
node_modules
*.md
pnpm-lock.yaml
If the default configuration doesn’t fit your needs, please read the advanced usage documentation.
Copyright © 2023, GSoft inc. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/gsoft-inc/gsoft-license/blob/master/LICENSE.
FAQs
Workleap recommended ESLint rules and configurations.
The npm package @workleap/eslint-plugin receives a total of 401 weekly downloads. As such, @workleap/eslint-plugin popularity was classified as not popular.
We found that @workleap/eslint-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.