@lcooper/eslint-config
v3.0.0
Published
Shareable config for ESLint
Downloads
32
Readme
@lcooper/eslint-config
An ESlint shareable flat config that extends eslint-config-airbnb-base
.
Installation
The peer dependency eslint
must be installed alongside this package.
install with npm:
npm install -D eslint @lcooper/eslint-config
install with yarn:
yarn add -D eslint @lcooper/eslint-config
Note: This project requires Eslint version
>=8.56
, and NodeJS version^18.18.0 || >=20.0.0
.
Rule Sets
| Name | Description | Source |
|:---------------------------------|:------------------------------------|:-------------------------|
| @lcooper/eslint-config
| Base config for node environments | index.js |
| @lcooper/eslint-config/browser
| Config for browser environments | browser.js |
Usage
Add an eslint.config.js
config file to your project's root directory:
import baseConfig from '@lcooper/eslint-config';
export default [
...baseConfig,
];
If your project does not specify "type": "module"
in its package.json
file, then eslint.config.js
must be in CommonJS format:
const baseConfig = require('@lcooper/eslint-config');
module.exports = [
...baseConfig,
];
For browser environments, replace @lcooper/eslint-config
with @lcooper/eslint-config/browser
.
This project is no longer compatable with the legacy eslintrc format, and requires you use the flat config format. Check out this page for more details about migrating from the eslintrc format to the flat config format.
Related
@lcooper/eslint-plugin
- Plugin with awesome extra ESLint rules used by this config@lcooper/eslint-config-react
- Enhancement config for React projects@lcooper/eslint-config-typescript
- Base config for TypeScript projects@lcooper/eslint-config-typescript-react
- Enhancement config for React projects that use TypeScript@lcooper/eslint-config-jest
- Enhancement config for projects using Jest