eslint-config-cheminfo
v13.0.0
Published
Shared ESLint config for cheminfo and ml.js projects
Downloads
31,711
Readme
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
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:
eslint-config-cheminfo/base
: The base config with most rules. At least this config should be used in all projects.eslint-config-cheminfo/jsdoc
: Rules from the jsdoc plugin to help improve the documentation of our libraries.eslint-config-cheminfo/unicorn
: Additional opinionated rules selected from the unicorn plugin.
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];