@atlaskit/eslint-plugin-design-system 13.7.0 → 13.8.0

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +56 -55
  3. package/dist/cjs/presets/all-flat.codegen.js +2 -1
  4. package/dist/cjs/presets/all.codegen.js +2 -1
  5. package/dist/cjs/presets/recommended-flat.codegen.js +2 -1
  6. package/dist/cjs/presets/recommended.codegen.js +2 -1
  7. package/dist/cjs/rules/index.codegen.js +3 -1
  8. package/dist/cjs/rules/no-html-range/index.js +34 -0
  9. package/dist/cjs/rules/no-html-range/node-types/index.js +12 -0
  10. package/dist/cjs/rules/no-html-range/node-types/jsx-element/index.js +27 -0
  11. package/dist/cjs/rules/no-html-range/node-types/supported.js +70 -0
  12. package/dist/es2019/presets/all-flat.codegen.js +2 -1
  13. package/dist/es2019/presets/all.codegen.js +2 -1
  14. package/dist/es2019/presets/recommended-flat.codegen.js +2 -1
  15. package/dist/es2019/presets/recommended.codegen.js +2 -1
  16. package/dist/es2019/rules/index.codegen.js +3 -1
  17. package/dist/es2019/rules/no-html-range/index.js +28 -0
  18. package/dist/es2019/rules/no-html-range/node-types/index.js +1 -0
  19. package/dist/es2019/rules/no-html-range/node-types/jsx-element/index.js +19 -0
  20. package/dist/es2019/rules/no-html-range/node-types/supported.js +60 -0
  21. package/dist/esm/presets/all-flat.codegen.js +2 -1
  22. package/dist/esm/presets/all.codegen.js +2 -1
  23. package/dist/esm/presets/recommended-flat.codegen.js +2 -1
  24. package/dist/esm/presets/recommended.codegen.js +2 -1
  25. package/dist/esm/rules/index.codegen.js +3 -1
  26. package/dist/esm/rules/no-html-range/index.js +28 -0
  27. package/dist/esm/rules/no-html-range/node-types/index.js +1 -0
  28. package/dist/esm/rules/no-html-range/node-types/jsx-element/index.js +18 -0
  29. package/dist/esm/rules/no-html-range/node-types/supported.js +61 -0
  30. package/dist/types/index.codegen.d.ts +9 -0
  31. package/dist/types/presets/all-flat.codegen.d.ts +1 -0
  32. package/dist/types/presets/all.codegen.d.ts +1 -0
  33. package/dist/types/presets/recommended-flat.codegen.d.ts +1 -0
  34. package/dist/types/presets/recommended.codegen.d.ts +1 -0
  35. package/dist/types/rules/index.codegen.d.ts +1 -0
  36. package/dist/types/rules/no-html-range/index.d.ts +3 -0
  37. package/dist/types/rules/no-html-range/node-types/index.d.ts +1 -0
  38. package/dist/types/rules/no-html-range/node-types/jsx-element/index.d.ts +8 -0
  39. package/dist/types/rules/no-html-range/node-types/supported.d.ts +7 -0
  40. package/dist/types-ts4.5/index.codegen.d.ts +9 -0
  41. package/dist/types-ts4.5/presets/all-flat.codegen.d.ts +1 -0
  42. package/dist/types-ts4.5/presets/all.codegen.d.ts +1 -0
  43. package/dist/types-ts4.5/presets/recommended-flat.codegen.d.ts +1 -0
  44. package/dist/types-ts4.5/presets/recommended.codegen.d.ts +1 -0
  45. package/dist/types-ts4.5/rules/index.codegen.d.ts +1 -0
  46. package/dist/types-ts4.5/rules/no-html-range/index.d.ts +3 -0
  47. package/dist/types-ts4.5/rules/no-html-range/node-types/index.d.ts +1 -0
  48. package/dist/types-ts4.5/rules/no-html-range/node-types/jsx-element/index.d.ts +8 -0
  49. package/dist/types-ts4.5/rules/no-html-range/node-types/supported.d.ts +7 -0
  50. package/package.json +1 -1
@@ -0,0 +1,28 @@
1
+ import { createLintRule } from '../utils/create-rule';
2
+ import { JSXElement } from './node-types';
3
+ const rule = createLintRule({
4
+ meta: {
5
+ name: 'no-html-range',
6
+ type: 'suggestion',
7
+ hasSuggestions: true,
8
+ docs: {
9
+ description: 'Discourage direct usage of HTML range elements in favor of the Atlassian Design System range component.',
10
+ recommended: true,
11
+ severity: 'warn'
12
+ },
13
+ messages: {
14
+ 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.`
15
+ }
16
+ },
17
+ create(context) {
18
+ return {
19
+ // transforms <input type="range" css={...}> usages
20
+ JSXElement(node) {
21
+ JSXElement.lint(node, {
22
+ context
23
+ });
24
+ }
25
+ };
26
+ }
27
+ });
28
+ export default rule;
@@ -0,0 +1 @@
1
+ export { JSXElement } from './jsx-element';
@@ -0,0 +1,19 @@
1
+ import * as ast from '../../../../ast-nodes';
2
+ import { isSupportedForLint } from '../supported';
3
+ export const JSXElement = {
4
+ lint(node, {
5
+ context
6
+ }) {
7
+ if (!isSupportedForLint(node)) {
8
+ return;
9
+ }
10
+ const nodeName = ast.JSXElement.getName(node);
11
+ context.report({
12
+ node: node.openingElement,
13
+ messageId: 'noHtmlRange',
14
+ data: {
15
+ name: nodeName
16
+ }
17
+ });
18
+ }
19
+ };
@@ -0,0 +1,60 @@
1
+ import { isNodeOfType } from 'eslint-codemod-utils';
2
+ import * as ast from '../../../ast-nodes';
3
+ const supportedElements = [{
4
+ name: 'input',
5
+ attributes: [{
6
+ name: 'type',
7
+ values: ['range']
8
+ }]
9
+ }];
10
+
11
+ /**
12
+ * Determines if the given JSX element is a supported element to lint with this rule.
13
+ */
14
+ export function isSupportedForLint(jsxNode, elementName) {
15
+ if (!isNodeOfType(jsxNode, 'JSXElement')) {
16
+ return false;
17
+ }
18
+
19
+ // Allow passing in the element name because the jsxNode doesn't
20
+ // represent the element name with styled components
21
+ const elName = elementName || ast.JSXElement.getName(jsxNode);
22
+ if (!elName) {
23
+ return false;
24
+ }
25
+
26
+ // Only check native HTML elements, not components
27
+ if (elName[0] !== elName[0].toLowerCase()) {
28
+ return false;
29
+ }
30
+ let supportedElement = supportedElements.find(({
31
+ name
32
+ }) => name === elName);
33
+ if (!supportedElement) {
34
+ supportedElement = supportedElements.find(({
35
+ name
36
+ }) => name === '*');
37
+ }
38
+ if (!supportedElement) {
39
+ return false;
40
+ }
41
+
42
+ // Check if the element has any attributes that are not supported
43
+ const attributes = ast.JSXElement.getAttributes(jsxNode);
44
+ if (supportedElement.attributes && !supportedElement.attributes.every(({
45
+ name,
46
+ values
47
+ }) => {
48
+ return attributes.some(attribute => {
49
+ if (attribute.type === 'JSXSpreadAttribute') {
50
+ return false;
51
+ }
52
+ const isMatchingName = attribute.name.name === name;
53
+ const isMatchingValues = values && attribute.value && attribute.value.type === 'Literal' && typeof attribute.value.value === 'string' && (values === null || values === void 0 ? void 0 : values.includes(attribute.value.value));
54
+ return isMatchingName && isMatchingValues;
55
+ });
56
+ })) {
57
+ return false;
58
+ }
59
+ return true;
60
+ }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::9a179b7d6c19d5c7eafde6b3ae40233b>>
3
+ * @codegen <<SignedSource::cadedc68c5a8a92d8134b8aa5239937f>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
 
@@ -26,6 +26,7 @@ export default {
26
26
  '@atlaskit/design-system/no-html-button': 'warn',
27
27
  '@atlaskit/design-system/no-html-checkbox': 'warn',
28
28
  '@atlaskit/design-system/no-html-image': 'warn',
29
+ '@atlaskit/design-system/no-html-range': 'warn',
29
30
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
30
31
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
31
32
  }],
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::08dc1cc7cbbf7112f2f5733f57a9e2b1>>
3
+ * @codegen <<SignedSource::340bf9f79ec1de1340a89df9d626b929>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
 
@@ -25,6 +25,7 @@ export default {
25
25
  '@atlaskit/design-system/no-html-button': 'warn',
26
26
  '@atlaskit/design-system/no-html-checkbox': 'warn',
27
27
  '@atlaskit/design-system/no-html-image': 'warn',
28
+ '@atlaskit/design-system/no-html-range': 'warn',
28
29
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
29
30
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
30
31
  }],
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::81564fd37c062c0be3a14ca6ea1e4271>>
3
+ * @codegen <<SignedSource::c264ea60cc6348c4292744c1260543d8>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
 
@@ -21,6 +21,7 @@ export default {
21
21
  '@atlaskit/design-system/no-html-button': 'warn',
22
22
  '@atlaskit/design-system/no-html-checkbox': 'warn',
23
23
  '@atlaskit/design-system/no-html-image': 'warn',
24
+ '@atlaskit/design-system/no-html-range': 'warn',
24
25
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
25
26
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
26
27
  }],
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::175936d329524b99169a5dc943011231>>
3
+ * @codegen <<SignedSource::0158deb3db6cafbdeae2aeb18673ebc2>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
 
@@ -20,6 +20,7 @@ export default {
20
20
  '@atlaskit/design-system/no-html-button': 'warn',
21
21
  '@atlaskit/design-system/no-html-checkbox': 'warn',
22
22
  '@atlaskit/design-system/no-html-image': 'warn',
23
+ '@atlaskit/design-system/no-html-range': 'warn',
23
24
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
24
25
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
25
26
  }],
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::3cefc1b277e5c633caf1fd4491d60d94>>
3
+ * @codegen <<SignedSource::5945e51ebc0b2c3553b51162f07dbd63>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
  import consistentCssPropUsage from './consistent-css-prop-usage';
@@ -24,6 +24,7 @@ import noHtmlAnchor from './no-html-anchor';
24
24
  import noHtmlButton from './no-html-button';
25
25
  import noHtmlCheckbox from './no-html-checkbox';
26
26
  import noHtmlImage from './no-html-image';
27
+ import noHtmlRange from './no-html-range';
27
28
  import noInvalidCssMap from './no-invalid-css-map';
28
29
  import noKeyframesTaggedTemplateExpression from './no-keyframes-tagged-template-expression';
29
30
  import noLegacyIcons from './no-legacy-icons';
@@ -78,6 +79,7 @@ export var rules = {
78
79
  'no-html-button': noHtmlButton,
79
80
  'no-html-checkbox': noHtmlCheckbox,
80
81
  'no-html-image': noHtmlImage,
82
+ 'no-html-range': noHtmlRange,
81
83
  'no-invalid-css-map': noInvalidCssMap,
82
84
  'no-keyframes-tagged-template-expression': noKeyframesTaggedTemplateExpression,
83
85
  'no-legacy-icons': noLegacyIcons,
@@ -0,0 +1,28 @@
1
+ import { createLintRule } from '../utils/create-rule';
2
+ import { JSXElement as _JSXElement } from './node-types';
3
+ var rule = createLintRule({
4
+ meta: {
5
+ name: 'no-html-range',
6
+ type: 'suggestion',
7
+ hasSuggestions: true,
8
+ docs: {
9
+ description: 'Discourage direct usage of HTML range elements in favor of the Atlassian Design System range component.',
10
+ recommended: true,
11
+ severity: 'warn'
12
+ },
13
+ messages: {
14
+ 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."
15
+ }
16
+ },
17
+ create: function create(context) {
18
+ return {
19
+ // transforms <input type="range" css={...}> usages
20
+ JSXElement: function JSXElement(node) {
21
+ _JSXElement.lint(node, {
22
+ context: context
23
+ });
24
+ }
25
+ };
26
+ }
27
+ });
28
+ export default rule;
@@ -0,0 +1 @@
1
+ export { JSXElement } from './jsx-element';
@@ -0,0 +1,18 @@
1
+ import * as ast from '../../../../ast-nodes';
2
+ import { isSupportedForLint } from '../supported';
3
+ export var JSXElement = {
4
+ lint: function lint(node, _ref) {
5
+ var context = _ref.context;
6
+ if (!isSupportedForLint(node)) {
7
+ return;
8
+ }
9
+ var nodeName = ast.JSXElement.getName(node);
10
+ context.report({
11
+ node: node.openingElement,
12
+ messageId: 'noHtmlRange',
13
+ data: {
14
+ name: nodeName
15
+ }
16
+ });
17
+ }
18
+ };
@@ -0,0 +1,61 @@
1
+ import { isNodeOfType } from 'eslint-codemod-utils';
2
+ import * as ast from '../../../ast-nodes';
3
+ var supportedElements = [{
4
+ name: 'input',
5
+ attributes: [{
6
+ name: 'type',
7
+ values: ['range']
8
+ }]
9
+ }];
10
+
11
+ /**
12
+ * Determines if the given JSX element is a supported element to lint with this rule.
13
+ */
14
+ export function isSupportedForLint(jsxNode, elementName) {
15
+ if (!isNodeOfType(jsxNode, 'JSXElement')) {
16
+ return false;
17
+ }
18
+
19
+ // Allow passing in the element name because the jsxNode doesn't
20
+ // represent the element name with styled components
21
+ var elName = elementName || ast.JSXElement.getName(jsxNode);
22
+ if (!elName) {
23
+ return false;
24
+ }
25
+
26
+ // Only check native HTML elements, not components
27
+ if (elName[0] !== elName[0].toLowerCase()) {
28
+ return false;
29
+ }
30
+ var supportedElement = supportedElements.find(function (_ref) {
31
+ var name = _ref.name;
32
+ return name === elName;
33
+ });
34
+ if (!supportedElement) {
35
+ supportedElement = supportedElements.find(function (_ref2) {
36
+ var name = _ref2.name;
37
+ return name === '*';
38
+ });
39
+ }
40
+ if (!supportedElement) {
41
+ return false;
42
+ }
43
+
44
+ // Check if the element has any attributes that are not supported
45
+ var attributes = ast.JSXElement.getAttributes(jsxNode);
46
+ if (supportedElement.attributes && !supportedElement.attributes.every(function (_ref3) {
47
+ var name = _ref3.name,
48
+ values = _ref3.values;
49
+ return attributes.some(function (attribute) {
50
+ if (attribute.type === 'JSXSpreadAttribute') {
51
+ return false;
52
+ }
53
+ var isMatchingName = attribute.name.name === name;
54
+ var isMatchingValues = values && attribute.value && attribute.value.type === 'Literal' && typeof attribute.value.value === 'string' && (values === null || values === void 0 ? void 0 : values.includes(attribute.value.value));
55
+ return isMatchingName && isMatchingValues;
56
+ });
57
+ })) {
58
+ return false;
59
+ }
60
+ return true;
61
+ }
@@ -36,6 +36,7 @@ export declare const plugin: {
36
36
  'no-html-button': import("eslint").Rule.RuleModule;
37
37
  'no-html-checkbox': import("eslint").Rule.RuleModule;
38
38
  'no-html-image': import("eslint").Rule.RuleModule;
39
+ 'no-html-range': import("eslint").Rule.RuleModule;
39
40
  'no-invalid-css-map': import("eslint").Rule.RuleModule;
40
41
  'no-keyframes-tagged-template-expression': import("eslint").Rule.RuleModule;
41
42
  'no-legacy-icons': import("eslint").Rule.RuleModule;
@@ -91,6 +92,7 @@ export declare const plugin: {
91
92
  '@atlaskit/design-system/no-html-button': "warn";
92
93
  '@atlaskit/design-system/no-html-checkbox': "warn";
93
94
  '@atlaskit/design-system/no-html-image': "warn";
95
+ '@atlaskit/design-system/no-html-range': "warn";
94
96
  '@atlaskit/design-system/no-invalid-css-map': ["error", {
95
97
  allowedFunctionCalls: string[][];
96
98
  }];
@@ -150,6 +152,7 @@ export declare const plugin: {
150
152
  '@atlaskit/design-system/no-html-button': "warn";
151
153
  '@atlaskit/design-system/no-html-checkbox': "warn";
152
154
  '@atlaskit/design-system/no-html-image': "warn";
155
+ '@atlaskit/design-system/no-html-range': "warn";
153
156
  '@atlaskit/design-system/no-invalid-css-map': ["error", {
154
157
  allowedFunctionCalls: string[][];
155
158
  }];
@@ -202,6 +205,7 @@ export declare const plugin: {
202
205
  '@atlaskit/design-system/no-html-button': "warn";
203
206
  '@atlaskit/design-system/no-html-checkbox': "warn";
204
207
  '@atlaskit/design-system/no-html-image': "warn";
208
+ '@atlaskit/design-system/no-html-range': "warn";
205
209
  '@atlaskit/design-system/no-invalid-css-map': ["error", {
206
210
  allowedFunctionCalls: string[][];
207
211
  }];
@@ -245,6 +249,7 @@ export declare const plugin: {
245
249
  '@atlaskit/design-system/no-html-button': "warn";
246
250
  '@atlaskit/design-system/no-html-checkbox': "warn";
247
251
  '@atlaskit/design-system/no-html-image': "warn";
252
+ '@atlaskit/design-system/no-html-range': "warn";
248
253
  '@atlaskit/design-system/no-invalid-css-map': ["error", {
249
254
  allowedFunctionCalls: string[][];
250
255
  }];
@@ -294,6 +299,7 @@ declare const configs: {
294
299
  '@atlaskit/design-system/no-html-button': "warn";
295
300
  '@atlaskit/design-system/no-html-checkbox': "warn";
296
301
  '@atlaskit/design-system/no-html-image': "warn";
302
+ '@atlaskit/design-system/no-html-range': "warn";
297
303
  '@atlaskit/design-system/no-invalid-css-map': ["error", {
298
304
  allowedFunctionCalls: string[][];
299
305
  }];
@@ -353,6 +359,7 @@ declare const configs: {
353
359
  '@atlaskit/design-system/no-html-button': "warn";
354
360
  '@atlaskit/design-system/no-html-checkbox': "warn";
355
361
  '@atlaskit/design-system/no-html-image': "warn";
362
+ '@atlaskit/design-system/no-html-range': "warn";
356
363
  '@atlaskit/design-system/no-invalid-css-map': ["error", {
357
364
  allowedFunctionCalls: string[][];
358
365
  }];
@@ -405,6 +412,7 @@ declare const configs: {
405
412
  '@atlaskit/design-system/no-html-button': "warn";
406
413
  '@atlaskit/design-system/no-html-checkbox': "warn";
407
414
  '@atlaskit/design-system/no-html-image': "warn";
415
+ '@atlaskit/design-system/no-html-range': "warn";
408
416
  '@atlaskit/design-system/no-invalid-css-map': ["error", {
409
417
  allowedFunctionCalls: string[][];
410
418
  }];
@@ -448,6 +456,7 @@ declare const configs: {
448
456
  '@atlaskit/design-system/no-html-button': "warn";
449
457
  '@atlaskit/design-system/no-html-checkbox': "warn";
450
458
  '@atlaskit/design-system/no-html-image': "warn";
459
+ '@atlaskit/design-system/no-html-range': "warn";
451
460
  '@atlaskit/design-system/no-invalid-css-map': ["error", {
452
461
  allowedFunctionCalls: string[][];
453
462
  }];
@@ -19,6 +19,7 @@ declare const _default: {
19
19
  '@atlaskit/design-system/no-html-button': "warn";
20
20
  '@atlaskit/design-system/no-html-checkbox': "warn";
21
21
  '@atlaskit/design-system/no-html-image': "warn";
22
+ '@atlaskit/design-system/no-html-range': "warn";
22
23
  '@atlaskit/design-system/no-invalid-css-map': ["error", {
23
24
  allowedFunctionCalls: string[][];
24
25
  }];
@@ -19,6 +19,7 @@ declare const _default: {
19
19
  '@atlaskit/design-system/no-html-button': "warn";
20
20
  '@atlaskit/design-system/no-html-checkbox': "warn";
21
21
  '@atlaskit/design-system/no-html-image': "warn";
22
+ '@atlaskit/design-system/no-html-range': "warn";
22
23
  '@atlaskit/design-system/no-invalid-css-map': ["error", {
23
24
  allowedFunctionCalls: string[][];
24
25
  }];
@@ -14,6 +14,7 @@ declare const _default: {
14
14
  '@atlaskit/design-system/no-html-button': "warn";
15
15
  '@atlaskit/design-system/no-html-checkbox': "warn";
16
16
  '@atlaskit/design-system/no-html-image': "warn";
17
+ '@atlaskit/design-system/no-html-range': "warn";
17
18
  '@atlaskit/design-system/no-invalid-css-map': ["error", {
18
19
  allowedFunctionCalls: string[][];
19
20
  }];
@@ -14,6 +14,7 @@ declare const _default: {
14
14
  '@atlaskit/design-system/no-html-button': "warn";
15
15
  '@atlaskit/design-system/no-html-checkbox': "warn";
16
16
  '@atlaskit/design-system/no-html-image': "warn";
17
+ '@atlaskit/design-system/no-html-range': "warn";
17
18
  '@atlaskit/design-system/no-invalid-css-map': ["error", {
18
19
  allowedFunctionCalls: string[][];
19
20
  }];
@@ -20,6 +20,7 @@ export declare const rules: {
20
20
  'no-html-button': import("eslint").Rule.RuleModule;
21
21
  'no-html-checkbox': import("eslint").Rule.RuleModule;
22
22
  'no-html-image': import("eslint").Rule.RuleModule;
23
+ 'no-html-range': import("eslint").Rule.RuleModule;
23
24
  'no-invalid-css-map': import("eslint").Rule.RuleModule;
24
25
  'no-keyframes-tagged-template-expression': import("eslint").Rule.RuleModule;
25
26
  'no-legacy-icons': import("eslint").Rule.RuleModule;
@@ -0,0 +1,3 @@
1
+ import type { Rule } from 'eslint';
2
+ declare const rule: Rule.RuleModule;
3
+ export default rule;
@@ -0,0 +1 @@
1
+ export { JSXElement } from './jsx-element';
@@ -0,0 +1,8 @@
1
+ import type { Rule } from 'eslint';
2
+ interface MetaData {
3
+ context: Rule.RuleContext;
4
+ }
5
+ export declare const JSXElement: {
6
+ lint(node: Rule.Node, { context }: MetaData): void;
7
+ };
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type EslintNode } from 'eslint-codemod-utils';
2
+ /**
3
+ * Determines if the given JSX element is a supported element to lint with this rule.
4
+ */
5
+ export declare function isSupportedForLint(jsxNode: EslintNode, elementName?: string): jsxNode is Extract<EslintNode, {
6
+ type: 'JSXElement';
7
+ }>;
@@ -36,6 +36,7 @@ export declare const plugin: {
36
36
  'no-html-button': import("eslint").Rule.RuleModule;
37
37
  'no-html-checkbox': import("eslint").Rule.RuleModule;
38
38
  'no-html-image': import("eslint").Rule.RuleModule;
39
+ 'no-html-range': import("eslint").Rule.RuleModule;
39
40
  'no-invalid-css-map': import("eslint").Rule.RuleModule;
40
41
  'no-keyframes-tagged-template-expression': import("eslint").Rule.RuleModule;
41
42
  'no-legacy-icons': import("eslint").Rule.RuleModule;
@@ -91,6 +92,7 @@ export declare const plugin: {
91
92
  '@atlaskit/design-system/no-html-button': "warn";
92
93
  '@atlaskit/design-system/no-html-checkbox': "warn";
93
94
  '@atlaskit/design-system/no-html-image': "warn";
95
+ '@atlaskit/design-system/no-html-range': "warn";
94
96
  '@atlaskit/design-system/no-invalid-css-map': [
95
97
  "error",
96
98
  {
@@ -153,6 +155,7 @@ export declare const plugin: {
153
155
  '@atlaskit/design-system/no-html-button': "warn";
154
156
  '@atlaskit/design-system/no-html-checkbox': "warn";
155
157
  '@atlaskit/design-system/no-html-image': "warn";
158
+ '@atlaskit/design-system/no-html-range': "warn";
156
159
  '@atlaskit/design-system/no-invalid-css-map': [
157
160
  "error",
158
161
  {
@@ -208,6 +211,7 @@ export declare const plugin: {
208
211
  '@atlaskit/design-system/no-html-button': "warn";
209
212
  '@atlaskit/design-system/no-html-checkbox': "warn";
210
213
  '@atlaskit/design-system/no-html-image': "warn";
214
+ '@atlaskit/design-system/no-html-range': "warn";
211
215
  '@atlaskit/design-system/no-invalid-css-map': [
212
216
  "error",
213
217
  {
@@ -254,6 +258,7 @@ export declare const plugin: {
254
258
  '@atlaskit/design-system/no-html-button': "warn";
255
259
  '@atlaskit/design-system/no-html-checkbox': "warn";
256
260
  '@atlaskit/design-system/no-html-image': "warn";
261
+ '@atlaskit/design-system/no-html-range': "warn";
257
262
  '@atlaskit/design-system/no-invalid-css-map': [
258
263
  "error",
259
264
  {
@@ -306,6 +311,7 @@ declare const configs: {
306
311
  '@atlaskit/design-system/no-html-button': "warn";
307
312
  '@atlaskit/design-system/no-html-checkbox': "warn";
308
313
  '@atlaskit/design-system/no-html-image': "warn";
314
+ '@atlaskit/design-system/no-html-range': "warn";
309
315
  '@atlaskit/design-system/no-invalid-css-map': [
310
316
  "error",
311
317
  {
@@ -368,6 +374,7 @@ declare const configs: {
368
374
  '@atlaskit/design-system/no-html-button': "warn";
369
375
  '@atlaskit/design-system/no-html-checkbox': "warn";
370
376
  '@atlaskit/design-system/no-html-image': "warn";
377
+ '@atlaskit/design-system/no-html-range': "warn";
371
378
  '@atlaskit/design-system/no-invalid-css-map': [
372
379
  "error",
373
380
  {
@@ -423,6 +430,7 @@ declare const configs: {
423
430
  '@atlaskit/design-system/no-html-button': "warn";
424
431
  '@atlaskit/design-system/no-html-checkbox': "warn";
425
432
  '@atlaskit/design-system/no-html-image': "warn";
433
+ '@atlaskit/design-system/no-html-range': "warn";
426
434
  '@atlaskit/design-system/no-invalid-css-map': [
427
435
  "error",
428
436
  {
@@ -469,6 +477,7 @@ declare const configs: {
469
477
  '@atlaskit/design-system/no-html-button': "warn";
470
478
  '@atlaskit/design-system/no-html-checkbox': "warn";
471
479
  '@atlaskit/design-system/no-html-image': "warn";
480
+ '@atlaskit/design-system/no-html-range': "warn";
472
481
  '@atlaskit/design-system/no-invalid-css-map': [
473
482
  "error",
474
483
  {
@@ -19,6 +19,7 @@ declare const _default: {
19
19
  '@atlaskit/design-system/no-html-button': "warn";
20
20
  '@atlaskit/design-system/no-html-checkbox': "warn";
21
21
  '@atlaskit/design-system/no-html-image': "warn";
22
+ '@atlaskit/design-system/no-html-range': "warn";
22
23
  '@atlaskit/design-system/no-invalid-css-map': [
23
24
  "error",
24
25
  {
@@ -19,6 +19,7 @@ declare const _default: {
19
19
  '@atlaskit/design-system/no-html-button': "warn";
20
20
  '@atlaskit/design-system/no-html-checkbox': "warn";
21
21
  '@atlaskit/design-system/no-html-image': "warn";
22
+ '@atlaskit/design-system/no-html-range': "warn";
22
23
  '@atlaskit/design-system/no-invalid-css-map': [
23
24
  "error",
24
25
  {
@@ -14,6 +14,7 @@ declare const _default: {
14
14
  '@atlaskit/design-system/no-html-button': "warn";
15
15
  '@atlaskit/design-system/no-html-checkbox': "warn";
16
16
  '@atlaskit/design-system/no-html-image': "warn";
17
+ '@atlaskit/design-system/no-html-range': "warn";
17
18
  '@atlaskit/design-system/no-invalid-css-map': [
18
19
  "error",
19
20
  {
@@ -14,6 +14,7 @@ declare const _default: {
14
14
  '@atlaskit/design-system/no-html-button': "warn";
15
15
  '@atlaskit/design-system/no-html-checkbox': "warn";
16
16
  '@atlaskit/design-system/no-html-image': "warn";
17
+ '@atlaskit/design-system/no-html-range': "warn";
17
18
  '@atlaskit/design-system/no-invalid-css-map': [
18
19
  "error",
19
20
  {
@@ -20,6 +20,7 @@ export declare const rules: {
20
20
  'no-html-button': import("eslint").Rule.RuleModule;
21
21
  'no-html-checkbox': import("eslint").Rule.RuleModule;
22
22
  'no-html-image': import("eslint").Rule.RuleModule;
23
+ 'no-html-range': import("eslint").Rule.RuleModule;
23
24
  'no-invalid-css-map': import("eslint").Rule.RuleModule;
24
25
  'no-keyframes-tagged-template-expression': import("eslint").Rule.RuleModule;
25
26
  'no-legacy-icons': import("eslint").Rule.RuleModule;
@@ -0,0 +1,3 @@
1
+ import type { Rule } from 'eslint';
2
+ declare const rule: Rule.RuleModule;
3
+ export default rule;
@@ -0,0 +1 @@
1
+ export { JSXElement } from './jsx-element';
@@ -0,0 +1,8 @@
1
+ import type { Rule } from 'eslint';
2
+ interface MetaData {
3
+ context: Rule.RuleContext;
4
+ }
5
+ export declare const JSXElement: {
6
+ lint(node: Rule.Node, { context }: MetaData): void;
7
+ };
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type EslintNode } from 'eslint-codemod-utils';
2
+ /**
3
+ * Determines if the given JSX element is a supported element to lint with this rule.
4
+ */
5
+ export declare function isSupportedForLint(jsxNode: EslintNode, elementName?: string): jsxNode is Extract<EslintNode, {
6
+ type: 'JSXElement';
7
+ }>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
3
  "description": "The essential plugin for use with the Atlassian Design System.",
4
- "version": "13.7.0",
4
+ "version": "13.8.0",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
7
7
  "publishConfig": {