Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

components: Restrict imports of @emotion/css #33051

Merged
merged 2 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ module.exports = {
message:
'`puppeteer-testing-library` is still experimental.',
},
{
name: '@emotion/css',
message:
'Please use `@emotion/react` and `@emotion/styled` in order to maintain iframe support',
},
],
},
],
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/base-field/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/base-field/styles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/card/card-body/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/card/card-divider/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/card/card-footer/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/card/card-header/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/card/card-media/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/card/card/component.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/card/card/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/card/styles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/divider/component.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css, cx } from '@emotion/css';
// eslint-disable-next-line no-restricted-imports
import { Separator } from 'reakit';
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/divider/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/elevation/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css, cx } from '@emotion/css';
import { isNil } from 'lodash';

Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/elevation/styles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

export const Elevation = css`
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/flex/flex-item/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css, cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/flex/flex/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css, cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/flex/styles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

export const Flex = css`
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/grid/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css, cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/scrollable/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
4 changes: 4 additions & 0 deletions packages/components/src/scrollable/styles.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

/**
* Internal dependencies
*/
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/spacer/hook.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css, cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/surface/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/surface/styles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/text/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css, cx } from '@emotion/css';
import { isPlainObject } from 'lodash';

Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/text/styles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/truncate/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css, cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/truncate/styles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

export const Truncate = css`
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/ui/context/use-context-system.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/ui/control-group/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/ui/control-group/styles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

export const first = css`
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/ui/control-label/hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/ui/control-label/styles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/ui/form-group/form-group-styles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

export const FormGroup = css`
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/ui/form-group/use-form-group.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/ui/item-group/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/ui/item-group/use-item-group.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/ui/item-group/use-item.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { cx } from '@emotion/css';

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/ui/popover/content.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* External dependencies
*/
// Disable reason: Temporarily disable for existing usages
// until we remove them as part of https://github.com/WordPress/gutenberg/issues/30503#deprecating-emotion-css
// eslint-disable-next-line no-restricted-imports
import { css, cx } from '@emotion/css';
// eslint-disable-next-line no-restricted-imports
import { Popover as ReakitPopover } from 'reakit';
Expand Down
Loading