0.0.3 • Published 8 months ago

@dylan66ty/prettier-config v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

@dylan66ty/eslint-config-prettier

  • 支持Vue,支持Typescript,Jsx格式化

安装

pnpm add -D @dylan66ty/eslint-config-prettier prettier

配置 .prettier.js

{
  ...require('@dylan66ty/eslint-config-prettier'),
}

配合eslint使用

.eslint添加配置

{
  "extends": [
    "@dylan66ty/eslint-config-base",
    "plugin:prettier/recommended"
  ],
  "rules": {
    "prettier/prettier": [
      "error",
      {
        "usePrettierrc": true
      }
    ]
  }
}

添加命令

{
      "lint:fix": "eslint . --fix"
}

VS Code 自动修复

{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}
0.0.3

8 months ago

0.0.2

11 months ago

0.0.1

11 months ago