1.1.0 • Published 7 months ago

@zhangph/prettier-config v1.1.0

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

@zhangph/prettier-config

  • 合理的默认配置
  • 支持Vue,支持Typescript,Jsx格式化
  • 使用简单无需繁琐的添加配置

安装

pnpm add -D @zhangph/prettier-config prettier

配置.prettier.config.js

import prettierConfig from '@zhangph/prettier-config';

export default {
  ...prettierConfig,
};

配合eslint使用

eslint.config.js 添加配置

import zhangph from '@zhangph/eslint-config';

export default zhangph(
  {
    prettier: {
      usePrettierrc: true,
    },
  },
);

添加命令

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

VS Code 自动修复

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

7 months ago

1.0.1

9 months ago

1.0.0

9 months ago