Skip to content

Commit

Permalink
feat!: migrate to ESLint flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Jul 2, 2024
1 parent bed0203 commit 1e6be26
Show file tree
Hide file tree
Showing 10 changed files with 459 additions and 452 deletions.
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@ Shared ESLint config for cheminfo and ml.js projects.
## Installation

```console
npm i -D eslint-config-cheminfo eslint
npm i -D eslint-config-cheminfo eslint@^8.57.0
```

## Usage

Create a `.eslintrc.yml` with the following contents:
Create a `eslint.config.mjs` file with the following contents:

```yml
extends: [cheminfo, cheminfo/jsdoc, cheminfo/unicorn]
```js
import cheminfo from 'eslint-config-cheminfo';

export default [
...cheminfo,
];
```

You can then customize the config for your project by changing rules in this file.
You can then customize the config for your project.

Create ESLint scripts in your `package.json`:

Expand All @@ -43,8 +47,12 @@ https://github.com/cheminfo/eslint-config-cheminfo-react

You can extend both of the above configurations as they are compatible between each other:

```yml
extends:
- cheminfo-typescript
- cheminfo-react
```js
import typescript from 'eslint-config-cheminfo-typescript';
import react from 'eslint-config-cheminfo-react';

export default [
...typescript,
...react,
];
```
Loading

0 comments on commit 1e6be26

Please sign in to comment.