@atlaskit/eslint-plugin-design-system 10.3.0 → 10.4.0
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/README.md +1 -0
- package/constellation/index/usage.mdx +1 -0
- package/constellation/use-latest-xcss-syntax/usage.mdx +33 -0
- 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/index.js +35 -0
- package/dist/cjs/rules/use-latest-xcss-syntax/transformers/index.js +12 -0
- package/dist/cjs/rules/use-latest-xcss-syntax/transformers/style-property/index.js +105 -0
- package/dist/cjs/rules/use-latest-xcss-syntax/transformers/style-property/style-map.js +7 -0
- package/dist/cjs/rules/use-latest-xcss-syntax/transformers/style-property/supported.js +13 -0
- package/dist/cjs/rules/use-latest-xcss-syntax/utils/index.js +12 -0
- package/dist/cjs/rules/use-latest-xcss-syntax/utils/is-string-or-number.js +9 -0
- package/dist/cjs/rules/use-tokens-typography/transformers/style-object.js +11 -0
- 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/index.js +27 -0
- package/dist/es2019/rules/use-latest-xcss-syntax/transformers/index.js +1 -0
- package/dist/es2019/rules/use-latest-xcss-syntax/transformers/style-property/index.js +99 -0
- package/dist/es2019/rules/use-latest-xcss-syntax/transformers/style-property/style-map.js +1 -0
- package/dist/es2019/rules/use-latest-xcss-syntax/transformers/style-property/supported.js +7 -0
- package/dist/es2019/rules/use-latest-xcss-syntax/utils/index.js +1 -0
- package/dist/es2019/rules/use-latest-xcss-syntax/utils/is-string-or-number.js +3 -0
- package/dist/es2019/rules/use-tokens-typography/transformers/style-object.js +12 -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/index.js +29 -0
- package/dist/esm/rules/use-latest-xcss-syntax/transformers/index.js +1 -0
- package/dist/esm/rules/use-latest-xcss-syntax/transformers/style-property/index.js +95 -0
- package/dist/esm/rules/use-latest-xcss-syntax/transformers/style-property/style-map.js +1 -0
- package/dist/esm/rules/use-latest-xcss-syntax/transformers/style-property/supported.js +7 -0
- package/dist/esm/rules/use-latest-xcss-syntax/utils/index.js +1 -0
- package/dist/esm/rules/use-latest-xcss-syntax/utils/is-string-or-number.js +3 -0
- package/dist/esm/rules/use-tokens-typography/transformers/style-object.js +11 -0
- package/dist/types/ast-nodes/function-call.d.ts +1 -1
- package/dist/types/ast-nodes/jsx-attribute.d.ts +1 -1
- package/dist/types/ast-nodes/jsx-element.d.ts +1 -1
- package/dist/types/ast-nodes/object-entry.d.ts +1 -1
- package/dist/types/ast-nodes/object.d.ts +1 -1
- package/dist/types/ast-nodes/root.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/ensure-design-token-usage/color.d.ts +1 -1
- package/dist/types/rules/ensure-design-token-usage/error-boundary.d.ts +1 -1
- package/dist/types/rules/ensure-design-token-usage/shape.d.ts +1 -1
- package/dist/types/rules/ensure-design-token-usage/spacing.d.ts +1 -1
- package/dist/types/rules/ensure-design-token-usage/utils.d.ts +2 -2
- package/dist/types/rules/index.codegen.d.ts +1 -0
- package/dist/types/rules/no-deprecated-apis/index.d.ts +2 -2
- package/dist/types/rules/no-deprecated-imports/index.d.ts +2 -2
- package/dist/types/rules/no-direct-use-of-web-platform-drag-and-drop/checks/is-blocked-add-event-listener.d.ts +1 -1
- package/dist/types/rules/no-direct-use-of-web-platform-drag-and-drop/checks/is-blocked-bind-all.d.ts +1 -1
- package/dist/types/rules/no-direct-use-of-web-platform-drag-and-drop/checks/is-blocked-bind.d.ts +1 -1
- package/dist/types/rules/no-direct-use-of-web-platform-drag-and-drop/checks/is-blocked-jsx-attribute.d.ts +1 -1
- package/dist/types/rules/no-direct-use-of-web-platform-drag-and-drop/shared/is-blocked-event-binding.d.ts +1 -1
- package/dist/types/rules/use-heading/transformers/common.d.ts +2 -2
- package/dist/types/rules/use-href-in-link-item/utils.d.ts +1 -1
- package/dist/types/rules/use-latest-xcss-syntax/index.d.ts +4 -0
- package/dist/types/rules/use-latest-xcss-syntax/transformers/index.d.ts +1 -0
- package/dist/types/rules/use-latest-xcss-syntax/transformers/style-property/index.d.ts +18 -0
- package/dist/types/rules/use-latest-xcss-syntax/transformers/style-property/style-map.d.ts +1 -0
- package/dist/types/rules/use-latest-xcss-syntax/transformers/style-property/supported.d.ts +6 -0
- package/dist/types/rules/use-latest-xcss-syntax/utils/index.d.ts +1 -0
- package/dist/types/rules/use-latest-xcss-syntax/utils/is-string-or-number.d.ts +1 -0
- package/dist/types/rules/use-primitives/transformers/compiled-styled/convert-jsx-call-site.d.ts +1 -1
- package/dist/types/rules/use-primitives/transformers/compiled-styled/convert-styled-component-call-to-jsx.d.ts +1 -1
- package/dist/types/rules/use-primitives/transformers/compiled-styled/find-valid-jsx-usage-to-transform.d.ts +1 -1
- package/dist/types/rules/use-primitives/transformers/compiled-styled/index.d.ts +2 -2
- package/dist/types/rules/use-primitives/transformers/emotion-css/index.d.ts +2 -2
- package/dist/types/rules/use-primitives/utils/convert-ast-object-expression-to-js-object.d.ts +1 -1
- package/dist/types/rules/use-primitives/utils/get-attribute-value-identifier.d.ts +1 -1
- package/dist/types/rules/use-primitives/utils/get-jsx-attribute-by-name.d.ts +1 -1
- package/dist/types/rules/use-primitives/utils/is-valid-css-properties-to-transform.d.ts +2 -2
- package/dist/types/rules/use-primitives/utils/update-jsx-attribute-by-name.d.ts +1 -1
- package/dist/types/rules/use-primitives/utils/validate-styles.d.ts +2 -2
- package/dist/types/rules/use-primitives-text/transformers/common.d.ts +2 -2
- package/dist/types/rules/use-tokens-space/transformers/style-property/index.d.ts +1 -1
- package/dist/types/rules/use-tokens-typography/config/index.d.ts +1 -1
- package/dist/types/rules/use-tokens-typography/error-boundary.d.ts +1 -1
- package/dist/types/rules/use-tokens-typography/transformers/style-object.d.ts +3 -3
- package/dist/types/rules/use-tokens-typography/utils.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/check-if-supported-export.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/get-first-supported-import.d.ts +2 -2
- package/dist/types/rules/utils/is-elevation.d.ts +1 -1
- package/dist/types-ts4.5/ast-nodes/function-call.d.ts +1 -1
- package/dist/types-ts4.5/ast-nodes/jsx-attribute.d.ts +1 -1
- package/dist/types-ts4.5/ast-nodes/jsx-element.d.ts +1 -1
- package/dist/types-ts4.5/ast-nodes/object-entry.d.ts +1 -1
- package/dist/types-ts4.5/ast-nodes/object.d.ts +1 -1
- package/dist/types-ts4.5/ast-nodes/root.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/ensure-design-token-usage/color.d.ts +1 -1
- package/dist/types-ts4.5/rules/ensure-design-token-usage/error-boundary.d.ts +1 -1
- package/dist/types-ts4.5/rules/ensure-design-token-usage/shape.d.ts +1 -1
- package/dist/types-ts4.5/rules/ensure-design-token-usage/spacing.d.ts +1 -1
- package/dist/types-ts4.5/rules/ensure-design-token-usage/utils.d.ts +2 -2
- package/dist/types-ts4.5/rules/index.codegen.d.ts +1 -0
- package/dist/types-ts4.5/rules/no-deprecated-apis/index.d.ts +2 -2
- package/dist/types-ts4.5/rules/no-deprecated-imports/index.d.ts +2 -2
- package/dist/types-ts4.5/rules/no-direct-use-of-web-platform-drag-and-drop/checks/is-blocked-add-event-listener.d.ts +1 -1
- package/dist/types-ts4.5/rules/no-direct-use-of-web-platform-drag-and-drop/checks/is-blocked-bind-all.d.ts +1 -1
- package/dist/types-ts4.5/rules/no-direct-use-of-web-platform-drag-and-drop/checks/is-blocked-bind.d.ts +1 -1
- package/dist/types-ts4.5/rules/no-direct-use-of-web-platform-drag-and-drop/checks/is-blocked-jsx-attribute.d.ts +1 -1
- package/dist/types-ts4.5/rules/no-direct-use-of-web-platform-drag-and-drop/shared/is-blocked-event-binding.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-heading/transformers/common.d.ts +2 -2
- package/dist/types-ts4.5/rules/use-href-in-link-item/utils.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-latest-xcss-syntax/index.d.ts +4 -0
- package/dist/types-ts4.5/rules/use-latest-xcss-syntax/transformers/index.d.ts +1 -0
- package/dist/types-ts4.5/rules/use-latest-xcss-syntax/transformers/style-property/index.d.ts +18 -0
- package/dist/types-ts4.5/rules/use-latest-xcss-syntax/transformers/style-property/style-map.d.ts +1 -0
- package/dist/types-ts4.5/rules/use-latest-xcss-syntax/transformers/style-property/supported.d.ts +6 -0
- package/dist/types-ts4.5/rules/use-latest-xcss-syntax/utils/index.d.ts +1 -0
- package/dist/types-ts4.5/rules/use-latest-xcss-syntax/utils/is-string-or-number.d.ts +1 -0
- package/dist/types-ts4.5/rules/use-primitives/transformers/compiled-styled/convert-jsx-call-site.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-primitives/transformers/compiled-styled/convert-styled-component-call-to-jsx.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-primitives/transformers/compiled-styled/find-valid-jsx-usage-to-transform.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-primitives/transformers/compiled-styled/index.d.ts +2 -2
- package/dist/types-ts4.5/rules/use-primitives/transformers/emotion-css/index.d.ts +2 -2
- package/dist/types-ts4.5/rules/use-primitives/utils/convert-ast-object-expression-to-js-object.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-primitives/utils/get-attribute-value-identifier.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-primitives/utils/get-jsx-attribute-by-name.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-primitives/utils/is-valid-css-properties-to-transform.d.ts +2 -2
- package/dist/types-ts4.5/rules/use-primitives/utils/update-jsx-attribute-by-name.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-primitives/utils/validate-styles.d.ts +2 -2
- package/dist/types-ts4.5/rules/use-primitives-text/transformers/common.d.ts +2 -2
- package/dist/types-ts4.5/rules/use-tokens-space/transformers/style-property/index.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-tokens-typography/config/index.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-tokens-typography/error-boundary.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-tokens-typography/transformers/style-object.d.ts +3 -3
- package/dist/types-ts4.5/rules/use-tokens-typography/utils.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/check-if-supported-export.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/get-first-supported-import.d.ts +2 -2
- package/dist/types-ts4.5/rules/utils/is-elevation.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Rule, Scope as ScopeNamespace } from 'eslint';
|
|
2
|
-
import { ImportSource } from '@atlaskit/eslint-utils/is-supported-import';
|
|
2
|
+
import { type ImportSource } from '@atlaskit/eslint-utils/is-supported-import';
|
|
3
3
|
type Node = Rule.Node;
|
|
4
4
|
type RuleContext = Rule.RuleContext;
|
|
5
5
|
type Scope = ScopeNamespace.Scope;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JSONSchema4 } from '@typescript-eslint/utils/dist/json-schema';
|
|
2
2
|
import type { Rule } from 'eslint';
|
|
3
|
-
import { SupportedNameChecker } from '@atlaskit/eslint-utils/is-supported-import';
|
|
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
6
|
export declare const createNoTaggedTemplateExpressionRule: (isUsage: SupportedNameChecker, messageId: string) => RuleModule['create'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { ImportDeclaration } from 'eslint-codemod-utils';
|
|
3
|
-
import { ImportSource } from '@atlaskit/eslint-utils/is-supported-import';
|
|
2
|
+
import { type ImportDeclaration } from 'eslint-codemod-utils';
|
|
3
|
+
import { type ImportSource } from '@atlaskit/eslint-utils/is-supported-import';
|
|
4
4
|
type RuleContext = Rule.RuleContext;
|
|
5
5
|
/**
|
|
6
6
|
* Get the first import declaration in the file that matches any of the packages
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { CallExpression, ObjectExpression } from 'eslint-codemod-utils';
|
|
2
|
+
import { type CallExpression, type ObjectExpression } from 'eslint-codemod-utils';
|
|
3
3
|
export declare const FunctionCall: {
|
|
4
4
|
getName(node: CallExpression): string | undefined;
|
|
5
5
|
updateName(node: CallExpression, newName: string, fixer: Rule.RuleFixer): Rule.Fix;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { JSXAttribute } from 'eslint-codemod-utils';
|
|
2
|
+
import { type JSXAttribute } from 'eslint-codemod-utils';
|
|
3
3
|
declare const HelperJSXAttribute: {
|
|
4
4
|
getName(node: JSXAttribute): string;
|
|
5
5
|
updateName(node: JSXAttribute, name: string, fixer: Rule.RuleFixer): Rule.Fix;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { JSXAttribute, JSXElement, JSXFragment, JSXSpreadAttribute } from 'eslint-codemod-utils';
|
|
2
|
+
import { type JSXAttribute, type JSXElement, type JSXFragment, type JSXSpreadAttribute } from 'eslint-codemod-utils';
|
|
3
3
|
export declare const JSXElementHelper: {
|
|
4
4
|
/**
|
|
5
5
|
* Names of JSXElements can be any of:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { Property, SpreadElement } from 'eslint-codemod-utils';
|
|
2
|
+
import { type Property, type SpreadElement } from 'eslint-codemod-utils';
|
|
3
3
|
export declare const ObjectEntry: {
|
|
4
4
|
getProperty(node: Property): {
|
|
5
5
|
type: 'Identifier';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { ObjectExpression, Property, SpreadElement } from 'eslint-codemod-utils';
|
|
2
|
+
import { type ObjectExpression, type Property, type SpreadElement } from 'eslint-codemod-utils';
|
|
3
3
|
declare const ASTObjectExpression: {
|
|
4
4
|
/**
|
|
5
5
|
* Returns `true` if an object contains a property with the specified name, `false` otherwise.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { Rule } from 'eslint';
|
|
3
|
-
import { Directive, ImportDeclaration, insertImportDeclaration, ModuleDeclaration, Statement } from 'eslint-codemod-utils';
|
|
3
|
+
import { type Directive, type ImportDeclaration, insertImportDeclaration, type ModuleDeclaration, type Statement } from 'eslint-codemod-utils';
|
|
4
4
|
type ImportData = Parameters<typeof insertImportDeclaration>[1];
|
|
5
5
|
export declare const Root: {
|
|
6
6
|
/**
|
|
@@ -33,6 +33,7 @@ export declare const configs: {
|
|
|
33
33
|
'@atlaskit/design-system/use-heading': string;
|
|
34
34
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': string;
|
|
35
35
|
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
36
|
+
'@atlaskit/design-system/use-latest-xcss-syntax': string;
|
|
36
37
|
'@atlaskit/design-system/use-popup-label': string;
|
|
37
38
|
'@atlaskit/design-system/use-primitives': string;
|
|
38
39
|
'@atlaskit/design-system/use-primitives-text': string;
|
|
@@ -64,6 +65,7 @@ export declare const configs: {
|
|
|
64
65
|
'@atlaskit/design-system/use-drawer-label': string;
|
|
65
66
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': string;
|
|
66
67
|
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
68
|
+
'@atlaskit/design-system/use-latest-xcss-syntax': string;
|
|
67
69
|
'@atlaskit/design-system/use-popup-label': string;
|
|
68
70
|
'@atlaskit/design-system/use-visually-hidden': string;
|
|
69
71
|
};
|
|
@@ -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::8453f9be2d12c65323a70743b71f7474>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
declare const _default: {
|
|
@@ -36,6 +36,7 @@ declare const _default: {
|
|
|
36
36
|
'@atlaskit/design-system/use-heading': string;
|
|
37
37
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': string;
|
|
38
38
|
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
39
|
+
'@atlaskit/design-system/use-latest-xcss-syntax': string;
|
|
39
40
|
'@atlaskit/design-system/use-popup-label': string;
|
|
40
41
|
'@atlaskit/design-system/use-primitives': string;
|
|
41
42
|
'@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::c67c53656bcdaedb72953c8026a01c24>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
declare const _default: {
|
|
@@ -26,6 +26,7 @@ declare const _default: {
|
|
|
26
26
|
'@atlaskit/design-system/use-drawer-label': string;
|
|
27
27
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': string;
|
|
28
28
|
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
29
|
+
'@atlaskit/design-system/use-latest-xcss-syntax': string;
|
|
29
30
|
'@atlaskit/design-system/use-popup-label': string;
|
|
30
31
|
'@atlaskit/design-system/use-visually-hidden': string;
|
|
31
32
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { Property } from 'eslint-codemod-utils';
|
|
2
|
+
import { type Property } from 'eslint-codemod-utils';
|
|
3
3
|
import { isLegacyElevation } from '../utils/is-elevation';
|
|
4
4
|
import type { RuleConfig } from './types';
|
|
5
5
|
type Suggestion = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EslintNode } from 'eslint-codemod-utils';
|
|
1
|
+
import { type EslintNode } from 'eslint-codemod-utils';
|
|
2
2
|
export declare const radiusValueToToken: any;
|
|
3
3
|
export declare const borderWidthValueToToken: any;
|
|
4
4
|
export declare function isRadiusProperty(propertyName: string): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { ImportDeclaration, Property } from 'eslint-codemod-utils';
|
|
2
|
+
import { type ImportDeclaration, type Property } from 'eslint-codemod-utils';
|
|
3
3
|
import type { RuleConfig } from './types';
|
|
4
4
|
export declare const lintObjectForSpacing: (node: Property, context: Rule.RuleContext, ruleConfig: RuleConfig, fontSize: any, tokenNode: ImportDeclaration | null) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { EslintNode, ObjectExpression, Property, SpreadElement, TaggedTemplateExpression } from 'eslint-codemod-utils';
|
|
3
|
-
import { Domains } from './types';
|
|
2
|
+
import { type EslintNode, type ObjectExpression, type Property, type SpreadElement, type TaggedTemplateExpression } from 'eslint-codemod-utils';
|
|
3
|
+
import { type Domains } from './types';
|
|
4
4
|
export type ProcessedCSSLines = [
|
|
5
5
|
string,
|
|
6
6
|
string
|
|
@@ -37,6 +37,7 @@ declare const _default: {
|
|
|
37
37
|
'use-heading': import("eslint").Rule.RuleModule;
|
|
38
38
|
'use-heading-level-in-spotlight-card': import("eslint").Rule.RuleModule;
|
|
39
39
|
'use-href-in-link-item': import("eslint").Rule.RuleModule;
|
|
40
|
+
'use-latest-xcss-syntax': import("eslint").Rule.RuleModule;
|
|
40
41
|
'use-popup-label': import("eslint").Rule.RuleModule;
|
|
41
42
|
'use-primitives': import("eslint").Rule.RuleModule;
|
|
42
43
|
'use-primitives-text': import("eslint").Rule.RuleModule;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
-
import { DeprecatedConfig } from '../utils/types';
|
|
1
|
+
import { type TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
import { type DeprecatedConfig } from '../utils/types';
|
|
3
3
|
export declare const noDeprecatedJSXAttributeMessageId = "noDeprecatedJSXAttributes";
|
|
4
4
|
export declare const name = "no-deprecated-apis";
|
|
5
5
|
declare const rule: TSESLint.RuleModule<string, [
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
25
|
* THE SOFTWARE.
|
|
26
26
|
*/
|
|
27
|
-
import { TSESLint } from '@typescript-eslint/utils';
|
|
28
|
-
import { DeprecatedConfig } from '../utils/types';
|
|
27
|
+
import { type TSESLint } from '@typescript-eslint/utils';
|
|
28
|
+
import { type DeprecatedConfig } from '../utils/types';
|
|
29
29
|
export declare const name = "no-deprecated-imports";
|
|
30
30
|
export declare const importNameWithCustomMessageId = "importNameWithCustomMessage";
|
|
31
31
|
export declare const pathWithCustomMessageId = "pathWithCustomMessage";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CallExpression } from 'eslint-codemod-utils';
|
|
1
|
+
import { type CallExpression } from 'eslint-codemod-utils';
|
|
2
2
|
export declare function isBlockedAddEventListener(node: CallExpression): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Property, SpreadElement } from 'eslint-codemod-utils';
|
|
1
|
+
import { type Property, type SpreadElement } from 'eslint-codemod-utils';
|
|
2
2
|
export declare function isBlockedEventBinding(property: Property | SpreadElement): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { JSXElement } from 'eslint-codemod-utils';
|
|
3
|
-
import { RuleConfig } from '../config';
|
|
2
|
+
import { type JSXElement } from 'eslint-codemod-utils';
|
|
3
|
+
import { type RuleConfig } from '../config';
|
|
4
4
|
export type MetaData = {
|
|
5
5
|
context: Rule.RuleContext;
|
|
6
6
|
config: RuleConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Rule, Scope } from 'eslint';
|
|
2
|
-
import { ImportDeclaration, JSXAttribute } from 'eslint-codemod-utils';
|
|
2
|
+
import { type ImportDeclaration, type JSXAttribute } from 'eslint-codemod-utils';
|
|
3
3
|
export declare const hrefHasInvalidValue: (scope: Scope.Scope, href: JSXAttribute | undefined) => boolean;
|
|
4
4
|
export declare const hasImportOfName: (node: ImportDeclaration, name: string) => boolean;
|
|
5
5
|
export declare const insertButtonItemDefaultImport: (fixer: Rule.RuleFixer, node: ImportDeclaration) => Rule.Fix;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Rule } from 'eslint';
|
|
2
|
+
export declare const noRawSpacingValues = "Don't use non-token values in padding or margin. There is ongoing work to make this a TypeScript error. Once that happens, you will have to delete/refactor anyway. Atlassians: See https://go.atlassian.com/xcss-spacing for details.";
|
|
3
|
+
declare const rule: Rule.RuleModule;
|
|
4
|
+
export default rule;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StyleProperty } from './style-property';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Rule } from 'eslint';
|
|
2
|
+
import { type Property as ObjectEntry } from 'eslint-codemod-utils';
|
|
3
|
+
type Check = {
|
|
4
|
+
success: false;
|
|
5
|
+
ref: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
success: true;
|
|
8
|
+
ref: ObjectEntry;
|
|
9
|
+
};
|
|
10
|
+
export declare const StyleProperty: {
|
|
11
|
+
lint(node: Rule.Node, { context }: {
|
|
12
|
+
context: Rule.RuleContext;
|
|
13
|
+
}): void;
|
|
14
|
+
_check(node: Rule.Node, { context }: {
|
|
15
|
+
context: Rule.RuleContext;
|
|
16
|
+
}): Check;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
package/dist/types-ts4.5/rules/use-latest-xcss-syntax/transformers/style-property/style-map.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styleMap: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isStringOrNumber } from './is-string-or-number';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isStringOrNumber: (value: string | number | bigint | true | RegExp | undefined) => value is string | number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Rule, Scope } from 'eslint';
|
|
2
|
-
import { JSXOpeningElement } from 'eslint-codemod-utils';
|
|
2
|
+
import { type JSXOpeningElement } from 'eslint-codemod-utils';
|
|
3
3
|
/**
|
|
4
4
|
* Given a component name finds its JSX usages and performs some
|
|
5
5
|
* additional validations to ensure transformation can be done correctly
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { JSXElement, VariableDeclarator } from 'eslint-codemod-utils';
|
|
3
|
-
import { RuleConfig } from '../../config';
|
|
2
|
+
import { type JSXElement, type VariableDeclarator } from 'eslint-codemod-utils';
|
|
3
|
+
import { type RuleConfig } from '../../config';
|
|
4
4
|
interface MetaData {
|
|
5
5
|
context: Rule.RuleContext;
|
|
6
6
|
config: RuleConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { JSXElement } from 'eslint-codemod-utils';
|
|
3
|
-
import { RuleConfig } from '../../config';
|
|
2
|
+
import { type JSXElement } from 'eslint-codemod-utils';
|
|
3
|
+
import { type RuleConfig } from '../../config';
|
|
4
4
|
interface MetaData {
|
|
5
5
|
context: Rule.RuleContext;
|
|
6
6
|
config: RuleConfig;
|
package/dist/types-ts4.5/rules/use-primitives/utils/convert-ast-object-expression-to-js-object.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
import type { Rule } from 'eslint';
|
|
3
|
-
import { ObjectExpression } from 'eslint-codemod-utils';
|
|
3
|
+
import { type ObjectExpression } from 'eslint-codemod-utils';
|
|
4
4
|
export declare const SPREAD_SYNTAX: unique symbol;
|
|
5
5
|
type Token = {
|
|
6
6
|
tokenName: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSXAttribute } from 'eslint-codemod-utils';
|
|
1
|
+
import { type JSXAttribute } from 'eslint-codemod-utils';
|
|
2
2
|
/**
|
|
3
3
|
* Bit of a weird name, but the functionality is quite specific, so this is the best I could do.
|
|
4
4
|
* This function looks at a JSXAttribute, and returns the string representation
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { JSXAttribute, JSXOpeningElement } from 'eslint-codemod-utils';
|
|
1
|
+
import { type JSXAttribute, type JSXOpeningElement } from 'eslint-codemod-utils';
|
|
2
2
|
export declare const getJSXAttributeByName: (node: JSXOpeningElement, attrName: string) => JSXAttribute | undefined;
|
package/dist/types-ts4.5/rules/use-primitives/utils/is-valid-css-properties-to-transform.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { SimpleCallExpression } from 'eslint-codemod-utils';
|
|
3
|
-
import { RuleConfig } from '../config';
|
|
2
|
+
import { type SimpleCallExpression } from 'eslint-codemod-utils';
|
|
3
|
+
import { type RuleConfig } from '../config';
|
|
4
4
|
export declare const isValidCssPropertiesToTransform: (node: SimpleCallExpression & Rule.NodeParentExtension, config: RuleConfig) => boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { JSXElement } from 'eslint-codemod-utils';
|
|
2
|
+
import { type JSXElement } from 'eslint-codemod-utils';
|
|
3
3
|
export declare const updateJSXAttributeByName: (oldName: string, newName: string, node: JSXElement, fixer: Rule.RuleFixer) => Rule.Fix | never[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CallExpression } from 'eslint-codemod-utils';
|
|
2
|
-
import { RuleConfig } from '../config';
|
|
1
|
+
import { type CallExpression } from 'eslint-codemod-utils';
|
|
2
|
+
import { type RuleConfig } from '../config';
|
|
3
3
|
export declare const validateStyles: (node: CallExpression, config: RuleConfig) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { JSXElement } from 'eslint-codemod-utils';
|
|
3
|
-
import { RuleConfig } from '../config';
|
|
2
|
+
import { type JSXElement } from 'eslint-codemod-utils';
|
|
3
|
+
import { type RuleConfig } from '../config';
|
|
4
4
|
export type MetaData = {
|
|
5
5
|
context: Rule.RuleContext;
|
|
6
6
|
config: RuleConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { ImportDeclaration, ObjectExpression, Property, StringableASTNode } from 'eslint-codemod-utils';
|
|
3
|
-
import { RuleConfig } from '../config';
|
|
4
|
-
import { TokenValueMap } from '../utils';
|
|
2
|
+
import { type ImportDeclaration, type ObjectExpression, type Property, type StringableASTNode } from 'eslint-codemod-utils';
|
|
3
|
+
import { type RuleConfig } from '../config';
|
|
4
|
+
import { type TokenValueMap } from '../utils';
|
|
5
5
|
interface MetaData {
|
|
6
6
|
context: Rule.RuleContext;
|
|
7
7
|
config: RuleConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { CallExpression, Directive, EslintNode, ImportDeclaration, ModuleDeclaration, Property, Statement, StringableASTNode } from 'eslint-codemod-utils';
|
|
2
|
+
import { type CallExpression, type Directive, type EslintNode, type ImportDeclaration, type ModuleDeclaration, type Property, type Statement, type StringableASTNode } from 'eslint-codemod-utils';
|
|
3
3
|
export declare const typographyProperties: string[];
|
|
4
4
|
export declare const isTypographyProperty: (propertyName: string) => boolean;
|
|
5
5
|
export declare const isFontSize: (node: EslintNode) => node is CallExpression;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Rule, Scope as ScopeNamespace } from 'eslint';
|
|
2
|
-
import { ImportSource } from '@atlaskit/eslint-utils/is-supported-import';
|
|
2
|
+
import { type ImportSource } from '@atlaskit/eslint-utils/is-supported-import';
|
|
3
3
|
type Node = Rule.Node;
|
|
4
4
|
type RuleContext = Rule.RuleContext;
|
|
5
5
|
type Scope = ScopeNamespace.Scope;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JSONSchema4 } from '@typescript-eslint/utils/dist/json-schema';
|
|
2
2
|
import type { Rule } from 'eslint';
|
|
3
|
-
import { SupportedNameChecker } from '@atlaskit/eslint-utils/is-supported-import';
|
|
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
6
|
export declare const createNoTaggedTemplateExpressionRule: (isUsage: SupportedNameChecker, messageId: string) => RuleModule['create'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
|
-
import { ImportDeclaration } from 'eslint-codemod-utils';
|
|
3
|
-
import { ImportSource } from '@atlaskit/eslint-utils/is-supported-import';
|
|
2
|
+
import { type ImportDeclaration } from 'eslint-codemod-utils';
|
|
3
|
+
import { type ImportSource } from '@atlaskit/eslint-utils/is-supported-import';
|
|
4
4
|
type RuleContext = Rule.RuleContext;
|
|
5
5
|
/**
|
|
6
6
|
* Get the first import declaration in the file that matches any of the packages
|
package/package.json
CHANGED