diff --git a/.yarn/offline-mirror/prettier-1.19.1.tgz b/.yarn/offline-mirror/prettier-1.19.1.tgz new file mode 100644 index 000000000000..9db46df7b01f Binary files /dev/null and b/.yarn/offline-mirror/prettier-1.19.1.tgz differ diff --git a/package.json b/package.json index 7feb35bd7a3f..4eb1b87a6eb2 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "jest-junit": "^6.4.0", "lerna": "^3.13.4", "lint-staged": "^8.1.5", - "prettier": "^1.17.0", + "prettier": "^1.19.1", "react": "^16.8.6", "react-dom": "^16.8.6", "rimraf": "^2.6.3", diff --git a/packages/bundler/src/bundlers/index.js b/packages/bundler/src/bundlers/index.js index 8c9ccfa97b32..64c9d8ee8a1d 100644 --- a/packages/bundler/src/bundlers/index.js +++ b/packages/bundler/src/bundlers/index.js @@ -10,6 +10,9 @@ const javascript = require('./javascript'); const scss = require('./scss'); -const bundlers = new Map([['.js', javascript], ['.scss', scss]]); +const bundlers = new Map([ + ['.js', javascript], + ['.scss', scss], +]); module.exports = bundlers; diff --git a/packages/bundler/src/commands/inline.js b/packages/bundler/src/commands/inline.js index 7071b04ac617..d0500cabad7c 100644 --- a/packages/bundler/src/commands/inline.js +++ b/packages/bundler/src/commands/inline.js @@ -52,19 +52,21 @@ async function inlineSassDependencies( ...Object.keys(dependencies), ...Object.keys(devDependencies), ]; - const inlinedDependencies = (await Promise.all( - allPossibleDependencies.map(async dependency => { - const modules = await findSassModule(dependency, cwd); - if (modules) { - const [scssFolder] = modules; - const dependencyOutputFolder = path.join(vendorFolder, dependency); - - await fs.copy(scssFolder, dependencyOutputFolder); - - return [dependency, dependencyOutputFolder]; - } - }) - )).filter(Boolean); + const inlinedDependencies = ( + await Promise.all( + allPossibleDependencies.map(async dependency => { + const modules = await findSassModule(dependency, cwd); + if (modules) { + const [scssFolder] = modules; + const dependencyOutputFolder = path.join(vendorFolder, dependency); + + await fs.copy(scssFolder, dependencyOutputFolder); + + return [dependency, dependencyOutputFolder]; + } + }) + ) + ).filter(Boolean); if (inlinedDependencies.length === 0) { return; diff --git a/packages/bundler/src/tools/sassdoc.js b/packages/bundler/src/tools/sassdoc.js index 5a71eea725fa..1c0a29145d88 100644 --- a/packages/bundler/src/tools/sassdoc.js +++ b/packages/bundler/src/tools/sassdoc.js @@ -1,11 +1,13 @@ --/** - * Copyright IBM Corp. 2018, 2018 - * - * This source code is licensed under the Apache-2.0 license found in the - * LICENSE file in the root directory of this source tree. - */ - -'use strict'; +-( + /** + * Copyright IBM Corp. 2018, 2018 + * + * This source code is licensed under the Apache-2.0 license found in the + * LICENSE file in the root directory of this source tree. + */ + + 'use strict' +); const prettier = require('prettier'); const sassdoc = require('sassdoc'); diff --git a/packages/cli/package.json b/packages/cli/package.json index d9d11d86c0a0..3b1d93bbd69d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -28,7 +28,7 @@ "clipboardy": "^2.1.0", "fs-extra": "^8.0.1", "inquirer": "^6.4.1", - "prettier": "^1.18.2", + "prettier": "^1.19.1", "progress-estimator": "^0.2.2", "remark": "^10.0.1", "yargs": "^13.2.4" diff --git a/packages/components/src/components/structured-list/structured-list.js b/packages/components/src/components/structured-list/structured-list.js index 9fafc3eb8701..957dd9b1c25e 100644 --- a/packages/components/src/components/structured-list/structured-list.js +++ b/packages/components/src/components/structured-list/structured-list.js @@ -84,9 +84,9 @@ class StructuredList extends mixin( _handleClick(evt) { const selectedRow = eventMatches(evt, this.options.selectorRow); - toArray(this.element.querySelectorAll(this.options.selectorRow)).forEach( - row => row.classList.remove(this.options.classActive) - ); + toArray( + this.element.querySelectorAll(this.options.selectorRow) + ).forEach(row => row.classList.remove(this.options.classActive)); if (selectedRow) { selectedRow.classList.add(this.options.classActive); } @@ -96,9 +96,9 @@ class StructuredList extends mixin( _handleKeydownChecked(evt) { evt.preventDefault(); // prevent spacebar from scrolling page const selectedRow = eventMatches(evt, this.options.selectorRow); - toArray(this.element.querySelectorAll(this.options.selectorRow)).forEach( - row => row.classList.remove(this.options.classActive) - ); + toArray( + this.element.querySelectorAll(this.options.selectorRow) + ).forEach(row => row.classList.remove(this.options.classActive)); if (selectedRow) { selectedRow.classList.add(this.options.classActive); const input = diff --git a/packages/components/src/components/tooltip/tooltip.js b/packages/components/src/components/tooltip/tooltip.js index e8591531058b..31698c78b538 100644 --- a/packages/components/src/components/tooltip/tooltip.js +++ b/packages/components/src/components/tooltip/tooltip.js @@ -223,7 +223,8 @@ class Tooltip extends mixin( // Note: SVGElement in IE11 does not have `.contains()` const wentToSelf = (relatedTarget && - (this.element.contains && this.element.contains(relatedTarget))) || + this.element.contains && + this.element.contains(relatedTarget)) || (this.tooltip && this.tooltip.element.contains(relatedTarget)); shouldPreventClose = hadContextMenu || wentToSelf; } diff --git a/packages/components/src/globals/js/components.js b/packages/components/src/globals/js/components.js index 6f6fa7cfac77..e3d19f90f768 100644 --- a/packages/components/src/globals/js/components.js +++ b/packages/components/src/globals/js/components.js @@ -6,69 +6,35 @@ */ export { default as Checkbox } from '../../components/checkbox/checkbox'; -export { - default as FileUploader, -} from '../../components/file-uploader/file-uploader'; -export { - default as ContentSwitcher, -} from '../../components/content-switcher/content-switcher'; +export { default as FileUploader } from '../../components/file-uploader/file-uploader'; +export { default as ContentSwitcher } from '../../components/content-switcher/content-switcher'; export { default as Tab } from '../../components/tabs/tabs'; -export { - default as OverflowMenu, -} from '../../components/overflow-menu/overflow-menu'; +export { default as OverflowMenu } from '../../components/overflow-menu/overflow-menu'; export { default as Modal } from '../../components/modal/modal'; export { default as Loading } from '../../components/loading/loading'; -export { - default as InlineLoading, -} from '../../components/inline-loading/inline-loading'; +export { default as InlineLoading } from '../../components/inline-loading/inline-loading'; export { default as Dropdown } from '../../components/dropdown/dropdown'; -export { - default as NumberInput, -} from '../../components/number-input/number-input'; -export { - default as DataTableV2, -} from '../../components/data-table-v2/data-table-v2'; +export { default as NumberInput } from '../../components/number-input/number-input'; +export { default as DataTableV2 } from '../../components/data-table-v2/data-table-v2'; export { default as DataTable } from '../../components/data-table/data-table'; -export { - default as DatePicker, -} from '../../components/date-picker/date-picker'; +export { default as DatePicker } from '../../components/date-picker/date-picker'; export { default as Pagination } from '../../components/pagination/pagination'; export { default as Search } from '../../components/search/search'; export { default as Accordion } from '../../components/accordion/accordion'; -export { - default as CopyButton, -} from '../../components/copy-button/copy-button'; -export { - default as Notification, -} from '../../components/notification/notification'; +export { default as CopyButton } from '../../components/copy-button/copy-button'; +export { default as Notification } from '../../components/notification/notification'; export { default as Toolbar } from '../../components/toolbar/toolbar'; export { default as Tooltip } from '../../components/tooltip/tooltip'; -export { - default as ProgressIndicator, -} from '../../components/progress-indicator/progress-indicator'; -export { - default as FloatingMenu, -} from '../../components/floating-menu/floating-menu'; -export { - default as StructuredList, -} from '../../components/structured-list/structured-list'; +export { default as ProgressIndicator } from '../../components/progress-indicator/progress-indicator'; +export { default as FloatingMenu } from '../../components/floating-menu/floating-menu'; +export { default as StructuredList } from '../../components/structured-list/structured-list'; export { default as Slider } from '../../components/slider/slider'; export { default as Tile } from '../../components/tile/tile'; -export { - default as CodeSnippet, -} from '../../components/code-snippet/code-snippet'; +export { default as CodeSnippet } from '../../components/code-snippet/code-snippet'; export { default as TextInput } from '../../components/text-input/text-input'; export { default as SideNav } from '../../components/ui-shell/side-nav'; -export { - default as HeaderSubmenu, -} from '../../components/ui-shell/header-submenu'; +export { default as HeaderSubmenu } from '../../components/ui-shell/header-submenu'; export { default as HeaderNav } from '../../components/ui-shell/header-nav'; -export { - default as NavigationMenu, -} from '../../components/ui-shell/navigation-menu'; -export { - default as ProductSwitcher, -} from '../../components/ui-shell/product-switcher'; -export { - default as PaginationNav, -} from '../../components/pagination-nav/pagination-nav'; +export { default as NavigationMenu } from '../../components/ui-shell/navigation-menu'; +export { default as ProductSwitcher } from '../../components/ui-shell/product-switcher'; +export { default as PaginationNav } from '../../components/pagination-nav/pagination-nav'; diff --git a/packages/components/tests/styles-test.js b/packages/components/tests/styles-test.js index 9f212072dc8f..7660f3eb8de8 100644 --- a/packages/components/tests/styles-test.js +++ b/packages/components/tests/styles-test.js @@ -27,10 +27,12 @@ describe('styles', () => { const filepath = path.join(cwd, relativeFilePath); try { expect( - (await render({ - file: filepath, - ...defaultOptions, - })).css + ( + await render({ + file: filepath, + ...defaultOptions, + }) + ).css ).toBeDefined(); } catch (error) { const { column, line, message } = error; diff --git a/packages/icon-build-helpers/package.json b/packages/icon-build-helpers/package.json index 1a3fcbfb773f..ef1095e6cbc3 100644 --- a/packages/icon-build-helpers/package.json +++ b/packages/icon-build-helpers/package.json @@ -30,7 +30,7 @@ "js-yaml": "^3.12.1", "klaw-sync": "^6.0.0", "memfs": "^2.14.0", - "prettier": "^1.17.0", + "prettier": "^1.19.1", "prop-types": "^15.6.2", "react": "^16.6.0", "react-dom": "^16.6.0", diff --git a/packages/icons-vue/package.json b/packages/icons-vue/package.json index 829ab0137b6c..f5c42eab4607 100644 --- a/packages/icons-vue/package.json +++ b/packages/icons-vue/package.json @@ -30,7 +30,7 @@ "@carbon/cli-reporter": "10.3.0", "@carbon/icons": "^10.8.0", "fs-extra": "^7.0.1", - "prettier": "^1.17.0", + "prettier": "^1.19.1", "rimraf": "^2.6.2", "rollup": "^1.15.1", "vue": "^2.6.8" diff --git a/packages/react/scripts/rollup.config.js b/packages/react/scripts/rollup.config.js index 49c1452d712b..01424d632209 100644 --- a/packages/react/scripts/rollup.config.js +++ b/packages/react/scripts/rollup.config.js @@ -12,9 +12,9 @@ const { terser } = require('rollup-plugin-terser'); const sizes = require('rollup-plugin-sizes'); const packageJson = require('../package.json'); -const peerDependencies = Object.keys(packageJson.peerDependencies || {}).concat( - ['classnames', 'prop-types'] -); +const peerDependencies = Object.keys( + packageJson.peerDependencies || {} +).concat(['classnames', 'prop-types']); const env = process.env.NODE_ENV || 'development'; const prodSettings = diff --git a/packages/react/src/components/FileUploader/FileUploaderItem.js b/packages/react/src/components/FileUploader/FileUploaderItem.js index 54eb62810cce..099ca41a5717 100644 --- a/packages/react/src/components/FileUploader/FileUploaderItem.js +++ b/packages/react/src/components/FileUploader/FileUploaderItem.js @@ -51,19 +51,18 @@ export default function FileUploaderItem({ }} /> - {invalid && - (errorSubject && ( -
- {errorBody} -
- )} + {invalid && errorSubject && ( ++ {errorBody} +
+ )} +