You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@defisaver/eslint-config

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@defisaver/eslint-config

Global eslint configs for DeFi Saver projects.

2.0.0-rc6
latest
Source
npmnpm
Version published
Weekly downloads
584
61.33%
Maintainers
4
Weekly downloads
 
Created
Source

DeFi Saver eslint-config

Global eslint configs for DeFi Saver projects. Requires ESLint >=9.0.0.

Three configs are exported:

  • Basic: Recommended ESLint, Stylistic, and Import rules for all JS projects.
  • Typescript: Basic config with additional TypeScript rules.
  • React: Typescript config with additional React rules.

Installation

npm install --save-dev eslint @defisaver/eslint-config

Setup

Example TypeScript setup

eslint.config.js

import { defineConfig } from 'eslint/config';
import { typescriptConfig } from '@defisaver/eslint-config';

export default defineConfig(
  {
    extends: typescriptConfig,
    files: ['src/**/*.{js,mjs,cjs,ts}', 'tests/**/*.js'],
    ignores: ['src/types/generated/**/*']
    // ...
  },
  { 
    // ... 
  },
)

Example Node.js/CommonJS setup

eslint.config.mjs - the .mjs extension is important if your project.json does not have a "type": "module" set.

import { defineConfig } from 'eslint/config';
import { basicConfig } from '@defisaver/eslint-config';

export default defineConfig(
  {
    extends: basicConfig,
    files: ['src/**/*.{js,mjs,cjs}'],
    // ...
  },
  { 
    // ... 
  },
)

Known issues

  • Certain imports are highligted as errors by the no-unresolved rule when using the basic JS setup (TypeScript setup is not affected). This is due to a long-standing issue with eslint-plugin-import. Example: import { defineConfig } from 'eslint/config';

Keywords

eslint

FAQs

Package last updated on 27 May 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