@onefinity/eslint-config
v3.6.1
Published
Generic base configuration for [ESLint][eslint] supporting setups using [ESNext][esnext], [Node.js][nodejs], [React][react], and [TypeScript][typescript]. Combine it with [`@onefinity/stylelint-config`][onefinity-stylelint-config] to lint CSS as well.
Readme
Onefinity ESLint Config
Generic base configuration for ESLint supporting setups using
ESNext, Node.js, React, and
TypeScript. Combine it with
@onefinity/stylelint-config to lint CSS as well.
Available configurations
The following configurations are available and can be extended in a project-specific ESLint configuration, they will extend the default set of rules. Note that it's possible to mix and match configurations.
api
Additional configuration and rules for API-like projects.node
Additional configuration and rules for projects targeting Node.js.react
Additional configuration and rules for projects using React and JSX.
Usage
Installation
Install the package using the following command.
npm install --save-dev @onefinity/eslint-configExtending
Use the extends feature provided by ESLint in the
project-specific eslint.config.mjs configuration file.
import configure, { configs } from '@onefinity/eslint-config';
export default configure([configs.node]);Scripts
The following scripts can be added to package.json to make it easier to start
the linter.
{
"scripts": {
"lint:js": "eslint",
"lint:fix": "npm run lint:js -- --fix"
}
}