eslint-plugin-baseui
raw JSON → 13.0.0 verified Sat Apr 25 auth: no javascript
ESLint plugin providing lint rules for Base Web (Uber's React component library). Current stable version is 13.0.0. Release cadence is irregular, tied to Base Web releases. Key differentiator: enforces best practices specific to Base Web, such as correct import paths, proper use of theme and overrides, and deprecation warnings. Requires ESLint 3-8.
Common errors
error Error: Failed to load plugin 'baseui': Cannot find module 'eslint-plugin-baseui' ↓
cause Plugin not installed as dev dependency
fix
npm install eslint-plugin-baseui --save-dev
error Definition for rule 'baseui/*' was not found ↓
cause Plugin not listed in 'plugins' array or rule name typo
fix
Ensure 'baseui' is in plugins and rule is spelled correctly (e.g. 'baseui/deprecated-theme-api')
error ESLint: TypeError: Cannot read properties of undefined (reading 'someRule') ↓
cause Incompatible ESLint major version (e.g. ESLint 9)
fix
Use ESLint 8 or check plugin compatibility table
Warnings
breaking ESLint 7 removal of some rules ↓
fix Update to ESLint 8 or remove conflicting rules
deprecated Rule 'baseui/no-deep-imports' has been deprecated in v13 ↓
fix Use no-relative-imports rule or remove rule from config
breaking Rule 'baseui/theme' removed in v12 ↓
fix Replace with 'baseui/deprecated-theme-api' if needed
gotcha Plugin may not work with ESLint 9 flat config without explicit adapter ↓
fix Use eslint-define-config or convert to flat config manually
Install
npm install eslint-plugin-baseui yarn add eslint-plugin-baseui pnpm add eslint-plugin-baseui Imports
- plugin wrong
const plugin = require('eslint-plugin-baseui')correctimport plugin from 'eslint-plugin-baseui' - rules
import { rules } from 'eslint-plugin-baseui' - configs wrong
const configs = require('eslint-plugin-baseui').configscorrectimport { configs } from 'eslint-plugin-baseui'
Quickstart
// .eslintrc.json
{
"plugins": ["baseui"],
"rules": {
"baseui/deprecated-theme-api": "error",
"baseui/no-deep-imports": "error",
"baseui/no-override-extend": "warn"
}
}