1.0.0 • Published 1 month ago

@vill-v/prettier-config v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 month ago

Villv Prettier Config

NPM Version NPM Downloads NPM License

vill-v 自用的 prettier 配置

安装

pnpm add prettier @vill-v/prettier-config -D

使用

使用帮助方法

prettier.config.(cm)js ESM

import { villv } from '@vill-v/prettier-config/helper'

export default villv()
import { defineConfig } from '@vill-v/prettier-config/helper'

export default defineConfig()

prettier.config.(cm)js CJS

const { villv } = require('@vill-v/prettier-config/helper')

module.exports = villv()
const { defineConfig } = require('@vill-v/prettier-config/helper')

module.exports = defineConfig()

使用配置项

prettier.config.(cm)js ESM

import config from '@vill-v/prettier-config'

export default config

prettier.config.(cm)js CJS

module.exports = require('@vill-v/prettier-config')

工作环境

  • prettier >=3.0.0

覆盖配置项

使用帮助方法

使用 配置帮助方法 defineConfig or villv 可以更灵活的配置 prettier 选项

你可以像这样在现代编辑器下,可以享受 ts 类型提示带来的体验提升

prettier.config.js

import { villv } from '@vill-v/prettier-config/helper'

export default villv({
    singleQuote: false,
})

使用配置项

prettier.config.js

import villv from '@vill-v/prettier-config'

/** @type {import("prettier").Config} */
export default {
    ...villv,
     singleQuote: false,
}

详细的配置项请查看 Options

其他代码规范

eslint config - eslint flat 风格的配置集合

prettier config - prettier 的默认配置

tsconfig - typescript tsconfig.json 基础配置

License

MIT License

1.0.0

1 month ago

1.0.0-beta.8

3 months ago

1.0.0-beta.7

3 months ago

1.0.0-beta.6

4 months ago

1.0.0-beta.5

4 months ago

1.0.0-beta.2

4 months ago

1.0.0-beta.3

4 months ago

1.0.0-beta.4

4 months ago

1.0.0-beta.0

4 months ago

1.0.0-beta.1

4 months ago

0.0.18

10 months ago

0.1.0

10 months ago

0.2.1

10 months ago

0.1.2

10 months ago

0.2.0

10 months ago

0.1.1

10 months ago

0.1.4

10 months ago

0.2.2

9 months ago

0.1.3

10 months ago

0.1.5

10 months ago

0.0.17

11 months ago

0.0.15

12 months ago

0.0.16

11 months ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago