1.1.8 • Published 5 years ago

eslint-plugin-attributes v1.1.8

Weekly downloads
66
License
ISC
Repository
github
Last release
5 years ago

eslint-plugin-attributes

html标签属性数量过多时需换行

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-attributes:

$ npm install eslint-plugin-attributes --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-attributes globally.

Usage

Add attributes to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "attributes"
    ]
}

Use default by extends option

{
    "extends": [
        "plugin:attributes/base"
    ]
}

Or configure the rules you want to use under the rules section.

{
    "rules": {
        "attributes/rule-name": 2
    }
}

Supported Rules

RuleDefaultOptionsDescription
max-attributes2[2, { max: 3, attrStrLimit: 50 }]html标签属性数量过多时需换行,支持自动修复。若属性过少换行也会自动修复为一行。单个属性长度超出attrStrLimit时,即使属性较少也要换行。
max-attribute-value-logical1[1, { max: 2 }]属性上逻辑操作符出现的次数限制
1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.2

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.17

5 years ago