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

@mpxjs/eslint-config

Package Overview
Dependencies
Maintainers
14
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mpxjs/eslint-config

Mpx's ESLint config presets

Source
npmnpm
Version
2.0.2
Version published
Weekly downloads
21
-66.67%
Maintainers
14
Weekly downloads
 
Created
Source

@mpxjs/eslint-config

基于eslint-plugin-mpx插件,集成js和ts的推荐(recommended)配置 升级了eslintv9版本支持flatConfig。

Usage

Install

# js版本
pnpm add -D eslint @mpxjs/eslint-config

Config eslint.config.js


import { mpxConfig } from '@mpxjs/eslint-config'

export default mpxConfig(
  {
    mpx: true,
    vue: true,
    typescript: true
  }
)

Add script for package.json

For example:

{
  "scripts": {
    "lint": "eslint --ext .js,.ts,.mpx src",
    "lint:fix": "eslint --fix --ext .js,.ts,.mpx src"
  }
}

Config VS Code auto fix

Create .vscode/settings.json

{
  "prettier.enable": false,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}

Keywords

eslint-config

FAQs

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