JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q56513F
  • License MIT

AfuTeam ESLint Plugin

Package Exports

  • @afuteam/eslint-plugin-fe-alpha

Readme

待验证: 框架+ts的情况 需要验证下是否可按照原来的方式组合用

@afuteam/eslint-plugin-fe

Build StatusBuild Statusnpm packagenpm downloads

安装

安装 ESLint@afuteam/eslint-plugin-fe:

npm i eslint @afuteam/eslint-plugin-fe --save-dev

使用

.eslintrc 配置文件中, 引入 @afuteam/eslint-plugin-fe 插件

{
  "plugins": ["@afuteam/fe"]
}

然后根据项目类型, 配置对应规则

// js + react
{
  "extends": [
    "plugin:@afuteam/fe/react-js"
  ],
  "plugins": ["@afuteam/fe"]
}
// js + vue2
{
  "extends": ["plugin:@afuteam/fe/vue2-js"],
  "plugins": ["@afuteam/fe"]
}
// js + vue3
{
  "extends": ["plugin:@afuteam/fe/vue3-js"],
  "plugins": ["@afuteam/fe"]
}
// ts + react
{
  "extends": [
    "plugin:@afuteam/fe/react-ts"
  ],
  "plugins": ["@afuteam/fe"]
}
// ts + vue2
{
  "plugins": ["@afuteam/fe"],
  "extends": ["plugin:@afuteam/fe/vue2-ts"]
}
// ts + vue3
{
  "plugins": ["@afuteam/fe"],
  "extends": ["plugin:@afuteam/fe/vue3-ts"]
}