Socket
Book a DemoInstallSign in
Socket

@lidofinance/eslint-config

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lidofinance/eslint-config

Automated, non-opinionated ESLint config foundation

latest
Source
npmnpm
Version
0.56.0
Version published
Weekly downloads
93
-73.35%
Maintainers
2
Weekly downloads
 
Created
Source

Lido ESint config

Automated, non-opinionated ESLint config foundation

Please note that this ESLint config is still 0.x and is subject to significant changes; it is mainly used by internal Lido teams.

Installation

npm install --dev @lidofinance/eslint-config
# and plugins
npm install --dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-import-resolver-typescript eslint-plugin-eslint-comments eslint-plugin-import eslint-plugin-jest eslint-plugin-promise eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-sonarjs eslint-plugin-unicorn @next/eslint-plugin-next

If using TypeScript, alter tsconfig.json line includes to include everything, like that: "include": ["**/*","**/.*"]

ℹ️ Modern module resolution ESLint patch by Rush team is intentionally not used, as it conflicts with same patch in @next/eslint-plugin.

Configuration

Style rules are intentionally not provided; bring your own code style, whatever it is - prettier, airbnb, xo or standard.

// .eslintrc.js.js
{
  "root": true,
  
  "extends": [
    // note: use every other config BEFORE @lidofinance config, 
    // EXCEPT prettier; prettier is bundled with multiple 
    // disable rules that should be turned off to avoid conflicts
    
    //"airbnb",
    "@lidofinance",
    //"prettier"
  ]
}

What's inside

@lidofinance/eslint-config is feature-packed config that ships with some logic.

Following assumptions are done:

  • ES version target is latest (2022); if you need other, change env in .eslintrc
  • code is always server-ready
  • code is client-ready if react package is present
  • there is no magic resolution mechanism and usage of webpack loaders; only explicit file paths and tsconfig.json paths are considered
  • latest version of TypeScript (4.6.x) and ESLint (^8.13) are used

For performance, developer experience and accuracy reasons some rules will turn on if following conditions will happen:

  • React package is declared in package.json
    • react, react-hooks rules will be used
  • Next package is declared in package.json
    • next plugin rules will be used
    • react rule react/react-in-jsx-scope will turn off
  • Jest package is declared in package.json
    • jest plugin rules will be used
    • some rules will be disabled (like "avoid code duplication" and "do not use any") for test-specific file patterns
  • Typescript package is declared in package.json:
    • typescript-eslint rules will be enabled
    • parser will be switched to typescript-eslint
    • if tsconfig.json is present, type-level lint rules will be enabled
    • if compilerOptions.strict is true, additional anti-any rules will be enabled

FAQs

Package last updated on 22 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts