Skip to content

Commit 83cb5ff

Browse files
Run prettier on all files in repo (#2033)
1 parent 08b8503 commit 83cb5ff

34 files changed

+239
-261
lines changed

.babelrc.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@ module.exports = {
99
],
1010
env: {
1111
cjs: {
12-
presets: [
13-
['@babel/preset-env', { modules: 'commonjs' }],
14-
],
12+
presets: [['@babel/preset-env', { modules: 'commonjs' }]],
1513
},
1614
mjs: {
17-
presets: [
18-
['@babel/preset-env', { modules: false }],
19-
],
15+
presets: [['@babel/preset-env', { modules: false }]],
2016
},
2117
},
2218
};

.eslintrc.yml

+10-12
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@ env:
66
node: true
77
plugins:
88
- flowtype
9-
- prettier
109

1110
rules:
12-
# https://github.com/prettier/eslint-plugin-prettier#installation
13-
prettier/prettier: error
14-
1511
# `eslint-plugin-flowtype` rule list based on `v3.11.x`
1612
# https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype
1713

@@ -35,7 +31,8 @@ rules:
3531
flowtype/require-readonly-react-props: off
3632
flowtype/require-return-type: off
3733
flowtype/require-types-at-top: off
38-
flowtype/require-valid-file-annotation: [error, always, { annotationStyle: line, strict: true }]
34+
flowtype/require-valid-file-annotation:
35+
[error, always, { annotationStyle: line, strict: true }]
3936
flowtype/require-variable-type: off
4037
flowtype/sort-keys: off
4138
flowtype/spread-exact-type: off
@@ -130,7 +127,7 @@ rules:
130127
no-implied-eval: error
131128
no-invalid-this: off
132129
no-iterator: error
133-
no-labels: [error, {allowLoop: true}]
130+
no-labels: [error, { allowLoop: true }]
134131
no-lone-blocks: error
135132
no-loop-func: error
136133
no-magic-numbers: off
@@ -168,7 +165,7 @@ rules:
168165
require-await: off # TODO
169166
require-unicode-regexp: off
170167
vars-on-top: error
171-
yoda: [error, never, {exceptRange: true}]
168+
yoda: [error, never, { exceptRange: true }]
172169

173170
# Strict Mode
174171
# https://eslint.org/docs/rules/#strict-mode
@@ -187,7 +184,8 @@ rules:
187184
no-undef: error
188185
no-undef-init: error
189186
no-undefined: off
190-
no-unused-vars: [error, {vars: all, args: after-used, argsIgnorePattern: "^_"}]
187+
no-unused-vars:
188+
[error, { vars: all, args: after-used, argsIgnorePattern: '^_' }]
191189
no-use-before-define: off
192190

193191
# Node.js and CommonJS
@@ -208,15 +206,15 @@ rules:
208206
# Stylistic Issues
209207
# https://eslint.org/docs/rules/#stylistic-issues
210208

211-
camelcase: [error, {properties: always}]
209+
camelcase: [error, { properties: always }]
212210
capitalized-comments: off # maybe
213211
consistent-this: off
214212
func-name-matching: off
215213
func-names: off
216214
func-style: off
217215
id-blacklist: off
218216
id-length: off
219-
id-match: [error, "^(?:_?[a-zA-Z0-9]*)|[_A-Z0-9]+$"]
217+
id-match: [error, '^(?:_?[a-zA-Z0-9]*)|[_A-Z0-9]+$']
220218
line-comment-position: off
221219
lines-around-comment: off
222220
lines-between-class-members: [error, always, { exceptAfterSingleLine: true }]
@@ -353,10 +351,10 @@ rules:
353351
yield-star-spacing: off
354352

355353
overrides:
356-
- files: "**/__tests__/**"
354+
- files: '**/__tests__/**'
357355
rules:
358356
no-restricted-syntax: off
359-
- files: "resources/**"
357+
- files: 'resources/**'
360358
parserOptions:
361359
sourceType: script
362360
rules:

.github/CONTRIBUTING.md

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Contributing to graphql-js
2-
==========================
1+
# Contributing to graphql-js
32

43
We want to make contributing to this project as easy and transparent as
54
possible. Hopefully this document makes the process for contributing clear and
@@ -72,23 +71,23 @@ This will watch the file system run any relevant lint, tests, and type checks au
7271
This project uses [Prettier](https://prettier.io/) for standard formatting. To
7372
ensure your pull request matches the style guides, run `npm run prettier`.
7473

75-
* 2 spaces for indentation (no tabs)
76-
* 80 character line length strongly preferred.
77-
* Prefer `'` over `"`
78-
* ES6 syntax when possible. However do not rely on ES6-specific functions to be available.
79-
* Use [Flow types](https://flowtype.org/).
80-
* Use semicolons;
81-
* Trailing commas,
82-
* Avd abbr wrds.
74+
- 2 spaces for indentation (no tabs)
75+
- 80 character line length strongly preferred.
76+
- Prefer `'` over `"`
77+
- ES6 syntax when possible. However do not rely on ES6-specific functions to be available.
78+
- Use [Flow types](https://flowtype.org/).
79+
- Use semicolons;
80+
- Trailing commas,
81+
- Avd abbr wrds.
8382

8483
## Release on NPM
8584

86-
*Only core contributors may release to NPM.*
85+
_Only core contributors may release to NPM._
8786

8887
To release a new version on NPM, first ensure all tests pass with `npm test`,
8988
then use `npm version patch|minor|major` in order to increment the version in
9089
package.json and tag and commit a release. Then `git push && git push --tags`
91-
this change so Travis CI can deploy to NPM. *Do not run `npm publish` directly.*
90+
this change so Travis CI can deploy to NPM. _Do not run `npm publish` directly._
9291
Once published, add [release notes](https://github.com/graphql/graphql-js/tags).
9392
Use [semver](https://semver.org/) to determine which version part to increment.
9493

.github/ISSUE_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Please do not post general questions directly as GitHub issues. They may sit for
1010

1111
Before filing a new issue, make sure an issue for your problem doesn't already exist.
1212

13-
The best way to get a bug fixed is to provide a *pull request* with a simplified failing test case (or better yet, include a fix).
13+
The best way to get a bug fixed is to provide a _pull request_ with a simplified failing test case (or better yet, include a fix).
1414

1515
# Feature requests
1616

.nycflowrc.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
include:
2-
- "src/"
2+
- 'src/'
33
exclude:
4-
- "src/polyfills"
4+
- 'src/polyfills'
55
clean: true
6-
temp-directory: "coverage/flow"
7-
report-dir: "coverage/flow"
6+
temp-directory: 'coverage/flow'
7+
report-dir: 'coverage/flow'
88
skip-full: true
99
skip-empty: true
1010
reporter: [json, html, text]

.nycrc.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
include:
2-
- "src/"
2+
- 'src/'
33
exclude:
4-
- "src/polyfills"
4+
- 'src/polyfills'
55
clean: true
6-
temp-directory: "coverage/tests"
7-
report-dir: "coverage/tests"
6+
temp-directory: 'coverage/tests'
7+
report-dir: 'coverage/tests'
88
skip-full: true
99
reporter: [json, html, text]

.travis.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ cache: yarn
55

66
# https://github.com/nodejs/Release
77
node_js:
8-
- '12'
9-
- '10'
10-
- '8'
11-
- '6'
8+
- '12'
9+
- '10'
10+
- '8'
11+
- '6'
1212

1313
script: |
1414
if [[ "$(node -pe process.version)" == v10.* ]]; then # Is latest LTS?
@@ -20,11 +20,11 @@ script: |
2020
2121
jobs:
2222
include:
23-
- stage: deploy
24-
if: type = push AND branch = master
25-
script: npm run gitpublish
26-
skip_cleanup: true
27-
node_js: '10'
23+
- stage: deploy
24+
if: type = push AND branch = master
25+
script: npm run gitpublish
26+
skip_cleanup: true
27+
node_js: '10'
2828

2929
notifications:
3030
irc:
@@ -33,7 +33,7 @@ notifications:
3333
on_failure: change
3434
skip_join: true
3535
channels:
36-
- chat.freenode.net#graphql
36+
- chat.freenode.net#graphql
3737
slack:
3838
secure: G7fzaXoPI1cyyW7dlpQ8oG/ot73n4kE83HgbyK1iEN1YBfodsytVgh0jS+zB3DhhRAotS/VfGVz9Wj2Oo109U5w/FyxdMGuKvFan/0B/aAws1sPxLGWA5230u1wTKQCHAu17+yppFOODUu1ILDXaD2A//Wj5iru9M4NnKc1bO6VHkfBHPTLQLbdPHmorwuSH02Ocbh7K4XOWzXRxM6VrwamEn1KnyXGu2w3QdJUT31OjGEEdf6FUzvjwzFgXPhngCw5+enpwm71ljHDNu8YHhXvHtS4328O5pYQO8np7j653HNEqi+ZUiYEOWpwC8be1xHdvi/s32tPFZiCx28ZmDoCUrY744tpPtE6tzuncmSKB0Y3EjutdXBpxllNr5l5hpX5092G2MlpokFbv85J+E2ALcZYNYeFOqTYTKwTYkxK6B1x4amBNpM+FXgUhloK4BK9OT0Qh5SiQOsM8cZT0h6QP91n+REljtpugW3VbuIxq5OJAi42FYbHBC27pohhq6ohU1euZfobk9a7ZawnjoEUk1EZHXiJzYKY/QqzyB6dwk0ersBl3l3OX/wnjwKTkqc9aTmDWo2L+lHaUCXuCY1+KQXsRicfnH395szTJXQbvcbN0zz188gdz6sawzi5BxndWo0NRwZyOG2YcyUHFQR4bK1rL7Lo6t6rijQ/XMeQ=
3939

README.md

+5-10
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ https://graphql.org/graphql-js/.
1111

1212
Looking for help? Find resources [from the community](https://graphql.org/community/).
1313

14-
1514
## Getting Started
1615

1716
An overview of GraphQL in general is available in the
@@ -47,7 +46,7 @@ import {
4746
graphql,
4847
GraphQLSchema,
4948
GraphQLObjectType,
50-
GraphQLString
49+
GraphQLString,
5150
} from 'graphql';
5251

5352
var schema = new GraphQLSchema({
@@ -58,10 +57,10 @@ var schema = new GraphQLSchema({
5857
type: GraphQLString,
5958
resolve() {
6059
return 'world';
61-
}
62-
}
63-
}
64-
})
60+
},
61+
},
62+
},
63+
}),
6564
});
6665
```
6766

@@ -76,13 +75,11 @@ Then, serve the result of a query against that type schema.
7675
var query = '{ hello }';
7776

7877
graphql(schema, query).then(result => {
79-
8078
// Prints
8179
// {
8280
// data: { hello: "world" }
8381
// }
8482
console.log(result);
85-
8683
});
8784
```
8885

@@ -94,7 +91,6 @@ it, reporting errors otherwise.
9491
var query = '{ boyhowdy }';
9592

9693
graphql(schema, query).then(result => {
97-
9894
// Prints
9995
// {
10096
// errors: [
@@ -103,7 +99,6 @@ graphql(schema, query).then(result => {
10399
// ]
104100
// }
105101
console.log(result);
106-
107102
});
108103
```
109104

docs/APIReference-GraphQL.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var { graphql } = require('graphql'); // CommonJS
1717

1818
## Overview
1919

20-
*Entry Point*
20+
_Entry Point_
2121

2222
<ul class="apiIndex">
2323
<li>
@@ -28,7 +28,7 @@ var { graphql } = require('graphql'); // CommonJS
2828
</li>
2929
</ul>
3030

31-
*Schema*
31+
_Schema_
3232

3333
<ul class="apiIndex">
3434
<li>
@@ -39,7 +39,7 @@ var { graphql } = require('graphql'); // CommonJS
3939
</li>
4040
</ul>
4141

42-
*Type Definitions*
42+
_Type Definitions_
4343

4444
<ul class="apiIndex">
4545
<li>
@@ -92,7 +92,7 @@ var { graphql } = require('graphql'); // CommonJS
9292
</li>
9393
</ul>
9494

95-
*Scalars*
95+
_Scalars_
9696

9797
<ul class="apiIndex">
9898
<li>
@@ -127,7 +127,7 @@ var { graphql } = require('graphql'); // CommonJS
127127
</li>
128128
</ul>
129129

130-
*Errors*
130+
_Errors_
131131

132132
<ul class="apiIndex">
133133
<li>

0 commit comments

Comments
 (0)