@atlaskit/eslint-plugin-design-system 13.40.4 → 13.41.1

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 (41) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/presets/all-flat.codegen.js +2 -2
  4. package/dist/cjs/presets/all.codegen.js +2 -2
  5. package/dist/cjs/presets/recommended-flat.codegen.js +2 -2
  6. package/dist/cjs/presets/recommended.codegen.js +2 -2
  7. package/dist/cjs/rules/index.codegen.js +3 -3
  8. package/dist/cjs/rules/no-icon-spacing-prop/helpers.js +250 -0
  9. package/dist/cjs/rules/no-icon-spacing-prop/index.js +139 -0
  10. package/dist/es2019/presets/all-flat.codegen.js +2 -2
  11. package/dist/es2019/presets/all.codegen.js +2 -2
  12. package/dist/es2019/presets/recommended-flat.codegen.js +2 -2
  13. package/dist/es2019/presets/recommended.codegen.js +2 -2
  14. package/dist/es2019/rules/index.codegen.js +3 -3
  15. package/dist/es2019/rules/no-icon-spacing-prop/helpers.js +199 -0
  16. package/dist/es2019/rules/no-icon-spacing-prop/index.js +133 -0
  17. package/dist/esm/presets/all-flat.codegen.js +2 -2
  18. package/dist/esm/presets/all.codegen.js +2 -2
  19. package/dist/esm/presets/recommended-flat.codegen.js +2 -2
  20. package/dist/esm/presets/recommended.codegen.js +2 -2
  21. package/dist/esm/rules/index.codegen.js +3 -3
  22. package/dist/esm/rules/no-icon-spacing-prop/helpers.js +232 -0
  23. package/dist/esm/rules/no-icon-spacing-prop/index.js +133 -0
  24. package/dist/types/presets/all-flat.codegen.d.ts +1 -1
  25. package/dist/types/presets/all.codegen.d.ts +1 -1
  26. package/dist/types/presets/recommended-flat.codegen.d.ts +1 -1
  27. package/dist/types/presets/recommended.codegen.d.ts +1 -1
  28. package/dist/types/rules/index.codegen.d.ts +1 -1
  29. package/dist/types/rules/no-icon-spacing-prop/helpers.d.ts +62 -0
  30. package/dist/types-ts4.5/presets/all-flat.codegen.d.ts +1 -1
  31. package/dist/types-ts4.5/presets/all.codegen.d.ts +1 -1
  32. package/dist/types-ts4.5/presets/recommended-flat.codegen.d.ts +1 -1
  33. package/dist/types-ts4.5/presets/recommended.codegen.d.ts +1 -1
  34. package/dist/types-ts4.5/rules/index.codegen.d.ts +1 -1
  35. package/dist/types-ts4.5/rules/no-icon-spacing-prop/helpers.d.ts +62 -0
  36. package/package.json +4 -4
  37. package/dist/cjs/rules/use-side-nav-items-package/index.js +0 -189
  38. package/dist/es2019/rules/use-side-nav-items-package/index.js +0 -152
  39. package/dist/esm/rules/use-side-nav-items-package/index.js +0 -182
  40. /package/dist/types/rules/{use-side-nav-items-package → no-icon-spacing-prop}/index.d.ts +0 -0
  41. /package/dist/types-ts4.5/rules/{use-side-nav-items-package → no-icon-spacing-prop}/index.d.ts +0 -0
@@ -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::70131b79da4231aaa59e2822b38790c1>>
3
+ * @codegen <<SignedSource::aa118aeb6a9c0d954f6e3a5ea7bd10af>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
 
@@ -28,6 +28,7 @@ const rules = {
28
28
  '@atlaskit/design-system/no-html-select': 'warn',
29
29
  '@atlaskit/design-system/no-html-text-input': 'warn',
30
30
  '@atlaskit/design-system/no-html-textarea': 'warn',
31
+ '@atlaskit/design-system/no-icon-spacing-prop': 'warn',
31
32
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
32
33
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
33
34
  }],
