UNPKG

@atlaskit/eslint-plugin-design-system

Version:

The essential plugin for use with the Atlassian Design System.

28 lines 986 B
import { createLintRule } from '../utils/create-lint-rule'; import { JSXElement as _JSXElement } from './node-types/jsx-element'; var rule = createLintRule({ meta: { name: 'no-html-range', type: 'suggestion', hasSuggestions: true, docs: { description: 'Discourage direct usage of HTML range elements in favor of the Atlassian Design System range component.', recommended: true, severity: 'warn' }, messages: { noHtmlRange: "This <{{ name }}> should be replaced with a range component from the Atlassian Design System. ADS components include event tracking, ensure accessible implementations, and provide access to ADS styling features like design tokens." } }, create: function create(context) { return { // transforms <input type="range" css={...}> usages JSXElement: function JSXElement(node) { _JSXElement.lint(node, { context: context }); } }; } }); export default rule;