@atlaskit/eslint-plugin-design-system 13.19.4 → 13.19.5
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 +6 -0
- package/dist/cjs/ast-nodes/import.js +1 -1
- package/dist/cjs/rules/enforce-inline-styles-in-select/utils.js +9 -2
- package/dist/cjs/rules/ensure-design-token-usage/utils.js +1 -1
- package/dist/cjs/rules/ensure-proper-xcss-usage/index.js +5 -3
- package/dist/cjs/rules/no-deprecated-imports/checks.js +2 -2
- package/dist/cjs/rules/no-html-anchor/node-types/jsx-element/index.js +1 -1
- package/dist/cjs/rules/no-html-code/node-types/jsx-element/index.js +1 -1
- package/dist/cjs/rules/no-invalid-css-map/utils.js +1 -0
- package/dist/cjs/rules/no-legacy-icons/checks.js +10 -8
- package/dist/cjs/rules/no-nested-styles/index.js +1 -1
- package/dist/cjs/rules/no-separator-with-list-elements/index.js +1 -1
- package/dist/cjs/rules/use-button-group-label/index.js +3 -2
- package/dist/cjs/rules/use-correct-field/index.js +2 -2
- package/dist/cjs/rules/use-cx-function-in-xcss/index.js +1 -1
- package/dist/cjs/rules/use-datetime-picker-calendar-button/index.js +7 -5
- package/dist/cjs/rules/use-menu-section-title/index.js +3 -2
- package/dist/cjs/rules/use-modal-dialog-close-button/index.js +1 -1
- package/dist/cjs/rules/use-onboarding-spotlight-label/index.js +3 -2
- package/dist/cjs/rules/use-should-render-to-parent/index.js +1 -1
- package/dist/cjs/rules/use-tokens-typography/transformers/style-object.js +1 -1
- package/dist/cjs/rules/use-visually-hidden/index.js +1 -1
- package/dist/cjs/rules/utils/create-no-exported-rule/is-styled-component.js +1 -1
- package/dist/cjs/rules/utils/get-import-name.js +2 -3
- package/dist/cjs/rules/utils/get-import-node-by-source.js +1 -1
- package/dist/es2019/ast-nodes/import.js +1 -1
- package/dist/es2019/rules/enforce-inline-styles-in-select/utils.js +9 -2
- package/dist/es2019/rules/ensure-design-token-usage/utils.js +1 -1
- package/dist/es2019/rules/ensure-proper-xcss-usage/index.js +5 -3
- package/dist/es2019/rules/no-deprecated-imports/checks.js +2 -2
- package/dist/es2019/rules/no-html-anchor/node-types/jsx-element/index.js +1 -1
- package/dist/es2019/rules/no-html-code/node-types/jsx-element/index.js +1 -1
- package/dist/es2019/rules/no-invalid-css-map/utils.js +1 -0
- package/dist/es2019/rules/no-legacy-icons/checks.js +10 -8
- package/dist/es2019/rules/no-nested-styles/index.js +1 -1
- package/dist/es2019/rules/no-separator-with-list-elements/index.js +1 -1
- package/dist/es2019/rules/use-button-group-label/index.js +3 -2
- package/dist/es2019/rules/use-correct-field/index.js +2 -2
- package/dist/es2019/rules/use-cx-function-in-xcss/index.js +1 -1
- package/dist/es2019/rules/use-datetime-picker-calendar-button/index.js +9 -7
- package/dist/es2019/rules/use-menu-section-title/index.js +3 -2
- package/dist/es2019/rules/use-modal-dialog-close-button/index.js +4 -2
- package/dist/es2019/rules/use-onboarding-spotlight-label/index.js +3 -2
- package/dist/es2019/rules/use-should-render-to-parent/index.js +1 -1
- package/dist/es2019/rules/use-tokens-typography/transformers/style-object.js +1 -1
- package/dist/es2019/rules/use-visually-hidden/index.js +1 -1
- package/dist/es2019/rules/utils/create-no-exported-rule/is-styled-component.js +1 -1
- package/dist/es2019/rules/utils/get-import-name.js +2 -3
- package/dist/es2019/rules/utils/get-import-node-by-source.js +1 -1
- package/dist/esm/ast-nodes/import.js +1 -1
- package/dist/esm/rules/enforce-inline-styles-in-select/utils.js +9 -2
- package/dist/esm/rules/ensure-design-token-usage/utils.js +1 -1
- package/dist/esm/rules/ensure-proper-xcss-usage/index.js +5 -3
- package/dist/esm/rules/no-deprecated-imports/checks.js +2 -2
- package/dist/esm/rules/no-html-anchor/node-types/jsx-element/index.js +1 -1
- package/dist/esm/rules/no-html-code/node-types/jsx-element/index.js +1 -1
- package/dist/esm/rules/no-invalid-css-map/utils.js +1 -0
- package/dist/esm/rules/no-legacy-icons/checks.js +10 -8
- package/dist/esm/rules/no-nested-styles/index.js +1 -1
- package/dist/esm/rules/no-separator-with-list-elements/index.js +1 -1
- package/dist/esm/rules/use-button-group-label/index.js +3 -2
- package/dist/esm/rules/use-correct-field/index.js +2 -2
- package/dist/esm/rules/use-cx-function-in-xcss/index.js +1 -1
- package/dist/esm/rules/use-datetime-picker-calendar-button/index.js +7 -5
- package/dist/esm/rules/use-menu-section-title/index.js +3 -2
- package/dist/esm/rules/use-modal-dialog-close-button/index.js +1 -1
- package/dist/esm/rules/use-onboarding-spotlight-label/index.js +3 -2
- package/dist/esm/rules/use-should-render-to-parent/index.js +1 -1
- package/dist/esm/rules/use-tokens-typography/transformers/style-object.js +1 -1
- package/dist/esm/rules/use-visually-hidden/index.js +1 -1
- package/dist/esm/rules/utils/create-no-exported-rule/is-styled-component.js +1 -1
- package/dist/esm/rules/utils/get-import-name.js +2 -3
- package/dist/esm/rules/utils/get-import-node-by-source.js +1 -1
- package/dist/types/ast-nodes/function-call.d.ts +2 -2
- package/dist/types/ast-nodes/jsx-attribute.d.ts +3 -3
- package/dist/types/ast-nodes/jsx-element.d.ts +1 -1
- package/dist/types/ast-nodes/object-entry.d.ts +2 -2
- package/dist/types/ast-nodes/object.d.ts +2 -2
- package/dist/types/ast-nodes/root.d.ts +0 -1
- package/dist/types/rules/no-legacy-icons/helpers.d.ts +12 -12
- package/dist/types/rules/use-primitives-text/transformers/paragraph-elements.d.ts +1 -1
- package/dist/types/rules/use-visually-hidden/utils.d.ts +1 -1
- package/dist/types/rules/utils/create-no-exported-rule/main.d.ts +1 -1
- package/dist/types/rules/utils/create-no-tagged-template-expression-rule/index.d.ts +1 -1
- package/dist/types/rules/utils/create-rule.d.ts +1 -1
- package/dist/types/rules/utils/get-is-exception.d.ts +1 -1
- package/dist/types/rules/utils/is-node.d.ts +2 -2
- package/dist/types-ts4.5/ast-nodes/function-call.d.ts +2 -2
- package/dist/types-ts4.5/ast-nodes/jsx-attribute.d.ts +3 -3
- package/dist/types-ts4.5/ast-nodes/jsx-element.d.ts +1 -1
- package/dist/types-ts4.5/ast-nodes/object-entry.d.ts +2 -2
- package/dist/types-ts4.5/ast-nodes/object.d.ts +2 -2
- package/dist/types-ts4.5/ast-nodes/root.d.ts +0 -1
- package/dist/types-ts4.5/rules/no-legacy-icons/helpers.d.ts +12 -12
- package/dist/types-ts4.5/rules/use-primitives-text/transformers/paragraph-elements.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-visually-hidden/utils.d.ts +1 -1
- package/dist/types-ts4.5/rules/utils/create-no-exported-rule/main.d.ts +1 -1
- package/dist/types-ts4.5/rules/utils/create-no-tagged-template-expression-rule/index.d.ts +1 -1
- package/dist/types-ts4.5/rules/utils/create-rule.d.ts +1 -1
- package/dist/types-ts4.5/rules/utils/get-is-exception.d.ts +1 -1
- package/dist/types-ts4.5/rules/utils/is-node.d.ts +2 -2
- package/package.json +4 -4
|
@@ -37,7 +37,7 @@ export type MigrationIconImportList = {
|
|
|
37
37
|
};
|
|
38
38
|
declare const sizes: readonly ["small", "medium", "large", "xlarge"];
|
|
39
39
|
export type Size = (typeof sizes)[number];
|
|
40
|
-
export declare const isSize: (size: any) => size is
|
|
40
|
+
export declare const isSize: (size: any) => size is Size;
|
|
41
41
|
/**
|
|
42
42
|
* Returns the migration map object for a legacy icon or null if not found
|
|
43
43
|
* @param iconPackage The name of the legacy icon package
|
|
@@ -48,14 +48,14 @@ export declare const getMigrationMapObject: (iconPackage: string) => {
|
|
|
48
48
|
name: string;
|
|
49
49
|
type: string;
|
|
50
50
|
package: string;
|
|
51
|
-
isMigrationUnsafe?: boolean
|
|
52
|
-
shouldForceSmallIcon?: boolean
|
|
53
|
-
}
|
|
51
|
+
isMigrationUnsafe?: boolean;
|
|
52
|
+
shouldForceSmallIcon?: boolean;
|
|
53
|
+
};
|
|
54
54
|
additionalIcons?: {
|
|
55
55
|
name: string;
|
|
56
56
|
type: string;
|
|
57
57
|
package: string;
|
|
58
|
-
}[]
|
|
58
|
+
}[];
|
|
59
59
|
sizeGuidance: Record<import("@atlaskit/icon").Size, IconMigrationSizeGuidance>;
|
|
60
60
|
} | null;
|
|
61
61
|
export declare const getUpcomingIcons: (iconPackage: string) => {
|
|
@@ -70,10 +70,10 @@ export declare const canAutoMigrateNewIconBasedOnSize: (guidance?: IconMigration
|
|
|
70
70
|
*/
|
|
71
71
|
export declare const createGuidance: ({ iconPackage, insideNewButton, size: initialSize, shouldUseMigrationPath, shouldForceSmallIcon, }: {
|
|
72
72
|
iconPackage: string;
|
|
73
|
-
insideNewButton?: boolean
|
|
74
|
-
size?:
|
|
75
|
-
shouldUseMigrationPath?: boolean
|
|
76
|
-
shouldForceSmallIcon?: boolean
|
|
73
|
+
insideNewButton?: boolean;
|
|
74
|
+
size?: Size;
|
|
75
|
+
shouldUseMigrationPath?: boolean;
|
|
76
|
+
shouldForceSmallIcon?: boolean;
|
|
77
77
|
}) => string;
|
|
78
78
|
/**
|
|
79
79
|
* Checks if the color can be migrated
|
|
@@ -95,9 +95,9 @@ export declare const createAutoMigrationError: ({ node, importSource, iconName,
|
|
|
95
95
|
importSource: string;
|
|
96
96
|
iconName: string;
|
|
97
97
|
errors: ErrorListAuto;
|
|
98
|
-
spacing?: string
|
|
99
|
-
insideNewButton?: boolean
|
|
100
|
-
shouldForceSmallIcon?: boolean
|
|
98
|
+
spacing?: string;
|
|
99
|
+
insideNewButton?: boolean;
|
|
100
|
+
shouldForceSmallIcon?: boolean;
|
|
101
101
|
}) => void;
|
|
102
102
|
export declare const createHelpers: (ctx: Rule.RuleContext) => {
|
|
103
103
|
/**
|
|
@@ -18,7 +18,7 @@ export type ReferenceObject = typeof referenceObject;
|
|
|
18
18
|
/**
|
|
19
19
|
* Returns the first import in the esprima AST.
|
|
20
20
|
*/
|
|
21
|
-
export declare const getFirstImport: (source: SourceCode) => import("estree").
|
|
21
|
+
export declare const getFirstImport: (source: SourceCode) => import("estree").ImportDeclaration | undefined;
|
|
22
22
|
/**
|
|
23
23
|
* Takes a template literal and returns [key, value] array of the css properties
|
|
24
24
|
*/
|
|
@@ -15,5 +15,5 @@ type RuleModule = Rule.RuleModule;
|
|
|
15
15
|
* @param messageId The ESLint error message to use for lint violations.
|
|
16
16
|
* @returns An eslint rule.
|
|
17
17
|
*/
|
|
18
|
-
export declare const createNoExportedRule: (isUsage: SupportedNameChecker, messageId: string) => RuleModule[
|
|
18
|
+
export declare const createNoExportedRule: (isUsage: SupportedNameChecker, messageId: string) => RuleModule["create"];
|
|
19
19
|
export {};
|
|
@@ -3,5 +3,5 @@ import type { JSONSchema4 } from 'json-schema';
|
|
|
3
3
|
import { type SupportedNameChecker } from '@atlaskit/eslint-utils/is-supported-import';
|
|
4
4
|
type RuleModule = Rule.RuleModule;
|
|
5
5
|
export declare const noTaggedTemplateExpressionRuleSchema: JSONSchema4;
|
|
6
|
-
export declare const createNoTaggedTemplateExpressionRule: (isUsage: SupportedNameChecker, messageId: string) => RuleModule[
|
|
6
|
+
export declare const createNoTaggedTemplateExpressionRule: (isUsage: SupportedNameChecker, messageId: string) => RuleModule["create"];
|
|
7
7
|
export {};
|
|
@@ -8,7 +8,7 @@ import { ESLintUtils } from '@typescript-eslint/utils';
|
|
|
8
8
|
* @private
|
|
9
9
|
* @deprecated
|
|
10
10
|
*/
|
|
11
|
-
export declare const createRule: <Options extends readonly unknown[], MessageIds extends string>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds>>) => ESLintUtils.RuleModule<MessageIds, Options
|
|
11
|
+
export declare const createRule: <Options extends readonly unknown[], MessageIds extends string>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds>>) => ESLintUtils.RuleModule<MessageIds, Options>;
|
|
12
12
|
/**
|
|
13
13
|
* Tiny wrapped over the ESLint rule module type that ensures
|
|
14
14
|
* there is a docs link to our ESLint plugin documentation page,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
export declare const getIsException: (exceptions?: string[]) => (node: Rule.Node) => boolean;
|
|
2
|
+
export declare const getIsException: (exceptions?: string[]) => ((node: Rule.Node) => boolean);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Rule, Scope } from 'eslint';
|
|
2
2
|
import { type CallExpression, type EslintNode, type Expression, type TaggedTemplateExpression } from 'eslint-codemod-utils';
|
|
3
3
|
export declare const isDecendantOfGlobalToken: (node: EslintNode) => boolean;
|
|
4
|
-
export declare const isDecendantOfType: (node: Rule.Node, type: Rule.Node[
|
|
4
|
+
export declare const isDecendantOfType: (node: Rule.Node, type: Rule.Node["type"], skipNode?: boolean) => boolean;
|
|
5
5
|
export declare const isPropertyKey: (node: Rule.Node) => boolean;
|
|
6
6
|
export declare const isDecendantOfStyleJsxAttribute: (node: Rule.Node) => boolean;
|
|
7
7
|
export declare const isDecendantOfSvgElement: (node: Rule.Node) => boolean;
|
|
@@ -11,4 +11,4 @@ export declare const isCssInJsCallNode: (node?: Expression | null) => node is Ca
|
|
|
11
11
|
export declare const isCssInJsObjectNode: (node?: Expression | null) => node is CallExpression;
|
|
12
12
|
export declare const isDecendantOfXcssBlock: (node: Rule.Node, referencesInScope: Scope.Reference[], importSources: string[]) => boolean;
|
|
13
13
|
export declare const isDecendantOfStyleBlock: (node: Rule.Node) => boolean;
|
|
14
|
-
export declare const isChildOfType: (node: Rule.Node, type: Rule.Node[
|
|
14
|
+
export declare const isChildOfType: (node: Rule.Node, type: Rule.Node["type"]) => boolean;
|
|
@@ -12,10 +12,10 @@ export declare const FunctionCall: {
|
|
|
12
12
|
* If you need to support another type of arg, add it, and update the type.
|
|
13
13
|
*/
|
|
14
14
|
getArgumentAtPos(node: CallExpression, pos: number): {
|
|
15
|
-
type:
|
|
15
|
+
type: "Literal";
|
|
16
16
|
value: string;
|
|
17
17
|
} | {
|
|
18
|
-
type:
|
|
18
|
+
type: "ObjectExpression";
|
|
19
19
|
value: ObjectExpression;
|
|
20
20
|
} | undefined;
|
|
21
21
|
};
|
|
@@ -16,13 +16,13 @@ declare const HelperJSXAttribute: {
|
|
|
16
16
|
* If you need additional functionality add it, and set the correct `type` on the returned object
|
|
17
17
|
*/
|
|
18
18
|
getValue(node: JSXAttribute): {
|
|
19
|
-
type:
|
|
19
|
+
type: "ExpressionStatement";
|
|
20
20
|
value: string;
|
|
21
21
|
} | {
|
|
22
|
-
type:
|
|
22
|
+
type: "ExpressionStatement Literal";
|
|
23
23
|
value: string | number | bigint | boolean | RegExp | null | undefined;
|
|
24
24
|
} | {
|
|
25
|
-
type:
|
|
25
|
+
type: "Literal";
|
|
26
26
|
value: string;
|
|
27
27
|
} | undefined;
|
|
28
28
|
};
|
|
@@ -18,7 +18,7 @@ export declare const JSXElementHelper: {
|
|
|
18
18
|
getAttributeByName(node: JSXElement, name: string): JSXAttribute | undefined;
|
|
19
19
|
containsSpreadAttributes(node: JSXElement): boolean;
|
|
20
20
|
addAttribute(node: JSXElement, name: string, value: string, fixer: Rule.RuleFixer): Rule.Fix;
|
|
21
|
-
getChildren(node: JSXElement | JSXFragment): JSXElement[
|
|
21
|
+
getChildren(node: JSXElement | JSXFragment): JSXElement["children"];
|
|
22
22
|
hasAllowedAttrsOnly(node: JSXElement, allowedProps: string[]): boolean;
|
|
23
23
|
};
|
|
24
24
|
export { JSXElementHelper as JSXElement };
|
|
@@ -2,10 +2,10 @@ import type { Rule } from 'eslint';
|
|
|
2
2
|
import { type Property, type SpreadElement } from 'eslint-codemod-utils';
|
|
3
3
|
export declare const ObjectEntry: {
|
|
4
4
|
getProperty(node: Property): {
|
|
5
|
-
type:
|
|
5
|
+
type: "Identifier";
|
|
6
6
|
value: string;
|
|
7
7
|
} | {
|
|
8
|
-
type:
|
|
8
|
+
type: "Literal";
|
|
9
9
|
value: string;
|
|
10
10
|
} | {
|
|
11
11
|
type: undefined;
|
|
@@ -22,7 +22,7 @@ declare const ASTObjectExpression: {
|
|
|
22
22
|
* Returns only the property @type {Property['key']} like: `padding` from: `{ padding: '8px' }`.
|
|
23
23
|
* If you want the key/value pair, use `getEntryByPropertyName`.
|
|
24
24
|
*/
|
|
25
|
-
getProperty(node: ObjectExpression, name: string): Property[
|
|
25
|
+
getProperty(node: ObjectExpression, name: string): Property["key"] | undefined;
|
|
26
26
|
/**
|
|
27
27
|
* Gets the array of key/value pairs in an ObjectExpression.
|
|
28
28
|
*/
|
|
@@ -32,7 +32,7 @@ declare const ASTObjectExpression: {
|
|
|
32
32
|
*
|
|
33
33
|
* Values can be basically anything, so be careful with this.
|
|
34
34
|
*/
|
|
35
|
-
getValueByPropertyName(node: ObjectExpression, name: string): Property[
|
|
35
|
+
getValueByPropertyName(node: ObjectExpression, name: string): Property["value"] | undefined;
|
|
36
36
|
containsSpreadProps(node: ObjectExpression): boolean;
|
|
37
37
|
updateValue(node: ObjectExpression, propertyName: string, newValue: string, fixer: Rule.RuleFixer): Rule.Fix;
|
|
38
38
|
/**
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { Rule } from 'eslint';
|
|
3
2
|
import { type Directive, type ImportDeclaration, insertImportDeclaration, type ModuleDeclaration, type Statement } from 'eslint-codemod-utils';
|
|
4
3
|
type ImportData = Parameters<typeof insertImportDeclaration>[1];
|
|
@@ -42,7 +42,7 @@ declare const sizes: readonly [
|
|
|
42
42
|
"xlarge"
|
|
43
43
|
];
|
|
44
44
|
export type Size = (typeof sizes)[number];
|
|
45
|
-
export declare const isSize: (size: any) => size is
|
|
45
|
+
export declare const isSize: (size: any) => size is Size;
|
|
46
46
|
/**
|
|
47
47
|
* Returns the migration map object for a legacy icon or null if not found
|
|
48
48
|
* @param iconPackage The name of the legacy icon package
|
|
@@ -53,14 +53,14 @@ export declare const getMigrationMapObject: (iconPackage: string) => {
|
|
|
53
53
|
name: string;
|
|
54
54
|
type: string;
|
|
55
55
|
package: string;
|
|
56
|
-
isMigrationUnsafe?: boolean
|
|
57
|
-
shouldForceSmallIcon?: boolean
|
|
58
|
-
}
|
|
56
|
+
isMigrationUnsafe?: boolean;
|
|
57
|
+
shouldForceSmallIcon?: boolean;
|
|
58
|
+
};
|
|
59
59
|
additionalIcons?: {
|
|
60
60
|
name: string;
|
|
61
61
|
type: string;
|
|
62
62
|
package: string;
|
|
63
|
-
}[]
|
|
63
|
+
}[];
|
|
64
64
|
sizeGuidance: Record<import("@atlaskit/icon").Size, IconMigrationSizeGuidance>;
|
|
65
65
|
} | null;
|
|
66
66
|
export declare const getUpcomingIcons: (iconPackage: string) => {
|
|
@@ -75,10 +75,10 @@ export declare const canAutoMigrateNewIconBasedOnSize: (guidance?: IconMigration
|
|
|
75
75
|
*/
|
|
76
76
|
export declare const createGuidance: ({ iconPackage, insideNewButton, size: initialSize, shouldUseMigrationPath, shouldForceSmallIcon, }: {
|
|
77
77
|
iconPackage: string;
|
|
78
|
-
insideNewButton?: boolean
|
|
79
|
-
size?:
|
|
80
|
-
shouldUseMigrationPath?: boolean
|
|
81
|
-
shouldForceSmallIcon?: boolean
|
|
78
|
+
insideNewButton?: boolean;
|
|
79
|
+
size?: Size;
|
|
80
|
+
shouldUseMigrationPath?: boolean;
|
|
81
|
+
shouldForceSmallIcon?: boolean;
|
|
82
82
|
}) => string;
|
|
83
83
|
/**
|
|
84
84
|
* Checks if the color can be migrated
|
|
@@ -100,9 +100,9 @@ export declare const createAutoMigrationError: ({ node, importSource, iconName,
|
|
|
100
100
|
importSource: string;
|
|
101
101
|
iconName: string;
|
|
102
102
|
errors: ErrorListAuto;
|
|
103
|
-
spacing?: string
|
|
104
|
-
insideNewButton?: boolean
|
|
105
|
-
shouldForceSmallIcon?: boolean
|
|
103
|
+
spacing?: string;
|
|
104
|
+
insideNewButton?: boolean;
|
|
105
|
+
shouldForceSmallIcon?: boolean;
|
|
106
106
|
}) => void;
|
|
107
107
|
export declare const createHelpers: (ctx: Rule.RuleContext) => {
|
|
108
108
|
/**
|
|
@@ -18,7 +18,7 @@ export type ReferenceObject = typeof referenceObject;
|
|
|
18
18
|
/**
|
|
19
19
|
* Returns the first import in the esprima AST.
|
|
20
20
|
*/
|
|
21
|
-
export declare const getFirstImport: (source: SourceCode) => import("estree").
|
|
21
|
+
export declare const getFirstImport: (source: SourceCode) => import("estree").ImportDeclaration | undefined;
|
|
22
22
|
/**
|
|
23
23
|
* Takes a template literal and returns [key, value] array of the css properties
|
|
24
24
|
*/
|
|
@@ -15,5 +15,5 @@ type RuleModule = Rule.RuleModule;
|
|
|
15
15
|
* @param messageId The ESLint error message to use for lint violations.
|
|
16
16
|
* @returns An eslint rule.
|
|
17
17
|
*/
|
|
18
|
-
export declare const createNoExportedRule: (isUsage: SupportedNameChecker, messageId: string) => RuleModule[
|
|
18
|
+
export declare const createNoExportedRule: (isUsage: SupportedNameChecker, messageId: string) => RuleModule["create"];
|
|
19
19
|
export {};
|
|
@@ -3,5 +3,5 @@ import type { JSONSchema4 } from 'json-schema';
|
|
|
3
3
|
import { type SupportedNameChecker } from '@atlaskit/eslint-utils/is-supported-import';
|
|
4
4
|
type RuleModule = Rule.RuleModule;
|
|
5
5
|
export declare const noTaggedTemplateExpressionRuleSchema: JSONSchema4;
|
|
6
|
-
export declare const createNoTaggedTemplateExpressionRule: (isUsage: SupportedNameChecker, messageId: string) => RuleModule[
|
|
6
|
+
export declare const createNoTaggedTemplateExpressionRule: (isUsage: SupportedNameChecker, messageId: string) => RuleModule["create"];
|
|
7
7
|
export {};
|
|
@@ -8,7 +8,7 @@ import { ESLintUtils } from '@typescript-eslint/utils';
|
|
|
8
8
|
* @private
|
|
9
9
|
* @deprecated
|
|
10
10
|
*/
|
|
11
|
-
export declare const createRule: <Options extends readonly unknown[], MessageIds extends string>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds>>) => ESLintUtils.RuleModule<MessageIds, Options
|
|
11
|
+
export declare const createRule: <Options extends readonly unknown[], MessageIds extends string>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds>>) => ESLintUtils.RuleModule<MessageIds, Options>;
|
|
12
12
|
/**
|
|
13
13
|
* Tiny wrapped over the ESLint rule module type that ensures
|
|
14
14
|
* there is a docs link to our ESLint plugin documentation page,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
export declare const getIsException: (exceptions?: string[]) => (node: Rule.Node) => boolean;
|
|
2
|
+
export declare const getIsException: (exceptions?: string[]) => ((node: Rule.Node) => boolean);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Rule, Scope } from 'eslint';
|
|
2
2
|
import { type CallExpression, type EslintNode, type Expression, type TaggedTemplateExpression } from 'eslint-codemod-utils';
|
|
3
3
|
export declare const isDecendantOfGlobalToken: (node: EslintNode) => boolean;
|
|
4
|
-
export declare const isDecendantOfType: (node: Rule.Node, type: Rule.Node[
|
|
4
|
+
export declare const isDecendantOfType: (node: Rule.Node, type: Rule.Node["type"], skipNode?: boolean) => boolean;
|
|
5
5
|
export declare const isPropertyKey: (node: Rule.Node) => boolean;
|
|
6
6
|
export declare const isDecendantOfStyleJsxAttribute: (node: Rule.Node) => boolean;
|
|
7
7
|
export declare const isDecendantOfSvgElement: (node: Rule.Node) => boolean;
|
|
@@ -11,4 +11,4 @@ export declare const isCssInJsCallNode: (node?: Expression | null) => node is Ca
|
|
|
11
11
|
export declare const isCssInJsObjectNode: (node?: Expression | null) => node is CallExpression;
|
|
12
12
|
export declare const isDecendantOfXcssBlock: (node: Rule.Node, referencesInScope: Scope.Reference[], importSources: string[]) => boolean;
|
|
13
13
|
export declare const isDecendantOfStyleBlock: (node: Rule.Node) => boolean;
|
|
14
|
-
export declare const isChildOfType: (node: Rule.Node, type: Rule.Node[
|
|
14
|
+
export declare const isChildOfType: (node: Rule.Node, type: Rule.Node["type"]) => boolean;
|
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.19.
|
|
4
|
+
"version": "13.19.5",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"publishConfig": {
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@atlaskit/eslint-utils": "^2.0.0",
|
|
46
|
-
"@atlaskit/icon": "^
|
|
47
|
-
"@atlaskit/icon-lab": "^5.
|
|
46
|
+
"@atlaskit/icon": "^28.0.0",
|
|
47
|
+
"@atlaskit/icon-lab": "^5.6.0",
|
|
48
48
|
"@atlaskit/tokens": "^6.0.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"@typescript-eslint/utils": "^7.1.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@types/json-schema": "^7.0.15",
|
|
74
74
|
"eslint": "^8.57.0",
|
|
75
75
|
"jscodeshift": "^17.0.0",
|
|
76
|
-
"outdent": "^0.
|
|
76
|
+
"outdent": "^0.7.1",
|
|
77
77
|
"react": "^18.2.0",
|
|
78
78
|
"ts-jest": "^29.2.2"
|
|
79
79
|
},
|