Skip to content

Commit 5a6074a

Browse files
authored
chore(*): add prettier check to CI (#598)
* chore(*): change prettier hook * Run prettier * Reorder * Fix all the files
1 parent b8d3f47 commit 5a6074a

File tree

18 files changed

+109
-75
lines changed

18 files changed

+109
-75
lines changed

.eslintrc

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
{
22
"root": true,
33
"parser": "babel-eslint",
4-
"extends": [
5-
"eslint:recommended",
6-
"plugin:react/recommended",
7-
"prettier"
8-
],
4+
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier"],
95
"globals": {
106
"chrome": true
117
},
@@ -17,17 +13,13 @@
1713
},
1814
"rules": {
1915
"eol-last": ["warn"],
20-
"max-len": ["warn", { "code": 120 , "ignoreComments": true }],
16+
"max-len": ["warn", { "code": 120, "ignoreComments": true }],
2117
"quotes": ["warn", "single", "avoid-escape"],
2218
"jsx-quotes": ["warn", "prefer-double"],
2319
"react/prop-types": 0,
2420
"prettier/prettier": "error"
2521
},
26-
"plugins": [
27-
"prettier",
28-
"react",
29-
"babel"
30-
],
22+
"plugins": ["prettier", "react", "babel"],
3123
"settings": {
3224
"react": {
3325
"version": "detect"

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
sudo: false
22
language: node_js
33
node_js:
4-
- "stable"
4+
- 'stable'
55
cache:
66
yarn: true
77
directories:
8-
- "node_modules"
8+
- 'node_modules'
99
script:
1010
- yarn build:all
1111
- yarn lint:all
12+
- yarn prettier:check
1213
- yarn test:all

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\" --cache",
3636
"lint:fix": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix --cache",
3737
"lint:all": "eslint \"**/*.{js,jsx,ts,tsx}\"",
38-
"prettify": "prettier \"**/*.{js,jsx,ts,tsx,json,css,html,md}\" --write",
38+
"prettify": "prettier --write .",
39+
"prettier:check": "prettier --check .",
3940
"test": "jest --onlyChanged",
4041
"test:all": "jest"
4142
},
@@ -56,11 +57,8 @@
5657
}
5758
},
5859
"lint-staged": {
59-
"*.{js,jsx,ts,tsx}": [
60-
"prettier --write",
61-
"yarn lint:fix"
62-
],
63-
"*.{json,css,html,md}": [
60+
"**/*": [
61+
"eslint --fix",
6462
"prettier --write"
6563
]
6664
}

packages/d3-state-visualizer/.babelrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"presets": ["@babel/preset-env"],
3-
"plugins": ["@babel/plugin-proposal-class-properties", "@babel/plugin-proposal-export-default-from"]
3+
"plugins": [
4+
"@babel/plugin-proposal-class-properties",
5+
"@babel/plugin-proposal-export-default-from"
6+
]
47
}

packages/devui/.babelrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"presets": ["@babel/preset-env", "@babel/preset-react"],
3-
"plugins": ["@babel/plugin-proposal-class-properties", "@babel/plugin-proposal-export-default-from"]
3+
"plugins": [
4+
"@babel/plugin-proposal-class-properties",
5+
"@babel/plugin-proposal-export-default-from"
6+
]
47
}

packages/react-dock/.babelrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
22
"presets": ["@babel/preset-env", "@babel/preset-react"],
3-
"plugins": ["@babel/plugin-proposal-class-properties", "@babel/plugin-proposal-export-default-from", "react-hot-loader/babel"]
3+
"plugins": [
4+
"@babel/plugin-proposal-class-properties",
5+
"@babel/plugin-proposal-export-default-from",
6+
"react-hot-loader/babel"
7+
]
48
}

