{"id":19540,"library":"eslint-config-loopback","title":"eslint-config-loopback","description":"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.","status":"active","version":"14.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/strongloop/eslint-config-loopback","tags":["javascript","eslint","eslint config","eslint config loopback","eslint-config","eslint-config-loopback"],"install":[{"cmd":"npm install eslint-config-loopback","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-loopback","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-loopback","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; ESLint is required to use the config.","package":"eslint","optional":true}],"imports":[{"note":"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.","wrong":"import eslintConfig from 'eslint-config-loopback'","symbol":"eslintConfig","correct":"module.exports = { extends: 'loopback' }"},{"note":"While using an array is valid, the typical usage is a simple string. Both work, but string is the recommended pattern per LoopBack docs.","wrong":"{\n  \"extends\": [\"loopback\"]\n}","symbol":"extends","correct":"{\n  \"extends\": \"loopback\"\n}"},{"note":"The config does not specify parser options; you may override them. Avoid using babel-eslint unless transpiling, as LoopBack expects standard ESLint parser.","wrong":"{\n  \"extends\": \"loopback\",\n  \"parser\": \"babel-eslint\"\n}","symbol":"parserOptions","correct":"{\n  \"extends\": \"loopback\",\n  \"parserOptions\": { \"ecmaVersion\": 2021 }\n}"}],"quickstart":{"code":"// Install dependencies\n// npm install -D eslint eslint-config-loopback\n\n// .eslintrc\n{\n  \"extends\": \"loopback\",\n  \"rules\": {\n    \"comma-dangle\": \"off\"\n  }\n}\n\n// package.json scripts\n{\n  \"scripts\": {\n    \"lint\": \"eslint .\",\n    \"posttest\": \"npm run lint\"\n  }\n}\n\n// Run lint\n// npm run lint","lang":"javascript","description":"Shows how to install and configure eslint-config-loopback in a LoopBack project, with optional override of rules."},"warnings":[{"fix":"Check peer dependency requirements in package.json; use compatible ESLint version.","message":"ESLint version compatibility: eslint-config-loopback may require specific ESLint major versions. Breaking changes in ESLint (e.g., v7 to v8) can cause config incompatibility.","severity":"breaking","affected_versions":">=14.0.0"},{"fix":"Override deprecated rules in .eslintrc with appropriate replacements or set to 'off'.","message":"Some 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.","severity":"deprecated","affected_versions":">=14.0.0"},{"fix":"Add 'parser' field to .eslintrc (e.g., '@typescript-eslint/parser') and install corresponding packages.","message":"The config extends 'loopback' but does not include a 'parser' option. If using TypeScript or Babel, you must set a parser manually.","severity":"gotcha","affected_versions":">=14.0.0"},{"fix":"Add 'env' object to .eslintrc: { \"env\": { \"node\": true } }.","message":"Config does not include environment settings (e.g., node, browser). You may need to set 'env' in your .eslintrc for proper global variable recognition.","severity":"gotcha","affected_versions":">=14.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-loopback is installed: npm install -D eslint eslint-config-loopback.","cause":"The package is not installed or ESLint cannot find the config module.","error":"Error: Failed to load config 'loopback' to extend from."},{"fix":"Update .eslintrc to use the correct rule name (e.g., '@stylistic/comma-dangle') or set to 'off'.","cause":"The rule 'comma-dangle' is deprecated or removed in the version of ESLint in use.","error":"Definition for rule 'comma-dangle' was not found."},{"fix":"Use appropriate ESLint version or adjust ecmaVersion/env in .eslintrc.","cause":"ESLint version does not support the specified ecmaVersion or env setting.","error":"Environment key \"es2021\" is unknown."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}