npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lxfriday/woodpecker

v2.6.0

Published

Eslint、Prettier、Commitlint、Editorconfig、GitIgnore 自动注入工具

Downloads

4

Readme

woodpecker

详细说明请看 wikihttps://wiki.n.miui.com/pages/viewpage.action?pageId=194334369


Eslint、Prettier、Commitlint、Editorconfig、Gitignore 自动注入工具

  • Prettier
  • Eslint(多种 config 可选)
  • Husky
  • Lint-staged
  • Commitlint (angular style 开源项目主流 commit 规范)
  • Editorconfig
  • Gitignore

安装

npm i -g @lxfriday/woodpecker

使用

woodpecker i

选择注入选项

点击 a 自动选中全部功能, 点空格选择或者取消选择单个功能。选好之后回车自动开始安装

$ woodpecker i
woodpecker v2.0.2

-> 开始执行

? 需要注入什么功能? (Press <space> to select, <a> to toggle all, <i> to invert selection)
>( ) Prettier: 格式化代码
 ( ) Commitlint: 限制 commit message 格式
 ( ) Eslint: 注入 Eslint 功能,选中之后下一步可选择 Eslint config 类型
 ( ) Editorconfig: 添加 .editorconfig 到根目录
 ( ) Gitignore: 添加 .gitignore 到根目录

Eslint 可选项

? 安装下列哪个 Eslint config? (Use arrow keys)
> airbnb
  eslint-config-react-app

woodpecker f

自动配置 vscode

将会对用户的 settings.json 配置文件进行更改,如下,需要预先安装 Prettier 插件

  "editor.formatOnSave": true, // 保存时 format
  "editor.formatOnPaste": true, // 粘贴时 format
  "editor.defaultFormatter": "esbenp.prettier-vscode" // 设置默认的 formatter 为 prettier

注意

当 Prettier 和 Eslint 同时存在时,Eslint 规则会受到 Prettier 影响,Prettier 自动格式化时变更为 Pretiter 配置文件对应的格式

相关链接