CSS linter 工具 stylelint

码农软件 · 软件分类 · CSS框架 · 2019-04-20 21:29:04

软件介绍

一个摩登的 CSS linter 工具。

Features

  • 近一百条规则 —— 包括 stylistic 规则,例如检查冒号周边的空格,发现细微的编码错误,,例如无效十六进制颜色或重写简写属性

  • 支持最新 CSS 语法 —— 包括自定义属性等等

  • 一点也不霸道 —— 只应用你想要的规则,并按你的需要配置可选的 linter

  • 可共享的 configs

  • 支持插件

  • 选择验证器

一个使用 gulp-postcss 和起草你的配置的例子:

gulp.task("css", function () {

  var postcss = require("gulp-postcss")
  var stylelint = require("stylelint")
  var reporter = require("postcss-reporter")

  return gulp.src("src/**/*.css")
    .pipe(postcss([
      stylelint({ // an example config that has four rules
        "rules": {
          "color-no-invalid-hex": 2,
          "declaration-colon-space-before": [2, "never"],
          "indentation": [2, "tab"],
          "number-leading-zero": [2, "always"]
        }
      }),
      reporter({
        clearMessages: true,
      })
    ]))
})


本文地址:https://www.codercto.com/soft/d/4026.html

Clean Code

Clean Code

Robert C. Martin / Prentice Hall / 2008-8-11 / USD 49.99

Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees. Every year, countless hours and significant resources are lost because of poorly written code......一起来看看 《Clean Code》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

URL 编码/解码
URL 编码/解码

URL 编码/解码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具