@atlaskit/eslint-plugin-design-system 10.5.0 → 10.6.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.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -0
- package/configs/deprecated.json +263 -273
- package/constellation/index/usage.mdx +1 -0
- package/constellation/use-menu-section-title/usage.mdx +55 -0
- package/dist/cjs/common/token-maps.partial.js +1 -1
- package/dist/cjs/presets/all.codegen.js +2 -1
- package/dist/cjs/presets/recommended.codegen.js +2 -1
- package/dist/cjs/rules/index.codegen.js +3 -1
- package/dist/cjs/rules/use-latest-xcss-syntax/transformers/style-property/index.js +10 -1
- package/dist/cjs/rules/use-menu-section-title/index.js +85 -0
- package/dist/configs/deprecated.json +263 -273
- package/dist/es2019/common/token-maps.partial.js +1 -1
- package/dist/es2019/presets/all.codegen.js +2 -1
- package/dist/es2019/presets/recommended.codegen.js +2 -1
- package/dist/es2019/rules/index.codegen.js +3 -1
- package/dist/es2019/rules/use-latest-xcss-syntax/transformers/style-property/index.js +10 -1
- package/dist/es2019/rules/use-menu-section-title/index.js +79 -0
- package/dist/esm/common/token-maps.partial.js +1 -1
- package/dist/esm/presets/all.codegen.js +2 -1
- package/dist/esm/presets/recommended.codegen.js +2 -1
- package/dist/esm/rules/index.codegen.js +3 -1
- package/dist/esm/rules/use-latest-xcss-syntax/transformers/style-property/index.js +10 -1
- package/dist/esm/rules/use-menu-section-title/index.js +79 -0
- package/dist/types/common/token-maps.partial.d.ts +1 -1
- package/dist/types/index.codegen.d.ts +2 -0
- package/dist/types/presets/all.codegen.d.ts +2 -1
- package/dist/types/presets/recommended.codegen.d.ts +2 -1
- package/dist/types/rules/index.codegen.d.ts +1 -0
- package/dist/types/rules/use-menu-section-title/index.d.ts +3 -0
- package/dist/types/rules/use-primitives/transformers/index.d.ts +1 -1
- package/dist/types-ts4.5/common/token-maps.partial.d.ts +1 -1
- package/dist/types-ts4.5/index.codegen.d.ts +2 -0
- package/dist/types-ts4.5/presets/all.codegen.d.ts +2 -1
- package/dist/types-ts4.5/presets/recommended.codegen.d.ts +2 -1
- package/dist/types-ts4.5/rules/index.codegen.d.ts +1 -0
- package/dist/types-ts4.5/rules/use-menu-section-title/index.d.ts +3 -0
- package/dist/types-ts4.5/rules/use-primitives/transformers/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -32,7 +32,16 @@ export const StyleProperty = {
|
|
|
32
32
|
ref: undefined
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
const importDeclarations = ast.Root.findImportsByModule(
|
|
35
|
+
const importDeclarations = ast.Root.findImportsByModule(
|
|
36
|
+
/**
|
|
37
|
+
* `context.getSourceCode()` is deprecated in favour of `context.sourceCode`.
|
|
38
|
+
* However, `context.sourceCode` returns undefined for some usages. This may be a bug
|
|
39
|
+
* in the `eslint` package. So, use `getSourceCode()` instead.
|
|
40
|
+
*
|
|
41
|
+
* Note: `context.sourceCode` works in testing environments. So, it is hard to validate whether it
|
|
42
|
+
* will work in the wild. Even if the tests pass, don't assume it will work in production.
|
|
43
|
+
*/
|
|
44
|
+
context.getSourceCode().ast.body, '@atlaskit/primitives');
|
|
36
45
|
const isXcssImported = importDeclarations.some(importDeclaration => {
|
|
37
46
|
return ast.Import.containsNamedSpecifier(importDeclaration, 'xcss');
|
|
38
47
|
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
|
+
|
|
3
|
+
import { isNodeOfType } from 'eslint-codemod-utils';
|
|
4
|
+
import { createLintRule } from '../utils/create-rule';
|
|
5
|
+
const elementsAccessibleNameProps = ['title', 'titleId'];
|
|
6
|
+
const rule = createLintRule({
|
|
7
|
+
meta: {
|
|
8
|
+
name: 'use-menu-section-title',
|
|
9
|
+
type: 'suggestion',
|
|
10
|
+
docs: {
|
|
11
|
+
description: 'Encourages makers to provide accessible title for Atlassian Design System Menu Section component.',
|
|
12
|
+
recommended: true,
|
|
13
|
+
severity: 'warn'
|
|
14
|
+
},
|
|
15
|
+
messages: {
|
|
16
|
+
missingTitleProp: 'Missing accessible title. If there is no visible content to associate use `title` prop, otherwise pass id of element to `titleId` prop to be associated as label.',
|
|
17
|
+
titlePropShouldHaveContents: 'Define the string that labels the interactive element.',
|
|
18
|
+
titleIdShouldHaveValue: '`titleId` should reference the id of the element that defines the accessible name.',
|
|
19
|
+
noBothPropsUsage: 'Do not include both `titleId` and `title` properties. Use `titleId` if the label text is available in the DOM to reference it, otherwise use `title` to provide accessible name explicitly.'
|
|
20
|
+
},
|
|
21
|
+
hasSuggestions: true
|
|
22
|
+
},
|
|
23
|
+
create(context) {
|
|
24
|
+
const contextLocalIdentifier = [];
|
|
25
|
+
return {
|
|
26
|
+
ImportDeclaration(node) {
|
|
27
|
+
var _node$specifiers;
|
|
28
|
+
const menuSectionIdentifier = (_node$specifiers = node.specifiers) === null || _node$specifiers === void 0 ? void 0 : _node$specifiers.filter(spec => {
|
|
29
|
+
if (node.source.value === '@atlaskit/menu') {
|
|
30
|
+
var _spec$imported;
|
|
31
|
+
return spec.type === 'ImportSpecifier' && ((_spec$imported = spec.imported) === null || _spec$imported === void 0 ? void 0 : _spec$imported.name) === 'Section';
|
|
32
|
+
} else if (node.source.value === '@atlaskit/menu/section') {
|
|
33
|
+
return spec.type === 'ImportDefaultSpecifier';
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
if (menuSectionIdentifier !== null && menuSectionIdentifier !== void 0 && menuSectionIdentifier.length) {
|
|
37
|
+
const {
|
|
38
|
+
local
|
|
39
|
+
} = menuSectionIdentifier[0];
|
|
40
|
+
contextLocalIdentifier.push(local.name);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
JSXElement(node) {
|
|
44
|
+
if (!isNodeOfType(node, 'JSXElement')) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (!isNodeOfType(node.openingElement.name, 'JSXIdentifier')) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const name = node.openingElement.name.name;
|
|
51
|
+
if (contextLocalIdentifier.includes(name)) {
|
|
52
|
+
const componentLabelProps = node.openingElement.attributes.filter(attr => isNodeOfType(attr, 'JSXAttribute') && isNodeOfType(attr.name, 'JSXIdentifier') && elementsAccessibleNameProps.includes(attr.name.name));
|
|
53
|
+
if (componentLabelProps.length === 1) {
|
|
54
|
+
const prop = componentLabelProps[0];
|
|
55
|
+
if ('value' in prop && prop.value) {
|
|
56
|
+
if (isNodeOfType(prop.value, 'Literal') && !prop.value.value || isNodeOfType(prop.value, 'JSXExpressionContainer') && !prop.value.expression) {
|
|
57
|
+
context.report({
|
|
58
|
+
node: prop,
|
|
59
|
+
messageId: prop.name.name === 'title' ? 'titlePropShouldHaveContents' : 'titleIdShouldHaveValue'
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
} else if (componentLabelProps.length > 1) {
|
|
64
|
+
context.report({
|
|
65
|
+
node: node.openingElement,
|
|
66
|
+
messageId: 'noBothPropsUsage'
|
|
67
|
+
});
|
|
68
|
+
} else {
|
|
69
|
+
context.report({
|
|
70
|
+
node: node.openingElement,
|
|
71
|
+
messageId: 'missingTitleProp'
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
export default rule;
|
|
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
/**
|
|
5
5
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::a9fbd091c8b53fd9515afc7cdd793c6b>>
|
|
7
7
|
* @codegenId spacing
|
|
8
8
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
9
9
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::837556032f39113ae86785a120bb9ccb>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
export default {
|
|
@@ -38,6 +38,7 @@ export default {
|
|
|
38
38
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
39
39
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
40
40
|
'@atlaskit/design-system/use-latest-xcss-syntax': 'error',
|
|
41
|
+
'@atlaskit/design-system/use-menu-section-title': 'warn',
|
|
41
42
|
'@atlaskit/design-system/use-popup-label': 'warn',
|
|
42
43
|
'@atlaskit/design-system/use-primitives': 'warn',
|
|
43
44
|
'@atlaskit/design-system/use-primitives-text': '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::
|
|
3
|
+
* @codegen <<SignedSource::b7ed527a03208f0bc68f9d34e4ef2260>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
export default {
|
|
@@ -28,6 +28,7 @@ export default {
|
|
|
28
28
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
29
29
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
30
30
|
'@atlaskit/design-system/use-latest-xcss-syntax': 'error',
|
|
31
|
+
'@atlaskit/design-system/use-menu-section-title': 'warn',
|
|
31
32
|
'@atlaskit/design-system/use-popup-label': 'warn',
|
|
32
33
|
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
33
34
|
}
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::287628b11d396c2bcbcf6f4a175a3d3a>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
import consistentCssPropUsage from './consistent-css-prop-usage';
|
|
@@ -35,6 +35,7 @@ import useHeading from './use-heading';
|
|
|
35
35
|
import useHeadingLevelInSpotlightCard from './use-heading-level-in-spotlight-card';
|
|
36
36
|
import useHrefInLinkItem from './use-href-in-link-item';
|
|
37
37
|
import useLatestXcssSyntax from './use-latest-xcss-syntax';
|
|
38
|
+
import useMenuSectionTitle from './use-menu-section-title';
|
|
38
39
|
import usePopupLabel from './use-popup-label';
|
|
39
40
|
import usePrimitives from './use-primitives';
|
|
40
41
|
import usePrimitivesText from './use-primitives-text';
|
|
@@ -74,6 +75,7 @@ export default {
|
|
|
74
75
|
'use-heading-level-in-spotlight-card': useHeadingLevelInSpotlightCard,
|
|
75
76
|
'use-href-in-link-item': useHrefInLinkItem,
|
|
76
77
|
'use-latest-xcss-syntax': useLatestXcssSyntax,
|
|
78
|
+
'use-menu-section-title': useMenuSectionTitle,
|
|
77
79
|
'use-popup-label': usePopupLabel,
|
|
78
80
|
'use-primitives': usePrimitives,
|
|
79
81
|
'use-primitives-text': usePrimitivesText,
|
|
@@ -29,7 +29,16 @@ export var StyleProperty = {
|
|
|
29
29
|
ref: undefined
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
var importDeclarations = ast.Root.findImportsByModule(
|
|
32
|
+
var importDeclarations = ast.Root.findImportsByModule(
|
|
33
|
+
/**
|
|
34
|
+
* `context.getSourceCode()` is deprecated in favour of `context.sourceCode`.
|
|
35
|
+
* However, `context.sourceCode` returns undefined for some usages. This may be a bug
|
|
36
|
+
* in the `eslint` package. So, use `getSourceCode()` instead.
|
|
37
|
+
*
|
|
38
|
+
* Note: `context.sourceCode` works in testing environments. So, it is hard to validate whether it
|
|
39
|
+
* will work in the wild. Even if the tests pass, don't assume it will work in production.
|
|
40
|
+
*/
|
|
41
|
+
context.getSourceCode().ast.body, '@atlaskit/primitives');
|
|
33
42
|
var isXcssImported = importDeclarations.some(function (importDeclaration) {
|
|
34
43
|
return ast.Import.containsNamedSpecifier(importDeclaration, 'xcss');
|
|
35
44
|
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
|
+
|
|
3
|
+
import { isNodeOfType } from 'eslint-codemod-utils';
|
|
4
|
+
import { createLintRule } from '../utils/create-rule';
|
|
5
|
+
var elementsAccessibleNameProps = ['title', 'titleId'];
|
|
6
|
+
var rule = createLintRule({
|
|
7
|
+
meta: {
|
|
8
|
+
name: 'use-menu-section-title',
|
|
9
|
+
type: 'suggestion',
|
|
10
|
+
docs: {
|
|
11
|
+
description: 'Encourages makers to provide accessible title for Atlassian Design System Menu Section component.',
|
|
12
|
+
recommended: true,
|
|
13
|
+
severity: 'warn'
|
|
14
|
+
},
|
|
15
|
+
messages: {
|
|
16
|
+
missingTitleProp: 'Missing accessible title. If there is no visible content to associate use `title` prop, otherwise pass id of element to `titleId` prop to be associated as label.',
|
|
17
|
+
titlePropShouldHaveContents: 'Define the string that labels the interactive element.',
|
|
18
|
+
titleIdShouldHaveValue: '`titleId` should reference the id of the element that defines the accessible name.',
|
|
19
|
+
noBothPropsUsage: 'Do not include both `titleId` and `title` properties. Use `titleId` if the label text is available in the DOM to reference it, otherwise use `title` to provide accessible name explicitly.'
|
|
20
|
+
},
|
|
21
|
+
hasSuggestions: true
|
|
22
|
+
},
|
|
23
|
+
create: function create(context) {
|
|
24
|
+
var contextLocalIdentifier = [];
|
|
25
|
+
return {
|
|
26
|
+
ImportDeclaration: function ImportDeclaration(node) {
|
|
27
|
+
var _node$specifiers;
|
|
28
|
+
var menuSectionIdentifier = (_node$specifiers = node.specifiers) === null || _node$specifiers === void 0 ? void 0 : _node$specifiers.filter(function (spec) {
|
|
29
|
+
if (node.source.value === '@atlaskit/menu') {
|
|
30
|
+
var _spec$imported;
|
|
31
|
+
return spec.type === 'ImportSpecifier' && ((_spec$imported = spec.imported) === null || _spec$imported === void 0 ? void 0 : _spec$imported.name) === 'Section';
|
|
32
|
+
} else if (node.source.value === '@atlaskit/menu/section') {
|
|
33
|
+
return spec.type === 'ImportDefaultSpecifier';
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
if (menuSectionIdentifier !== null && menuSectionIdentifier !== void 0 && menuSectionIdentifier.length) {
|
|
37
|
+
var local = menuSectionIdentifier[0].local;
|
|
38
|
+
contextLocalIdentifier.push(local.name);
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
JSXElement: function JSXElement(node) {
|
|
42
|
+
if (!isNodeOfType(node, 'JSXElement')) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (!isNodeOfType(node.openingElement.name, 'JSXIdentifier')) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
var name = node.openingElement.name.name;
|
|
49
|
+
if (contextLocalIdentifier.includes(name)) {
|
|
50
|
+
var componentLabelProps = node.openingElement.attributes.filter(function (attr) {
|
|
51
|
+
return isNodeOfType(attr, 'JSXAttribute') && isNodeOfType(attr.name, 'JSXIdentifier') && elementsAccessibleNameProps.includes(attr.name.name);
|
|
52
|
+
});
|
|
53
|
+
if (componentLabelProps.length === 1) {
|
|
54
|
+
var prop = componentLabelProps[0];
|
|
55
|
+
if ('value' in prop && prop.value) {
|
|
56
|
+
if (isNodeOfType(prop.value, 'Literal') && !prop.value.value || isNodeOfType(prop.value, 'JSXExpressionContainer') && !prop.value.expression) {
|
|
57
|
+
context.report({
|
|
58
|
+
node: prop,
|
|
59
|
+
messageId: prop.name.name === 'title' ? 'titlePropShouldHaveContents' : 'titleIdShouldHaveValue'
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
} else if (componentLabelProps.length > 1) {
|
|
64
|
+
context.report({
|
|
65
|
+
node: node.openingElement,
|
|
66
|
+
messageId: 'noBothPropsUsage'
|
|
67
|
+
});
|
|
68
|
+
} else {
|
|
69
|
+
context.report({
|
|
70
|
+
node: node.openingElement,
|
|
71
|
+
messageId: 'missingTitleProp'
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
export default rule;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::a9fbd091c8b53fd9515afc7cdd793c6b>>
|
|
4
4
|
* @codegenId spacing
|
|
5
5
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
6
6
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
@@ -35,6 +35,7 @@ export declare const configs: {
|
|
|
35
35
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': string;
|
|
36
36
|
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
37
37
|
'@atlaskit/design-system/use-latest-xcss-syntax': string;
|
|
38
|
+
'@atlaskit/design-system/use-menu-section-title': string;
|
|
38
39
|
'@atlaskit/design-system/use-popup-label': string;
|
|
39
40
|
'@atlaskit/design-system/use-primitives': string;
|
|
40
41
|
'@atlaskit/design-system/use-primitives-text': string;
|
|
@@ -68,6 +69,7 @@ export declare const configs: {
|
|
|
68
69
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': string;
|
|
69
70
|
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
70
71
|
'@atlaskit/design-system/use-latest-xcss-syntax': string;
|
|
72
|
+
'@atlaskit/design-system/use-menu-section-title': string;
|
|
71
73
|
'@atlaskit/design-system/use-popup-label': string;
|
|
72
74
|
'@atlaskit/design-system/use-visually-hidden': string;
|
|
73
75
|
};
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::837556032f39113ae86785a120bb9ccb>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
declare const _default: {
|
|
@@ -38,6 +38,7 @@ declare const _default: {
|
|
|
38
38
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': string;
|
|
39
39
|
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
40
40
|
'@atlaskit/design-system/use-latest-xcss-syntax': string;
|
|
41
|
+
'@atlaskit/design-system/use-menu-section-title': string;
|
|
41
42
|
'@atlaskit/design-system/use-popup-label': string;
|
|
42
43
|
'@atlaskit/design-system/use-primitives': string;
|
|
43
44
|
'@atlaskit/design-system/use-primitives-text': string;
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::b7ed527a03208f0bc68f9d34e4ef2260>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
declare const _default: {
|
|
@@ -28,6 +28,7 @@ declare const _default: {
|
|
|
28
28
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': string;
|
|
29
29
|
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
30
30
|
'@atlaskit/design-system/use-latest-xcss-syntax': string;
|
|
31
|
+
'@atlaskit/design-system/use-menu-section-title': string;
|
|
31
32
|
'@atlaskit/design-system/use-popup-label': string;
|
|
32
33
|
'@atlaskit/design-system/use-visually-hidden': string;
|
|
33
34
|
};
|
|
@@ -35,6 +35,7 @@ declare const _default: {
|
|
|
35
35
|
'use-heading-level-in-spotlight-card': import("eslint").Rule.RuleModule;
|
|
36
36
|
'use-href-in-link-item': import("eslint").Rule.RuleModule;
|
|
37
37
|
'use-latest-xcss-syntax': import("eslint").Rule.RuleModule;
|
|
38
|
+
'use-menu-section-title': import("eslint").Rule.RuleModule;
|
|
38
39
|
'use-popup-label': import("eslint").Rule.RuleModule;
|
|
39
40
|
'use-primitives': import("eslint").Rule.RuleModule;
|
|
40
41
|
'use-primitives-text': import("eslint").Rule.RuleModule;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { cssToXcssTransformer, supportedStylesMap, spaceTokenMap
|
|
1
|
+
export { cssToXcssTransformer, supportedStylesMap, spaceTokenMap } from './css-to-xcss';
|
|
2
2
|
export { CompiledStyled } from './compiled-styled';
|
|
3
3
|
export { EmotionCSS } from './emotion-css';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::a9fbd091c8b53fd9515afc7cdd793c6b>>
|
|
4
4
|
* @codegenId spacing
|
|
5
5
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
6
6
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
@@ -35,6 +35,7 @@ export declare const configs: {
|
|
|
35
35
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': string;
|
|
36
36
|
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
37
37
|
'@atlaskit/design-system/use-latest-xcss-syntax': string;
|
|
38
|
+
'@atlaskit/design-system/use-menu-section-title': string;
|
|
38
39
|
'@atlaskit/design-system/use-popup-label': string;
|
|
39
40
|
'@atlaskit/design-system/use-primitives': string;
|
|
40
41
|
'@atlaskit/design-system/use-primitives-text': string;
|
|
@@ -68,6 +69,7 @@ export declare const configs: {
|
|
|
68
69
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': string;
|
|
69
70
|
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
70
71
|
'@atlaskit/design-system/use-latest-xcss-syntax': string;
|
|
72
|
+
'@atlaskit/design-system/use-menu-section-title': string;
|
|
71
73
|
'@atlaskit/design-system/use-popup-label': string;
|
|
72
74
|
'@atlaskit/design-system/use-visually-hidden': string;
|
|
73
75
|
};
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::837556032f39113ae86785a120bb9ccb>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
declare const _default: {
|
|
@@ -38,6 +38,7 @@ declare const _default: {
|
|
|
38
38
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': string;
|
|
39
39
|
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
40
40
|
'@atlaskit/design-system/use-latest-xcss-syntax': string;
|
|
41
|
+
'@atlaskit/design-system/use-menu-section-title': string;
|
|
41
42
|
'@atlaskit/design-system/use-popup-label': string;
|
|
42
43
|
'@atlaskit/design-system/use-primitives': string;
|
|
43
44
|
'@atlaskit/design-system/use-primitives-text': string;
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::b7ed527a03208f0bc68f9d34e4ef2260>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
declare const _default: {
|
|
@@ -28,6 +28,7 @@ declare const _default: {
|
|
|
28
28
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': string;
|
|
29
29
|
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
30
30
|
'@atlaskit/design-system/use-latest-xcss-syntax': string;
|
|
31
|
+
'@atlaskit/design-system/use-menu-section-title': string;
|
|
31
32
|
'@atlaskit/design-system/use-popup-label': string;
|
|
32
33
|
'@atlaskit/design-system/use-visually-hidden': string;
|
|
33
34
|
};
|
|
@@ -39,6 +39,7 @@ declare const _default: {
|
|
|
39
39
|
'use-heading-level-in-spotlight-card': import("eslint").Rule.RuleModule;
|
|
40
40
|
'use-href-in-link-item': import("eslint").Rule.RuleModule;
|
|
41
41
|
'use-latest-xcss-syntax': import("eslint").Rule.RuleModule;
|
|
42
|
+
'use-menu-section-title': import("eslint").Rule.RuleModule;
|
|
42
43
|
'use-popup-label': import("eslint").Rule.RuleModule;
|
|
43
44
|
'use-primitives': import("eslint").Rule.RuleModule;
|
|
44
45
|
'use-primitives-text': import("eslint").Rule.RuleModule;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { cssToXcssTransformer, supportedStylesMap, spaceTokenMap
|
|
1
|
+
export { cssToXcssTransformer, supportedStylesMap, spaceTokenMap } from './css-to-xcss';
|
|
2
2
|
export { CompiledStyled } from './compiled-styled';
|
|
3
3
|
export { EmotionCSS } from './emotion-css';
|
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": "10.
|
|
4
|
+
"version": "10.6.1",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"publishConfig": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@af/formatting": "*",
|
|
57
57
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
58
|
-
"@atlaskit/theme": "^12.
|
|
58
|
+
"@atlaskit/theme": "^12.9.0",
|
|
59
59
|
"@atlassian/codegen": "*",
|
|
60
60
|
"@atlassian/eslint-utils": "^0.5.0",
|
|
61
61
|
"@emotion/react": "^11.7.1",
|