Skip to content

introduce prettier#1647

Merged
alexander-akait merged 2 commits into
webpack:masterfrom
hiroppy:feature/prettier
Feb 4, 2019
Merged

introduce prettier#1647
alexander-akait merged 2 commits into
webpack:masterfrom
hiroppy:feature/prettier

Conversation

@hiroppy

@hiroppy hiroppy commented Feb 2, 2019

Copy link
Copy Markdown
Contributor
  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

Motivation / Use-Case

I would like to introduce prettier for development.
And I picked configure file and command from webpack repository.

Breaking Changes

Additional Info

Currently, the webpack-dev-server code is far out of webpack's rule and there are many changes in this PR.
So should we decide on a custom rule? /cc @evilebottnawi

@codecov

codecov Bot commented Feb 2, 2019

Copy link
Copy Markdown

Codecov Report

Merging #1647 into master will increase coverage by 0.18%.
The diff coverage is 78.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1647      +/-   ##
==========================================
+ Coverage    75.1%   75.29%   +0.18%     
==========================================
  Files          10       10              
  Lines         687      688       +1     
==========================================
+ Hits          516      518       +2     
+ Misses        171      170       -1
Impacted Files Coverage Δ
bin/options.js 100% <ø> (ø) ⬆️
lib/utils/createLogger.js 87.5% <ø> (ø) ⬆️
lib/utils/createCertificate.js 100% <ø> (ø) ⬆️
bin/utils.js 44.44% <100%> (ø) ⬆️
lib/utils/addEntries.js 100% <100%> (ø) ⬆️
lib/utils/createDomain.js 100% <100%> (ø) ⬆️
examples/util.js 81.81% <100%> (ø) ⬆️
lib/Server.js 81.77% <72.22%> (+0.26%) ⬆️
bin/webpack-dev-server.js 58.28% <87.5%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4767a31...bf1b436. Read the comment docs.

@montogeek

Copy link
Copy Markdown

Code should have same tab/space width, that is current style.

Comment thread .prettierrc.js
}
}
]
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use this config:

{
  "singleQuote": true,
  "trailingComma": "es5",
  "arrowParens": "always"
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added,PTAL

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@hiroppy Can't see in PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like a regular config, got no opinion here. @evilebottnawi has worked with this more to have a better argument

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@evenstensberg Oops, Sorry, I mistook the name of the destination 🙇

@alexander-akait alexander-akait left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@hiroppy

hiroppy commented Feb 4, 2019

Copy link
Copy Markdown
Contributor Author

@evilebottnawi sorry but do you want spaces or tabs? I’m fine either way!

@alexander-akait

Copy link
Copy Markdown
Member

@hiroppy spaces

@hiroppy

hiroppy commented Feb 4, 2019

Copy link
Copy Markdown
Contributor Author

@evilebottnawi I changed spaces from tabs:)

Comment thread client-src/live/live.html Outdated
></script>
</head>
<body></body>
</html>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's don't use prettier here

@alexander-akait alexander-akait left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All good, one note

@hiroppy

hiroppy commented Feb 4, 2019

Copy link
Copy Markdown
Contributor Author

@evilebottnawi I removed html from prettier. PTAL 🙏

@alexander-akait alexander-akait left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, good work!

@alexander-akait alexander-akait merged commit 4a04864 into webpack:master Feb 4, 2019
@hiroppy hiroppy deleted the feature/prettier branch February 4, 2019 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants