Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@ecomfe/eslint-config

Package Overview
Dependencies
Maintainers
11
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ecomfe/eslint-config

ESLint config for Baidu EFE.

beta
Source
npmnpm
Version
9.0.0-beta.0
Version published
Weekly downloads
366
-28.09%
Maintainers
11
Weekly downloads
 
Created
Source

@ecomfe/eslint-config

EFE 团队使用的 ESLint 配置。

安装

npm i -D eslint @ecomfe/eslint-config

使用

仅支持Flat Config格式的配置。

eslint.config.js 中使用:

import {configure, Options} from './dist/index.js';

const options = {
    strict: true,
    typeScript: {
        typeCheck: true,
    },
    import: {
        node: false,
        webpack: false,
    },
    react: {},
};
export default configure(options);

配置项

strict外,其余选项均控制特写场景的规则,无该配置即完全禁用相关规则,你可以使用一个空对象({})表示按默认配置启用这一场景。

  • strict:开启严格模式,会提升部分规则的约束。
  • typeScript:配置TS相关规则。
    • typeCheck:是否启用需要类型的规则,这些规则速度较慢但能提高代码质量,默认为true
  • import:配置模块引入、导出相关规则。
    • node:是否Node项目,默认为false,即不允许使用Node原生模块。
    • webpack:是否为Webpack项目,默认为false,当打开时会检查动态import需要配置webpckChunkName等规则。
  • react:是否启用React的相关规则。

FAQs

Package last updated on 12 Aug 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