{"id":19609,"library":"eslint-config-umi","title":"eslint-config-umi","description":"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.","status":"maintenance","version":"1.6.0","language":"javascript","source_language":"en","source_url":"https://github.com/umijs/umi/tree/master/packages/eslint-config-umi","tags":["javascript"],"install":[{"cmd":"npm install eslint-config-umi","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-umi","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-umi","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency for Flow type checking","package":"eslint-plugin-flowtype","optional":false},{"reason":"Required peer dependency for import/export rules","package":"eslint-plugin-import","optional":false},{"reason":"Required peer dependency for accessibility rules","package":"eslint-plugin-jsx-a11y","optional":false},{"reason":"Required peer dependency for React-specific rules","package":"eslint-plugin-react","optional":false},{"reason":"Required peer dependency for React Hooks rules (v1.5.0)","package":"eslint-plugin-react-hooks","optional":false}],"imports":[{"note":"This package exports a plain ESLint config object, not a module. Use 'extends' in .eslintrc","wrong":"import umi from 'eslint-config-umi'","symbol":"default","correct":"module.exports = { extends: ['umi'] }"},{"note":"When using the shorthand, just 'umi' (without scope) is valid for scoped packages like eslint-config-umi","wrong":"{ \"extends\": [\"eslint-config-umi\"] }","symbol":"ESLint config","correct":"// .eslintrc\n{ \"extends\": [\"umi\"] }"},{"note":"The 'umi/react' config is optional; base config already includes React rules. Use it to add stricter React-specific rules.","wrong":"module.exports = { extends: ['umi/react'] }","symbol":"With React","correct":"module.exports = { extends: ['umi', 'umi/react'] }"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  extends: ['umi'],\n  rules: {\n    'react/react-in-jsx-scope': 'off', // Not needed with React 17+\n  },\n};","lang":"javascript","description":"Basic ESLint configuration for a Umi project using eslint-config-umi."},"warnings":[{"fix":"Migrate to @umijs/lint or a custom ESLint config","message":"eslint-config-umi is no longer actively maintained; prefer @umijs/lint for Umi 4+ projects.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Pin react-hooks plugin to 1.5.0: 'eslint-plugin-react-hooks': '1.5.0'","message":"Requires eslint-plugin-react-hooks@1.5.0 exactly; newer versions may cause conflicts.","severity":"breaking","affected_versions":"1.6.0"},{"fix":"Add 'plugins': ['flowtype'], 'rules': { 'flowtype/define-flow-type': 'off' }","message":"Included Flowtype rules may conflict with TypeScript projects; disable flowtype plugin if not needed.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Override 'jsx-a11y/...' rules as needed","message":"The config includes JSX accessibility checks via eslint-plugin-jsx-a11y which may be too strict for internal apps.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Ensure eslint-config-umi is installed and extends: ['umi'] is set","cause":"Missing or misconfigured extends in .eslintrc","error":"ESLint couldn't find the config \"umi\""},{"fix":"Run npm install --save-dev eslint-plugin-react@7.x","cause":"Missing peer dependency","error":"Cannot find module 'eslint-plugin-react'"},{"fix":"Add 'parserOptions': { 'ecmaFeatures': { 'jsx': true } } or use a JSX parser","cause":"ESLint is not configured for JSX syntax","error":"Parsing error: Unexpected token <"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}