Skip to content

Commit

Permalink
Set up Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
astorije committed May 29, 2018
1 parent 65e8544 commit 799542d
Show file tree
Hide file tree
Showing 9 changed files with 468 additions and 471 deletions.
91 changes: 4 additions & 87 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ env:
commonjs: true
es6: true

extends: 'eslint:recommended'
extends:
- eslint:recommended
- prettier

rules:

## Possible Errors

for-direction: error
no-extra-parens: error
no-prototype-builtins: error
no-template-curly-in-string: error

Expand All @@ -27,9 +28,6 @@ rules:
consistent-return: error
curly: error
default-case: error
dot-location:
- error
- property
dot-notation: error
eqeqeq: error
guard-for-in: error
Expand All @@ -43,7 +41,6 @@ rules:
no-extend-native: error
no-extra-bind: error
no-extra-label: error
no-floating-decimal: error
no-global-assign: error
no-implicit-coercion: error
no-implicit-globals: error
Expand All @@ -52,7 +49,6 @@ rules:
no-labels: error
no-lone-blocks: error
no-loop-func: error
no-multi-spaces: error
no-multi-str: error
no-new: error
no-new-func: error
Expand All @@ -73,7 +69,6 @@ rules:
no-with: error
prefer-promise-reject-errors: error
radix: error
wrap-iife: error
yoda: error

## Strict Mode
Expand Down Expand Up @@ -103,126 +98,51 @@ rules:

## Stylistic Issues

array-bracket-newline: error
array-bracket-spacing: error
block-spacing: error
brace-style: error
camelcase: error
capitalized-comments:
- error
- always
- ignoreConsecutiveComments: true
comma-dangle:
- error
- always-multiline
comma-spacing: error
comma-style: error
computed-property-spacing: error
consistent-this: error
eol-last: error
func-call-spacing: error
func-name-matching: error
func-style:
- error
- declaration
- allowArrowFunctions: true
function-paren-newline:
- error
- consistent
id-match: error
indent:
- error
- 2
- SwitchCase: 1
key-spacing: error
keyword-spacing: error
linebreak-style:
- error
- unix
lines-around-comment: error
lines-between-class-members: error
max-depth: error
max-len:
- error
- tabWidth: 2
ignoreUrls: true
ignorePattern: \* expect\(.*\)\.to\.have\.[a-z.]*(keys|nested\.property)
max-nested-callbacks:
- error
- max: 6
max-statements-per-line: error
multiline-ternary:
- error
- never
new-cap: error
new-parens: error
newline-per-chained-call: error
no-array-constructor: error
no-bitwise: error
no-continue: error
no-lonely-if: error
no-mixed-operators: error
no-multi-assign: error
no-multiple-empty-lines: error
no-negated-condition: error
no-nested-ternary: error
no-new-object: error
no-tabs: error
no-trailing-spaces: error
no-underscore-dangle:
- error
- allowAfterThis: true
no-unneeded-ternary: error
no-whitespace-before-property: error
object-curly-newline: error
object-curly-spacing:
- error
- always
object-property-newline:
- error
- allowMultiplePropertiesPerLine: true
one-var:
- error
- never
operator-assignment: error
operator-linebreak: error
padded-blocks:
- error
- never
padding-line-between-statements: error
quote-props:
- error
- as-needed
quotes:
- error
- single
semi:
- error
- always
semi-spacing: error
semi-style: error
sort-vars: error
space-before-blocks: error
space-before-function-paren:
- error
- named: never
space-in-parens: error
space-infix-ops: error
space-unary-ops: error
# spaced-comment: error
switch-colon-spacing: error
template-tag-spacing: error
unicode-bom: error
wrap-regex: error
spaced-comment: error

## ECMAScript 6

arrow-body-style: error
arrow-parens:
- error
- as-needed
arrow-spacing: error
generator-star-spacing: error
no-duplicate-imports: error
no-restricted-imports: error
no-useless-computed-key: error
Expand All @@ -236,8 +156,5 @@ rules:
prefer-numeric-literals: error
prefer-spread: error
prefer-template: error
rest-spread-spacing: error
sort-imports: error
symbol-description: error
template-curly-spacing: error
yield-star-spacing: error
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage/
2 changes: 2 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
singleQuote: true
trailingComma: es5
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
Expand Down
Loading

0 comments on commit 799542d

Please sign in to comment.