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

Chore: merge all html formatter files into html.js #14612

Merged
merged 1 commit into from May 22, 2021

Conversation

mdjermanovic
Copy link
Member

Prerequisites checklist

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

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain:

We encountered the following problem during the release.

The gensite script reads the content of ./lib/cli-engine/formatters/

const formatterFiles = fs.readdirSync("./lib/cli-engine/formatters/"),

and then uses all found .js files as formatters, in order to generate https://eslint.org/docs/user-guide/formatters/ page

eslint/Makefile.js

Lines 443 to 451 in 9e9b5e0

return formatterFiles.reduce((data, filename) => {
const fileExt = path.extname(filename),
name = path.basename(filename, fileExt);
if (fileExt === ".js") {
const formattedOutput = cli.getFormatter(name)(
rawMessages.results,
{ rulesMeta }
);

The problem is that after #14287, that directory contains .js helper files for the html formatter, but those helper files are not formatters.

What changes did you make? (Give an overview)

Merged all html-*.js files into the main html.js.

Is there anything you'd like reviewers to focus on?

@mdjermanovic mdjermanovic added the chore This change is not user-facing label May 22, 2021
nzakas
nzakas approved these changes May 22, 2021
Copy link
Member

@btmills btmills left a comment

Choose a reason for hiding this comment

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

Let's see if this does the trick

@mdjermanovic
Copy link
Member Author

Thanks!

@mdjermanovic mdjermanovic merged commit 2c0868c into master May 22, 2021
14 checks passed
@mdjermanovic mdjermanovic deleted the merge-htmlformatter-files branch May 22, 2021 00:58
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Nov 19, 2021
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Nov 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion chore This change is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants