Registry / testing / eslint-config-lion

eslint-config-lion

JSON →
library2.2.7jsnpmunverified

eslint-config-lion is a shareable ESLint configuration preset by itsmelion, providing a unified linting style for JavaScript, React, React Native, TypeScript, and Node.js projects. The current stable version is 2.2.7. It relies on peer dependencies installed via install-peerdeps and offers presets for various environments: 'lion' for base, 'lion/react-native' for React Native, 'lion/typescript' for TypeScript web, 'lion/typescript-node' for TypeScript Node, and 'lion/node' for Node. It also includes additional dependency groups for React, TypeScript, and Node. Key differentiator: modular presets with explicit environment-specific configurations.

npm install eslint-config-lion
INSTALL
IMPORT
SIG · ESLINT-CONFIG-LION
E
eslint-config-lion
testingjavascriptv2.2.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

lion
{ "extends": "lion" }
{ "extends": "eslint-config-lion" }
Use the short name 'lion' in extends, not the full package name.
lion/typescript
{ "extends": "lion/typescript" }
{ "extends": "lion-typescript" }
Presets are subdirectories under 'lion', use slash notation.
lion/node
{ "extends": "lion/node" }
{ "extends": "node" }
Do not extend a bare Node config; must be scoped under lion.
lion/react-native
{ "extends": "lion/react-native" }
{ "extends": "lion/react-native" }
Requires additional resolver: eslint-import-resolver-alias.

Install eslint-config-lion and its peer dependencies, then configure ESLint for a TypeScript project.

# Install peer dependencies automatically (npm 5+) npx install-peerdeps --dev eslint-config-lion # Then for TypeScript project, also install: npm install --save-dev @typescript-eslint/eslint-plugin @typescript-eslint/parser # Create .eslintrc.json cat <<'EOF' > .eslintrc.json { "extends": "lion/typescript" } EOF # Run ESLint npx eslint .
Debug
Known issues
gotchaDo not manually install peer dependencies; use install-peerdeps to get correct versions.
fix
Run npx install-peerdeps --dev eslint-config-lion
affects: >=2.0.0
gotchaFor React projects using Create React App, you must extend both 'lion' and 'react-app'.
fix
Set extends to ["lion", "react-app"] and install eslint-config-react-app and eslint-plugin-flowtype.
affects: >=2.0.0
gotchaNode preset requires setting 'type': 'module' or 'type': 'commonjs' in package.json.
fix
Add "type": "module" in package.json for ES modules, or "type": "commonjs" for CommonJS.
affects: >=2.0.0
gotchaReact Native preset requires eslint-import-resolver-alias to be installed.
fix
Run npm install --save-dev eslint-import-resolver-alias
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-react'
Missing peer dependency for React rules.
fix
Run install-peerdeps to install all peer dependencies: npx install-peerdeps --dev eslint-config-lion
ESLint couldn't find the config "lion/typescript". Check that the package name "eslint-config-lion/typescript" is correct.
Incorrect extends value; using full package name or invalid subpath.
fix
Use "extends": "lion/typescript" (short name).
Configuration for rule "react/jsx-uses-react" is invalid: Value "error" is not an allowed value.
Mismatch between ESLint plugin version and configuration; typically due to wrong peer dependency version.
fix
Reinstall peer dependencies with install-peerdeps to match versions.
Upgrade
Version history
2.2.7latest on npm
Audit
Dependencies
eslintrequiredpeer dependency; ESLint core required for linting
eslint-plugin-reactoptionalrequired for React-specific rules (included in reactDependencies)
eslint-plugin-react-hooksoptionalrequired for React Hooks rules (included in reactDependencies)
@typescript-eslint/eslint-pluginoptionalrequired for TypeScript rules (included in typescriptDependencies)
@typescript-eslint/parseroptionalrequired for TypeScript parsing (included in typescriptDependencies)
eslint-plugin-nodeoptionalrequired for Node.js rules (included in nodeDependencies)
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-config-lion — npm install eslint-config-lion · libregistry