1.0.0 • Published 1 year ago

@vill-v/prettier-config v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year 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 year ago

1.0.0-beta.8

1 year ago

1.0.0-beta.7

1 year ago

1.0.0-beta.6

1 year ago

1.0.0-beta.5

2 years ago

1.0.0-beta.2

2 years ago

1.0.0-beta.3

2 years ago

1.0.0-beta.4

2 years ago

1.0.0-beta.0

2 years ago

1.0.0-beta.1

2 years ago

0.0.18

2 years ago

0.1.0

2 years ago

0.2.1

2 years ago

0.1.2

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.4

2 years ago

0.2.2

2 years ago

0.1.3

2 years ago

0.1.5

2 years ago

0.0.17

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.11

2 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago