This package provides a shared ESLint configuration specifically tailored for TypeScript projects within the Cheminfo ecosystem. It aims to enforce consistent coding styles and best practices across various repositories. Currently at version 22.0.0, the configuration is actively maintained with a relatively frequent release cadence, often aligning with updates to its base JavaScript configuration (`eslint-config-cheminfo`), ESLint itself, and various ESLint plugins. A key differentiator is its strict adherence to the ESLint Flat Config format, moving away from legacy configurations and embracing modern ESLint practices. It builds upon a robust base JS config and integrates plugins for JSDoc, Unicorn, and Vitest, offering a comprehensive and opinionated linting solution for TypeScript development.
npm install eslint-config-cheminfo-typescriptVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up `eslint-config-cheminfo-typescript` in an `eslint.config.mjs` file, importing the default configuration and showing how to extend or override rules for a specific project.
Migrate your ESLint setup to use `eslint.config.mjs` (or `.js` with `type: 'module'`) and follow the flat config migration guide linked in the package README.
Update your `eslint` package to the version specified in the `peerDependencies` of `eslint-config-cheminfo-typescript` (e.g., `npm i -D eslint@^9.39.1`).
Review the release notes for each major version update. Run ESLint after updating and address any new errors or warnings. Consider using an ESLint `--fix` dry run first.
Ensure `typescript` is installed (`npm i -D typescript`) and your `eslint.config.mjs`'s `languageOptions.parserOptions.project` points to your `tsconfig.json`.
Examine the `eslint-config-cheminfo` v18 release notes for specific changes. Address any newly reported linting issues in your codebase.
Ensure `eslint-config-cheminfo-typescript` is installed (`npm i -D eslint-config-cheminfo-typescript`) and the import path in `eslint.config.mjs` is `import cheminfo from 'eslint-config-cheminfo-typescript';`.
Verify `typescript` is installed and that your `eslint.config.mjs` includes `languageOptions: { parserOptions: { project: './tsconfig.json' } }` correctly configured for your project.Ensure your config file is named `eslint.config.mjs` (or `.js` with `"type": "module"` in `package.json`), contains valid JavaScript/ESM syntax, and is accessible to ESLint.
This specific rule was fixed in v21.0.1. If on an older version, update the package. Otherwise, ensure no custom rules conflict by re-enabling `@typescript-eslint/no-redeclare` if needed, or remove the rule entirely if it's implicitly handled.