@@ -56,7 +57,6 @@ const rules = {
56
57
  '@atlaskit/design-system/use-popup-label': 'warn',
57
58
  '@atlaskit/design-system/use-primitives-text': 'warn',
58
59
  '@atlaskit/design-system/use-should-render-to-parent': 'warn',
59
- '@atlaskit/design-system/use-side-nav-items-package': 'warn',
60
60
  '@atlaskit/design-system/use-simple-field': 'warn',
61
61
  '@atlaskit/design-system/use-simple-form': 'warn',
62
62
  '@atlaskit/design-system/use-tag-group-label': 'warn',
@@ -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::9644eafd202e31d1b6f6c9b86ad519a2>>
3
+ * @codegen <<SignedSource::5d0d1213db83267889fa81e0aab419f7>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
 
@@ -37,6 +37,7 @@ import noHtmlRange from './no-html-range';
37
37
  import noHtmlSelect from './no-html-select';
38
38
  import noHtmlTextInput from './no-html-text-input';
39
39
  import noHtmlTextarea from './no-html-textarea';
40
+ import noIconSpacingProp from './no-icon-spacing-prop';
40
41
  import noInvalidCssMap from './no-invalid-css-map';
41
42
  import noKeyframesTaggedTemplateExpression from './no-keyframes-tagged-template-expression';
42
43
  import noLegacyIcons from './no-legacy-icons';
@@ -72,7 +73,6 @@ import usePopupLabel from './use-popup-label';
72
73
  import usePrimitives from './use-primitives';
73
74
  import usePrimitivesText from './use-primitives-text';
74
75
  import useShouldRenderToParent from './use-should-render-to-parent';
75
- import useSideNavItemsPackage from './use-side-nav-items-package';
76
76
  import useSimpleField from './use-simple-field';
77
77
  import useSimpleForm from './use-simple-form';
78
78
  import useSpotlightPackage from './use-spotlight-package';
@@ -115,6 +115,7 @@ export const rules = {
115
115
  'no-html-select': noHtmlSelect,
116
116
  'no-html-text-input': noHtmlTextInput,
117
117
  'no-html-textarea': noHtmlTextarea,
118
+ 'no-icon-spacing-prop': noIconSpacingProp,
118
119
  'no-invalid-css-map': noInvalidCssMap,
119
120
  'no-keyframes-tagged-template-expression': noKeyframesTaggedTemplateExpression,
120
121
  'no-legacy-icons': noLegacyIcons,
@@ -150,7 +151,6 @@ export const rules = {
150
151
  'use-primitives': usePrimitives,
151
152
  'use-primitives-text': usePrimitivesText,
152
153
  'use-should-render-to-parent': useShouldRenderToParent,
153
- 'use-side-nav-items-package': useSideNavItemsPackage,
154
154
  'use-simple-field': useSimpleField,
155
155
  'use-simple-form': useSimpleForm,
156
156
  'use-spotlight-package': useSpotlightPackage,
@@ -0,0 +1,199 @@
1
+ import { isNodeOfType } from 'eslint-codemod-utils';
2
+ import { getSourceCode } from '@atlaskit/eslint-utils/context-compat';
3
+ import * as ast from '../../ast-nodes';
4
+ import { Import } from '../../ast-nodes/import';
5
+ export const BOX_IMPORT_MODULE = '@atlaskit/primitives/compiled';
6
+ export const BOX_IMPORT_MODULE_NON_COMPILED = '@atlaskit/primitives';
7
+ export const TOKEN_IMPORT_MODULE = '@atlaskit/tokens';
8
+ export const CSS_IMPORT_MODULE = '@atlaskit/css';
9
+ export const CSSMAP_VARIABLE_NAME = 'iconSpacingStyles';
10
+
11
+ /**
12
+ * Padding token mapping based on icon size and spacing value.
13
+ * Same mapping as the codemod `icon-spacing-to-box-primitive`.
14
+ */
15
+ export const SPACING_TO_PADDING = {
16
+ medium: {
17
+ compact: 'space.050',
18
+ spacious: 'space.050'
19
+ },
20
+ small: {
21
+ compact: 'space.025',
22
+ spacious: 'space.075'
23
+ }
24
+ };
25
+
26
+ /**
27
+ * Maps a padding token to a cssMap key name.
28
+ * e.g. 'space.050' → 'space050'
29
+ */
30
+ export function getCssMapKey(paddingToken) {
31
+ return paddingToken.replace('space.', 'space');
32
+ }
33
+
34
+ /**
35
+ * Returns the `spacing` JSXAttribute from an icon element, or undefined.
36
+ */
37
+ export function getSpacingAttribute(node) {
38
+ if (!isNodeOfType(node.openingElement, 'JSXOpeningElement')) {
39
+ return undefined;
40
+ }
41
+ return node.openingElement.attributes.find(a => a.type === 'JSXAttribute' && a.name.name === 'spacing');
42
+ }
43
+
44
+ /**
45
+ * Returns the static string value of a JSXAttribute, or undefined if dynamic.
46
+ */
47
+ export function getStaticAttributeValue(attr) {
48
+ if (attr.value && attr.value.type === 'Literal' && typeof attr.value.value === 'string') {
49
+ return attr.value.value;
50
+ }
51
+ return undefined;
52
+ }
53
+
54
+ /**
55
+ * Returns the static `size` prop value, defaulting to 'medium' if not present.
56
+ */
57
+ export function getIconSize(node) {
58
+ if (!isNodeOfType(node.openingElement, 'JSXOpeningElement')) {
59
+ return 'medium';
60
+ }
61
+ const sizeAttr = node.openingElement.attributes.find(a => a.type === 'JSXAttribute' && a.name.name === 'size');
62
+ if (!sizeAttr) {
63
+ return 'medium';
64
+ }
65
+ return getStaticAttributeValue(sizeAttr);
66
+ }
67
+
68
+ /**
69
+ * Returns true if the element has any JSXSpreadAttribute.
70
+ */
71
+ export function hasSpreadProps(node) {
72
+ return node.openingElement.attributes.some(a => a.type === 'JSXSpreadAttribute');
73
+ }
74
+
75
+ /**
76
+ * Upserts `Box` from `@atlaskit/primitives/compiled`, handling:
77
+ * 1. Already imported from `/compiled` → add Box if missing
78
+ * 2. Import from `@atlaskit/primitives` (non-compiled) → migrate path + add Box
79
+ * 3. No import → insert new `import { Box } from '@atlaskit/primitives/compiled'`
80
+ */
81
+ export function upsertBoxImport(context, fixer) {
82
+ const root = getSourceCode(context).ast.body;
83
+ const findExactImports = module => root.filter(node => node.type === 'ImportDeclaration' && node.source.value === module);
84
+ const compiledImports = findExactImports(BOX_IMPORT_MODULE);
85
+ if (compiledImports.length > 0) {
86
+ const decl = compiledImports[0];
87
+ if (Import.containsNamedSpecifier(decl, 'Box')) {
88
+ return undefined;
89
+ }
90
+ const specifiers = decl.specifiers.filter(s => s.type === 'ImportSpecifier').map(s => s.local.name);
91
+ specifiers.push('Box');
92
+ return fixer.replaceText(decl, `import { ${specifiers.join(', ')} } from '${BOX_IMPORT_MODULE}';`);
93
+ }
94
+ const nonCompiledImports = findExactImports(BOX_IMPORT_MODULE_NON_COMPILED);
95
+ if (nonCompiledImports.length > 0) {
96
+ const decl = nonCompiledImports[0];
97
+ const specifiers = decl.specifiers.filter(s => s.type === 'ImportSpecifier').map(s => s.local.name);
98
+ if (!specifiers.includes('Box')) specifiers.push('Box');
99
+ return fixer.replaceText(decl, `import { ${specifiers.join(', ')} } from '${BOX_IMPORT_MODULE}';`);
100
+ }
101
+ return ast.Root.upsertNamedImportDeclaration({
102
+ module: BOX_IMPORT_MODULE,
103
+ specifiers: ['Box']
104
+ }, context, fixer);
105
+ }
106
+
107
+ /**
108
+ * Upserts `cssMap` from `@atlaskit/css`, handling:
109
+ * 1. Already imported → no-op
110
+ * 2. `@atlaskit/css` exists but missing `cssMap` → add specifier
111
+ * 3. No import → insert new `import { cssMap } from '@atlaskit/css'`
112
+ */
113
+ export function upsertCssMapImport(context, fixer) {
114
+ const root = getSourceCode(context).ast.body;
115
+ const cssImports = root.filter(node => node.type === 'ImportDeclaration' && node.source.value === CSS_IMPORT_MODULE);
116
+ if (cssImports.length > 0) {
117
+ const decl = cssImports[0];
118
+ const hasCssMap = Import.containsNamedSpecifier(decl, 'cssMap');
119
+ if (hasCssMap) {
120
+ return undefined;
121
+ }
122
+ const specifiers = decl.specifiers.filter(s => s.type === 'ImportSpecifier').map(s => s.local.name);
123
+ if (!hasCssMap) specifiers.push('cssMap');
124
+ return fixer.replaceText(decl, `import { ${specifiers.join(', ')} } from '${CSS_IMPORT_MODULE}';`);
125
+ }
126
+ return ast.Root.upsertNamedImportDeclaration({
127
+ module: CSS_IMPORT_MODULE,
128
+ specifiers: ['cssMap']
129
+ }, context, fixer);
130
+ }
131
+
132
+ /**
133
+ * Upserts `token` from `@atlaskit/tokens`, handling:
134
+ * 1. Already imported → no-op
135
+ * 2. `@atlaskit/tokens` exists but missing `token` → add specifier
136
+ * 3. No import → insert new `import { token } from '@atlaskit/tokens'`
137
+ */
138
+ export function upsertTokenImport(context, fixer) {
139
+ const root = getSourceCode(context).ast.body;
140
+ const tokenImports = root.filter(node => node.type === 'ImportDeclaration' && node.source.value === TOKEN_IMPORT_MODULE);
141
+ if (tokenImports.length > 0) {
142
+ const decl = tokenImports[0];
143
+ if (Import.containsNamedSpecifier(decl, 'token')) {
144
+ return undefined;
145
+ }
146
+ const specifiers = decl.specifiers.filter(s => s.type === 'ImportSpecifier').map(s => s.local.name);
147
+ specifiers.push('token');
148
+ return fixer.replaceText(decl, `import { ${specifiers.join(', ')} } from '${TOKEN_IMPORT_MODULE}';`);
149
+ }
150
+ return ast.Root.upsertNamedImportDeclaration({
151
+ module: TOKEN_IMPORT_MODULE,
152
+ specifiers: ['token']
153
+ }, context, fixer);
154
+ }
155
+
156
+ /**
157
+ * Inserts or updates `const iconSpacingStyles = cssMap({ spaceXXX: { padding: token('space.XXX') } })`
158
+ * after the last import statement.
159
+ *
160
+ * If `iconSpacingStyles` already exists, adds the new key to the existing cssMap object.
161
+ * If it doesn't exist, inserts a new declaration after the last import.
162
+ */
163
+ export function upsertCssMapVariable(context, fixer, paddingToken) {
164
+ const sourceCode = getSourceCode(context);
165
+ const body = sourceCode.ast.body;
166
+ const key = getCssMapKey(paddingToken);
167
+ const keyValuePair = ` ${key}: { paddingTop: token('${paddingToken}'), paddingRight: token('${paddingToken}'), paddingBottom: token('${paddingToken}'), paddingLeft: token('${paddingToken}') }`;
168
+
169
+ // Check if iconSpacingStyles cssMap variable already exists
170
+ const existingVar = body.find(node => {
171
+ var _node$declarations$, _node$declarations$0$;
172
+ return node.type === 'VariableDeclaration' && ((_node$declarations$ = node.declarations[0]) === null || _node$declarations$ === void 0 ? void 0 : _node$declarations$.type) === 'VariableDeclarator' && ((_node$declarations$0$ = node.declarations[0].id) === null || _node$declarations$0$ === void 0 ? void 0 : _node$declarations$0$.name) === CSSMAP_VARIABLE_NAME;
173
+ });
174
+ if (existingVar) {
175
+ // Check if the key already exists in the cssMap
176
+ const varText = sourceCode.getText(existingVar);
177
+ if (varText.includes(key + ':') || varText.includes(`'${key}'`)) {
178
+ return undefined;
179
+ }
180
+ // Add the key to the existing cssMap — insert before the closing }
181
+ const closingBrace = sourceCode.getText(existingVar).lastIndexOf('}');
182
+ const existingVarStart = existingVar.range[0];
183
+ return fixer.insertTextAfterRange([existingVarStart, existingVarStart + closingBrace], `,\n${keyValuePair}\n`);
184
+ }
185
+
186
+ // Find last import to insert after it
187
+ const lastImport = [...body].reverse().find(n => n.type === 'ImportDeclaration');
188
+ const declaration = `\nconst ${CSSMAP_VARIABLE_NAME} = cssMap({\n${keyValuePair},\n});`;
189
+ if (lastImport) {
190
+ return fixer.insertTextAfter(lastImport, declaration);
191
+ }
192
+
193
+ // No imports — insert at the start of the file
194
+ const firstNode = body[0];
195
+ if (firstNode) {
196
+ return fixer.insertTextBefore(firstNode, declaration);
197
+ }
198
+ return undefined;
199
+ }
@@ -0,0 +1,133 @@
1
+ import { createIsFromImportSourceFor } from '../no-custom-icons/checks/is-from-import-source';
2
+ import { createLintRule } from '../utils/create-rule';
3
+ import { errorBoundary } from '../utils/error-boundary';
4
+ import { CSSMAP_VARIABLE_NAME, getCssMapKey, getIconSize, getSpacingAttribute, getStaticAttributeValue, hasSpreadProps, SPACING_TO_PADDING, upsertBoxImport, upsertCssMapImport, upsertCssMapVariable, upsertTokenImport } from './helpers';
5
+ const rule = createLintRule({
6
+ meta: {
7
+ name: 'no-icon-spacing-prop',
8
+ hasSuggestions: true,
9
+ type: 'suggestion',
10
+ docs: {
11
+ description: 'Disallows usage of the deprecated spacing prop on new icons. Use Box with cssMap for spacing instead.',
12
+ recommended: true,
13
+ severity: 'warn'
14
+ },
15
+ messages: {
16
+ noSpacingProp: "The `spacing` prop on icon component '{{iconName}}' is deprecated. Wrap the icon in a `<Box xcss={iconSpacingStyles.spaceXXX}>` using `cssMap` from `@atlaskit/css` instead.",
17
+ noSpacingPropManual: "The `spacing` prop on icon component '{{iconName}}' is deprecated but cannot be auto-fixed ({{reason}}). Manually wrap the icon in a `<Box xcss={...}>` using `cssMap` from `@atlaskit/css`.",
18
+ suggestRemoveSpacing: 'Remove the `spacing` prop.',
19
+ suggestWrapInBox: 'Wrap in `<Box xcss={{{cssMapVarName}}.{{cssMapKey}}}>` and remove the `spacing` prop.'
20
+ }
21
+ },
22
+ create(context) {
23
+ const isNewIcon = createIsFromImportSourceFor(/^@(atlaskit\/icon|atlaskit\/icon-lab|atlassian\/icon-private)\/core\//);
24
+ return errorBoundary({
25
+ JSXElement(node) {
26
+ var _SPACING_TO_PADDING$s;
27
+ if (!isNewIcon(node)) {
28
+ return;
29
+ }
30
+ const spacingAttr = getSpacingAttribute(node);
31
+ if (!spacingAttr) {
32
+ return;
33
+ }
34
+ const iconName = node.openingElement.name.type === 'JSXIdentifier' ? node.openingElement.name.name : 'Unknown';
35
+ const spacingValue = getStaticAttributeValue(spacingAttr);
36
+ const hasSpread = hasSpreadProps(node);
37
+ if (!spacingValue || hasSpread) {
38
+ const reason = hasSpread ? 'spread props present' : 'dynamic spacing value';
39
+ context.report({
40
+ node: node.openingElement,
41
+ messageId: 'noSpacingPropManual',
42
+ data: {
43
+ iconName,
44
+ reason
45
+ }
46
+ });
47
+ return;
48
+ }
49
+ if (spacingValue === 'none') {
50
+ context.report({
51
+ node: node.openingElement,
52
+ messageId: 'noSpacingProp',
53
+ data: {
54
+ iconName
55
+ },
56
+ suggest: [{
57
+ messageId: 'suggestRemoveSpacing',
58
+ fix(fixer) {
59
+ return fixer.remove(spacingAttr);
60
+ }
61
+ }]
62
+ });
63
+ return;
64
+ }
65
+ const size = getIconSize(node);
66
+ if (!size || !((_SPACING_TO_PADDING$s = SPACING_TO_PADDING[size]) !== null && _SPACING_TO_PADDING$s !== void 0 && _SPACING_TO_PADDING$s[spacingValue])) {
67
+ context.report({
68
+ node: node.openingElement,
69
+ messageId: 'noSpacingPropManual',
70
+ data: {
71
+ iconName,
72
+ reason: `unknown size '${size}' or spacing '${spacingValue}'`
73
+ }
74
+ });
75
+ return;
76
+ }
77
+ const paddingToken = SPACING_TO_PADDING[size][spacingValue];
78
+ const cssMapKey = getCssMapKey(paddingToken);
79
+ context.report({
80
+ node: node.openingElement,
81
+ messageId: 'noSpacingProp',
82
+ data: {
83
+ iconName
84
+ },
85
+ suggest: [{
86
+ messageId: 'suggestWrapInBox',
87
+ data: {
88
+ cssMapVarName: CSSMAP_VARIABLE_NAME,
89
+ cssMapKey
90
+ },
91
+ fix(fixer) {
92
+ const fixes = [];
93
+
94
+ // 1. Remove spacing prop
95
+ fixes.push(fixer.remove(spacingAttr));
96
+
97
+ // 2. Wrap in Box with cssMap reference
98
+ fixes.push(fixer.insertTextBefore(node, `<Box xcss={${CSSMAP_VARIABLE_NAME}.${cssMapKey}}>`));
99
+ fixes.push(fixer.insertTextAfter(node, `</Box>`));
100
+
101
+ // 3. Insert/update cssMap variable after last import
102
+ const cssMapFix = upsertCssMapVariable(context, fixer, paddingToken);
103
+ if (cssMapFix) {
104
+ fixes.push(cssMapFix);
105
+ }
106
+
107
+ // 4. Add/update @atlaskit/css import (cssMap)
108
+ const cssFix = upsertCssMapImport(context, fixer);
109
+ if (cssFix) {
110
+ fixes.push(cssFix);
111
+ }
112
+
113
+ // 5. Add Box to @atlaskit/primitives/compiled
114
+ const boxFix = upsertBoxImport(context, fixer);
115
+ if (boxFix) {
116
+ fixes.push(boxFix);
117
+ }
118
+
119
+ // 6. Add token from @atlaskit/tokens
120
+ const tokenFix = upsertTokenImport(context, fixer);
121
+ if (tokenFix) {
122
+ fixes.push(tokenFix);
123
+ }
124
+ return fixes;
125
+ }
126
+ }]
127
+ });
128
+ },
129
+ ImportDeclaration: isNewIcon.importDeclarationHook
130
+ });
131
+ }
132
+ });
133
+ export default rule;
@@ -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::82ab0b678e51fc2eba27b6725ea60840>>
3
+ * @codegen <<SignedSource::6a7b233fc5b211ee3868899e1525bbdb>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
 
@@ -38,6 +38,7 @@ var rules = {
38
38
  '@atlaskit/design-system/no-html-select': 'warn',
39
39
  '@atlaskit/design-system/no-html-text-input': 'warn',
40
40
  '@atlaskit/design-system/no-html-textarea': 'warn',
41
+ '@atlaskit/design-system/no-icon-spacing-prop': 'warn',
41
42
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
42
43
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
43
44
  }],
@@ -75,7 +76,6 @@ var rules = {
75
76
  '@atlaskit/design-system/use-primitives': 'warn',
76
77
  '@atlaskit/design-system/use-primitives-text': 'warn',
77
78
  '@atlaskit/design-system/use-should-render-to-parent': 'warn',
78
- '@atlaskit/design-system/use-side-nav-items-package': 'warn',
79
79
  '@atlaskit/design-system/use-simple-field': 'warn',
80
80
  '@atlaskit/design-system/use-simple-form': 'warn',
81
81
  '@atlaskit/design-system/use-spotlight-package': 'warn',
@@ -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::7ee6b956e557a4528e187fef69ff1014>>
3
+ * @codegen <<SignedSource::69b963bac3d18247c1cba21a3bca7bb4>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
 
@@ -37,6 +37,7 @@ var rules = {
37
37
  '@atlaskit/design-system/no-html-select': 'warn',
38
38
  '@atlaskit/design-system/no-html-text-input': 'warn',
39
39
  '@atlaskit/design-system/no-html-textarea': 'warn',
40
+ '@atlaskit/design-system/no-icon-spacing-prop': 'warn',
40
41
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
41
42
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
42
43
  }],
@@ -74,7 +75,6 @@ var rules = {
74
75
  '@atlaskit/design-system/use-primitives': 'warn',
75
76
  '@atlaskit/design-system/use-primitives-text': 'warn',
76
77
  '@atlaskit/design-system/use-should-render-to-parent': 'warn',
77
- '@atlaskit/design-system/use-side-nav-items-package': 'warn',
78
78
  '@atlaskit/design-system/use-simple-field': 'warn',
79
79
  '@atlaskit/design-system/use-simple-form': 'warn',
80
80
  '@atlaskit/design-system/use-spotlight-package': 'warn',
@@ -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::7c689115fea10ca7f4a4d36b687d0d4b>>
3
+ * @codegen <<SignedSource::6f0d931df90a4eea8dc4201b3a8e0866>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
 
@@ -29,6 +29,7 @@ var rules = {
29
29
  '@atlaskit/design-system/no-html-select': 'warn',
30
30
  '@atlaskit/design-system/no-html-text-input': 'warn',
31
31
  '@atlaskit/design-system/no-html-textarea': 'warn',
32
+ '@atlaskit/design-system/no-icon-spacing-prop': 'warn',
32
33
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
33
34
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
34
35
  }],
@@ -57,7 +58,6 @@ var rules = {
57
58
  '@atlaskit/design-system/use-popup-label': 'warn',
58
59
  '@atlaskit/design-system/use-primitives-text': 'warn',
59
60
  '@atlaskit/design-system/use-should-render-to-parent': 'warn',
60
- '@atlaskit/design-system/use-side-nav-items-package': 'warn',
61
61
  '@atlaskit/design-system/use-simple-field': 'warn',
62
62
  '@atlaskit/design-system/use-simple-form': 'warn',
63
63
  '@atlaskit/design-system/use-tag-group-label': 'warn',
@@ -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::70131b79da4231aaa59e2822b38790c1>>
3
+ * @codegen <<SignedSource::aa118aeb6a9c0d954f6e3a5ea7bd10af>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
 
@@ -28,6 +28,7 @@ var rules = {
28
28
  '@atlaskit/design-system/no-html-select': 'warn',
29
29
  '@atlaskit/design-system/no-html-text-input': 'warn',
30
30
  '@atlaskit/design-system/no-html-textarea': 'warn',
31
+ '@atlaskit/design-system/no-icon-spacing-prop': 'warn',
31
32
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
32
33
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
33
34
  }],
@@ -56,7 +57,6 @@ var rules = {
56
57
  '@atlaskit/design-system/use-popup-label': 'warn',
57
58
  '@atlaskit/design-system/use-primitives-text': 'warn',
58
59
  '@atlaskit/design-system/use-should-render-to-parent': 'warn',
59
- '@atlaskit/design-system/use-side-nav-items-package': 'warn',
60
60
  '@atlaskit/design-system/use-simple-field': 'warn',
61
61
  '@atlaskit/design-system/use-simple-form': 'warn',
62
62
  '@atlaskit/design-system/use-tag-group-label': 'warn',
@@ -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::9644eafd202e31d1b6f6c9b86ad519a2>>
3
+ * @codegen <<SignedSource::5d0d1213db83267889fa81e0aab419f7>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
 
@@ -37,6 +37,7 @@ import noHtmlRange from './no-html-range';
37
37
  import noHtmlSelect from './no-html-select';
38
38
  import noHtmlTextInput from './no-html-text-input';
39
39
  import noHtmlTextarea from './no-html-textarea';
40
+ import noIconSpacingProp from './no-icon-spacing-prop';
40
41
  import noInvalidCssMap from './no-invalid-css-map';
41
42
  import noKeyframesTaggedTemplateExpression from './no-keyframes-tagged-template-expression';
42
43
  import noLegacyIcons from './no-legacy-icons';
@@ -72,7 +73,6 @@ import usePopupLabel from './use-popup-label';
72
73
  import usePrimitives from './use-primitives';
73
74
  import usePrimitivesText from './use-primitives-text';
74
75
  import useShouldRenderToParent from './use-should-render-to-parent';
75
- import useSideNavItemsPackage from './use-side-nav-items-package';
76
76
  import useSimpleField from './use-simple-field';
77
77
  import useSimpleForm from './use-simple-form';
78
78
  import useSpotlightPackage from './use-spotlight-package';
@@ -115,6 +115,7 @@ export var rules = {
115
115
  'no-html-select': noHtmlSelect,
116
116
  'no-html-text-input': noHtmlTextInput,
117
117
  'no-html-textarea': noHtmlTextarea,
118
+ 'no-icon-spacing-prop': noIconSpacingProp,
118
119
  'no-invalid-css-map': noInvalidCssMap,
119
120
  'no-keyframes-tagged-template-expression': noKeyframesTaggedTemplateExpression,
120
121
  'no-legacy-icons': noLegacyIcons,
@@ -150,7 +151,6 @@ export var rules = {
150
151
  'use-primitives': usePrimitives,
151
152
  'use-primitives-text': usePrimitivesText,
152
153
  'use-should-render-to-parent': useShouldRenderToParent,
153
- 'use-side-nav-items-package': useSideNavItemsPackage,
154
154
  'use-simple-field': useSimpleField,
155
155
  'use-simple-form': useSimpleForm,
156
156
  'use-spotlight-package': useSpotlightPackage,