1.0.10 • Published 1 year ago

eslint-plugin-html-zonki v1.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

插件简介

本插件用于规范html开发

更新日志

2023-01-05

添加 self-closed 规则,用于规范自闭合元素闭合

添加 double-quotation 规则,用于规范属性以双引号的形式赋值

2022-12-30

添加 class-bem 规则,用于规范元素class属性值为BEM形式

添加 img-alt 规则,用于规范元素img的alt属性存在且不为空

添加 label-for 规则,用于规范元素label的for属性存在且不为空

添加 attribute-complete 规则,用于规范元素属性填写完整,不使用<input readonly />默认写法

2022-12-15

添加 ul-only-li 规则,用于规范ul标签只有li子标签

使用

module.exports = {
  // 依赖插件
  plugins: ["@html-eslint","html-zonki"],
  overrides: [
    {
      files: ["*.html"],
      parser: "@html-eslint/parser"
    }
  ],
  rules: {
    "html-zonki/ul-only-li": "error",
    "html-zonki/class-bem": "error",
    "html-zonki/img-alt": "error",
    "html-zonki/label-for": "error",
    "html-zonki/attribute-complete": "error",
    "html-zonki/self-closed": "error",
    "html-zonki/double-quotation": "error"
  }
}
eslint xxx.html
1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago