Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(rules): add html-lang-require rule #632

Merged
merged 3 commits into from
Jun 10, 2021

Conversation

baleyko
Copy link
Contributor

@baleyko baleyko commented Apr 22, 2021

  • added html-lang-require rule
  • add tests for html-lang-require rule

This rule helps make HTML documents to correspond to the W3C requirements.

If the rule is enabled, the next example should be valid:

<html lang="en-EN"></html>

And the next one should not be valid:

<html></html>

ruleOptions[ruldId] = true

describe(`Rules: ${ruldId}`, () => {
it('Html tag have no a lang attribute should result in an error', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Html here should be HTML

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

* added html-lang-require rule
* add tests for html-lang-require rule
@baleyko baleyko force-pushed the feat/html-lang-require-rule branch from 68b7764 to 1d946ff Compare June 9, 2021 16:08
Copy link
Member

@thedaviddias thedaviddias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @baleyko for this, ideally the doc should also be updated but it can be done in another PR. Would you mind create another ticket to update the doc accordingly to this new rule? I let you squash and merge this ticket if you want.

@thedaviddias thedaviddias merged commit 51471a9 into htmlhint:master Jun 10, 2021
thedaviddias pushed a commit that referenced this pull request Jun 10, 2021
# [0.15.0](v0.14.2...v0.15.0) (2021-06-10)

### Features

* **rules:** add html-lang-require rule ([#632](#632)) ([51471a9](51471a9))
@thedaviddias
Copy link
Member

🎉 This PR is included in version 0.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants