Registry / testing / eslint-config-loopback

eslint-config-loopback

JSON →
library14.0.0jsnpmunverified

Shareable ESLint configuration for LoopBack projects. Version 14.0.0 provides a set of predefined rules consistent with LoopBack's coding standards. This package is maintained by the LoopBack team and is primarily used in Node.js server-side applications. It integrates with ESLint and allows easy extension and overriding of rules. Release cadence is tied to LoopBack releases. Unlike generic ESLint configs, this one is tailored specifically for LoopBack projects, ensuring code style consistency across the ecosystem.

npm install eslint-config-loopback
INSTALL
IMPORT
SIG · ESLINT-CONFIG-LOOP
E
eslint-config-loopback
testingjavascriptv14.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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.

eslintConfig
module.exports = { extends: 'loopback' }
import eslintConfig from 'eslint-config-loopback'
The package is not a JavaScript module to import; it's an ESLint config referenced by string name in .eslintrc or eslintConfig in package.json. Since v8, ESLint requires the config to be referenced by name or via a config file.
extends
{ "extends": "loopback" }
{ "extends": ["loopback"] }
While using an array is valid, the typical usage is a simple string. Both work, but string is the recommended pattern per LoopBack docs.
parserOptions
{ "extends": "loopback", "parserOptions": { "ecmaVersion": 2021 } }
{ "extends": "loopback", "parser": "babel-eslint" }
The config does not specify parser options; you may override them. Avoid using babel-eslint unless transpiling, as LoopBack expects standard ESLint parser.

Shows how to install and configure eslint-config-loopback in a LoopBack project, with optional override of rules.

// Install dependencies // npm install -D eslint eslint-config-loopback // .eslintrc { "extends": "loopback", "rules": { "comma-dangle": "off" } } // package.json scripts { "scripts": { "lint": "eslint .", "posttest": "npm run lint" } } // Run lint // npm run lint
Debug
Known issues
breakingESLint version compatibility: eslint-config-loopback may require specific ESLint major versions. Breaking changes in ESLint (e.g., v7 to v8) can cause config incompatibility.
fix
Check peer dependency requirements in package.json; use compatible ESLint version.
affects: >=14.0.0
deprecatedSome rules may be deprecated in newer ESLint versions (e.g., no-catch-shadow, no-native-reassign). These rules are no longer valid and can cause errors.
fix
Override deprecated rules in .eslintrc with appropriate replacements or set to 'off'.
affects: >=14.0.0
gotchaThe config extends 'loopback' but does not include a 'parser' option. If using TypeScript or Babel, you must set a parser manually.
fix
Add 'parser' field to .eslintrc (e.g., '@typescript-eslint/parser') and install corresponding packages.
affects: >=14.0.0
gotchaConfig does not include environment settings (e.g., node, browser). You may need to set 'env' in your .eslintrc for proper global variable recognition.
fix
Add 'env' object to .eslintrc: { "env": { "node": true } }.
affects: >=14.0.0
Errors
Common errors & fixes
Error: Failed to load config 'loopback' to extend from.
The package is not installed or ESLint cannot find the config module.
fix
Ensure eslint-config-loopback is installed: npm install -D eslint eslint-config-loopback.
Definition for rule 'comma-dangle' was not found.
The rule 'comma-dangle' is deprecated or removed in the version of ESLint in use.
fix
Update .eslintrc to use the correct rule name (e.g., '@stylistic/comma-dangle') or set to 'off'.
Environment key "es2021" is unknown.
ESLint version does not support the specified ecmaVersion or env setting.
fix
Use appropriate ESLint version or adjust ecmaVersion/env in .eslintrc.
Upgrade
Version history
14.0.0latest on npm
Audit
Dependencies
eslintoptionalPeer dependency; ESLint is required to use the config.
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-config-loopback — npm install eslint-config-loopback · libregistry