@atlaskit/eslint-plugin-design-system 10.12.2 → 10.12.4
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 +17 -0
- package/dist/cjs/rules/no-legacy-icons/checks.js +13 -12
- package/dist/cjs/rules/no-legacy-icons/helpers.js +70 -24
- package/dist/cjs/rules/no-legacy-icons/upcoming-icons.js +7 -0
- package/dist/es2019/rules/no-legacy-icons/checks.js +11 -10
- package/dist/es2019/rules/no-legacy-icons/helpers.js +52 -11
- package/dist/es2019/rules/no-legacy-icons/upcoming-icons.js +1 -0
- package/dist/esm/rules/no-legacy-icons/checks.js +11 -10
- package/dist/esm/rules/no-legacy-icons/helpers.js +69 -23
- package/dist/esm/rules/no-legacy-icons/upcoming-icons.js +1 -0
- package/dist/types/rules/no-legacy-icons/helpers.d.ts +8 -13
- package/dist/types/rules/no-legacy-icons/upcoming-icons.d.ts +1 -0
- package/dist/types-ts4.5/rules/no-legacy-icons/helpers.d.ts +13 -13
- package/dist/types-ts4.5/rules/no-legacy-icons/upcoming-icons.d.ts +1 -0
- package/package.json +2 -1
- package/dist/cjs/rules/no-legacy-icons/migration-map-temp.js +0 -4090
- package/dist/es2019/rules/no-legacy-icons/migration-map-temp.js +0 -4082
- package/dist/esm/rules/no-legacy-icons/migration-map-temp.js +0 -4084
- package/dist/types/rules/no-legacy-icons/migration-map-temp.d.ts +0 -22
- package/dist/types-ts4.5/rules/no-legacy-icons/migration-map-temp.d.ts +0 -27
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
2
|
import { type JSXAttribute, type Node } from 'eslint-codemod-utils';
|
|
3
|
-
import { type
|
|
3
|
+
import { type IconMigrationSizeGuidance } from '@atlaskit/icon/UNSAFE_migration-map';
|
|
4
4
|
export type iconMigrationError = Rule.ReportDescriptor;
|
|
5
5
|
export type errorsListManual = {
|
|
6
6
|
[loc: string]: {
|
|
@@ -15,23 +15,17 @@ export type errorsListAuto = {
|
|
|
15
15
|
export type guidanceList = {
|
|
16
16
|
[loc: string]: string;
|
|
17
17
|
};
|
|
18
|
+
declare const sizes: readonly ["small", "medium", "large", "xlarge"];
|
|
19
|
+
export type Size = (typeof sizes)[number];
|
|
20
|
+
export declare const isSize: (size: any) => size is "small" | "medium" | "large" | "xlarge";
|
|
18
21
|
/**
|
|
19
22
|
* Returns the migration map object for a legacy icon or null if not found
|
|
20
23
|
* @param iconPackage The name of the legacy icon package
|
|
21
24
|
* @returns The migration map object for the legacy icon or null if not found
|
|
22
25
|
*/
|
|
23
|
-
export declare const getMigrationMapObject: (iconPackage: string) =>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
medium: string;
|
|
27
|
-
large: string;
|
|
28
|
-
xlarge: string;
|
|
29
|
-
};
|
|
30
|
-
newIcon?: {
|
|
31
|
-
name: string;
|
|
32
|
-
type: string;
|
|
33
|
-
library: string;
|
|
34
|
-
} | undefined;
|
|
26
|
+
export declare const getMigrationMapObject: (iconPackage: string) => any;
|
|
27
|
+
export declare const getUpcomingIcons: (iconPackage: string) => {
|
|
28
|
+
sizeGuidance: Record<Size, IconMigrationSizeGuidance>;
|
|
35
29
|
} | null;
|
|
36
30
|
/**
|
|
37
31
|
* Checks if a new icon can be auto-migrated based on guidance from the migration map
|
|
@@ -65,3 +59,4 @@ export declare const createHelpers: (context: Rule.RuleContext) => {
|
|
|
65
59
|
getTokenCallValue: (value: any) => string | undefined;
|
|
66
60
|
getConfigFlag: (key: string, defaultValue: boolean) => boolean;
|
|
67
61
|
};
|
|
62
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const upcomingIcons: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
2
|
import { type JSXAttribute, type Node } from 'eslint-codemod-utils';
|
|
3
|
-
import { type
|
|
3
|
+
import { type IconMigrationSizeGuidance } from '@atlaskit/icon/UNSAFE_migration-map';
|
|
4
4
|
export type iconMigrationError = Rule.ReportDescriptor;
|
|
5
5
|
export type errorsListManual = {
|
|
6
6
|
[loc: string]: {
|
|
@@ -15,23 +15,22 @@ export type errorsListAuto = {
|
|
|
15
15
|
export type guidanceList = {
|
|
16
16
|
[loc: string]: string;
|
|
17
17
|
};
|
|
18
|
+
declare const sizes: readonly [
|
|
19
|
+
"small",
|
|
20
|
+
"medium",
|
|
21
|
+
"large",
|
|
22
|
+
"xlarge"
|
|
23
|
+
];
|
|
24
|
+
export type Size = (typeof sizes)[number];
|
|
25
|
+
export declare const isSize: (size: any) => size is "small" | "medium" | "large" | "xlarge";
|
|
18
26
|
/**
|
|
19
27
|
* Returns the migration map object for a legacy icon or null if not found
|
|
20
28
|
* @param iconPackage The name of the legacy icon package
|
|
21
29
|
* @returns The migration map object for the legacy icon or null if not found
|
|
22
30
|
*/
|
|
23
|
-
export declare const getMigrationMapObject: (iconPackage: string) =>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
medium: string;
|
|
27
|
-
large: string;
|
|
28
|
-
xlarge: string;
|
|
29
|
-
};
|
|
30
|
-
newIcon?: {
|
|
31
|
-
name: string;
|
|
32
|
-
type: string;
|
|
33
|
-
library: string;
|
|
34
|
-
} | undefined;
|
|
31
|
+
export declare const getMigrationMapObject: (iconPackage: string) => any;
|
|
32
|
+
export declare const getUpcomingIcons: (iconPackage: string) => {
|
|
33
|
+
sizeGuidance: Record<Size, IconMigrationSizeGuidance>;
|
|
35
34
|
} | null;
|
|
36
35
|
/**
|
|
37
36
|
* Checks if a new icon can be auto-migrated based on guidance from the migration map
|
|
@@ -65,3 +64,4 @@ export declare const createHelpers: (context: Rule.RuleContext) => {
|
|
|
65
64
|
getTokenCallValue: (value: any) => string | undefined;
|
|
66
65
|
getConfigFlag: (key: string, defaultValue: boolean) => boolean;
|
|
67
66
|
};
|
|
67
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const upcomingIcons: string[];
|
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.12.
|
|
4
|
+
"version": "10.12.4",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"publishConfig": {
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@atlaskit/eslint-utils": "^1.6.0",
|
|
45
|
+
"@atlaskit/icon": "^22.10.0",
|
|
45
46
|
"@atlaskit/tokens": "*",
|
|
46
47
|
"@babel/runtime": "^7.0.0",
|
|
47
48
|
"@typescript-eslint/utils": "^5.48.1",
|