-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrated Prettier (1), the opinionated code formatter with support for many languages and integrations with most editors. It ensures that all outputted code conforms to a consistent style. >>> Configuration This is one of the main features of Prettier: It already provides the best and recommended style configurations of-out-the-box. The only option we will change is the print width (2). It is set to 80 by default which not up-to-date for modern screens (might only be relevant when working in terminals only like e.g. with Vim). It has been changed to 120 used by all of Arctic Ice Studio's style guides. The `prettier.config.js` configuration file is placed in the project root as well as the `.prettierignore` file to also define ignore pattern. >>> NPM script/task To allow to format all sources a `format:pretty` npm script/task has been added to be included in the main `format` script flow. >>> First Time Code Base Run The last task was to run Prettier for the first time on the entire code base. This revealed multiple style guide violations that were fixedf through Prettier and the configured linters of the project. >>> False-Positives To ensure incorrect examples of the style guide won't be fixed by Prettier, the affected lines have been excluded from Prettier by adding the `<!-- prettier-ignore -->` handle for HTML (3). Note that this also triggers `remark-lint` when added right above a code block (`no-missing-blank-lines`). This has been fixed by adding the `<!--lint disable no-missing-blank-lines-->` handle (4) as well. References: (1) https://prettier.io (2) https://prettier.io/docs/en/options.html#print-width (3) https://prettier.io/docs/en/ignore.html#html (4) https://github.com/remarkjs/remark-lint#configuring-remark-lint Epic: GH-8 Resolves GH-11
- Loading branch information
1 parent
db2a43b
commit 1025324
Showing
50 changed files
with
6,767 additions
and
650 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (C) 2018-present Arctic Ice Studio <development@arcticicestudio.com> | ||
# Copyright (C) 2018-present Sven Greb <development@svengreb.de> | ||
# | ||
# Project: Styleguide JavaScript | ||
# Repository: https://github.com/arcticicestudio/styleguide-javascript | ||
# License: MIT | ||
|
||
build/* | ||
**/node_modules/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.