eslint-config-uphold

raw JSON →
6.12.0 verified Sat Apr 25 auth: no javascript

Uphold-flavored ESLint configuration extending eslint-recommended with Prettier compatibility. Current stable version is 6.12.0, released with moderate cadence (multiple releases per year). Supports ESLint flat config (ESM only) and requires Node >=20.19.0 (v20), >=22.12.0 (v22), or >=23.0.0. Key differentiators: includes TypeScript support via typescript-eslint, separate configs for JavaScript and TypeScript with factory functions for ESM/CJS, and custom rules like require-comment-punctuation and no-trailing-period-in-log-messages. All peer dependencies must be installed manually.

error Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'eslint-config-uphold'
cause Missing peer dependency or incorrect import path (e.g., using require() in ESM project).
fix
Install all peer dependencies: npm install eslint eslint-config-uphold prettier --save-dev. Use import instead of require.
error Error: 'eslint-config-uphold' is not exported from package
cause Trying to import from subpath that doesn't exist (e.g., 'eslint-config-uphold/typescript' in v6).
fix
Use 'eslint-config-uphold/configs' for subpath exports.
error Error: The 'ecmaVersion' option must be a number or 'latest'.
cause Passing invalid ecmaVersion to createTypeScriptConfig or createJavaScriptConfig factory.
fix
Pass a valid ECMAScript version integer (e.g., 2022) or 'latest'.
error Error: Node.js version 18.x is not supported. Minimum required versions: v23.0.0, v22.12.0, or v20.19.0.
cause Using Node.js versions below the minimum requirement.
fix
Upgrade Node.js to v20.19.0+, v22.12.0+, or v23.0.0+.
breaking From v6.0.0, the package is ESM-only and uses flat config. CommonJS require() and legacy .eslintrc formats are not supported.
fix Migrate to ESM and use eslint.config.mjs (or .js with type:module). Use import instead of require.
breaking Node.js minimum versions are v23.0.0, v22.12.0, or v20.19.0 due to @stylistic/eslint-plugin-js requiring require('esm') module.
fix Upgrade Node.js to one of the required versions.
deprecated The subpath 'eslint-config-uphold/typescript' and 'eslint-config-uphold/javascript' are deprecated; use '/configs' instead.
fix Change imports to 'eslint-config-uphold/configs'.
gotcha The TypeScript config assumes ESM by default. For CJS projects, use createTypeScriptConfig('commonjs', ...).
fix Use the factory function with 'commonjs' as first argument.
gotcha The JavaScript config assumes CJS by default. For ESM projects, use createJavaScriptConfig('module', ...).
fix Use the factory function with 'module' as first argument.
gotcha All peer dependencies must be manually installed; they are not auto-installed by npm.
fix Run: npm install eslint eslint-config-uphold prettier typescript typescript-eslint eslint-plugin-jest eslint-plugin-mocha @vitest/eslint-plugin --save-dev
npm install eslint-config-uphold
yarn add eslint-config-uphold
pnpm add eslint-config-uphold

Flat ESLint config using the default Uphold config, with custom rules and global ignores.

import uphostConfig from 'eslint-config-uphold';
import { defineConfig, globalIgnores } from 'eslint/config';

export default defineConfig([
  uphostConfig,
  {
    name: 'my-project/config',
    rules: {
      'no-console': 'warn'
    }
  },
  globalIgnores(['dist', 'node_modules'])
]);