@atlaskit/eslint-plugin-design-system 4.13.3 → 4.13.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/version.json +1 -1
  3. package/dist/es2019/version.json +1 -1
  4. package/dist/esm/version.json +1 -1
  5. package/package.json +2 -2
  6. package/dist/types-ts4.0/index.d.ts +0 -36
  7. package/dist/types-ts4.0/rules/ensure-design-token-usage/index.d.ts +0 -3
  8. package/dist/types-ts4.0/rules/ensure-design-token-usage-spacing/index.d.ts +0 -3
  9. package/dist/types-ts4.0/rules/ensure-design-token-usage-spacing/utils.d.ts +0 -18
  10. package/dist/types-ts4.0/rules/icon-label/index.d.ts +0 -3
  11. package/dist/types-ts4.0/rules/no-banned-imports/index.d.ts +0 -3
  12. package/dist/types-ts4.0/rules/no-banned-imports/paths.d.ts +0 -4
  13. package/dist/types-ts4.0/rules/no-deprecated-apis/index.d.ts +0 -3
  14. package/dist/types-ts4.0/rules/no-deprecated-design-token-usage/index.d.ts +0 -3
  15. package/dist/types-ts4.0/rules/no-deprecated-imports/index.d.ts +0 -29
  16. package/dist/types-ts4.0/rules/no-deprecated-imports/logo-paths.d.ts +0 -8
  17. package/dist/types-ts4.0/rules/no-deprecated-imports/paths.d.ts +0 -94
  18. package/dist/types-ts4.0/rules/no-unsafe-design-token-usage/index.d.ts +0 -3
  19. package/dist/types-ts4.0/rules/use-visually-hidden/constants.d.ts +0 -3
  20. package/dist/types-ts4.0/rules/use-visually-hidden/fix-jsx.d.ts +0 -3
  21. package/dist/types-ts4.0/rules/use-visually-hidden/fix-vanilla.d.ts +0 -3
  22. package/dist/types-ts4.0/rules/use-visually-hidden/index.d.ts +0 -3
  23. package/dist/types-ts4.0/rules/use-visually-hidden/utils.d.ts +0 -35
  24. package/dist/types-ts4.0/rules/utils/get-import-node-by-source.d.ts +0 -8
  25. package/dist/types-ts4.0/rules/utils/get-is-exception.d.ts +0 -2
  26. package/dist/types-ts4.0/rules/utils/is-color.d.ts +0 -4
  27. package/dist/types-ts4.0/rules/utils/is-elevation.d.ts +0 -5
  28. package/dist/types-ts4.0/rules/utils/is-node.d.ts +0 -11
  29. package/dist/types-ts4.0/rules/utils/is-token.d.ts +0 -1
  30. package/dist/types-ts4.0/rules/utils/jsx.d.ts +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/eslint-plugin-design-system
2
2
 
3
+ ## 4.13.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 4.13.3
4
10
 
5
11
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
- "version": "4.13.3",
3
+ "version": "4.13.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
- "version": "4.13.3",
3
+ "version": "4.13.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
- "version": "4.13.3",
3
+ "version": "4.13.4",
4
4
  "sideEffects": false
5
5
  }
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": "4.13.3",
4
+ "version": "4.13.4",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
7
7
  "registry": "https://registry.npmjs.org/"
@@ -33,7 +33,7 @@
33
33
  ".": "./src/index.tsx"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/tokens": "^0.10.0",
36
+ "@atlaskit/tokens": "^0.11.0",
37
37
  "@babel/runtime": "^7.0.0",
38
38
  "eslint-codemod-utils": "^1.4.0"
39
39
  },
