HTML files are parsed into an AST, which can be traversed, examined, and linted with the visitor pattern like any other ESLint source. The HTML AST that is produced has the following types of nodes and structure
1:1 error Element <p> is implicitly closed by adjacent <div> no-implicit-close 2:2 error Button is missing type attribute button-type 6:4 error Unexpected close-tag, expected opening tag close-order BundlesThe library comes in four flavours:CommonJS full (dist/cjs/index.js) CommonJS ...
<divid="1"ID="1"<--noerror(falsenegative)Id="1"<--noerror(falsenegative)id=""<---error(ok)></div> Perhaps we should convert the attribute key value here totoLowerCaseand store it in a set. html-eslint/packages/eslint-plugin/lib/rules/no-duplicate-attrs.js ...
In cases when the value of the attribute is an invalid JSON or can not be wrapped into a function, it will be compared asundefined. Example:[{ name: 'data', isFunction: false }, { name: 'onclick', isFunction: true }] The following two code samples will be considered to be equival...
Tell us about your environment ESLint Version: 4.14.0 eslint-plugin-vue Version: 4.0.0 Node Version: 8.9.1 Please show your full configuration: module.exports = { parserOptions: { parser: 'babel-eslint', ecmaVersion: 6, sourceType: 'modu...
esModule sources Type: type sources = | boolean | { list?: Array<{ tag?: string; attribute?: string; type?: string; filter?: ( tag: string, attribute: string, attributes: string, resourcePath: string, ) => boolean; }>; urlFilter?: ( attribute: string, value: string, resourcePath...
It lets you specify a rule that controls a namespace attribute position. Order - use this drop-down list to select the sorting order for the rule. This option is useful when more than one element uses the same matching rule. In this case, selecting Keep order will keep the same order ...
order': 'off', 'vue/one-component-per-file': 'off', 'vue/html-closing-bracket-newline': 'off', 'vue/max-attributes-per-line': 'off', 'vue/multiline-html-element-content-newline': 'off', 'vue/singleline-html-element-content-newline': 'warn', 'vue/attribute-hyphenation': 'off'...
2:0,"vue/max-attributes-per-line":["error",{"singleline":3,"multiline":{"max":1,"allowFirstLine":false}}],"vue/html-indent":["error",2,{"attribute":1,"baseIndent":1,"closeBracket":0,"alignAttributesVertically":true,"ignores":[]}],"vue/attributes-order":["error",{"order":...
In both cases it will allow html-validate to parse and detect errors in the templates: component.js 2:13 error Button is missing type attribute button-type route.js 2:51 error Mismatched close-tag, expected '</p>' but found '</i>' close-order...