Registry / testing / eslint-config-taro

eslint-config-taro

JSON →
library4.2.0jsnpmunverified

ESLint configuration for Taro projects, providing linting rules for React/JSX and Vue (optional). Current stable version 4.2.0, released as part of Taro monorepo. Requires ESLint ^8 and supports both Taro 3 and 4. Integrates with eslint-plugin-react, eslint-plugin-react-hooks, and optionally eslint-plugin-vue. Designed for cross-platform app development. Differentiator: official config from Taro team with rules tuned for Taro's component system and JSX transformations. Release cadence follows Taro releases (~monthly).

testing
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.

ESM-only since Taro 4. Use .eslintrc.cjs and require() in CommonJS projects, but default import works in both.

import taroConfig from 'eslint-config-taro'

Use the short name 'taro' in extends. The full package name works but is not conventional.

"extends": ["taro"]

Append /vue to use Vue-specific rules. Requires eslint-plugin-vue installed.

"extends": ["taro/vue"]

Base ESLint configuration for a Taro React project using eslint-config-taro.

// .eslintrc.cjs module.exports = { root: true, extends: ['taro'], parserOptions: { ecmaVersion: 'latest', sourceType: 'module', ecmaFeatures: { jsx: true } }, settings: { react: { version: 'detect' } }, rules: { // custom rules } };
Debug
Known footguns
breakingeslint-config-taro v4 requires ESLint ^8 and drops support for ESLint <8.
breakingIn v4, the config is ESM-only. CommonJS require() may fail unless using .eslintrc.cjs.
deprecatedeslint-plugin-vue is optional but must be installed explicitly; not automatically included.
gotchaUsing extends: ['taro'] without eslint-plugin-react-hooks installed will cause ESLint to crash.
deprecatedConfig v3.x is deprecated; upgrade to v4 for future updates.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
13 hits · last 30 days
gptbot
4
ahrefsbot
4
amazonbot
4
script
1
Resources