Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ued2345/stylelint-config

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ued2345/stylelint-config - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name": "@ued2345/stylelint-config",
"version": "0.1.1",
"version": "0.1.2",
"description": "stylelint by UED2345",

@@ -5,0 +5,0 @@ "main": "index.js",

# stylelint-config
CSS 编码规范之 stylelint 配置文件
> CSS 编码规范之 stylelint 配置文件 ‧ UED2345
## 安装
在你的项目中安装 stylelint 和配置包:
```sh
npm i -D stylelint
npm i -D @ued2345/stylelint-config
```
## 使用方法
1. 在你的项目的根目录添加 `.stylelintrc.js` 文件:
```js
module.exports = {
extends: [
'@ued2345/stylelint-config'
],
ignoreFiles: [
'./dist/**/*.*',
],
}
```
1. 在你的项目的 `package.json` 文件中添加脚本:
```json
{
"scripts": {
"lint-css": "stylelint src/**/*.scss src/**/*.vue"
}
}
```
1. 执行以下命令开始校验 CSS 代码:
```sh
npm run lint-css
```
如果需要 stylelint 帮忙修复(只有部分问题可以自动修复),执行以下命令:
```sh
npm run lint-css -- --fix
```
如有必要,你可以把上述命令整合到 CI、Git hook 等工作流中。

@@ -70,3 +70,3 @@ module.exports = {

// 'selector-no-qualifying-type': null,
'selector-no-vendor-prefix': [true, { ignoreSelectors: [] }], // TODO: 核对一下 placeholder 之类的伪元素能不能被 auto-prefix
'selector-no-vendor-prefix': [true, { ignoreSelectors: [] }],
// 'selector-pseudo-class-blacklist': null,

@@ -88,3 +88,3 @@ // 'selector-pseudo-class-whitelist': null,

// 'at-rule-blacklist': null,
'at-rule-no-vendor-prefix': true, // TODO: 核对一下能不能被 auto-prefix
'at-rule-no-vendor-prefix': true,
// 'at-rule-property-requirelist': null,

@@ -98,3 +98,3 @@ // 'at-rule-whitelist': null,

// 'max-nesting-depth': null,
'no-unknown-animations': true, // TODO: 测试一下跨模块的情况
// 'no-unknown-animations': null, // cannot resolve anim defined externally
}

@@ -43,3 +43,3 @@ module.exports = {

'value-list-comma-newline-before': 'never-multi-line',
'value-list-comma-space-after': 'always',
'value-list-comma-space-after': 'always-single-line',
'value-list-comma-space-before': 'never',

@@ -58,3 +58,3 @@ 'value-list-max-empty-lines': 0,

'declaration-colon-newline-after': 'always-multi-line',
'declaration-colon-space-after': 'always', // TODO: 验证一下换行的行为
'declaration-colon-space-after': 'always-single-line',
'declaration-colon-space-before': 'never',

@@ -61,0 +61,0 @@ // 'declaration-empty-line-before': null,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc