🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@atlaskit/eslint-plugin-design-system

Package Overview
Dependencies
Maintainers
1
Versions
293
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/eslint-plugin-design-system

The essential plugin for use with the Atlassian Design System.

13.13.0
latest
Source
npm
Version published
Weekly downloads
4.7K
11.05%
Maintainers
1
Weekly downloads
 
Created
Source

Design System ESLint Plugin

This plugin contains rules that should be used when working with the Atlassian Design System.

Installation

yarn add @atlaskit/eslint-plugin-design-system -D

Configuration

Use the recommended config to get reasonable defaults recommended by the Atlassian Design System:

module.exports = {
  extends: [
+    'plugin:@atlaskit/design-system/recommended',
  ],
};

We don't recommended maintaining your own configuration. If you do not use our config you will need to specify individual rules and configuration. Add the plugin to your eslint.config.cjs file.

module.exports = {
  plugins: [
+    '@atlaskit/design-system',
  ],
};

Enable the rules that you would like to use.

module.exports = {
  rules: [
+    '@atlaskit/design-system/no-deprecated-apis': 'error',
  ],
};

Rules

RuleDescriptionRecommendedFixableSuggestions
consistent-css-prop-usageEnsures consistency with css and xcss prop usagesYesYes
ensure-design-token-usageEnforces usage of design tokens rather than hard-coded values.YesYesYes
ensure-design-token-usage/previewEnforces usage of pre-release design tokens rather than hard-coded values.YesYes
ensure-icon-colorEnforces that upcoming icon components have a color prop set, to enable a migration of the default value.
icon-labelEnforces accessible usage of icon labels when composed with Atlassian Design System components.YesYes
no-banned-importsDisallow importing banned modules.Yes
no-boolean-autofocus-on-modal-dialogEncourages makers to not use boolean values for autoFocus on Atlassian Design System's modal dialog component.Yes
no-css-tagged-template-expressionDisallows any css tagged template expressions that originate from Emotion, Styled Components or CompiledYes
no-custom-iconsEnforces custom glyph icons are used.
no-dark-theme-vr-testsDisallow using dark colorScheme in VR tests.Yes
no-deprecated-apisDisallow using deprecated APIs.Yes
no-deprecated-design-token-usageDisallow using deprecated design tokens.YesYes
no-deprecated-importsDisallow importing deprecated modules.YesYesYes
no-direct-use-of-web-platform-drag-and-dropDisallow using direct use of native drag and drop (please use Pragmatic drag and drop)Yes
no-empty-styled-expressionForbids any styled expression to be used when passing empty arguments to styled.div() (or other JSX elements).
no-exported-cssForbid exporting css function calls. Exporting css function calls can result in unexpected behaviour at runtime, and is not statically analysable.
no-exported-keyframesForbid exporting keyframes function calls. Exporting css function calls can result in unexpected behaviour at runtime, and is not statically analysable.
no-html-anchorDiscourage direct usage of HTML anchor elements in favor of Atlassian Design System link components.YesYes
no-html-buttonDiscourage direct usage of HTML button elements in favor of Atlassian Design System button components.Yes
no-html-checkboxDiscourage direct usage of HTML checkbox elements in favor of the Atlassian Design System checkbox component.YesYes
no-html-codeDiscourage direct usage of HTML code elements in favor of the Atlassian Design System code component.YesYes
no-html-headingDiscourage direct usage of HTML heading elements in favor of Atlassian Design System heading components.YesYes
no-html-imageDiscourage direct usage of HTML image elements in favor of the Atlassian Design System image component.YesYes
no-html-radioDiscourage direct usage of HTML radio elements in favor of the Atlassian Design System radio component.YesYes
no-html-rangeDiscourage direct usage of HTML range elements in favor of the Atlassian Design System range component.YesYes
no-html-selectDiscourage direct usage of HTML select elements in favor of the Atlassian Design System select component.YesYes
no-html-text-inputDiscourage direct usage of HTML text input elements in favor of the Atlassian Design System textfield component.YesYes
no-html-textareaDiscourage direct usage of HTML textarea elements in favor of the Atlassian Design System textarea component.YesYes
no-invalid-css-mapChecks the validity of a CSS map created through cssMap. This is intended to be used alongside TypeScript's type-checking.Yes
no-keyframes-tagged-template-expressionDisallows any keyframe tagged template expressions that originate from Emotion, Styled Components or CompiledYes
no-legacy-iconsEnforces no legacy icons are used.YesYes
no-marginDisallow using the margin CSS property.
no-nested-stylesDisallows use of nested styles in css functions.Yes
no-physical-propertiesDisallow physical properties and values in css function calls.Yes
no-separator-with-list-elementsWarn when the separator prop is used with as="li", as="ol", or as="dl" in the Inline component.Yes
no-styled-tagged-template-expressionDisallows any styled tagged template expressions that originate from Emotion, Styled Components or CompiledYes
no-unsafe-design-token-usageEnforces design token usage is statically and locally analyzable.YesYes
no-unsafe-style-overridesDiscourage usage of unsafe style overrides used against the Atlassian Design System.Yes
no-unsupported-drag-and-drop-librariesDisallow importing unsupported drag and drop modules.Yes
prefer-primitivesIncrease awareness of primitive components via code hints. Strictly used for education purposes and discoverability. To enforce usage please refer to the use-primitives rule.
use-button-group-labelEnsures button groups are described to assistive technology by a direct label or by another element.YesYes
use-cx-function-in-xcssEnforces cx function use to combine styles in xcss.YesYesYes
use-datetime-picker-calendar-buttonEncourages makers to use calendar button in Atlassian Design System's date picker and datetime picker components.YesYesYes
use-drawer-labelEncourages to provide accessible name for Atlassian Design System Drawer component.YesYes
use-headingEncourage the usage of heading components.YesYes
use-heading-level-in-spotlight-cardInform developers of eventual requirement of headingLevel prop in SpotlightCard component. The heading level should be the appropriate level according to the surrounding context.YesYes
use-href-in-link-itemInform 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.YesYesYes
use-latest-xcss-syntaxEnforces usage of space design tokens rather than hard-coded values in xcss.YesYes
use-latest-xcss-syntax-typographyProhibits use of unsafe styling properties in xcss. Please use Text/Heading primitives instead.YesYes
use-menu-section-titleEncourages makers to provide accessible title for Atlassian Design System Menu Section component.YesYes
use-modal-dialog-close-buttonEncourages makers to use close button in Atlassian Design System's modal dialog component.YesYesYes
use-onboarding-spotlight-labelEnsures onboarding spotlight dialogs are described to assistive technology by a direct label or by another element.YesYes
use-popup-labelEncourages to provide accessible name for Atlassian Design System Popup component.YesYes
use-primitivesEncourage the usage of primitives components.YesYes
use-primitives-textEncourage the usage of text components.YesYes
use-should-render-to-parentEncourages makers to use the shouldRenderToParent where possible in Atlassian Design System Popup and DropdownMenu components.YesYes
use-tag-group-labelEnsures tag groups are described to assistive technology by a direct label or by another element.YesYes
use-tokens-spaceEnforces usage of space design tokens rather than hard-coded values.YesYes
use-tokens-typographyEnforces usage of design tokens for typography properties rather than hard-coded values.YesYes
use-visually-hiddenEnforce usage of the visually hidden component.YesYes

FAQs

Package last updated on 30 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts