Skip to content

Commit

Permalink
Implement Prettier configuration and ignore pattern file
Browse files Browse the repository at this point in the history
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 that has been changed is the print width (1). 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 is
now set 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 that defines ignore pattern.

References:
  (1) prettier.io/docs/en/options.html#print-width

Epic: GH-33
Depends on GH-47 GH-49
GH-37
  • Loading branch information
arcticicestudio committed Jun 22, 2019
1 parent fc70c6e commit d8eefc0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (C) 2017-present Arctic Ice Studio <[email protected]>
# Copyright (C) 2017-present Sven Greb <[email protected]>
#
# Project: snowsaw
# Repository: https://github.com/arcticicestudio/snowsaw
# License: MIT

**/node_modules/*
22 changes: 22 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright (C) 2017-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2017-present Sven Greb <[email protected]>
*
* Project: snowsaw
* Repository: https://github.com/arcticicestudio/snowsaw
* License: MIT
* References:
* https://prettier.io/docs/en/configuration.html
* https://prettier.io/docs/en/options.html
*/

/**
* @file The Prettier configuration.
* @author Arctic Ice Studio <[email protected]>
* @author Sven Greb <[email protected]>
* @see https://prettier.io/docs/en/configuration.html
*/

module.exports = {
printWidth: 120
};

0 comments on commit d8eefc0

Please sign in to comment.