Registry / testing / eslint-config-cheminfo

eslint-config-cheminfo

JSON →
library18.0.0jsnpmunverified

Shared ESLint configuration for cheminfo and ml.js projects. Current stable version is 18.0.0, released April 2026. It requires ESLint ^9.39.1 and uses the flat config format only. The config bundles rules from eslint-plugin-jsdoc, eslint-plugin-unicorn, and eslint-plugin-vitest into multiple sub-configs: base, jsdoc, unicorn, and vitest. The default export combines them all. Breaking changes in recent major versions include enabling new unicorn rules, adding import order and type-only checks, and updating ESLint and plugin peer dependencies. Unlike generic ESLint configs, this is tightly scoped to the cheminfo ecosystem with opinionated rules for chemistry and machine learning JavaScript libraries.

npm install eslint-config-cheminfo
INSTALL
IMPORT
SIG · ESLINT-CONFIG-CHEM
E
eslint-config-cheminfo
testingjavascriptv18.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import cheminfo from 'eslint-config-cheminfo'
const cheminfo = require('eslint-config-cheminfo')
ESM-only since v15 (flat config). CJS require() will fail.
base (named export from subpath)
import base from 'eslint-config-cheminfo/base'
import { base } from 'eslint-config-cheminfo'
Subpath exports are default exports, not named exports. Use the full path to the sub-config file.
vitest (named export from subpath)
import vitest from 'eslint-config-cheminfo/vitest'
import { vitest } from 'eslint-config-cheminfo/vitest'
Same as base: subpath configs are default exports, not named.

Shows how to use the default config with flat config format and defineConfig helper. Requires ESLint ^9.39.1.

import { defineConfig } from 'eslint/config'; import cheminfo from 'eslint-config-cheminfo'; export default defineConfig(cheminfo); // package.json scripts: // "eslint": "eslint src", // "eslint-fix": "npm run eslint -- --fix"
Debug
Known issues
breakingv17.0.0: Updated ESLint peer dependency to ^9.39.1 and plugins. Old v16 configs are incompatible with ESLint <9.39.1.
fix
Update ESLint to ^9.39.1 and migrate to flat config if not already done. See MIGRATION.md.
affects: <17.0.0
breakingv15.0.0: Added Vitest plugin and strict config, enforced import order, and switched to ESM-only. The config is now flat config only.
fix
Migrate from .eslintrc to eslint.config.mjs. Use default import instead of require().
affects: <15.0.0
breakingv18.0.0: Enabled two new unicorn rules. Projects may see new lint errors if code violates these rules.
fix
Review the newly enabled unicorn rules in CHANGELOG and fix or disable them as needed.
affects: >=18.0.0
deprecatedThe .eslintrc format is deprecated since v15. Flat config only.
fix
Use eslint.config.mjs with the default export from 'eslint-config-cheminfo'.
affects: >=15.0.0
gotchaThe default export from 'eslint-config-cheminfo' combines all sub-configs (base, jsdoc, unicorn, vitest). If you only want base, import from 'eslint-config-cheminfo/base'.
fix
Use subpath imports: import base from 'eslint-config-cheminfo/base'.
affects: >=15.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/eslint-config-cheminfo/index.js from /path/to/eslint.config.js not supported.
Using require() on an ESM-only package that has no CJS export.
fix
Change your eslint.config.js to .mjs extension and use import: `import cheminfo from 'eslint-config-cheminfo'`. Or use dynamic import.
Parsing error: The keyword 'import' is reserved
ESLint is not configured for ES modules or flat config is not enabled.
fix
Ensure you are using ESLint ^9.39.1 and a flat config file (eslint.config.mjs). Check that your Node version supports ES modules (>=12).
.eslintrc.json: ESLint couldn't find the config 'eslint-config-cheminfo' after extending.
Trying to use eslint-config-cheminfo with the legacy .eslintrc format, which is not supported since v15.
fix
Remove the 'extends' field from .eslintrc and create an eslint.config.mjs file following the quickstart.
Upgrade
Version history
18.0.0latest on npm
Audit
Dependencies
eslintrequiredESLint is a peer dependency required to use the config
Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
eslint-config-cheminfo — npm install eslint-config-cheminfo · libregistry