Skip to content

Commit 250fea3

Browse files
authored
chore: use prettier (#55)
1 parent b7576df commit 250fea3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1145
-1026
lines changed

.eslintrc.js

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
/* @flow */
22

33
module.exports = {
4-
'extends': './node_modules/@krakenjs/grumbler-scripts/config/.eslintrc-browser.js',
4+
extends:
5+
"./node_modules/@krakenjs/grumbler-scripts/config/.eslintrc-browser.js",
56

6-
'globals': {
7-
'Promise': false,
8-
'__PAYPAL_CHECKOUT__': true,
9-
'__paypal_checkout__': true,
10-
'__sdk__': true,
11-
'__LOCALE__': true,
12-
'__CLIENT_ID__': true,
13-
'__MERCHANT_ID__': true,
14-
'__INTENT__': true,
15-
'__COMMIT__': true,
16-
'__VAULT__': true,
17-
'__PORT__': true,
18-
'__STAGE_HOST__': true,
19-
'__HOST__': true,
20-
'__PATH__': true,
21-
'__COMPONENTS__': true
22-
},
7+
globals: {
8+
Promise: false,
9+
__PAYPAL_CHECKOUT__: true,
10+
__paypal_checkout__: true,
11+
__sdk__: true,
12+
__LOCALE__: true,
13+
__CLIENT_ID__: true,
14+
__MERCHANT_ID__: true,
15+
__INTENT__: true,
16+
__COMMIT__: true,
17+
__VAULT__: true,
18+
__PORT__: true,
19+
__STAGE_HOST__: true,
20+
__HOST__: true,
21+
__PATH__: true,
22+
__COMPONENTS__: true,
23+
},
2324

24-
'rules': {
25-
'complexity': 'off',
26-
'max-nested-callbacks': [ 'error', 5 ],
27-
'react/prop-types': 'off',
28-
'react/style-prop-object': 'off',
29-
'react/display-name': 'off',
30-
'react/require-default-props': 'off',
31-
'react/forbid-component-props': 'off'
32-
}
33-
};
25+
rules: {
26+
complexity: "off",
27+
"max-nested-callbacks": ["error", 5],
28+
"react/prop-types": "off",
29+
"react/style-prop-object": "off",
30+
"react/display-name": "off",
31+
"react/require-default-props": "off",
32+
"react/forbid-component-props": "off",
33+
},
34+
};

.github/renovate.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
{
2-
"extends": [
3-
"config:base",
4-
":preserveSemverRanges"
5-
],
2+
"extends": ["config:base", ":preserveSemverRanges"],
63
"prCreation": "immediate",
74
"prHourlyLimit": 0,
85
"rangeStrategy": "status-success",
96
"separateMajorMinor": false,
107
"semanticCommits": true,
118
"timezone": "America/Los_Angeles",
129
"rebaseStalePrs": true,
13-
"labels": [
14-
":christmas_tree: dependencies"
15-
],
10+
"labels": [":christmas_tree: dependencies"],
1611
"packageRules": [
1712
{
1813
"packagePatterns": "^babel",

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: ⎔ Setup node
1717
uses: actions/setup-node@v2
1818
with:
19-
node-version: '14'
19+
node-version: "14"
2020

2121
- name: 📥 Download deps
2222
uses: bahmutov/npm-install@v1

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
# sets up the .npmrc file to publish to npm
1616
uses: actions/setup-node@v2
1717
with:
18-
node-version: '14'
19-
registry-url: 'https://registry.npmjs.org'
18+
node-version: "14"
19+
registry-url: "https://registry.npmjs.org"
2020

2121
- name: 📥 Download deps
2222
uses: bahmutov/npm-install@v1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build
2+
dist
3+
coverage
4+
flow-typed
5+
CHANGELOG.md

.prettierrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ Feel free to raise a pull request to us. Our team would review your proposed mod
66
your changes into our code. Ideas and other comments are also welcome.
77

88
## Getting Started
9+
910
1. Create your own [fork](https://help.github.com/articles/fork-a-repo) of this [repository](../../fork).
11+
1012
```bash
1113
# Clone it
1214
$ git clone [email protected]:me/paypal-checkout.git
@@ -28,10 +30,12 @@ $ npm test
2830
```
2931

3032
## Making Changes
33+
3134
1. Make sure that your changes adhere to the current coding conventions used throughout the project, indentation, accurate comments, etc.
3235
2. Ensure existing tests pass (`$ npm test`) and include test cases which fail without your change and succeed with it.
3336

3437
## Submitting Changes
38+
3539
1. Ensure that no errors are generated by ESLint (run during `$ npm test`).
3640
2. Commit your changes in logical chunks, i.e. keep your changes small per single commit.
3741
3. Locally merge (or rebase) the upstream branch into your topic branch: `$ git pull upstream && git merge`.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
PayPal Common Components
2-
------------------------
1+
## PayPal Common Components
32

43
[![build status][build-badge]][build]
54
[![code coverage][coverage-badge]][coverage]
@@ -42,13 +41,14 @@ npm run dev
4241
```
4342

4443
## Test Tasks
44+
4545
```
4646
npm test
4747
```
4848

49-
| Flags | Description |
50-
| ------------- | ------------- |
51-
| --clear-cache | Clear Babel Loader and PhantomJS cache |
52-
| --debug | Debug mode. PhantomJS, Karma, and CheckoutJS |
53-
| --quick | Fastest testing. Minimal output, no coverage |
54-
| --browser | Choose Browser |
49+
| Flags | Description |
50+
| ------------- | -------------------------------------------- |
51+
| --clear-cache | Clear Babel Loader and PhantomJS cache |
52+
| --debug | Debug mode. PhantomJS, Karma, and CheckoutJS |
53+
| --quick | Fastest testing. Minimal output, no coverage |
54+
| --browser | Choose Browser |

__sdk__.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/* @flow */
22
/* eslint unicorn/filename-case: 0, import/unambiguous: 0, import/no-commonjs: 0 */
33

4-
const globals = require('./globals');
4+
const globals = require("./globals");
55

66
module.exports = {
7-
common: {
8-
automatic: true,
9-
entry: './src/interface',
10-
globals
11-
}
7+
common: {
8+
automatic: true,
9+
entry: "./src/interface",
10+
globals,
11+
},
1212
};

0 commit comments

Comments
 (0)