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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tsoul/stylelint-config

v1.0.2

Published

Stylelint configuration for Web Boot projects

Readme

@tsoul/stylelint-config

Web Boot 项目的 Stylelint 配置包,提供了针对 Vue、React 等框架的样式规范配置。

特性

  • 🎯 开箱即用的配置
  • 🔄 支持多框架(Vue/React)
  • 📦 SCSS 支持
  • 🎨 CSS 属性排序(Recess Order)
  • 💅 HTML/Vue 单文件组件支持
  • 🚀 现代化 CSS 特性支持

安装

# npm
npm install -D @tsoul/stylelint-config stylelint@^16.0.0

# yarn
yarn add -D @tsoul/stylelint-config stylelint@^16.0.0

# pnpm
pnpm add -D @tsoul/stylelint-config stylelint@^16.0.0

使用方法

Vue 项目

// stylelint.config.mjs
import webboot from '@tsoul/stylelint-config/vue'

export default webboot

React 项目

// stylelint.config.mjs
import webboot from '@tsoul/stylelint-config/react'

export default webboot

通用项目

// stylelint.config.mjs
import webboot from '@tsoul/stylelint-config'

export default webboot

配置说明

基础配置

继承了以下配置:

  • stylelint-config-standard: 标准规则集
  • stylelint-config-recommended-scss: SCSS 推荐规则
  • stylelint-config-recess-order: CSS 属性排序规则

文件忽略

默认忽略以下文件:

  • .husky
  • .vscode
  • node_modules
  • coverage
  • dist
  • output
  • stats.html

语法解析器

根据文件类型自动选择合适的解析器:

  • *.css/scss: postcss-scss
  • *.html: postcss-html
  • *.vue: Vue 单文件组件解析器

自定义规则

  • 允许特殊伪类选择器:
    'selector-pseudo-class-no-unknown': [
      true,
      {
        ignorePseudoClasses: ['global', 'export', ':deep']
      }
    ]
  • 关闭类名连接必须是下划线的限制:
    'selector-class-pattern': null

自定义配置

如果需要覆盖默认配置,可以这样做:

// stylelint.config.mjs
import webboot from '@tsoul/stylelint-config/vue'

export default {
	extends: [webboot],
	rules: {
		// 你的自定义规则
		'selector-class-pattern': '^[a-z][a-zA-Z0-9]+$',
	},
}

VS Code 配置

推荐在 VS Code 中安装 Stylelint 插件,并添加以下配置:

{
	"editor.codeActionsOnSave": {
		"source.fixAll.stylelint": true
	},
	"stylelint.validate": ["css", "scss", "vue", "html"]
}

更多信息

License

MIT