@@ -1,36 +0,0 @@
1
- export declare const rules: {
2
- 'ensure-design-token-usage': import("eslint").Rule.RuleModule;
3
- 'icon-label': import("eslint").Rule.RuleModule;
4
- 'no-deprecated-apis': import("eslint").Rule.RuleModule;
5
- 'no-deprecated-design-token-usage': import("eslint").Rule.RuleModule;
6
- 'no-deprecated-imports': import("eslint").Rule.RuleModule;
7
- 'no-banned-imports': import("eslint").Rule.RuleModule;
8
- 'no-unsafe-design-token-usage': import("eslint").Rule.RuleModule;
9
- 'use-visually-hidden': import("eslint").Rule.RuleModule;
10
- 'ensure-design-token-usage-spacing': import("eslint").Rule.RuleModule;
11
- };
12
- export declare const configs: {
13
- recommended: {
14
- plugins: string[];
15
- rules: {
16
- '@atlaskit/design-system/icon-label': string;
17
- '@atlaskit/design-system/no-deprecated-apis': string;
18
- '@atlaskit/design-system/no-deprecated-imports': string;
19
- '@atlaskit/design-system/use-visually-hidden': string;
20
- '@atlaskit/design-system/no-banned-imports': string;
21
- };
22
- };
23
- all: {
24
- plugins: string[];
25
- rules: {
26
- '@atlaskit/design-system/icon-label': string;
27
- '@atlaskit/design-system/no-deprecated-apis': string;
28
- '@atlaskit/design-system/no-deprecated-imports': string;
29
- '@atlaskit/design-system/use-visually-hidden': string;
30
- '@atlaskit/design-system/ensure-design-token-usage': string;
31
- '@atlaskit/design-system/no-banned-imports': string;
32
- '@atlaskit/design-system/no-unsafe-design-token-usage': string;
33
- '@atlaskit/design-system/ensure-design-token-usage-spacing': string;
34
- };
35
- };
36
- };
@@ -1,3 +0,0 @@
1
- import type { Rule } from 'eslint';
2
- declare const rule: Rule.RuleModule;
3
- export default rule;
@@ -1,3 +0,0 @@
1
- import type { Rule } from 'eslint';
2
- declare const rule: Rule.RuleModule;
3
- export default rule;
@@ -1,18 +0,0 @@
1
- import type { Rule, Scope } from 'eslint';
2
- import { EslintNode } from 'eslint-codemod-utils';
3
- export declare function findIdentifierInParentScope({ scope, identifierName, }: {
4
- scope: Scope.Scope;
5
- identifierName: string;
6
- }): Scope.Variable | null;
7
- export declare const isSpacingProperty: (prop: string) => boolean;
8
- export declare const getValueFromShorthand: (str: unknown) => any[];
9
- export declare const getValue: (node: EslintNode, context: Rule.RuleContext) => string | number | any[] | null | undefined;
10
- export declare const emToPixels: <T extends unknown>(value: T, fontSize: number | null | undefined) => number | T | null;
11
- export declare const removePixelSuffix: (value: string | number) => string | number;
12
- export declare const isValidSpacingValue: (value: string | number | boolean | RegExp | null | undefined | any[] | bigint, fontSize?: number | null | undefined) => boolean;
13
- export declare const convertHyphenatedNameToCamelCase: (prop: string) => string;
14
- /**
15
- * @param node
16
- * @returns The furthest parent node that is on the same line as the input node
17
- */
18
- export declare const findParentNodeForLine: (node: Rule.Node) => Rule.Node;
@@ -1,3 +0,0 @@
1
- import type { Rule } from 'eslint';
2
- declare const rule: Rule.RuleModule;
3
- export default rule;
@@ -1,3 +0,0 @@
1
- import type { Rule } from 'eslint';
2
- declare const rule: Rule.RuleModule;
3
- export default rule;
@@ -1,4 +0,0 @@
1
- export declare const restrictedPaths: {
2
- path: string;
3
- message: string;
4
- }[];
@@ -1,3 +0,0 @@
1
- import type { Rule } from 'eslint';
2
- declare const rule: Rule.RuleModule;
3
- export default rule;
@@ -1,3 +0,0 @@
1
- import type { Rule } from 'eslint';
2
- declare const rule: Rule.RuleModule;
3
- export default rule;
@@ -1,29 +0,0 @@
1
- /**
2
- * Forked from original `no-restricted-imports` although the source has been substantially changed.
3
- *
4
- * To ensure compliance the license from eslint has been included and the original attribution.
5
- * @author Guy Ellis
6
- *
7
- * Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in
17
- * all copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- * THE SOFTWARE.
26
- */
27
- import type { Rule } from 'eslint';
28
- declare const rule: Rule.RuleModule;
29
- export default rule;
@@ -1,8 +0,0 @@
1
- export declare const namedLogoConstantsExports: {
2
- importName: string;
3
- message: string;
4
- }[];
5
- export declare const namedLogoExports: {
6
- importName: string;
7
- message: string;
8
- }[];
@@ -1,94 +0,0 @@
1
- export declare const namedThemeExports: {
2
- importName: string;
3
- message: string;
4
- }[];
5
- export declare const restrictedPaths: readonly [
6
- {
7
- readonly path: "@atlaskit/navigation-next";
8
- readonly message: "navigation-next is deprecated. Please use '@atlaskit/atlassian-navigation' instead.";
9
- },
10
- {
11
- readonly path: "@atlaskit/field-base";
12
- readonly message: "field-base is deprecated. Please use the '@atlaskit/form' package instead.";
13
- },
14
- {
15
- readonly path: "@atlaskit/field-radio-group";
16
- readonly message: "field-radio-group is deprecated. Please use '@atlaskit/radio' instead, and check the migration guide.";
17
- },
18
- {
19
- readonly path: "@atlaskit/field-range";
20
- readonly message: "field-range is deprecated. Please use '@atlaskit/range' instead.";
21
- },
22
- {
23
- readonly path: "@atlaskit/field-text";
24
- readonly message: "field-text is deprecated. Please use '@atlaskit/textfield' instead.";
25
- },
26
- {
27
- readonly path: "@atlaskit/field-text-area";
28
- readonly message: "field-text-area is deprecated. Please use '@atlaskit/textarea' instead.";
29
- },
30
- {
31
- readonly path: "@atlaskit/navigation";
32
- readonly message: "navigation is deprecated. Please use '@atlaskit/atlassian-navigation' instead.";
33
- },
34
- {
35
- readonly path: "@atlaskit/global-navigation";
36
- readonly message: "global-navigation is deprecated. Please use '@atlaskit/atlassian-navigation' for the horizontal nav bar, '@atlaskit/side-navigation' for the side nav, and '@atlaskit/page-layout' to layout your application.";
37
- },
38
- {
39
- readonly path: "@atlaskit/input";
40
- readonly message: "input is deprecated. This was an internal component and should not be used directly.";
41
- },
42
- {
43
- readonly path: "@atlaskit/layer";
44
- readonly message: "layer is deprecated. This was an internal component and should not be used directly.";
45
- },
46
- {
47
- readonly path: "@atlaskit/single-select";
48
- readonly message: "single-select is deprecated. Please use '@atlaskit/select' instead.";
49
- },
50
- {
51
- readonly path: "@atlaskit/multi-select";
52
- readonly message: "multi-select is deprecated. Please use '@atlaskit/select' instead.";
53
- },
54
- {
55
- readonly path: "@atlaskit/droplist";
56
- readonly message: "droplist is deprecated. For the pop-up behaviour please use '@atlaskit/popup' and for common menu components please use '@atlaskit/menu'.";
57
- },
58
- {
59
- readonly path: "@atlaskit/item";
60
- readonly message: "item is deprecated. Please use '@atlaskit/menu' instead.";
61
- },
62
- {
63
- readonly path: "@atlaskit/theme/constants";
64
- readonly imports: {
65
- importName: string;
66
- message: string;
67
- }[];
68
- },
69
- {
70
- readonly path: "@atlaskit/theme";
71
- readonly imports: {
72
- importName: string;
73
- message: string;
74
- }[];
75
- },
76
- {
77
- readonly path: "@atlaskit/icon-priority";
78
- readonly message: "icon-priority was deprecated due to limited usage in Cloud products and is no longer supported.";
79
- },
80
- {
81
- readonly path: "@atlaskit/logo/constants";
82
- readonly imports: {
83
- importName: string;
84
- message: string;
85
- }[];
86
- },
87
- {
88
- readonly path: "@atlaskit/logo";
89
- readonly imports: {
90
- importName: string;
91
- message: string;
92
- }[];
93
- }
94
- ];
@@ -1,3 +0,0 @@
1
- import type { Rule } from 'eslint';
2
- declare const rule: Rule.RuleModule;
3
- export default rule;
@@ -1,3 +0,0 @@
1
- export declare const IMPORT_NAME = "AKVisuallyHidden";
2
- export declare const VISUALLY_HIDDEN_SOURCE = "@atlaskit/visually-hidden";
3
- export declare const VISUALLY_HIDDEN_IMPORT: string;
@@ -1,3 +0,0 @@
1
- import type { Rule, SourceCode } from 'eslint';
2
- declare const _default: (source: SourceCode, node: Rule.Node) => (fixer: Rule.RuleFixer) => Rule.Fix[];
3
- export default _default;
@@ -1,3 +0,0 @@
1
- import type { Rule, SourceCode } from 'eslint';
2
- declare const _default: (source: SourceCode, node: Rule.Node) => (fixer: Rule.RuleFixer) => Rule.Fix[];
3
- export default _default;
@@ -1,3 +0,0 @@
1
- import type { Rule } from 'eslint';
2
- declare const rule: Rule.RuleModule;
3
- export default rule;
@@ -1,35 +0,0 @@
1
- import type { SourceCode } from 'eslint';
2
- import { ObjectExpression } from 'eslint-codemod-utils';
3
- declare const referenceObject: {
4
- width: string;
5
- height: string;
6
- padding: string;
7
- position: string;
8
- border: string;
9
- clip: string;
10
- overflow: string;
11
- whiteSpace: string;
12
- };
13
- declare type KeyValue = {
14
- key: string;
15
- value: string;
16
- };
17
- export declare type ReferenceObject = typeof referenceObject;
18
- /**
19
- * Returns the first import in the esprima AST.
20
- */
21
- export declare const getFirstImport: (source: SourceCode) => import("estree").ModuleDeclaration | import("estree").Statement | import("estree").Directive | undefined;
22
- /**
23
- * Takes a template literal and returns [key, value] array of the css properties
24
- */
25
- export declare const makeTemplateLiteralIntoEntries: (templateString: string) => string[][];
26
- /**
27
- * Given a node, translate the node into css key-value pairs and
28
- * compare the output to the reference styles required to make a
29
- * visually hidden element.
30
- *
31
- * @returns {number} A fraction between 0-1 depending on the object's likeness.
32
- */
33
- export declare const getObjectLikeness: (node: ObjectExpression) => number;
34
- export declare const countMatchingKeyValues: (styleEntries: KeyValue[]) => number;
35
- export {};
@@ -1,8 +0,0 @@
1
- import type { SourceCode } from 'eslint';
2
- import type { ImportDeclaration } from 'eslint-codemod-utils';
3
- /**
4
- * @param {SourceCode} source The eslint source
5
- * @param {string} path The path specified to find
6
- * @returns {ImportDeclaration}
7
- */
8
- export declare const getImportedNodeBySource: (source: SourceCode, path: string) => ImportDeclaration | undefined;
@@ -1,2 +0,0 @@
1
- import type { Rule } from 'eslint';
2
- export declare const getIsException: (exceptions?: string[] | undefined) => (node: Rule.Node) => boolean;
@@ -1,4 +0,0 @@
1
- export declare const isLegacyColor: (value: string) => boolean;
2
- export declare const isLegacyNamedColor: (value: string) => boolean;
3
- export declare const includesHardCodedColor: (raw: string) => boolean;
4
- export declare const isHardCodedColor: (value: string) => boolean;
@@ -1,5 +0,0 @@
1
- import tokens from '@atlaskit/tokens/token-names';
2
- export declare const isLegacyElevation: (name: string) => false | {
3
- background: keyof typeof tokens;
4
- shadow: keyof typeof tokens;
5
- };
@@ -1,11 +0,0 @@
1
- import type { Rule } from 'eslint';
2
- import { CallExpression, EslintNode, Expression, TaggedTemplateExpression } from 'eslint-codemod-utils';
3
- export declare const isDecendantOfGlobalToken: (node: EslintNode) => boolean;
4
- export declare const isDecendantOfType: (node: Rule.Node, type: Rule.Node['type'], skipNode?: boolean) => boolean;
5
- export declare const isPropertyKey: (node: Rule.Node) => boolean;
6
- export declare const isVariableName: (node: Rule.Node) => boolean;
7
- export declare const isDecendantOfStyleJsxAttribute: (node: Rule.Node) => boolean;
8
- export declare const isStyledTemplateNode: (node?: Expression | null | undefined) => node is TaggedTemplateExpression;
9
- export declare const isStyledObjectNode: (node?: Expression | null | undefined) => node is CallExpression;
10
- export declare const isDecendantOfStyleBlock: (node: Rule.Node) => boolean;
11
- export declare const isChildOfType: (node: Rule.Node, type: Rule.Node['type']) => boolean;
@@ -1 +0,0 @@
1
- export declare const isToken: (value: string, tokens: Record<string, string>) => string | undefined;
@@ -1,2 +0,0 @@
1
- import type { JSXAttribute, JSXElement } from 'eslint-codemod-utils';
2
- export declare function findProp(jsx: JSXElement, propName: string): JSXAttribute | undefined;