Skip to content

Shared ESLint config for cheminfo and ml.js projects

License

Notifications You must be signed in to change notification settings

cheminfo/eslint-config

Repository files navigation

eslint-config-cheminfo

Shared ESLint config for cheminfo and ml.js projects.

Important

Configs now require to use the ESLint Flat Config format. See the migration guide for more information.

Installation

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

Usage

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

import cheminfo from 'eslint-config-cheminfo';

export default [...cheminfo];

You can then customize the config for your project.

Create ESLint scripts in your package.json:

{
  "scripts": {
    "eslint": "eslint src",
    "eslint-fix": "npm run eslint -- --fix"
  }
}

Exported configurations

This package exports three separate configurations:

The default export from eslint-config-cheminfo combines all of them.

Extensions of this config

TypeScript

https://github.com/cheminfo/eslint-config-cheminfo-typescript

React

https://github.com/cheminfo/eslint-config-cheminfo-react

TypeScript and React

To extend both the TypeScript and React configs, use the following template:

import typescript from 'eslint-config-cheminfo-typescript';
import react from 'eslint-config-cheminfo-react/base';

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