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

Turn on prettier (except repo root) #1167

Merged
merged 17 commits into from
Aug 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 27 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,15 @@ jobs:
when: always
command: npm run test:js:server

danger:
docker:
- image: shieldsio/shields-ci-node-8:0.0.3
working_directory: ~/repo
steps:
- checkout

- restore_cache:
key: v1-dependencies-{{ checksum "package.json" }}

- run:
name: Integration tests
when: always
command: npm run test:integration

- run:
name: Danger
name: 'Prettier check (quick fix: `npm run prettier`)'
when: always
command: npm run danger ci
command: npm run prettier-check

main@node-latest:
docker:
Expand All @@ -83,6 +73,31 @@ jobs:
when: always
command: npm run test:js:server

- run:
name: Integration tests
when: always
command: npm run test:integration

- run:
name: 'Prettier check (quick fix: `npm run prettier`)'
when: always
command: npm run prettier-check

danger:
docker:
- image: shieldsio/shields-ci-node-8:0.0.3
working_directory: ~/repo
steps:
- checkout

- restore_cache:
key: v1-dependencies-{{ checksum "package.json" }}

- run:
name: Danger
when: always
command: npm run danger ci

frontend:
docker:
- image: shieldsio/shields-ci-node-8:0.0.3
Expand Down
3 changes: 0 additions & 3 deletions .eslintrc-preferred.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
plugins:
# - "prettier"
- "chai-friendly"

extends:
Expand All @@ -12,8 +11,6 @@ parserOptions:
sourceType: "script"

rules:
# prettier/prettier: "error"

# These are not disabled by eslint-config-prettier
spaced-comment: "off"
standard/object-curly-even-spacing: "off"
Expand Down
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
server.js
dangerfile.js
next.config.js
server.spec.js
package.json
package-lock.json
/__snapshots__
/.next
/build
/coverage
1 change: 1 addition & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
semi: false
singleQuote: true
trailingComma: es5
bracketSpacing: true
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ Badge URLs
Coding guidelines
-----------------

### Prettier

This project formats its source code using Prettier. The most enjoyable way to
use Prettier is to let is format code for you when you save. You can [integrate
it into your editor][integrate prettier].

If for whatever reason you don't want to do that, you can run
`npm run prettier` to format the code from the command line.

[integrate prettier]: https://prettier.io/docs/en/editors.html

### Tests

When adding or changing a service [please write tests][service-tests].
Expand Down
Loading