packages/react-dock/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ render() {
2727

2828
#### Dock Props
2929

30-
| Prop Name | Description |
31-
|-----------|-------------|
32-
| position | Side to dock (`left`, `right`, `top` or `bottom`). Default is `left`. |
33-
| fluid | If `true`, resize dock proportionally on window resize. |
34-
| size | Size of dock panel (width or height, depending on `position`). If this prop is set, `Dock` is considered as a controlled component, so you need to use `onSizeChange` to track dock resizing. Value is a fraction of window width/height, if `fluid` is true, or pixels otherwise |
35-
| defaultSize | Default size of dock panel (used for uncontrolled `Dock` component) |
36-
| isVisible | If `true`, dock is visible |
37-
| dimMode | If `none` - content is not dimmed, if `transparent` - pointer events are disabled (so you can click through it), if `opaque` - click on dim area closes the dock. Default is `opaque` |
38-
| duration | Animation duration. Should be synced with transition animation in style properties |
39-
| dimStyle | Style for dim area |
40-
| dockStyle | Style for dock |
41-
| zIndex | Z-index for wrapper |
42-
| onVisibleChange | Fires when `Dock` wants to change `isVisible` (when opaque dim is clicked, in particular) |
43-
| onSizeChange | Fires when `Dock` wants to change `size` |
44-
| children | Dock content - react elements or function that returns an element. Function receives an object with these state values: `{ position, isResizing, size, isVisible }` |
30+
| Prop Name | Description |
31+
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
32+
| position | Side to dock (`left`, `right`, `top` or `bottom`). Default is `left`. |
33+
| fluid | If `true`, resize dock proportionally on window resize. |
34+
| size | Size of dock panel (width or height, depending on `position`). If this prop is set, `Dock` is considered as a controlled component, so you need to use `onSizeChange` to track dock resizing. Value is a fraction of window width/height, if `fluid` is true, or pixels otherwise |
35+
| defaultSize | Default size of dock panel (used for uncontrolled `Dock` component) |
36+
| isVisible | If `true`, dock is visible |
37+
| dimMode | If `none` - content is not dimmed, if `transparent` - pointer events are disabled (so you can click through it), if `opaque` - click on dim area closes the dock. Default is `opaque` |
38+
| duration | Animation duration. Should be synced with transition animation in style properties |
39+
| dimStyle | Style for dim area |
40+
| dockStyle | Style for dock |
41+
| zIndex | Z-index for wrapper |
42+
| onVisibleChange | Fires when `Dock` wants to change `isVisible` (when opaque dim is clicked, in particular) |
43+
| onSizeChange | Fires when `Dock` wants to change `size` |
44+
| children | Dock content - react elements or function that returns an element. Function receives an object with these state values: `{ position, isResizing, size, isVisible }` |

packages/react-dock/demo/index.html

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,24 @@
22
<html>
33
<head>
44
<title>React Dock</title>
5-
<link href="http://fonts.googleapis.com/css?family=Noto+Sans|Roboto:400,300,500" rel="stylesheet" type="text/css">
6-
<link href="//maxcdn.bootstrapcdn.com/bootswatch/3.3.5/paper/bootstrap.min.css" rel="stylesheet">
5+
<link
6+
href="http://fonts.googleapis.com/css?family=Noto+Sans|Roboto:400,300,500"
7+
rel="stylesheet"
8+
type="text/css"
9+
/>
10+
<link
11+
href="//maxcdn.bootstrapcdn.com/bootswatch/3.3.5/paper/bootstrap.min.css"
12+
rel="stylesheet"
13+
/>
714
</head>
815
<body>
9-
<a href="https://github.com/alexkuz/react-dock"><img style="z-index: 999999999; position: fixed; top: 0; left: 0; border: 0;" src="https://camo.githubusercontent.com/121cd7cbdc3e4855075ea8b558508b91ac463ac2/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_green_007200.png"></a>
16+
<a href="https://github.com/alexkuz/react-dock"
17+
><img
18+
style="z-index: 999999999; position: fixed; top: 0; left: 0; border: 0;"
19+
src="https://camo.githubusercontent.com/121cd7cbdc3e4855075ea8b558508b91ac463ac2/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f677265656e5f3030373230302e706e67"
20+
alt="Fork me on GitHub"
21+
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_green_007200.png"
22+
/></a>
1023
<div id="root"></div>
1124
<script src="static/bundle.js"></script>
1225
</body>
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"presets": ["@babel/preset-env", "@babel/preset-react"],
3-
"plugins": ["@babel/plugin-proposal-class-properties", "@babel/plugin-proposal-export-default-from"]
3+
"plugins": [
4+
"@babel/plugin-proposal-class-properties",
5+
"@babel/plugin-proposal-export-default-from"
6+
]
47
}

packages/redux-devtools-cli/src/api/schema_def.graphql

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
# A list of options for the type of the report
22
enum ReportType {
3-
STATE
4-
ACTION
5-
STATES
6-
ACTIONS
3+
STATE
4+
ACTION
5+
STATES
6+
ACTIONS
77
}
88

99
type Report {
1010
# Report ID
1111
id: ID!
1212
# Type of the report, can be: STATE, ACTION, STATES, ACTIONS
13-
type: ReportType,
13+
type: ReportType
1414
# Briefly what happened
15-
title: String,
15+
title: String
1616
# Details supplied by the user
17-
description: String,
17+
description: String
1818
# The last dispatched action before the report was sent
19-
action: String,
19+
action: String
2020
# Stringified actions or the state or both, which should be loaded the application to reproduce the exact behavior
21-
payload: String,
21+
payload: String
2222
# Stringified preloaded state object. Could be the initial state of the app or committed state (after dispatching COMMIT action or reaching maxAge)
23-
preloadedState: String,
23+
preloadedState: String
2424
# Screenshot url or blob as a string
25-
screenshot: String,
25+
screenshot: String
2626
# User Agent String
27-
userAgent: String,
27+
userAgent: String
2828
# Application version to group the reports and versioning
29-
version: String,
29+
version: String
3030
# Used to identify the user who sent the report
31-
userId: String,
31+
userId: String
3232
# More detailed data about the user, usually it's a stringified object
33-
user: String,
33+
user: String
3434
# Everything else you want to send
35-
meta: String,
35+
meta: String
3636
# Error message which invoked sending the report
37-
exception: String,
37+
exception: String
3838
# Id to identify the store in case there are multiple stores
39-
instanceId: String,
39+
instanceId: String
4040
# Timestamp when the report was added
4141
added: String
4242
# Id to identify the application (from apps table)

0 commit comments

Comments
 (0)