Skip to content

Zotero 中文社区自动化工具共享配置文件

Notifications You must be signed in to change notification settings

zotero-chinese/configs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

共享配置

Prettier

pnpm add -D prettier @zotero-chinese/prettier-config

package.json 中新建如下字段:

{  
  "prettier": "@zotero-chinese/prettier-config"
}

MarkdownLint

pnpm add -D markdownlint-cli2 @zotero-chinese/markdownlint-config

package.json 中:

{
  "devDependencies": {
    "@zotero-chinese/markdownlint-config": "^0.1.3"
  }
}

.markdownlint-cli2.mjs 中:

import { markdownlintcli2Config } from "@zotero-chinese/markdownlint-config";

export default markdownlintcli2Config;

ES Lint

组织不设立 ES Lint 配置预设,请使用 @antfu/eslint-config@sxzz/eslint-config

AutoCorrect

pnpm add -D autocorrect-node

该工具未提供扩展预设的办法,且其 Prettier 插件尚不完善,因此需要手动配置,在 .autocorrectrc 中:

# yaml-language-server: $schema=https://huacnlee.github.io/autocorrect/schema.json
# Config rules
rules:
  # Auto add spacing between CJK (Chinese, Japanese, Korean) and English words.
  # 0 - off, 1 - error, 2 - warning
  space-word: 1
  # Add space between some punctuations.
  space-punctuation: 1
  # Add space between brackets (), [] when near the CJK.
  space-bracket: 1
  # Add space between ``, when near the CJK.
  space-backticks: 1
  # Add space between dash `-`
  space-dash: 0
  # Add space between dollar $ when near the CJK.
  space-dollar: 1
  # Convert to fullwidth.
  fullwidth: 1
  # To remove space near the fullwidth.
  no-space-fullwidth: 1
  # Fullwidth alphanumeric characters to halfwidth.
  halfwidth-word: 1
  # Fullwidth punctuations to halfwidth in english.
  halfwidth-punctuation: 1
  # Spellcheck
  spellcheck: 0
# Enable or disable in a specific context
context:
  # Enable or disable to format codeblock in Markdown or AsciiDoc etc.
  codeblock: 1

Renovate Bot

参:zotero-chinese/renovate-config 仓库

About

Zotero 中文社区自动化工具共享配置文件

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published