eslint-config-umi

raw JSON →
1.6.0 verified Sat Apr 25 auth: no javascript maintenance

Shared ESLint configuration for Umi.js framework projects, version 1.6.0. It enforces code style and best practices for React, JSX, import ordering, accessibility (a11y), and React Hooks via peer dependencies on eslint-plugin-flowtype, eslint-plugin-import, eslint-plugin-jsx-a11y, eslint-plugin-react, and eslint-plugin-react-hooks. Designed for teams using Umi.js, but can be used in any React project. No active major releases since 2019; consider using modern alternatives like @umijs/lint or custom ESLint configs for newer projects.

error ESLint couldn't find the config "umi"
cause Missing or misconfigured extends in .eslintrc
fix
Ensure eslint-config-umi is installed and extends: ['umi'] is set
error Cannot find module 'eslint-plugin-react'
cause Missing peer dependency
fix
Run npm install --save-dev eslint-plugin-react@7.x
error Parsing error: Unexpected token <
cause ESLint is not configured for JSX syntax
fix
Add 'parserOptions': { 'ecmaFeatures': { 'jsx': true } } or use a JSX parser
deprecated eslint-config-umi is no longer actively maintained; prefer @umijs/lint for Umi 4+ projects.
fix Migrate to @umijs/lint or a custom ESLint config
breaking Requires eslint-plugin-react-hooks@1.5.0 exactly; newer versions may cause conflicts.
fix Pin react-hooks plugin to 1.5.0: 'eslint-plugin-react-hooks': '1.5.0'
gotcha Included Flowtype rules may conflict with TypeScript projects; disable flowtype plugin if not needed.
fix Add 'plugins': ['flowtype'], 'rules': { 'flowtype/define-flow-type': 'off' }
gotcha The config includes JSX accessibility checks via eslint-plugin-jsx-a11y which may be too strict for internal apps.
fix Override 'jsx-a11y/...' rules as needed
npm install eslint-config-umi
yarn add eslint-config-umi
pnpm add eslint-config-umi

Basic ESLint configuration for a Umi project using eslint-config-umi.

// .eslintrc.js
module.exports = {
  extends: ['umi'],
  rules: {
    'react/react-in-jsx-scope': 'off', // Not needed with React 17+
  },
};