Skip to content

Commit

Permalink
fix(lint): run code through prettier
Browse files Browse the repository at this point in the history
closes #825
  • Loading branch information
bmuenzenmeyer committed Mar 16, 2018
1 parent b4f1337 commit ca52fde
Show file tree
Hide file tree
Showing 42 changed files with 7,395 additions and 5,424 deletions.
131 changes: 66 additions & 65 deletions .github/gitgraph/patternlab-flow.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,65 @@
var graphConfig = new GitGraph.Template({
colors: [ "#9993FF", "#47E8D4", "#6BDB52", "#F85BB5", "#FFA657", "#FFCCAA", "#F85BB5" ],
colors: [
'#9993FF',
'#47E8D4',
'#6BDB52',
'#F85BB5',
'#FFA657',
'#FFCCAA',
'#F85BB5',
],
branch: {
lineWidth: 3,
spacingX: 60,
mergeStyle: "straight",
mergeStyle: 'straight',
showLabel: true, // display branch names on graph
labelFont: "normal 10pt Arial",
labelFont: 'normal 10pt Arial',
labelRotation: 0,
color: "black"
color: 'black',
},
commit: {
spacingY: -30,
dot: {
size: 8,
strokeColor: "#000000",
strokeWidth: 4
strokeColor: '#000000',
strokeWidth: 4,
},
tag: {
font: "normal 10pt Arial",
color: "yellow"
font: 'normal 10pt Arial',
color: 'yellow',
},
message: {
color: "black",
font: "normal 12pt Arial",
color: 'black',
font: 'normal 12pt Arial',
displayAuthor: false,
displayBranch: false,
displayHash: false,
}
},
},
arrow: {
size: 8,
offset: 3,

}
},
});

var config = {
template: graphConfig,
mode: "extended",
orientation: "horizontal"
mode: 'extended',
orientation: 'horizontal',
};

var bugFixCommit = {
messageAuthorDisplay: false,
messageBranchDisplay: false,
messageHashDisplay: false,
message: "Bug fix commit(s)"
message: 'Bug fix commit(s)',
};

var stabilizationCommit = {
messageAuthorDisplay: false,
messageBranchDisplay: false,
messageHashDisplay: false,
message: "Release stabilization commit(s)"
message: 'Release stabilization commit(s)',
};

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

var master = gitgraph.branch({
name: "master",
column: masterCol
name: 'master',
column: masterCol,
});
master.commit("Initial commit");
master.commit('Initial commit');

var develop = gitgraph.branch({
parentBranch: master,
name: "dev",
column: developCol
name: 'dev',
column: developCol,
});

var developV3 = gitgraph.branch({
parentBranch: master,
name: "dev-3.0",
column: developV3Col
name: 'dev-3.0',
column: developV3Col,
});


var longRunning = gitgraph.branch({
parentBranch: master,
name: "long-running-improvement",
column: longRunningCol
name: 'long-running-improvement',
column: longRunningCol,
});

develop.commit({
messageDisplay: false
messageDisplay: false,
});
developV3.commit({
messageDisplay: false
messageDisplay: false,
});

longRunning.commit({
messageDisplay: false
messageDisplay: false,
});
longRunning.merge(developV3);

var feature1 = gitgraph.branch({
parentBranch: develop,
name: "feature/1-description",
column: featureCol
name: 'feature/1-description',
column: featureCol,
});
feature1.commit("#1 A feature to go into v2.8.0").commit({
messageDisplay: false
feature1.commit('#1 A feature to go into v2.8.0').commit({
messageDisplay: false,
});
develop.merge(feature1);
feature1.commit("Small Bugfix").commit({
messageDisplay: false
feature1.commit('Small Bugfix').commit({
messageDisplay: false,
});
feature1.merge(develop);


var feature3X = gitgraph.branch({
parentBranch: developV3,
name: "feature/42-feature-for-3-x-only",
column: featureV3Col
name: 'feature/42-feature-for-3-x-only',
column: featureV3Col,
});
feature3X.commit("#42 A feature to go into v3.X").commit({
messageDisplay: false
feature3X.commit('#42 A feature to go into v3.X').commit({
messageDisplay: false,
});
feature3X.merge(developV3);


var feature2 = gitgraph.branch({
parentBranch: develop,
name: "feature/2-description",
column: featureCol
name: 'feature/2-description',
column: featureCol,
});
feature2.commit("#2 Another feature to go into v2.8.0").commit({
messageDisplay: false
feature2.commit('#2 Another feature to go into v2.8.0').commit({
messageDisplay: false,
});
feature2.merge(develop);
feature2.merge(developV3);

develop.merge(master,{
develop.merge(master, {
dotStrokeWidth: 10,
message: "Release v2.8.1 tagged",
tag: "v2.8.1"
message: 'Release v2.8.1 tagged',
tag: 'v2.8.1',
});


develop.commit({
messageDisplay: false
messageDisplay: false,
});


longRunning.commit({
messageDisplay: false
messageDisplay: false,
});

developV3.merge(longRunning);

longRunning.commit({
messageDisplay: false
messageDisplay: false,
});

var feature3 = gitgraph.branch({
parentBranch: develop,
name: "bugfix/3-description",
column: featureCol
name: 'bugfix/3-description',
column: featureCol,
});

feature3.commit("A feature to go into v2.8.0").commit({
messageDisplay: false
feature3.commit('A feature to go into v2.8.0').commit({
messageDisplay: false,
});
feature3.merge(develop);

longRunning.merge(developV3);

developV3.commit({
messageDisplay: false,
dotStrokeWidth: 10
dotStrokeWidth: 10,
});


develop.commit({
messageDisplay: false
messageDisplay: false,
});

develop.commit({
messageDisplay: false
messageDisplay: false,
});

develop.merge(master, {
dotStrokeWidth: 10,
message: "Release v2.9.0 tagged",
tag: "v2.9.0"
message: 'Release v2.9.0 tagged',
tag: 'v2.9.0',
});

develop.commit({
messageDisplay: false,
dotStrokeWidth: 10
dotStrokeWidth: 10,
});

developV3.checkout();
Expand Down
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
**/*.json
**/README.md
**/node_modules/
**/bower_components/
**/dist/
**/public/
**/*.min.js
./packages/core/scripts/api.handlebars
./packages/core/scripts/events.handlebars
2 changes: 0 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@
"scripts": {
"docs": "node ./scripts/docs.js",
"lint": "eslint src/**/*.js",
"precommit": "pretty-quick --staged",
"pretest": "npm run lint",
"prettier": "prettier --config .prettierrc --write ./src/**/*.js",
"release": "standard-version",
"test": "tap test/*_tests.js --reporter spec --coverage"
},
Expand Down
20 changes: 11 additions & 9 deletions packages/core/test/files/annotations.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
var comments = {
"comments" : [
comments: [
{
"el": "header[role=banner]",
"title" : "Masthead",
"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."
el: 'header[role=banner]',
title: 'Masthead',
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.",
},
{
"el": ".logo",
"title" : "Logo",
"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>"
}
]
el: '.logo',
title: 'Logo',
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>',
},
],
};
4 changes: 1 addition & 3 deletions packages/core/test/help_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
const tap = require('tap');
const help = require('../src/lib/help');

tap.test('help - includes passed in version number', function(
test
) {
tap.test('help - includes passed in version number', function(test) {
//arrange
const version = '⚡';

Expand Down
Loading

0 comments on commit ca52fde

Please sign in to comment.