Skip to content

Commit 3b9769e

Browse files
Merge pull request #828 from pattern-lab/test-prettier
Test/Fix prettier
2 parents bf527ed + a0f752c commit 3b9769e

Some content is hidden

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

43 files changed

+7392
-5420
lines changed

Diff for: .github/gitgraph/patternlab-flow.js

+66-65
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,65 @@
11
var graphConfig = new GitGraph.Template({
2-
colors: [ "#9993FF", "#47E8D4", "#6BDB52", "#F85BB5", "#FFA657", "#FFCCAA", "#F85BB5" ],
2+
colors: [
3+
'#9993FF',
4+
'#47E8D4',
5+
'#6BDB52',
6+
'#F85BB5',
7+
'#FFA657',
8+
'#FFCCAA',
9+
'#F85BB5',
10+
],
311
branch: {
412
lineWidth: 3,
513
spacingX: 60,
6-
mergeStyle: "straight",
14+
mergeStyle: 'straight',
715
showLabel: true, // display branch names on graph
8-
labelFont: "normal 10pt Arial",
16+
labelFont: 'normal 10pt Arial',
917
labelRotation: 0,
10-
color: "black"
18+
color: 'black',
1119
},
1220
commit: {
1321
spacingY: -30,
1422
dot: {
1523
size: 8,
16-
strokeColor: "#000000",
17-
strokeWidth: 4
24+
strokeColor: '#000000',
25+
strokeWidth: 4,
1826
},
1927
tag: {
20-
font: "normal 10pt Arial",
21-
color: "yellow"
28+
font: 'normal 10pt Arial',
29+
color: 'yellow',
2230
},
2331
message: {
24-
color: "black",
25-
font: "normal 12pt Arial",
32+
color: 'black',
33+
font: 'normal 12pt Arial',
2634
displayAuthor: false,
2735
displayBranch: false,
2836
displayHash: false,
29-
}
37+
},
3038
},
3139
arrow: {
3240
size: 8,
3341
offset: 3,
34-
35-
}
42+
},
3643
});
3744

3845
var config = {
3946
template: graphConfig,
40-
mode: "extended",
41-
orientation: "horizontal"
47+
mode: 'extended',
48+
orientation: 'horizontal',
4249
};
4350

4451
var bugFixCommit = {
4552
messageAuthorDisplay: false,
4653
messageBranchDisplay: false,
4754
messageHashDisplay: false,
48-
message: "Bug fix commit(s)"
55+
message: 'Bug fix commit(s)',
4956
};
5057

5158
var stabilizationCommit = {
5259
messageAuthorDisplay: false,
5360
messageBranchDisplay: false,
5461
messageHashDisplay: false,
55-
message: "Release stabilization commit(s)"
62+
message: 'Release stabilization commit(s)',
5663
};
5764

5865
// You can manually fix columns to control the display.
@@ -68,137 +75,131 @@ var masterCol = i++;
6875
var gitgraph = new GitGraph(config);
6976

7077
var master = gitgraph.branch({
71-
name: "master",
72-
column: masterCol
78+
name: 'master',
79+
column: masterCol,
7380
});
74-
master.commit("Initial commit");
81+
master.commit('Initial commit');
7582

7683
var develop = gitgraph.branch({
7784
parentBranch: master,
78-
name: "dev",
79-
column: developCol
85+
name: 'dev',
86+
column: developCol,
8087
});
8188

8289
var developV3 = gitgraph.branch({
8390
parentBranch: master,
84-
name: "dev-3.0",
85-
column: developV3Col
91+
name: 'dev-3.0',
92+
column: developV3Col,
8693
});
8794

88-
8995
var longRunning = gitgraph.branch({
9096
parentBranch: master,
91-
name: "long-running-improvement",
92-
column: longRunningCol
97+
name: 'long-running-improvement',
98+
column: longRunningCol,
9399
});
94100

95101
develop.commit({
96-
messageDisplay: false
102+
messageDisplay: false,
97103
});
98104
developV3.commit({
99-
messageDisplay: false
105+
messageDisplay: false,
100106
});
101107

102108
longRunning.commit({
103-
messageDisplay: false
109+
messageDisplay: false,
104110
});
105111
longRunning.merge(developV3);
106112

107113
var feature1 = gitgraph.branch({
108114
parentBranch: develop,
109-
name: "feature/1-description",
110-
column: featureCol
115+
name: 'feature/1-description',
116+
column: featureCol,
111117
});
112-
feature1.commit("#1 A feature to go into v2.8.0").commit({
113-
messageDisplay: false
118+
feature1.commit('#1 A feature to go into v2.8.0').commit({
119+
messageDisplay: false,
114120
});
115121
develop.merge(feature1);
116-
feature1.commit("Small Bugfix").commit({
117-
messageDisplay: false
122+
feature1.commit('Small Bugfix').commit({
123+
messageDisplay: false,
118124
});
119125
feature1.merge(develop);
120126

121-
122127
var feature3X = gitgraph.branch({
123128
parentBranch: developV3,
124-
name: "feature/42-feature-for-3-x-only",
125-
column: featureV3Col
129+
name: 'feature/42-feature-for-3-x-only',
130+
column: featureV3Col,
126131
});
127-
feature3X.commit("#42 A feature to go into v3.X").commit({
128-
messageDisplay: false
132+
feature3X.commit('#42 A feature to go into v3.X').commit({
133+
messageDisplay: false,
129134
});
130135
feature3X.merge(developV3);
131136

132-
133137
var feature2 = gitgraph.branch({
134138
parentBranch: develop,
135-
name: "feature/2-description",
136-
column: featureCol
139+
name: 'feature/2-description',
140+
column: featureCol,
137141
});
138-
feature2.commit("#2 Another feature to go into v2.8.0").commit({
139-
messageDisplay: false
142+
feature2.commit('#2 Another feature to go into v2.8.0').commit({
143+
messageDisplay: false,
140144
});
141145
feature2.merge(develop);
142146
feature2.merge(developV3);
143147

144-
develop.merge(master,{
148+
develop.merge(master, {
145149
dotStrokeWidth: 10,
146-
message: "Release v2.8.1 tagged",
147-
tag: "v2.8.1"
150+
message: 'Release v2.8.1 tagged',
151+
tag: 'v2.8.1',
148152
});
149153

150-
151154
develop.commit({
152-
messageDisplay: false
155+
messageDisplay: false,
153156
});
154157

155-
156158
longRunning.commit({
157-
messageDisplay: false
159+
messageDisplay: false,
158160
});
159161

160162
developV3.merge(longRunning);
161163

162164
longRunning.commit({
163-
messageDisplay: false
165+
messageDisplay: false,
164166
});
165167

166168
var feature3 = gitgraph.branch({
167169
parentBranch: develop,
168-
name: "bugfix/3-description",
169-
column: featureCol
170+
name: 'bugfix/3-description',
171+
column: featureCol,
170172
});
171173

172-
feature3.commit("A feature to go into v2.8.0").commit({
173-
messageDisplay: false
174+
feature3.commit('A feature to go into v2.8.0').commit({
175+
messageDisplay: false,
174176
});
175177
feature3.merge(develop);
176178

177179
longRunning.merge(developV3);
178180

179181
developV3.commit({
180182
messageDisplay: false,
181-
dotStrokeWidth: 10
183+
dotStrokeWidth: 10,
182184
});
183185

184-
185186
develop.commit({
186-
messageDisplay: false
187+
messageDisplay: false,
187188
});
188189

189190
develop.commit({
190-
messageDisplay: false
191+
messageDisplay: false,
191192
});
192193

193194
develop.merge(master, {
194195
dotStrokeWidth: 10,
195-
message: "Release v2.9.0 tagged",
196-
tag: "v2.9.0"
196+
message: 'Release v2.9.0 tagged',
197+
tag: 'v2.9.0',
197198
});
198199

199200
develop.commit({
200201
messageDisplay: false,
201-
dotStrokeWidth: 10
202+
dotStrokeWidth: 10,
202203
});
203204

204205
developV3.checkout();

Diff for: .prettierignore

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
**/*.json
22
**/README.md
3-
./packages/core/scripts/api.handlebars
4-
./packages/core/scripts/events.handlebars
3+
**/node_modules/
4+
**/bower_components/
5+
**/dist/
6+
**/public/
7+
**/*.min.js
8+
packages/core/scripts/api.handlebars
9+
packages/core/scripts/events.handlebars
10+
packages/core/test/files/annotations.js

Diff for: package.json

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
},
55
"scripts": {
66
"bootstrap": "lerna bootstrap --hoist tap --hoist eslin* --hoist husky --hoist prettier --hoist pretty-quick",
7+
"precommit": "pretty-quick --staged",
8+
"prettier": "prettier --config .prettierrc --write ./**/*.js",
79
"test": "tap packages/core/test/*_tests.js --reporter spec --coverage"
810
},
911
"nyc": {

Diff for: packages/core/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@
6060
"scripts": {
6161
"docs": "node ./scripts/docs.js",
6262
"lint": "eslint src/**/*.js",
63-
"precommit": "pretty-quick --staged",
6463
"pretest": "npm run lint",
65-
"prettier": "prettier --config .prettierrc --write ./src/**/*.js",
6664
"release": "standard-version",
6765
"test": "tap test/*_tests.js --reporter spec --coverage"
6866
},

Diff for: packages/core/test/files/annotations.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
var comments = {
2-
"comments" : [
2+
"comments": [
33
{
44
"el": "header[role=banner]",
5-
"title" : "Masthead",
5+
"title": "Masthead",
66
"comment": "The main header of the site doesn't take up too much screen real estate in order to keep the focus on the core content. It's using a linear CSS gradient instead of a background image to give greater design flexibility and reduce HTTP requests."
77
},
88
{
99
"el": ".logo",
10-
"title" : "Logo",
10+
"title": "Logo",
1111
"comment": "The logo image is an SVG file, which ensures that the logo displays crisply even on high resolution displays. A PNG fallback is provided for browsers that don't support SVG images.</p><p>Further reading: <a href=\"http://bradfrostweb.com/blog/mobile/hi-res-optimization/\">Optimizing Web Experiences for High Resolution Screens</a></p>"
1212
}
1313
]

Diff for: packages/core/test/help_tests.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
const tap = require('tap');
44
const help = require('../src/lib/help');
55

6-
tap.test('help - includes passed in version number', function(
7-
test
8-
) {
6+
tap.test('help - includes passed in version number', function(test) {
97
//arrange
108
const version = '⚡';
119

0 commit comments

Comments
 (0)