Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit 3d40ef4

Browse files
authored
Fix linting and prettifying (#59)
Fix linting and prettifying
2 parents afaf9b1 + d348ef0 commit 3d40ef4

File tree

8 files changed

+35
-37
lines changed

8 files changed

+35
-37
lines changed

.eslintrc.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{
22
"parser": "babel-eslint",
3-
"extends": "eslint:recommended",
4-
"plugins": [
5-
"node",
6-
"prettier"
7-
],
3+
"plugins": ["node", "prettier"],
84
"env": {
95
"node": true,
106
"es6": true

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
4949

5050
### Commits
5151

52-
- Update ZISI and dependencies [`ec31e36`](https://github.com/netlify/js-client/commit/ec31e36412ff46f83e1d1a47dfb28d6866cadfad)
52+
- Update ZISI and dependencies [`ec31e36`](https://github.com/netlify/js-client/commit/ec31e36412ff46f83e1d1a47dfb28d6866cadfad)
5353

5454
## [v2.4.3](https://github.com/netlify/js-client/compare/v2.4.2...v2.4.3) - 2019-04-17
5555

@@ -224,7 +224,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
224224

225225
### Commits
226226

227-
- Its just value assignment [`96e3095`](https://github.com/netlify/js-client/commit/96e3095607938fc2077f18a0a8441d655c0ffe20)
227+
- Its just value assignment [`96e3095`](https://github.com/netlify/js-client/commit/96e3095607938fc2077f18a0a8441d655c0ffe20)
228228

229229
## [v2.0.1-beta.6](https://github.com/netlify/js-client/compare/v2.0.1-beta.5...v2.0.1-beta.6) - 2018-09-18
230230

CODE_OF_CONDUCT.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

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

2323
Examples of unacceptable behavior by participants include:
2424

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

3434
## Our Responsibilities

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Projects that depend heavily on this client that should be taken into considerat
4444
# Update the changelog
4545
$ npm version [major|minor|patch]
4646
$ git push && git push --tags
47-
# Create a github release with the changelog contents
47+
# Create a github release with the changelog contents
4848
$ npm publish
4949
```
5050

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# netlify/js-client
2+
23
[![npm version][npm-img]][npm] [![build status][travis-img]][travis] [![windows build status][av-img]][av]
34
[![coverage][coverage-img]][coverage] [![dependencies][david-img]][david] [![downloads][dl-img]][dl]
45

@@ -41,7 +42,7 @@ await netlify.deleteSite({
4142

4243
Create a new instance of the Netlify API client with the provided `accessToken`.
4344

44-
`accessToken` is optional. Without it, you can't make authorized requests.
45+
`accessToken` is optional. Without it, you can't make authorized requests.
4546

4647
`opts` includes:
4748

@@ -75,8 +76,8 @@ Every open-api method has the following signature:
7576
Perform a call to the given endpoint corresponding with the `operationId`. Returns promise that will resolve with the body of the response, or reject with an error with details about the request attached. Rejects if the `status` > 400.
7677

7778
- `params` is an object that includes any of the required or optional endpoint parameters.
78-
- `params.body` should be an object which gets serialized to JSON automatically. Any object can live here but refer to the open-api specification for allowed fields in a particular request body.
79-
- If the endpoint accepts `binary`, `params.body` can be a Node.js readable stream or stream ctor (e.g. `() => fs.createReadStream('./foo')`). A Stream ctor function is required to support rate limit retry.
79+
- `params.body` should be an object which gets serialized to JSON automatically. Any object can live here but refer to the open-api specification for allowed fields in a particular request body.
80+
- If the endpoint accepts `binary`, `params.body` can be a Node.js readable stream or stream ctor (e.g. `() => fs.createReadStream('./foo')`). A Stream ctor function is required to support rate limit retry.
8081

8182
```js
8283
// example params
@@ -105,7 +106,7 @@ Optional `opts` can include any property you want passed to `node-fetch`. The `h
105106
All methods are conveniently consumed with async/await:
106107

107108
```js
108-
async function getSomeData () {
109+
async function getSomeData() {
109110
// Calls may fail!
110111
try {
111112
return await client.getSiteDeploy({
@@ -141,7 +142,7 @@ See the [authenticating](https://www.netlify.com/docs/api/#authenticating) docs
141142

142143
```js
143144
// example:
144-
async function login () {
145+
async function login() {
145146
const ticket = await api.createTicket({
146147
clientId: CLIENT_ID
147148
})
@@ -156,7 +157,7 @@ async function login () {
156157
#### `promise(deploy) = client.deploy(siteId, buildDir, [opts])`
157158

158159
**Node.js Only**: Pass in a `siteId`, a `buildDir` (the folder you want to deploy) and an options object to deploy the contents of that folder.
159-
Sometimes this method needs to write to a `tmpDir`. By default `tmpDir` is a folder in the system temporary directory.
160+
Sometimes this method needs to write to a `tmpDir`. By default `tmpDir` is a folder in the system temporary directory.
160161

161162
The following paths can be passed in the options:
162163

@@ -192,7 +193,7 @@ Optional `opts` include:
192193

193194
## UMD Builds
194195

195-
A UMD build is provided for your convenience, however browser support is still experimental. Contributions to improve browser support are welcome.
196+
A UMD build is provided for your convenience, however browser support is still experimental. Contributions to improve browser support are welcome.
196197

197198
## Contributing
198199

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@
103103
"test": "run-s test:*",
104104
"test:ava": "nyc --reporter=lcov ava --verbose && nyc report",
105105
"test:deps": "dependency-check ./package.json --entry \"src/**/!(*.test).js\" --unused --missing --no-dev --no-peer",
106-
"test:lint": "eslint src",
106+
"test:lint": "eslint --fix 'src/**/*.js' '*.js'",
107+
"test:prettier": "prettier --write --loglevel warn 'src/**/*.js' '*.{js,md,yml,json}'",
107108
"watch": "nyc --reporter=lcov ava --watch",
108109
"clean": "rimraf dist coverage",
109110
"version": "auto-changelog -p --template keepachangelog --breaking-pattern breaking && git add CHANGELOG.md"

src/addons.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ async function createAddon(settings, netlifyApiToken) {
1414
},
1515
body: JSON.stringify({
1616
config: config
17-
}),
17+
})
1818
})
1919

2020
const data = await response.json()
@@ -76,7 +76,7 @@ async function updateAddon(settings, netlifyApiToken) {
7676
},
7777
body: JSON.stringify({
7878
config: config
79-
}),
79+
})
8080
})
8181

8282
if (response.status === 422) {

webpack.config.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
devtool: 'source-map',
44
output: {
55
library: 'NetlifyClient',
6-
libraryTarget: 'umd',
6+
libraryTarget: 'umd'
77
},
88
module: {
99
rules: [
@@ -13,11 +13,11 @@ module.exports = {
1313
use: {
1414
loader: 'babel-loader',
1515
query: {
16-
presets: [['@babel/preset-env', {modules: 'commonjs'}]],
17-
plugins: ['@babel/plugin-transform-runtime'],
18-
},
19-
},
20-
},
21-
],
22-
},
16+
presets: [['@babel/preset-env', { modules: 'commonjs' }]],
17+
plugins: ['@babel/plugin-transform-runtime']
18+
}
19+
}
20+
}
21+
]
22+
}
2323
}

0 commit comments

Comments
 (0)