@atlaskit/ads-mcp 1.7.0 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/tools/get-all-components/components.codegen.js +2 -2
- package/dist/cjs/tools/get-atlaskit-components/atlaskit-components.codegen.js +2 -2
- package/dist/cjs/tools/get-lint-rules/lint-rules-structured-content.codegen.js +14 -2
- package/dist/cjs/tools/migration-guides/migration-registry.js +2 -1
- package/dist/cjs/tools/migration-guides/migrations/avatar-xsmall-to-xxsmall.js +22 -0
- package/dist/es2019/tools/get-all-components/components.codegen.js +2 -2
- package/dist/es2019/tools/get-atlaskit-components/atlaskit-components.codegen.js +2 -2
- package/dist/es2019/tools/get-lint-rules/lint-rules-structured-content.codegen.js +14 -2
- package/dist/es2019/tools/migration-guides/migration-registry.js +2 -0
- package/dist/es2019/tools/migration-guides/migrations/avatar-xsmall-to-xxsmall.js +24 -0
- package/dist/esm/tools/get-all-components/components.codegen.js +2 -2
- package/dist/esm/tools/get-atlaskit-components/atlaskit-components.codegen.js +2 -2
- package/dist/esm/tools/get-lint-rules/lint-rules-structured-content.codegen.js +14 -2
- package/dist/esm/tools/migration-guides/migration-registry.js +2 -1
- package/dist/esm/tools/migration-guides/migrations/avatar-xsmall-to-xxsmall.js +16 -0
- package/dist/types/helpers/zod-to-json-schema.d.ts +1 -1
- package/dist/types/tools/get-all-components/components.codegen.d.ts +1 -1
- package/dist/types/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +1 -1
- package/dist/types/tools/get-lint-rules/lint-rules-structured-content.codegen.d.ts +1 -1
- package/dist/types/tools/migration-guides/migrations/avatar-xsmall-to-xxsmall.d.ts +2 -0
- package/package.json +4 -5
|
@@ -9,7 +9,7 @@ exports.lintRulesMcpStructuredContent = void 0;
|
|
|
9
9
|
*
|
|
10
10
|
* Structured content for MCP (JSON) for ESLint rule docs from constellation.
|
|
11
11
|
*
|
|
12
|
-
* @codegen <<SignedSource::
|
|
12
|
+
* @codegen <<SignedSource::dd38be154d0998c5c9a0f636c03ce76e>>
|
|
13
13
|
* @codegenCommand yarn build structured-docs
|
|
14
14
|
*/
|
|
15
15
|
/* eslint-disable no-template-curly-in-string */
|
|
@@ -55,7 +55,7 @@ var lintRulesMcpStructuredContent = exports.lintRulesMcpStructuredContent = [{
|
|
|
55
55
|
ruleName: 'icon-label',
|
|
56
56
|
description: 'Icon labels are used to describe what the icon is so the visually impaired can be described what the'
|
|
57
57
|
}, {
|
|
58
|
-
content: '{"ruleName":"index","description":"---","content":"---\\norder: 0\\n---\\n\\nThis plugin contains rules that should be used when working with the\\n[Atlassian Design System](https://atlassian.design).\\n\\n## Rules\\n\\n<!-- START_RULE_TABLE_CODEGEN -->\\n<!-- @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen -->\\n\\n| Rule | Description | Recommended | Fixable | Suggestions |\\n| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------- | ----------- |\\n| <a href=\\"/components/eslint-plugin-design-system/consistent-css-prop-usage/usage\\">consistent-css-prop-usage</a> | Ensures consistency with `css` and `xcss` prop usages | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/enforce-inline-styles-in-select/usage\\">enforce-inline-styles-in-select</a> | Disallow unsupported CSS selectors in styles prop for @atlaskit/select and require inline styles only | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/ensure-avatar-tag-avatar-props/usage\\">ensure-avatar-tag-avatar-props</a> | Ensures AvatarTag avatar prop does not include controlled props (size, borderColor, appearance) which are managed internally. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/ensure-design-token-usage/usage\\">ensure-design-token-usage</a> | Enforces usage of design tokens rather than hard-coded values. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/ensure-design-token-usage-preview/usage\\">ensure-design-token-usage/preview</a> | Enforces usage of pre-release design tokens rather than hard-coded values. | | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/ensure-icon-color/usage\\">ensure-icon-color</a> | Enforces that upcoming icon components have a color prop set, to enable a migration of the default value. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/ensure-proper-xcss-usage/usage\\">ensure-proper-xcss-usage</a> | Enforces proper xcss usage: migrate from xcss() to cssMap() and use cssMap objects with specific keys. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/expand-motion-shorthand/usage\\">expand-motion-shorthand</a> | Expands `transition` and `animation` CSS shorthand properties into their individual sub-properties, so individual values can be replaced with motion tokens. | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/icon-label/usage\\">icon-label</a> | Enforces accessible usage of icon labels when composed with Atlassian Design System components. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/lozenge-badge-tag-labelling-system-migration/usage\\">lozenge-badge-tag-labelling-system-migration</a> | Helps migrate Lozenge isBold prop, Badge appearance values, and SimpleTag/RemovableTag components as part of the Labelling System Phase 1 migration. | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-banned-imports/usage\\">no-banned-imports</a> | Disallow importing banned modules. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-css-tagged-template-expression/usage\\">no-css-tagged-template-expression</a> | Disallows any `css` tagged template expressions that originate from Emotion, Styled Components or Compiled | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-dark-theme-vr-tests/usage\\">no-dark-theme-vr-tests</a> | Disallow using dark colorScheme in VR tests. | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-deprecated-apis/usage\\">no-deprecated-apis</a> | Disallow using deprecated APIs. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-deprecated-design-token-usage/usage\\">no-deprecated-design-token-usage</a> | Disallow using deprecated design tokens. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-deprecated-imports/usage\\">no-deprecated-imports</a> | Disallow importing deprecated modules. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-direct-use-of-web-platform-drag-and-drop/usage\\">no-direct-use-of-web-platform-drag-and-drop</a> | Disallow using direct use of native drag and drop (please use Pragmatic drag and drop) | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-emotion-primitives/usage\\">no-emotion-primitives</a> | Ensures usage of Compiled Primitives import instead of Emotion entrypoint. | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-empty-styled-expression/usage\\">no-empty-styled-expression</a> | Forbids any styled expression to be used when passing empty arguments to styled.div() (or other JSX elements). | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-exported-css/usage\\">no-exported-css</a> | Forbid exporting `css` function calls. Exporting `css` function calls can result in unexpected behaviour at runtime, and is not statically analysable. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-exported-keyframes/usage\\">no-exported-keyframes</a> | Forbid exporting `keyframes` function calls. Exporting `css` function calls can result in unexpected behaviour at runtime, and is not statically analysable. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-anchor/usage\\">no-html-anchor</a> | Discourage direct usage of HTML anchor elements in favor of Atlassian Design System link components. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-button/usage\\">no-html-button</a> | Discourage direct usage of HTML button elements in favor of Atlassian Design System button components. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-checkbox/usage\\">no-html-checkbox</a> | Discourage direct usage of HTML checkbox elements in favor of the Atlassian Design System checkbox component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-code/usage\\">no-html-code</a> | Discourage direct usage of HTML code elements in favor of the Atlassian Design System code component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-heading/usage\\">no-html-heading</a> | Discourage direct usage of HTML heading elements in favor of Atlassian Design System heading components. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-image/usage\\">no-html-image</a> | Discourage direct usage of HTML image elements in favor of the Atlassian Design System image component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-radio/usage\\">no-html-radio</a> | Discourage direct usage of HTML radio elements in favor of the Atlassian Design System radio component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-range/usage\\">no-html-range</a> | Discourage direct usage of HTML range elements in favor of the Atlassian Design System range component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-select/usage\\">no-html-select</a> | Discourage direct usage of HTML select elements in favor of the Atlassian Design System select component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-text-input/usage\\">no-html-text-input</a> | Discourage direct usage of HTML text input elements in favor of the Atlassian Design System textfield component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-textarea/usage\\">no-html-textarea</a> | Discourage direct usage of HTML textarea elements in favor of the Atlassian Design System textarea component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-icon-spacing-prop/usage\\">no-icon-spacing-prop</a> | Disallows usage of the deprecated spacing prop on new icons. Use Flex with cssMap for spacing instead. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-invalid-css-map/usage\\">no-invalid-css-map</a> | Checks the validity of a CSS map created through cssMap. This is intended to be used alongside TypeScript\'s type-checking. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-keyframes-tagged-template-expression/usage\\">no-keyframes-tagged-template-expression</a> | Disallows any `keyframe` tagged template expressions that originate from Emotion, Styled Components or Compiled | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-margin/usage\\">no-margin</a> | Disallow using the margin CSS property. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-modal-label/usage\\">no-modal-label</a> | Disallows usage of the `label` prop on Atlassian Design System modal dialog. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-nested-styles/usage\\">no-nested-styles</a> | Disallows use of nested styles in `css` functions. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-physical-properties/usage\\">no-physical-properties</a> | Disallow physical properties and values in `css` and `cssMap` function calls. | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-placeholder/usage\\">no-placeholder</a> | Placeholders should not be used. If information should be given to the user about the proper type or formatting of a value, this should be included using a helper message that is associated to the input instead. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-readonly-or-disabled-inputs/usage\\">no-readonly-or-disabled-inputs</a> | Inputs should almost always be interactive. Disabled and read-only inputs can usually be replaced by a more user-friendly design pattern. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-separator-with-list-elements/usage\\">no-separator-with-list-elements</a> | Warn when the `separator` prop is used with `as=\\"li\\"`, `as=\\"ol\\"`, or `as=\\"dl\\"` in the Inline component. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-styled-tagged-template-expression/usage\\">no-styled-tagged-template-expression</a> | Disallows any `styled` tagged template expressions that originate from Emotion, Styled Components or Compiled | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-to-match-snapshot/usage\\">no-to-match-snapshot</a> | Disallow using toMatchSnapshot() in favor of toMatchInlineSnapshot(). See https://hello.atlassian.net/wiki/spaces/DST/pages/6105892000/DSTRFC-038+-+Removal+of+.toMatchSnapshot for rationale. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-unsafe-design-token-usage/usage\\">no-unsafe-design-token-usage</a> | Enforces design token usage is statically and locally analyzable. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-unsafe-inline-snapshot/usage\\">no-unsafe-inline-snapshot</a> | Enforce guardrails on toMatchInlineSnapshot usage: snapshots must not exceed 100 lines and must not contain internal implementation details like className or style attributes. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-unsafe-style-overrides/usage\\">no-unsafe-style-overrides</a> | Discourage usage of unsafe style overrides used against the Atlassian Design System. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-unsupported-drag-and-drop-libraries/usage\\">no-unsupported-drag-and-drop-libraries</a> | Disallow importing unsupported drag and drop modules. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-unused-css-map/usage\\">no-unused-css-map</a> | Detects unused styles in cssMap objects to help keep code clean. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/prefer-primitives/usage\\">prefer-primitives</a> | Increase awareness of primitive components via code hints. Strictly used for education purposes and discoverability. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-button-group-label/usage\\">use-button-group-label</a> | Ensures button groups are described to assistive technology by a direct label or by another element. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-character-counter-field/usage\\">use-character-counter-field</a> | Suggests using CharacterCounterField or CharacterCounter when Textfield or Textarea components have maxLength or minLength props. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-correct-field/usage\\">use-correct-field</a> | Ensure makers use appropriate field component for their respective form elements. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-cx-function-in-xcss/usage\\">use-cx-function-in-xcss</a> | Enforces cx function use to combine styles in xcss. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-datetime-picker-calendar-button/usage\\">use-datetime-picker-calendar-button</a> | Encourages makers to use calendar button in Atlassian Design System\'s date picker and datetime picker components. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-drawer-label/usage\\">use-drawer-label</a> | Encourages to provide accessible name for Atlassian Design System Drawer component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-field-message-wrapper/usage\\">use-field-message-wrapper</a> | Encourage use of message wrapper component when using form message components. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-heading/usage\\">use-heading</a> | Encourage the usage of heading components. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-heading-level-in-section-message/usage\\">use-heading-level-in-section-message</a> | The `SectionMessage` component in `@atlaskit/section-message` needs to be the correct level within the document flow. This is not something that can be automated and requires contextual knowledge of what is present in the experience. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-heading-level-in-spotlight-card/usage\\">use-heading-level-in-spotlight-card</a> | Inform developers of eventual requirement of `headingLevel` prop in `SpotlightCard` component. The heading level should be the appropriate level according to the surrounding context. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-href-in-link-item/usage\\">use-href-in-link-item</a> | Inform developers of eventual requirement of `href` prop in `LinkItem` component. Elements with a `link` role require an `href` attribute for users to properly navigate, particularly those using assistive technologies. If no valid `href` is required for your use case, consider using a `ButtonItem` instead. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-latest-xcss-syntax/usage\\">use-latest-xcss-syntax</a> | Enforces usage of space design tokens rather than hard-coded values in xcss. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-latest-xcss-syntax-typography/usage\\">use-latest-xcss-syntax-typography</a> | Prohibits use of unsafe styling properties in xcss. Please use Text/Heading primitives instead. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-menu-section-title/usage\\">use-menu-section-title</a> | Encourages makers to provide accessible title for Atlassian Design System Menu Section component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-modal-dialog-close-button/usage\\">use-modal-dialog-close-button</a> | Encourages makers to use close button in Atlassian Design System\'s modal dialog component. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-onboarding-spotlight-label/usage\\">use-onboarding-spotlight-label</a> | Ensures onboarding spotlight dialogs are described to assistive technology by a direct label or by another element. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-popup-label/usage\\">use-popup-label</a> | Encourages to provide accessible name for Atlassian Design System Popup component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-primitives-text/usage\\">use-primitives-text</a> | Encourage the usage of text components. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-should-render-to-parent/usage\\">use-should-render-to-parent</a> | Encourages makers to use the `shouldRenderToParent` where possible in Atlassian Design System `Popup` and `DropdownMenu` components. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-simple-field/usage\\">use-simple-field</a> | Encourage use of simple field for better developer experience and accessibility. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-simple-form/usage\\">use-simple-form</a> | Encourage use of simple form for better developer experience and accessibility. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-spotlight-package/usage\\">use-spotlight-package</a> | Discourage the use of @atlaskit/onboarding in favor of @atlaskit/spotlight. | | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-tag-group-label/usage\\">use-tag-group-label</a> | Ensures tag groups are described to assistive technology by a direct label or by another element. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-textfield-autocomplete/usage\\">use-textfield-autocomplete</a> | Enforce that Textfield components with type=\\"email\\", \\"tel\\", or \\"url\\" have an appropriate autocomplete value for WCAG 2.2 SC 1.3.5 compliance (Identify Input Purpose). | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-tokens-motion/usage\\">use-tokens-motion</a> | Enforces usage of motion design tokens rather than hard-coded duration and easing values. | | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-tokens-shape/usage\\">use-tokens-shape</a> | Enforces usage of shape design tokens rather than hard-coded values. | | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-tokens-space/usage\\">use-tokens-space</a> | Enforces usage of space design tokens rather than hard-coded values. | | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-tokens-typography/usage\\">use-tokens-typography</a> | Enforces usage of design tokens for typography properties rather than hard-coded values. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-visually-hidden/usage\\">use-visually-hidden</a> | Enforce usage of the visually hidden component. | Yes | Yes | |\\n\\n<!-- END_RULE_TABLE_CODEGEN -->\\n\\n\\n## Props\\n\\nUse the recommended config to get reasonable defaults recommended by the Atlassian Design System:\\n\\n```diff\\nmodule.exports = {\\n extends: [\\n+ \'plugin:@atlaskit/design-system/recommended\',\\n ],\\n};\\n```\\n\\nWe don\'t recommended maintaining your own configuration. If you do not use our config you will need\\nto specify individual rules and configuration. Add the plugin to your `eslint.config.cjs` file.\\n\\n```diff\\nmodule.exports = {\\n plugins: [\\n+ \'@atlaskit/design-system\',\\n ],\\n};\\n```\\n\\nEnable the rules that you would like to use.\\n\\n```diff\\nmodule.exports = {\\n rules: [\\n+ \'@atlaskit/design-system/no-deprecated-apis\': \'error\',\\n ],\\n};\\n```\\n"}',
|
|
58
|
+
content: '{"ruleName":"index","description":"---","content":"---\\norder: 0\\n---\\n\\nThis plugin contains rules that should be used when working with the\\n[Atlassian Design System](https://atlassian.design).\\n\\n## Rules\\n\\n<!-- START_RULE_TABLE_CODEGEN -->\\n<!-- @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen -->\\n\\n| Rule | Description | Recommended | Fixable | Suggestions |\\n| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------- | ----------- |\\n| <a href=\\"/components/eslint-plugin-design-system/consistent-css-prop-usage/usage\\">consistent-css-prop-usage</a> | Ensures consistency with `css` and `xcss` prop usages | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/enforce-inline-styles-in-select/usage\\">enforce-inline-styles-in-select</a> | Disallow unsupported CSS selectors in styles prop for @atlaskit/select and require inline styles only | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/ensure-avatar-tag-avatar-props/usage\\">ensure-avatar-tag-avatar-props</a> | Ensures AvatarTag avatar prop does not include controlled props (size, borderColor, appearance) which are managed internally. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/ensure-design-token-usage/usage\\">ensure-design-token-usage</a> | Enforces usage of design tokens rather than hard-coded values. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/ensure-design-token-usage-preview/usage\\">ensure-design-token-usage/preview</a> | Enforces usage of pre-release design tokens rather than hard-coded values. | | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/ensure-icon-color/usage\\">ensure-icon-color</a> | Enforces that upcoming icon components have a color prop set, to enable a migration of the default value. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/ensure-proper-xcss-usage/usage\\">ensure-proper-xcss-usage</a> | Enforces proper xcss usage: migrate from xcss() to cssMap() and use cssMap objects with specific keys. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/expand-motion-shorthand/usage\\">expand-motion-shorthand</a> | Expands `transition` and `animation` CSS shorthand properties into their individual sub-properties, so individual values can be replaced with motion tokens. | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/icon-label/usage\\">icon-label</a> | Enforces accessible usage of icon labels when composed with Atlassian Design System components. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/lozenge-badge-tag-labelling-system-migration/usage\\">lozenge-badge-tag-labelling-system-migration</a> | Helps migrate Lozenge isBold prop, Badge appearance values, and SimpleTag/RemovableTag components as part of the Labelling System Phase 1 migration. | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-banned-imports/usage\\">no-banned-imports</a> | Disallow importing banned modules. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-css-map-scoped/usage\\">no-css-map-scoped</a> | Disallows usage of the experimental `cssMapScoped` API from `@compiled/react`. This API is internal and is not part of the public Compiled CSS-in-JS interface. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-css-tagged-template-expression/usage\\">no-css-tagged-template-expression</a> | Disallows any `css` tagged template expressions that originate from Emotion, Styled Components or Compiled | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-dark-theme-vr-tests/usage\\">no-dark-theme-vr-tests</a> | Disallow using dark colorScheme in VR tests. | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-deprecated-apis/usage\\">no-deprecated-apis</a> | Disallow using deprecated APIs. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-deprecated-design-token-usage/usage\\">no-deprecated-design-token-usage</a> | Disallow using deprecated design tokens. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-deprecated-imports/usage\\">no-deprecated-imports</a> | Disallow importing deprecated modules. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-direct-use-of-web-platform-drag-and-drop/usage\\">no-direct-use-of-web-platform-drag-and-drop</a> | Disallow using direct use of native drag and drop (please use Pragmatic drag and drop) | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-emotion-primitives/usage\\">no-emotion-primitives</a> | Ensures usage of Compiled Primitives import instead of Emotion entrypoint. | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-empty-styled-expression/usage\\">no-empty-styled-expression</a> | Forbids any styled expression to be used when passing empty arguments to styled.div() (or other JSX elements). | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-exported-css/usage\\">no-exported-css</a> | Forbid exporting `css` function calls. Exporting `css` function calls can result in unexpected behaviour at runtime, and is not statically analysable. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-exported-keyframes/usage\\">no-exported-keyframes</a> | Forbid exporting `keyframes` function calls. Exporting `css` function calls can result in unexpected behaviour at runtime, and is not statically analysable. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-anchor/usage\\">no-html-anchor</a> | Discourage direct usage of HTML anchor elements in favor of Atlassian Design System link components. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-button/usage\\">no-html-button</a> | Discourage direct usage of HTML button elements in favor of Atlassian Design System button components. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-checkbox/usage\\">no-html-checkbox</a> | Discourage direct usage of HTML checkbox elements in favor of the Atlassian Design System checkbox component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-code/usage\\">no-html-code</a> | Discourage direct usage of HTML code elements in favor of the Atlassian Design System code component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-heading/usage\\">no-html-heading</a> | Discourage direct usage of HTML heading elements in favor of Atlassian Design System heading components. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-image/usage\\">no-html-image</a> | Discourage direct usage of HTML image elements in favor of the Atlassian Design System image component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-radio/usage\\">no-html-radio</a> | Discourage direct usage of HTML radio elements in favor of the Atlassian Design System radio component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-range/usage\\">no-html-range</a> | Discourage direct usage of HTML range elements in favor of the Atlassian Design System range component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-select/usage\\">no-html-select</a> | Discourage direct usage of HTML select elements in favor of the Atlassian Design System select component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-text-input/usage\\">no-html-text-input</a> | Discourage direct usage of HTML text input elements in favor of the Atlassian Design System textfield component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-html-textarea/usage\\">no-html-textarea</a> | Discourage direct usage of HTML textarea elements in favor of the Atlassian Design System textarea component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-icon-spacing-prop/usage\\">no-icon-spacing-prop</a> | Disallows usage of the deprecated spacing prop on new icons. Use Flex with cssMap for spacing instead. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/no-invalid-css-map/usage\\">no-invalid-css-map</a> | Checks the validity of a CSS map created through cssMap. This is intended to be used alongside TypeScript\'s type-checking. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-keyframes-tagged-template-expression/usage\\">no-keyframes-tagged-template-expression</a> | Disallows any `keyframe` tagged template expressions that originate from Emotion, Styled Components or Compiled | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-margin/usage\\">no-margin</a> | Disallow using the margin CSS property. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-modal-label/usage\\">no-modal-label</a> | Disallows usage of the `label` prop on Atlassian Design System modal dialog. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-nested-styles/usage\\">no-nested-styles</a> | Disallows use of nested styles in `css` functions. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-physical-properties/usage\\">no-physical-properties</a> | Disallow physical properties and values in `css` and `cssMap` function calls. | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-placeholder/usage\\">no-placeholder</a> | Placeholders should not be used. If information should be given to the user about the proper type or formatting of a value, this should be included using a helper message that is associated to the input instead. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-readonly-or-disabled-inputs/usage\\">no-readonly-or-disabled-inputs</a> | Inputs should almost always be interactive. Disabled and read-only inputs can usually be replaced by a more user-friendly design pattern. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-separator-with-list-elements/usage\\">no-separator-with-list-elements</a> | Warn when the `separator` prop is used with `as=\\"li\\"`, `as=\\"ol\\"`, or `as=\\"dl\\"` in the Inline component. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-styled-tagged-template-expression/usage\\">no-styled-tagged-template-expression</a> | Disallows any `styled` tagged template expressions that originate from Emotion, Styled Components or Compiled | | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-to-match-snapshot/usage\\">no-to-match-snapshot</a> | Disallow using toMatchSnapshot() in favor of toMatchInlineSnapshot(). See https://hello.atlassian.net/wiki/spaces/DST/pages/6105892000/DSTRFC-038+-+Removal+of+.toMatchSnapshot for rationale. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-unsafe-design-token-usage/usage\\">no-unsafe-design-token-usage</a> | Enforces design token usage is statically and locally analyzable. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-unsafe-inline-snapshot/usage\\">no-unsafe-inline-snapshot</a> | Enforce guardrails on toMatchInlineSnapshot usage: snapshots must not exceed 100 lines and must not contain internal implementation details like className or style attributes. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-unsafe-style-overrides/usage\\">no-unsafe-style-overrides</a> | Discourage usage of unsafe style overrides used against the Atlassian Design System. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-unsupported-drag-and-drop-libraries/usage\\">no-unsupported-drag-and-drop-libraries</a> | Disallow importing unsupported drag and drop modules. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/no-unused-css-map/usage\\">no-unused-css-map</a> | Detects unused styles in cssMap objects to help keep code clean. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/prefer-primitives/usage\\">prefer-primitives</a> | Increase awareness of primitive components via code hints. Strictly used for education purposes and discoverability. | | | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-button-group-label/usage\\">use-button-group-label</a> | Ensures button groups are described to assistive technology by a direct label or by another element. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-character-counter-field/usage\\">use-character-counter-field</a> | Suggests using CharacterCounterField or CharacterCounter when Textfield or Textarea components have maxLength or minLength props. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-correct-field/usage\\">use-correct-field</a> | Ensure makers use appropriate field component for their respective form elements. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-cx-function-in-xcss/usage\\">use-cx-function-in-xcss</a> | Enforces cx function use to combine styles in xcss. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-datetime-picker-calendar-button/usage\\">use-datetime-picker-calendar-button</a> | Encourages makers to use calendar button in Atlassian Design System\'s date picker and datetime picker components. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-drawer-label/usage\\">use-drawer-label</a> | Encourages to provide accessible name for Atlassian Design System Drawer component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-field-message-wrapper/usage\\">use-field-message-wrapper</a> | Encourage use of message wrapper component when using form message components. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-heading/usage\\">use-heading</a> | Encourage the usage of heading components. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-heading-level-in-section-message/usage\\">use-heading-level-in-section-message</a> | The `SectionMessage` component in `@atlaskit/section-message` needs to be the correct level within the document flow. This is not something that can be automated and requires contextual knowledge of what is present in the experience. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-heading-level-in-spotlight-card/usage\\">use-heading-level-in-spotlight-card</a> | Inform developers of eventual requirement of `headingLevel` prop in `SpotlightCard` component. The heading level should be the appropriate level according to the surrounding context. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-href-in-link-item/usage\\">use-href-in-link-item</a> | Inform developers of eventual requirement of `href` prop in `LinkItem` component. Elements with a `link` role require an `href` attribute for users to properly navigate, particularly those using assistive technologies. If no valid `href` is required for your use case, consider using a `ButtonItem` instead. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-latest-xcss-syntax/usage\\">use-latest-xcss-syntax</a> | Enforces usage of space design tokens rather than hard-coded values in xcss. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-latest-xcss-syntax-typography/usage\\">use-latest-xcss-syntax-typography</a> | Prohibits use of unsafe styling properties in xcss. Please use Text/Heading primitives instead. | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-menu-section-title/usage\\">use-menu-section-title</a> | Encourages makers to provide accessible title for Atlassian Design System Menu Section component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-modal-dialog-close-button/usage\\">use-modal-dialog-close-button</a> | Encourages makers to use close button in Atlassian Design System\'s modal dialog component. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-modal-title/usage\\">use-modal-title</a> | Encourages makers to include `ModalTitle` within `ModalHeader` when using Atlassian Design System modal dialog. | Yes | | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-onboarding-spotlight-label/usage\\">use-onboarding-spotlight-label</a> | Ensures onboarding spotlight dialogs are described to assistive technology by a direct label or by another element. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-popup-label/usage\\">use-popup-label</a> | Encourages to provide accessible name for Atlassian Design System Popup component. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-primitives-text/usage\\">use-primitives-text</a> | Encourage the usage of text components. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-should-render-to-parent/usage\\">use-should-render-to-parent</a> | Encourages makers to use the `shouldRenderToParent` where possible in Atlassian Design System `Popup` and `DropdownMenu` components. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-simple-field/usage\\">use-simple-field</a> | Encourage use of simple field for better developer experience and accessibility. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-simple-form/usage\\">use-simple-form</a> | Encourage use of simple form for better developer experience and accessibility. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-spotlight-package/usage\\">use-spotlight-package</a> | Discourage the use of @atlaskit/onboarding in favor of @atlaskit/spotlight. | | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-tag-group-label/usage\\">use-tag-group-label</a> | Ensures tag groups are described to assistive technology by a direct label or by another element. | Yes | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-textfield-autocomplete/usage\\">use-textfield-autocomplete</a> | Enforce that Textfield components with type=\\"email\\", \\"tel\\", or \\"url\\" have an appropriate autocomplete value for WCAG 2.2 SC 1.3.5 compliance (Identify Input Purpose). | Yes | Yes | |\\n| <a href=\\"/components/eslint-plugin-design-system/use-tokens-motion/usage\\">use-tokens-motion</a> | Enforces usage of motion design tokens rather than hard-coded duration and easing values. | | | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-tokens-shape/usage\\">use-tokens-shape</a> | Enforces usage of shape design tokens rather than hard-coded values. | | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-tokens-space/usage\\">use-tokens-space</a> | Enforces usage of space design tokens rather than hard-coded values. | | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-tokens-typography/usage\\">use-tokens-typography</a> | Enforces usage of design tokens for typography properties rather than hard-coded values. | Yes | Yes | Yes |\\n| <a href=\\"/components/eslint-plugin-design-system/use-visually-hidden/usage\\">use-visually-hidden</a> | Enforce usage of the visually hidden component. | Yes | Yes | |\\n\\n<!-- END_RULE_TABLE_CODEGEN -->\\n\\n\\n## Props\\n\\nUse the recommended config to get reasonable defaults recommended by the Atlassian Design System:\\n\\n```diff\\nmodule.exports = {\\n extends: [\\n+ \'plugin:@atlaskit/design-system/recommended\',\\n ],\\n};\\n```\\n\\nWe don\'t recommended maintaining your own configuration. If you do not use our config you will need\\nto specify individual rules and configuration. Add the plugin to your `eslint.config.cjs` file.\\n\\n```diff\\nmodule.exports = {\\n plugins: [\\n+ \'@atlaskit/design-system\',\\n ],\\n};\\n```\\n\\nEnable the rules that you would like to use.\\n\\n```diff\\nmodule.exports = {\\n rules: [\\n+ \'@atlaskit/design-system/no-deprecated-apis\': \'error\',\\n ],\\n};\\n```\\n"}',
|
|
59
59
|
ruleName: 'index',
|
|
60
60
|
description: '---'
|
|
61
61
|
}, {
|
|
@@ -78,6 +78,10 @@ var lintRulesMcpStructuredContent = exports.lintRulesMcpStructuredContent = [{
|
|
|
78
78
|
content: '{"ruleName":"no-banned-imports","description":"Using private or experimental packages is dangerous as they are not supported across major versions","content":"# no-banned-imports\\n\\nUsing private or experimental packages is dangerous as they are not supported across major versions\\nmeaning you will not be able to migrate easily causing friction for yourself and the Atlassian\\nDesign System team.\\n\\n## Examples\\n\\nAnything that is considered private or experimental will be marked as violations.\\n\\n### Incorrect\\n\\n```ts\\nimport noop from \'@atlaskit/ds-lib/noop\';\\n ^^^^^^^^^^^^^^^^^^^^^\\n\\nimport { Text } from \'@atlaskit/ds-explorations\';\\n ^^^^^^^^^^^^^^^^^^^^^^^^^\\n```\\n"}',
|
|
79
79
|
ruleName: 'no-banned-imports',
|
|
80
80
|
description: 'Using private or experimental packages is dangerous as they are not supported across major versions'
|
|
81
|
+
}, {
|
|
82
|
+
content: '{"ruleName":"no-css-map-scoped","description":"Disallows usage of the experimental `cssMapScoped` API from `@compiled/react`.","content":"# no-css-map-scoped\\n\\nDisallows usage of the experimental `cssMapScoped` API from `@compiled/react`.\\n\\n## Rationale\\n\\n`cssMapScoped` is an experimental, internal Compiled CSS-in-JS API that produces non-atomic CSS\\noutput (one `cc-<hash>` class per variant, with all declarations grouped under that class).\\n\\nIt is **not** part of the public Compiled CSS-in-JS interface and is intentionally not exported from\\n`@compiled/react`\'s public type definitions. The Compiled team does not currently support this API\\nfor general consumption, and using it can negatively impact CSS cascade and specificity behaviour\\nwhen composed across packages.\\n\\nThis rule prevents accidental adoption outside of the small set of packages (e.g. editor-core) that\\nare explicitly approved to use it.\\n\\n## How the rule works\\n\\nThis rule reports any call expression where the callee is an `Identifier` resolved to a named import\\nof `cssMapScoped` from `@compiled/react` or `@atlaskit/css`.\\n\\n```ts\\n// ❌ Reported\\nimport { cssMapScoped } from \'@compiled/react\';\\n\\nconst styles = cssMapScoped({\\n\\tpanel: { color: \'red\' },\\n});\\n\\n// ✅ Allowed — standard atomic cssMap\\nimport { cssMap } from \'@compiled/react\';\\n\\nconst styles = cssMap({\\n\\tpanel: { color: \'red\' },\\n});\\n```\\n\\nIf your package has a legitimate need to use `cssMapScoped`, please contact the Compiled team and\\nthe Editor Platform team for approval before disabling this rule.\\n"}',
|
|
83
|
+
ruleName: 'no-css-map-scoped',
|
|
84
|
+
description: 'Disallows usage of the experimental `cssMapScoped` API from `@compiled/react`.'
|
|
81
85
|
}, {
|
|
82
86
|
content: '{"ruleName":"no-css-tagged-template-expression","description":"Disallows any `css` tagged template expressions that originate from a CSS-in-JS library, including","content":"# no-css-tagged-template-expression\\n\\nDisallows any `css` tagged template expressions that originate from a CSS-in-JS library, including\\n`@atlaskit/css`, `@compiled/react`, Emotion, and `styled-components`.\\n\\nTagged template expressions cannot be type safe and are difficult to parse correctly. Will auto fix\\n` css`` ` to the preferred `css({})` call expression syntax.\\n\\nThank you to the\\n[Compiled team for their rule](https://github.com/atlassian-labs/compiled/tree/master/packages/eslint-plugin/src/rules/no-css-tagged-template-expression)\\nfrom which this was ported.\\n\\n## Examples\\n\\n### Incorrect\\n\\n```js\\nimport { css } from \'@emotion/react\';\\n\\ncss`\\n\\tcolor: blue;\\n`;\\n\\nconst styles = css`\\n\\tcolor: blue;\\n\\tfont-weight: 500;\\n`;\\n```\\n\\n### Correct\\n\\n```js\\nimport { css } from \'@emotion/react\';\\n\\ncss({ color: \'blue\' });\\n\\nconst styles = css({\\n\\tcolor: \'blue\',\\n\\tfontWeight: 500,\\n});\\n```\\n\\n## Options\\n\\n### importSources\\n\\nBy default, this rule will check `css` usages from:\\n\\n- `@atlaskit/css`\\n- `@atlaskit/primitives`\\n- `@compiled/react`\\n- `@emotion/react`\\n- `@emotion/core`\\n- `@emotion/styled`\\n- `styled-components`\\n\\nTo change this list of libraries, you can define a custom set of `importSources`, which accepts an\\narray of package names (strings).\\n\\n```tsx\\n// [{ importSources: [\'other-lib\'] }]\\n\\nimport { css } from \'other-lib\';\\n\\n// Invalid!\\nexport const styles = css``;\\n```\\n\\n## Limitations\\n\\n- Comments are not auto-fixable. You will need to manually convert usages containing functions.\\n"}',
|
|
83
87
|
ruleName: 'no-css-tagged-template-expression',
|
|
@@ -302,6 +306,10 @@ var lintRulesMcpStructuredContent = exports.lintRulesMcpStructuredContent = [{
|
|
|
302
306
|
content: '{"ruleName":"use-modal-dialog-close-button","description":"The modal dialog should have a dedicated close button to ensure it is accessible for all users.","content":"# use-modal-dialog-close-button\\n\\nThe modal dialog should have a dedicated close button to ensure it is accessible for all users.\\n\\n## Examples\\n\\nThis rule will warn makers if the `hasCloseButton` prop is not set to `true` or if the `CloseButton`\\ncomponent is not used.\\n\\n### Incorrect\\n\\n```tsx\\n<ModalDialog>\\n\\t^^^^^^^^^^^ `hasCloseButton` on `ModalHeader` should be set to `true` or `CloseButton` component should be used to make modal dialog accessible.\\n\\t<div>\\n\\t\\t<ModalTitle>Modal Title</ModalTitle>\\n\\t</div>\\n</ModalDialog>\\n\\n<ModalDialog>\\n\\t^^^^^^^^^^^ `hasCloseButton` on `ModalHeader` should be set to `true` or `CloseButton` component should be used to make modal dialog accessible.\\n\\t<ModalHeader>\\n\\t\\t<ModalTitle>Modal Title</ModalTitle>\\n\\t</ModalHeader>\\n</ModalDialog>\\n\\n<ModalDialog>\\n\\t^^^^^^^^^^^ `hasCloseButton` on `ModalHeader` should be set to `true` or `CloseButton` component should be used to make modal dialog accessible.\\n\\t<ModalHeader hasCloseButton={false}>\\n\\t\\t<ModalTitle>Modal Title</ModalTitle>\\n\\t</ModalHeader>\\n</ModalDialog>\\n```\\n\\n### Correct\\n\\n```tsx\\n<ModalDialog>\\n\\t<ModalHeader hasCloseButton>\\n\\t\\t<ModalTitle>Modal Title</ModalTitle>\\n\\t</ModalHeader>\\n</ModalDialog>\\n\\n<ModalDialog>\\n\\t<ModalHeader>\\n\\t\\t<Box>\\n\\t\\t\\t<ModalTitle>Modal Title</ModalTitle>\\n\\t\\t\\t<CloseButton onClick={onClose} />\\n\\t\\t</Box>\\n\\t</ModalHeader>\\n</ModalDialog>\\n```\\n"}',
|
|
303
307
|
ruleName: 'use-modal-dialog-close-button',
|
|
304
308
|
description: 'The modal dialog should have a dedicated close button to ensure it is accessible for all users.'
|
|
309
|
+
}, {
|
|
310
|
+
content: "{\"ruleName\":\"use-modal-title\",\"description\":\"Modal headers should include `ModalTitle` so modal dialogs expose a clear accessible title.\",\"content\":\"# use-modal-title\\n\\nModal headers should include `ModalTitle` so modal dialogs expose a clear accessible title.\\n\\nWe recommend using `ModalTitle`, but if a custom implementation is required, use `titleId` from the\\n`useModal()` hook to provide the modal's accessible name.\\n\\n## Examples\\n\\nThis rule warns when `ModalHeader` does not include a `ModalTitle`.\\n\\n### Incorrect\\n\\n```tsx\\nimport ModalDialog from '@atlaskit/modal-dialog/modal-dialog';\\nimport { ModalHeader } from '@atlaskit/modal-dialog/modal-header';\\n\\n<ModalDialog>\\n\\t<ModalHeader>\\n\\t\\t<h1>New issue</h1>\\n\\t</ModalHeader>\\n</ModalDialog>;\\n```\\n\\n```tsx\\nimport { ModalHeader } from '@atlaskit/modal-dialog/modal-header';\\n\\n<ModalHeader>\\n\\t<h1>New issue</h1>\\n</ModalHeader>;\\n```\\n\\n### Correct\\n\\n```tsx\\nimport ModalDialog from '@atlaskit/modal-dialog/modal-dialog';\\nimport { ModalHeader } from '@atlaskit/modal-dialog/modal-header';\\n\\n<ModalDialog>\\n\\t<ModalHeader>\\n\\t\\t<ModalTitle>New issue</ModalTitle>\\n\\t</ModalHeader>\\n</ModalDialog>;\\n```\\n\\n```tsx\\nimport { ModalHeader } from '@atlaskit/modal-dialog/modal-header';\\n\\n<ModalHeader>\\n\\t<ModalTitle>New issue</ModalTitle>\\n</ModalHeader>;\\n```\\n\"}",
|
|
311
|
+
ruleName: 'use-modal-title',
|
|
312
|
+
description: 'Modal headers should include `ModalTitle` so modal dialogs expose a clear accessible title.'
|
|
305
313
|
}, {
|
|
306
314
|
content: '{"ruleName":"use-onboarding-spotlight-label","description":"Onboarding spotlight dialog should have an accessible name or a reference to it, so that upon","content":"# use-onboarding-spotlight-label\\n\\nOnboarding spotlight dialog should have an accessible name or a reference to it, so that upon\\nopening, users of assistive technologies could have contextual information of interaction with\\ncurrent element.\\n\\n## Examples\\n\\nThis rule will indicate user with warning to strongly recommend usage of either `label` or `titleId`\\nprop if spotlight dialog is missing `heading` prop value.\\n\\n### Incorrect\\n\\n```tsx\\n<Spotlight>\\n ^^^^^^^^^ Missing `heading`, `label` or `titleId` prop.\\n\\n</Spotlight>\\n\\n<Spotlight label=\\"\\">\\n ^^^^^ `label` prop is missing accessible name value.\\n\\t<Lorem count={1} />\\n</Spotlight>\\n\\n<Spotlight titleId=\\"\\">\\n ^^^^^^^ `titleId` prop is missing reference value.\\n\\t<p id=\\"spotlight-dialog-title\\">Spotlight accessible name</p>\\n\\t<Lorem count={1} />\\n</Spotlight>\\n\\n<Spotlight heading=\\"Spotlight dialog heading\\" titleId=\\"spotlight-dialog-title\\" label=\\"\\">\\n ^^^^^^^ ^^^^^^^ ^^^^^ Avoid using `heading`, `titleId` and `label` properties simultaneously. If the `heading` value is not specified or there is a requirement to reference another element in the DOM as accessible name, use `titleId`. Otherwise, use `label` to explicitly provide the accessible name.\\n\\t<p id=\\"spotlight-dialog-label\\">Spotlight accessible name</p>\\n\\t<Lorem count={1} />\\n</Spotlight>\\n```\\n\\n### Correct\\n\\n```tsx\\n\\n<Spotlight heading=\\"Spotlight dialog title\\">\\n\\t<Lorem count={1} />\\n</Spotlight>\\n\\n\\n<Spotlight titleId=\\"spotlight-dialog-title\\">\\n\\t<p id=\\"spotlight-dialog-title\\">Spotlight accessible name</p>\\n\\t<Lorem count={1} />\\n</Spotlight>\\n\\n<Spotlight label=\\"Spotlight content title\\">\\n\\t<Lorem count={1} />\\n</Spotlight>\\n```\\n"}',
|
|
307
315
|
ruleName: 'use-onboarding-spotlight-label',
|
|
@@ -390,6 +398,10 @@ var lintRulesMcpStructuredContent = exports.lintRulesMcpStructuredContent = [{
|
|
|
390
398
|
content: "{\"ruleName\":\"no-container-queries\",\"description\":\"Blocks `@container` at-rules\",\"content\":\"# no-container-queries\\n\\nBlocks `@container` at-rules\\n([container queries](https://developer.mozilla.org/en-US/docs/Web/CSS/@container)), which are\\nunsafe.\\n\\nContainer queries are unsafe because they:\\n\\n- break the rules of scope\\n- aren't deterministic\\n- aren't type-safe\\n- aren't fully supported across our frontend tech stacks\\n\\nUse [media queries](https://atlassian.design/components/primitives/responsive/breakpoints/examples),\\na\\n[WidthObserver](https://atlaskit.atlassian.com/packages/design-system/width-detector/docs/migration-guide),\\nor a custom [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)\\ninstead.\\n\\n## Examples\\n\\n### Incorrect\\n\\n```tsx\\nimport { css } from '@compiled/react';\\nimport { token } from '@atlaskit/tokens';\\n\\nconst headingStyles = css({\\n\\t'@container (width > 400px)': {\\n\\t\\tfont: token('font.heading.large'),\\n\\t},\\n});\\n```\\n\\n### Correct\\n\\n#### Media queries\\n\\n```tsx\\nimport { css } from '@compiled/react';\\nimport { media } from '@atlaskit/primitives/responsive';\\nimport { token } from '@atlaskit/tokens';\\n\\nconst headingStyles = css({\\n\\t[media.above.sm]: {\\n\\t\\tfont: token('font.heading.large'),\\n\\t},\\n});\\n```\\n\\n#### WidthObserver\\n\\n```tsx\\nimport { useState } from 'react';\\nimport { css, cssMap } from '@compiled/react';\\nimport throttle from 'lodash/throttle';\\nimport { WidthObserver } from '@atlaskit/width-detector';\\nimport { token } from '@atlaskit/tokens';\\n\\nconst containerStyles = css({\\n\\t// Required for the `WidthObserver`, which is absolutely positioned\\n\\tposition: 'relative',\\n});\\n\\nconst headingStyles = cssMap({\\n\\tsmall: {\\n\\t\\tfont: token('font.heading.small'),\\n\\t},\\n\\tlarge: {\\n\\t\\tfont: token('font.heading.large'),\\n\\t},\\n});\\n\\nconst ResponsiveH2 = () => {\\n\\tconst [width = 0, setWidth] = useState<number | undefined>(undefined);\\n\\tconst throttledSetWidth = throttle(setWidth, 50);\\n\\n\\treturn (\\n\\t\\t<div css={containerStyles}>\\n\\t\\t\\t<WidthObserver setWidth={throttledSetWidth} />\\n\\t\\t\\t<h2 css={width < 400 ? headingStyles.small : headingStyles.large}>Title</h2>\\n\\t\\t</div>\\n\\t);\\n};\\n```\\n\\n## Options\\n\\n### `importSources: string[]`\\n\\nBy default, this rule will check styles using:\\n\\n- `@atlaskit/css`\\n- `@atlaskit/primitives`\\n- `@compiled/react`\\n- `@emotion/react`\\n- `@emotion/core`\\n- `@emotion/styled`\\n- `styled-components`\\n\\nOverride this list with the `importSources` option, which accepts an array of package names.\\n\"}",
|
|
391
399
|
ruleName: 'no-container-queries',
|
|
392
400
|
description: 'Blocks `@container` at-rules'
|
|
401
|
+
}, {
|
|
402
|
+
content: '{"ruleName":"no-css-map-scoped","description":"Disallows usage of the experimental `cssMapScoped` API from `@compiled/react`. This API is internal","content":"# @atlaskit/design-system/no-css-map-scoped\\n\\nDisallows usage of the experimental `cssMapScoped` API from `@compiled/react`. This API is internal\\nand is not part of the public Compiled CSS-in-JS interface.\\n\\nThis rule is maintained by another package and configured here; refer to\\nhttps://atlassian.design/components/eslint-plugin-design-system/no-css-map-scoped/usage for more\\ndetails.\\n"}',
|
|
403
|
+
ruleName: 'no-css-map-scoped',
|
|
404
|
+
description: 'Disallows usage of the experimental `cssMapScoped` API from `@compiled/react`. This API is internal'
|
|
393
405
|
}, {
|
|
394
406
|
content: '{"ruleName":"no-css-tagged-template-expression","description":"Disallows any `css` tagged template expressions that originate from a CSS-in-JS library, including","content":"# @atlaskit/design-system/no-css-tagged-template-expression\\n\\nDisallows any `css` tagged template expressions that originate from a CSS-in-JS library, including\\n`@atlaskit/css`, `@compiled/react`, Emotion, and `styled-components`.\\n\\nThis rule is maintained by another package and configured here; refer to\\nhttps://atlassian.design/components/eslint-plugin-design-system/no-css-tagged-template-expression/usage\\nfor more details.\\n"}',
|
|
395
407
|
ruleName: 'no-css-tagged-template-expression',
|
|
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.migrationRegistry = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _avatarXsmallToXxsmall = require("./migrations/avatar-xsmall-to-xxsmall");
|
|
9
10
|
var _onboardingJiraSpotlight = require("./migrations/onboarding-jira-spotlight");
|
|
10
11
|
var _onboardingMultiStep = require("./migrations/onboarding-multi-step");
|
|
11
12
|
var _onboardingSingleStep = require("./migrations/onboarding-single-step");
|
|
12
13
|
var _onboardingWithMotion = require("./migrations/onboarding-with-motion");
|
|
13
|
-
var migrationRegistry = exports.migrationRegistry = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _onboardingJiraSpotlight.onboardingJiraSpotlight.id, _onboardingJiraSpotlight.onboardingJiraSpotlight), _onboardingSingleStep.onboardingSingleStep.id, _onboardingSingleStep.onboardingSingleStep), _onboardingMultiStep.onboardingMultiStep.id, _onboardingMultiStep.onboardingMultiStep), _onboardingWithMotion.onboardingWithMotion.id, _onboardingWithMotion.onboardingWithMotion);
|
|
14
|
+
var migrationRegistry = exports.migrationRegistry = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _avatarXsmallToXxsmall.avatarXsmallToXxsmall.id, _avatarXsmallToXxsmall.avatarXsmallToXxsmall), _onboardingJiraSpotlight.onboardingJiraSpotlight.id, _onboardingJiraSpotlight.onboardingJiraSpotlight), _onboardingSingleStep.onboardingSingleStep.id, _onboardingSingleStep.onboardingSingleStep), _onboardingMultiStep.onboardingMultiStep.id, _onboardingMultiStep.onboardingMultiStep), _onboardingWithMotion.onboardingWithMotion.id, _onboardingWithMotion.onboardingWithMotion);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.avatarXsmallToXxsmall = void 0;
|
|
7
|
+
var avatarXsmallToXxsmall = exports.avatarXsmallToXxsmall = {
|
|
8
|
+
id: 'avatar-xsmall-to-xxsmall',
|
|
9
|
+
title: 'Avatar xsmall to xxsmall migration',
|
|
10
|
+
description: 'Use when code uses the 16px `xsmall` Avatar size from `@atlaskit/avatar`.',
|
|
11
|
+
fromPackage: '@atlaskit/avatar',
|
|
12
|
+
toPackage: '@atlaskit/avatar',
|
|
13
|
+
examples: [{
|
|
14
|
+
title: 'Rename 16px Avatar size',
|
|
15
|
+
description: 'Use `xxsmall` for 16px avatars. `xsmall` is being reserved for 20px avatars.',
|
|
16
|
+
before: "\nimport Avatar from '@atlaskit/avatar/avatar';\n\nexport const Example = () => <Avatar size=\"xsmall\" name=\"Alex\" />;\n",
|
|
17
|
+
after: "\nimport Avatar from '@atlaskit/avatar/avatar';\n\nexport const Example = () => <Avatar size=\"xxsmall\" name=\"Alex\" />;\n",
|
|
18
|
+
explanation: 'The current 16px `xsmall` size is renamed to `xxsmall`. The temporary `UNSAFE_xsmall` value remains the 20px Avatar-only size until a future major makes `xsmall` the public 20px size.'
|
|
19
|
+
}],
|
|
20
|
+
bestPractices: ['Run the Avatar codemod before manually editing call sites.', 'Check dynamic size values marked with `TODO: (from codemod)` because the codemod only updates static `xsmall` values.', 'Do not migrate unrelated `xsmall` strings from heading, icon, spinner, or product-specific size APIs.', 'AvatarGroup still does not support 16px or 20px sizes.'],
|
|
21
|
+
additionalResources: 'See https://atlassian.design/components/avatar/migration-guide for the full migration guide.'
|
|
22
|
+
};
|