Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix: Add meta element with charset attribute. #9365

Merged
merged 1 commit into from Sep 29, 2017
Merged

Fix: Add meta element with charset attribute. #9365

merged 1 commit into from Sep 29, 2017

Conversation

H1Gdev
Copy link
Contributor

@H1Gdev H1Gdev commented Sep 27, 2017

Open html output file used Firefox and output the following error message in console.
'The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.'
So add meta element with charset(UTF-8) attribute.

What is the purpose of this pull request? (put an "X" next to item)

[X] Bug fix (template)

Tell us about your environment

  • ESLint Version: 4.7.2
  • Node Version: 6.10.2
  • npm Version: 5.4.1

What parser (default, Babel-ESLint, etc.) are you using?
default

Please show your full configuration:

module.exports = {
    "env": {
        "browser": true
    },
    "extends": "eslint:recommended",
    "rules": {
        "indent": [
            "error",
            4
        ],
        "linebreak-style": [
            "error",
            "unix"
        ],
        "quotes": [
            "error",
            "single"
        ],
        "semi": [
            "error",
            "always"
        ]
    }
};

What did you do? Please include the actual source code causing the issue.
eslint --format html --output-file lint.html yourfile.js

What did you expect to happen?
output no error message in console.

What actually happened? Please include the actual, raw output from ESLint.
output the following error message in console.

The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.

lint.html

What changes did you make? (Give an overview)
add meta element with charset(UTF-8) attribute.

Is there anything you'd like reviewers to focus on?
An html element's start tag can be omitted.
Should be omitted it ?

Open html output file used Firefox and output the following error message in console.
'The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.'
So add meta element with charset(UTF-8) attribute.
@eslintbot
Copy link

LGTM

@not-an-aardvark not-an-aardvark added accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly core Relates to ESLint's core APIs and features labels Sep 29, 2017
@gyandeeps gyandeeps merged commit 06efe87 into eslint:master Sep 29, 2017
@H1Gdev H1Gdev deleted the formatter branch September 29, 2017 16:29
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Mar 29, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Mar 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly core Relates to ESLint's core APIs and features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants