Skip to content

Commit

Permalink
Enforce formatting with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
blitze committed Oct 30, 2019
1 parent d566900 commit 970b588
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ docs/website/build/
docs/website/i18n/*
!docs/website/i18n/en.json
.DS_Store
.env
2 changes: 1 addition & 1 deletion develop/components/Feeds/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}

code {
background: #ECF3F7;
background: #ecf3f7;
padding: 1px 2px;
border-radius: 4px;
}
Expand Down
8 changes: 5 additions & 3 deletions develop/components/LayoutPreviewer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ function showSmallPreview(layout) {

export default function LayoutPreviewer() {
$largePreview = $('.layout-large-preview').find('img');
$smallPreview = $('.layout-small-preview').find('img').hover(() => {
$largePreview.parent().toggleClass('show');
});
$smallPreview = $('.layout-small-preview')
.find('img')
.hover(() => {
$largePreview.parent().toggleClass('show');
});

$('.style-layouts > dl')
.hover(e => {
Expand Down
12 changes: 6 additions & 6 deletions develop/components/LayoutPreviewer/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@

.layout-large-preview {
position: absolute;
left: 0;
left: 0;
top: 0;
opacity: 0;
visibility: hidden;
overflow: hidden;
border: 5px solid #666;
border-radius: 5px;
z-index: 1000;
max-width: 80%;
overflow: hidden;
border: 5px solid #666;
border-radius: 5px;
z-index: 1000;
max-width: 80%;
transition: opacity 500ms linear, visibility 0s linear 500ms;
}

Expand Down
8 changes: 6 additions & 2 deletions develop/components/SidebarWidth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ export default function SidebarWidth(getPositionName: Function): string {
* @param {number} width
* @param {string} unit
*/
function save($sidebar: jQuery, $input: jQuery, width: number, unit: string): void {
function save(
$sidebar: jQuery,
$input: jQuery,
width: number,
unit: string,
): void {
clearTimeout(timeOut);
timeOut = setTimeout(() => {
const data = {
Expand All @@ -39,7 +44,6 @@ export default function SidebarWidth(getPositionName: Function): string {
}

$('.column-sizer').each((i, element) => {

const $columnSizeInput = $(element).find('.column-size-input');
const $sidebar = $columnSizeInput.closest('.sidebar');

Expand Down
2 changes: 1 addition & 1 deletion develop/components/TreeGroup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function TreeGroup({ idKey, groupActions = {}, ...options }) {
if (
!$treeBuilder ||
!$tree.treeBuilder('isUnsaved') ||
window.confirm(lang.unsavedChanges) // eslint-disable-line no-alert
window.confirm(lang.unsavedChanges) // eslint-disable-line no-alert
) {
groupId = $(e.currentTarget)
.addClass('row3 current-group')
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"flow-bin": "^0.97.0",
"node-sass": "^4.9.4",
"postcss-loader": "^3.0.0",
"prettier": "^1.18.2",
"sass-loader": "^7.1.0"
},
"dependencies": {
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5943,6 +5943,11 @@ prelude-ls@~1.1.2:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=

prettier@^1.18.2:
version "1.18.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea"
integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==

pretty-error@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3"
Expand Down

0 comments on commit 970b588

Please sign in to comment.