Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@ifanrx/stylelint-config-standard

Package Overview
Dependencies
Maintainers
5
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ifanrx/stylelint-config-standard

An Stylelint shared standard configuration.

latest
npmnpm
Version
2.1.0
Version published
Maintainers
5
Created
Source

说明

@ifanrx/stylelint-config-standard 仅针对 CSS 项目。

如果是 SASS 项目,请使用 @ifanrx/stylelint-config-standard-scss

@ifanrx/stylelint-config-standard 已默认引入 @ifanrx/stylelint-config-standard-bem

同时支持两种 BEM 格式:

  • 一般情况下,必须优先使用常规 BEM 格式:.block-foo__element-bar--modifier-baz
  • 如果使用 css module 或一些 css-in-js 的项目,通常使用驼峰式 BEM 格式:.blockFoo__elementBar_modifierBaz

注意事项

.stylelintrc.js 配置文件的 extends 中,@ifanrx/stylelint-config-standard 总是放在第一个。

使用方法

单独使用

pnpm install @ifanrx/stylelint-config-standard -D
// .stylelintrc.js
module.exports = {
  extends: ['@ifanrx/stylelint-config-standard'],
}

小程序项目中使用

pnpm install @ifanrx/stylelint-config-standard @ifanrx/stylelint-config-standard-wxss -D
// .stylelintrc.js
module.exports = {
  extends: ['@ifanrx/stylelint-config-standard', '@ifanrx/stylelint-config-standard-wxss'],
}

Keywords

stylelint

FAQs

Package last updated on 28 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts