Releases: yeonjuan/html-eslint
Releases · yeonjuan/html-eslint
v0.31.0
v0.30.0
Linting HTML in Template literals 🚀
- Updates both
@html-eslint/parserand@html-eslint/eslint-pluginversion to0.29.0.
npm install -D @html-eslint/eslint-plugin@latest @html-eslint/parser@latest- Edit your eslint configuration file
import eslintHTML from "@html-eslint/eslint-plugin";
import eslintHTMLParser from "@html-eslint/parser";
export default [
{
// You can use the @html-eslint rules in your ESLint configuration for JS!
// This is used to lint HTML written inside Template Literal.
"plugins": {
"@html-eslint": eslintHTML
},
"rules": {
// Specifies the @html-eslint rules to apply to Template Literal.
"@html-eslint/no-inline-styles": 1,
"@html-eslint/indent": 1,
}
},
]- Now you can see that this plugin linting the html syntax inside the template literal.
// TaggedTemplateExpression
html`
<div style="${style}">
^^^^^^^^^^^^^^^// Unexpected usage of inline style
</div>`;
// TemplateLiteral
const code = /* html */`
<div style="${style}">
^^^^^^^^^^^^^^^// Unexpected usage of inline style
</div>`- If you want to specify that linting should be done with keywords other than
html, you can utilize the settings option.
{
"plugins": {
"@html-eslint": eslintHTML
},
settings: {
html: {
templateLiterals: {
// default options
tags: ["^html$"],
comments: ["^\\s*html\\s*$"],
}
}
},
}What's Changed
Full Changelog: v0.29.0...v0.30.0
v0.29.0
Linting HTML in Template literals 🚀
- Updates both
@html-eslint/parserand@html-eslint/eslint-pluginversion to0.29.0.
npm install -D @html-eslint/eslint-plugin@latest @html-eslint/parser@latest- Edit your eslint configuration file
import eslintHTML from "@html-eslint/eslint-plugin";
import eslintHTMLParser from "@html-eslint/parser";
export default [
{
// You can use the @html-eslint rules in your ESLint configuration for JS!
// This is used to lint HTML written inside Template Literal.
"plugins": {
"@html-eslint": eslintHTML
},
"rules": {
// Specifies the @html-eslint rules to apply to Template Literal.
"@html-eslint/no-inline-styles": 1,
"@html-eslint/indent": 1,
}
},
]- Now you can see that this plugin linting the html syntax inside the template literal.
// TaggedTemplateExpression
html`
<div style="${style}">
^^^^^^^^^^^^^^^// Unexpected usage of inline style
</div>`;
// TemplateLiteral
const code = /* html */`
<div style="${style}">
^^^^^^^^^^^^^^^// Unexpected usage of inline style
</div>`- If you want to specify that linting should be done with keywords other than
html, you can utilize the settings option.
{
"plugins": {
"@html-eslint": eslintHTML
},
settings: {
html: {
templateLiterals: {
// default options
tags: ["^html$"],
comments: ["^\\s*html\\s*$"],
}
}
},
}What's Changed
- feat: add @html-eslint/template-parser package by @yeonjuan in #224
- feat: support linting html in template literals in no-inline-styles by @yeonjuan in #226
- feat: support linting html in template literals in lowercase by @yeonjuan in #227
- feat: support linting html in template literals in attrs-newline by @yeonjuan in #228
- feat: support linting html in template literals in element-newline by @yeonjuan in #229
- feat: support linting html in template literals in id-naming-convention by @yeonjuan in #230
- feat: support linting html in template literals in no-duplicate-attrs by @yeonjuan in #232
- feat: support linting html in template literals in no-abstract-roles by @yeonjuan in #233
- feat: support linting html in template literals in no-obsolete-tags by @yeonjuan in #234
- feat: support linting html in template literals in no-extra-spacing-attrs by @yeonjuan in #235
- refactor: refactor types and predicates utils by @yeonjuan in #236
- feat: support linting html in template literals in indent by @yeonjuan in #237
- feat: support linting html in template literals by @yeonjuan in #238
- feat: support linting html in template literals in no-extra-spacing-text by @yeonjuan in #239
- fix: fix errors in no-multiple-empty-lines by @yeonjuan in #240
Full Changelog: v0.27.0...v0.29.0
v0.27.0
What's Changed
- feat: adds disallowInAssigment to no-extra-spacing-attrs by @RobertAKARobin in #216
- feat: add root eslintrc; resolves #205 by @RobertAKARobin in #212
- feat: adds no-extra-spacing-text by @RobertAKARobin in #215
- feat: adds e2e testing; fixes #203 by @RobertAKARobin in #213
- feat: adds
inlineoption to element-newline; fixes #210 by @RobertAKARobin in #214 - chore: fix generated docs by @yeonjuan in #219
Full Changelog: v0.26.0...v0.27.0
v0.26.0
What's Changed
- chore: add sitemap.xml generating script by @yeonjuan in #197
- feat: add test for tabs in no-extra-spacing-attrs by @RobertAKARobin in #202
- docs: add docs about lint javascript inside html by @yeonjuan in #206
- ci: add lint by @yeonjuan in #208
- chore: update lerna, turbo, jest, husky version by @yeonjuan in #209
Full Changelog: v0.25.0...v0.26.0
v0.25.0
BREAKING CHANGE
require-closing-tags'sallowSelfClosingCustomoption is removed.selfClosingCustomPatternsoption is added to replace it.
What's Changed
- feat: better
require-closing-tagssupport by @seleb in #188 - docs: improve flat config examples by @gian1200 in #190
- feat: add attrs-newline rule and close #191 by @RobertAKARobin in #193
- chore: clean deps by @yeonjuan in #195
New Contributors
- @gian1200 made their first contribution in #190
- @RobertAKARobin made their first contribution in #193
Full Changelog: v0.24.1...v0.25.0
v0.24.1
v0.24.0
What's Changed
- feat: add regexp flags support for id-naming-convention by @jdussouillez in #181
New Contributors
- @jdussouillez made their first contribution in #181
Full Changelog: v0.23.1...v0.24.0
v0.23.1
v0.23.0
What's Changed
- docs: improve website by @yeonjuan in #168
- docs: correct spelling of "accessibility" by @kitschpatrol in #170
- chore: update dependency turbo to 1.11.3 by @yeonjuan in #172
- chore: update dependencies lerna, firebase-tools versions by @yeonjuan in #173
- chore: export eslint-plugin types by @yeonjuan in #175
- feat: support flat config by @yeonjuan in #176
New Contributors
- @kitschpatrol made their first contribution in #170
Full Changelog: v0.22.0...v0.23.0