@atlaskit/eslint-plugin-design-system 8.37.1 → 8.37.3
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/use-primitives/utils/validate-styles.js +11 -2
- package/dist/cjs/rules/utils/create-no-tagged-template-expression-rule/index.js +18 -9
- package/dist/cjs/rules/utils/is-supported-import.js +3 -1
- package/dist/es2019/rules/use-primitives/utils/validate-styles.js +11 -2
- package/dist/es2019/rules/utils/create-no-tagged-template-expression-rule/index.js +27 -8
- package/dist/es2019/rules/utils/is-supported-import.js +1 -1
- package/dist/esm/rules/use-primitives/utils/validate-styles.js +11 -2
- package/dist/esm/rules/utils/create-no-tagged-template-expression-rule/index.js +19 -10
- package/dist/esm/rules/utils/is-supported-import.js +3 -1
- package/dist/types/rules/index.codegen.d.ts +4 -4
- package/dist/types/rules/use-visually-hidden/constants.d.ts +1 -1
- package/dist/types/rules/utils/create-rule.d.ts +1 -1
- package/dist/types-ts4.5/rules/index.codegen.d.ts +4 -4
- package/dist/types-ts4.5/rules/use-visually-hidden/constants.d.ts +1 -1
- package/dist/types-ts4.5/rules/utils/create-rule.d.ts +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/eslint-plugin-design-system
|
|
2
2
|
|
|
3
|
+
## 8.37.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
8
|
+
|
|
9
|
+
## 8.37.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#80662](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80662) [`4833299b00d4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4833299b00d4) - For `no-css-tagged-template-expression` and `no-styled-tagged-template-expression`:
|
|
14
|
+
|
|
15
|
+
- When importing from Emotion, stop applying autofixer when the styles contain `!important`.
|
|
16
|
+
- When importing from any library, stop applying autofixer when a selector contains a tagged template interpolation (previously only styled-components).
|
|
17
|
+
|
|
18
|
+
- [#81697](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81697) [`cf3483e7e87d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cf3483e7e87d) - Adding a missing `license` entry to the `package.json` for this package. This package was already licensed under `Apache-2.0` (see `LICENSE` file), so this change is not changing it's license.
|
|
19
|
+
|
|
3
20
|
## 8.37.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -93,7 +93,6 @@ var isTokenCall = function isTokenCall(node) {
|
|
|
93
93
|
return false;
|
|
94
94
|
}
|
|
95
95
|
var token = ast.FunctionCall.getArgumentAtPos(node, 0);
|
|
96
|
-
var fallback = ast.FunctionCall.getArgumentAtPos(node, 1);
|
|
97
96
|
if (!token || token.type !== 'Literal') {
|
|
98
97
|
return false;
|
|
99
98
|
}
|
|
@@ -104,7 +103,17 @@ var isTokenCall = function isTokenCall(node) {
|
|
|
104
103
|
}
|
|
105
104
|
|
|
106
105
|
// Not all `token()` calls have a fall back. This is fine, but if there is a fallback, make sure it's the same as the fallback xcss will use
|
|
107
|
-
if (
|
|
106
|
+
if (node.arguments.length === 2) {
|
|
107
|
+
var fallback = ast.FunctionCall.getArgumentAtPos(node, 1);
|
|
108
|
+
|
|
109
|
+
// `getArgumentAtPos` is only able to understand `Literal` and `ObjectExpression` statements
|
|
110
|
+
// If there are 2 args, but `fallback` is undefined, then the fallback is something wild, like `token('space.100, `${gridSize * rem(3)`})`
|
|
111
|
+
if (!fallback) {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
if (fallback.type !== 'Literal') {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
108
117
|
if (_transformers.spaceTokenMap[fallback.value] !== token.value) {
|
|
109
118
|
return false;
|
|
110
119
|
}
|
|
@@ -43,12 +43,11 @@ var createNoTaggedTemplateExpressionRule = exports.createNoTaggedTemplateExpress
|
|
|
43
43
|
if (!isUsage(node.tag, references, importSources)) {
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
var isSC = (0, _isSupportedImport.isStyledComponents)(node.tag, references, importSources);
|
|
47
46
|
context.report({
|
|
48
47
|
messageId: messageId,
|
|
49
48
|
node: node,
|
|
50
49
|
fix: /*#__PURE__*/_regenerator.default.mark(function fix(fixer) {
|
|
51
|
-
var quasi, source, args, oldCode, withoutQuasi, newCode;
|
|
50
|
+
var quasi, source, args, oldCode, withoutQuasi, newCode, usesEmotion;
|
|
52
51
|
return _regenerator.default.wrap(function fix$(_context) {
|
|
53
52
|
while (1) switch (_context.prev = _context.next) {
|
|
54
53
|
case 0:
|
|
@@ -95,18 +94,28 @@ var createNoTaggedTemplateExpressionRule = exports.createNoTaggedTemplateExpress
|
|
|
95
94
|
}
|
|
96
95
|
return _context.abrupt("return");
|
|
97
96
|
case 16:
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
// For styles like `position: initial !important`,
|
|
98
|
+
// Emotion can give typechecking errors when using object syntax
|
|
99
|
+
// due to csstype being overly strict
|
|
100
|
+
usesEmotion = (0, _isSupportedImport.isEmotion)(node.tag, references, importSources);
|
|
101
|
+
if (!(usesEmotion && !!newCode.match(/!\s*important/gm))) {
|
|
102
|
+
_context.next = 19;
|
|
100
103
|
break;
|
|
101
104
|
}
|
|
102
105
|
return _context.abrupt("return");
|
|
103
|
-
case
|
|
104
|
-
|
|
106
|
+
case 19:
|
|
107
|
+
if (!/\$\{.*:[\s]*\{/.test(newCode)) {
|
|
108
|
+
_context.next = 21;
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
return _context.abrupt("return");
|
|
112
|
+
case 21:
|
|
113
|
+
_context.next = 23;
|
|
105
114
|
return fixer.insertTextBefore(node, newCode);
|
|
106
|
-
case
|
|
107
|
-
_context.next =
|
|
115
|
+
case 23:
|
|
116
|
+
_context.next = 25;
|
|
108
117
|
return fixer.remove(node);
|
|
109
|
-
case
|
|
118
|
+
case 25:
|
|
110
119
|
case "end":
|
|
111
120
|
return _context.stop();
|
|
112
121
|
}
|
|
@@ -121,7 +121,9 @@ var isStyled = exports.isStyled = isSupportedImportWrapper('styled', ['styled-co
|
|
|
121
121
|
var isImportedFrom = exports.isImportedFrom = function isImportedFrom(moduleName) {
|
|
122
122
|
var exactMatch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
123
123
|
return function (nodeToCheck, referencesInScope, importSources) {
|
|
124
|
-
if (!importSources.
|
|
124
|
+
if (!importSources.some(function (importSource) {
|
|
125
|
+
return importSource === moduleName || !exactMatch && importSource.startsWith(moduleName);
|
|
126
|
+
})) {
|
|
125
127
|
// Don't go through the trouble of checking the import sources does not include this
|
|
126
128
|
// We'll assume this is skipped elsewhere.
|
|
127
129
|
return false;
|
|
@@ -86,7 +86,6 @@ const isTokenCall = node => {
|
|
|
86
86
|
return false;
|
|
87
87
|
}
|
|
88
88
|
const token = ast.FunctionCall.getArgumentAtPos(node, 0);
|
|
89
|
-
const fallback = ast.FunctionCall.getArgumentAtPos(node, 1);
|
|
90
89
|
if (!token || token.type !== 'Literal') {
|
|
91
90
|
return false;
|
|
92
91
|
}
|
|
@@ -97,7 +96,17 @@ const isTokenCall = node => {
|
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
// Not all `token()` calls have a fall back. This is fine, but if there is a fallback, make sure it's the same as the fallback xcss will use
|
|
100
|
-
if (
|
|
99
|
+
if (node.arguments.length === 2) {
|
|
100
|
+
const fallback = ast.FunctionCall.getArgumentAtPos(node, 1);
|
|
101
|
+
|
|
102
|
+
// `getArgumentAtPos` is only able to understand `Literal` and `ObjectExpression` statements
|
|
103
|
+
// If there are 2 args, but `fallback` is undefined, then the fallback is something wild, like `token('space.100, `${gridSize * rem(3)`})`
|
|
104
|
+
if (!fallback) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
if (fallback.type !== 'Literal') {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
101
110
|
if (spaceTokenMap[fallback.value] !== token.value) {
|
|
102
111
|
return false;
|
|
103
112
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Original source from Compiled https://github.com/atlassian-labs/compiled/blob/master/packages/eslint-plugin/src/utils/create-no-tagged-template-expression-rule/index.ts
|
|
2
2
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
3
3
|
|
|
4
|
-
import { getImportSources,
|
|
4
|
+
import { getImportSources, isEmotion } from '../is-supported-import';
|
|
5
5
|
import { generate } from './generate';
|
|
6
6
|
import { getTaggedTemplateExpressionOffset } from './get-tagged-template-expression-offset';
|
|
7
7
|
import { toArguments } from './to-arguments';
|
|
@@ -35,7 +35,6 @@ export const createNoTaggedTemplateExpressionRule = (isUsage, messageId) => cont
|
|
|
35
35
|
if (!isUsage(node.tag, references, importSources)) {
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
const isSC = isStyledComponents(node.tag, references, importSources);
|
|
39
38
|
context.report({
|
|
40
39
|
messageId,
|
|
41
40
|
node,
|
|
@@ -77,12 +76,22 @@ export const createNoTaggedTemplateExpressionRule = (isUsage, messageId) => cont
|
|
|
77
76
|
return;
|
|
78
77
|
}
|
|
79
78
|
|
|
80
|
-
//
|
|
81
|
-
//
|
|
82
|
-
|
|
79
|
+
// For styles like `position: initial !important`,
|
|
80
|
+
// Emotion can give typechecking errors when using object syntax
|
|
81
|
+
// due to csstype being overly strict
|
|
82
|
+
const usesEmotion = isEmotion(node.tag, references, importSources);
|
|
83
|
+
if (usesEmotion && !!newCode.match(/!\s*important/gm)) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// For styled-components, we might also want to similarly disallow or autofix `styled.div({ color: props => props.color })` as it's broken too (both type and functionality). This is tracked in https://product-fabric.atlassian.net/browse/USS-26.
|
|
88
|
+
if (/\$\{.*:[\s]*\{/.test(newCode)) {
|
|
83
89
|
/**
|
|
84
|
-
* If we find a variable in a selector
|
|
85
|
-
*
|
|
90
|
+
* If we find a variable in a selector, we skip it. There are two reasons:
|
|
91
|
+
*
|
|
92
|
+
* - `styled-components@3.x` does not support variables in a selector (see the first example).
|
|
93
|
+
*
|
|
94
|
+
* - We cannot guarantee that the contents of an function call is actually a selector, and not a CSS block (see the third example).
|
|
86
95
|
*
|
|
87
96
|
* @examples
|
|
88
97
|
* ```tsx
|
|
@@ -90,11 +99,21 @@ export const createNoTaggedTemplateExpressionRule = (isUsage, messageId) => cont
|
|
|
90
99
|
* & + ${Button} { color: red; }
|
|
91
100
|
* `;
|
|
92
101
|
* ```
|
|
93
|
-
|
|
102
|
+
*
|
|
103
|
+
* ```tsx
|
|
94
104
|
* const Component = styled.div`
|
|
95
105
|
* ${mixin()} button { color: red; }
|
|
96
106
|
* `;
|
|
97
107
|
* ```
|
|
108
|
+
*
|
|
109
|
+
* ```tsx
|
|
110
|
+
* const styles = `&:active { color: blue; }`;
|
|
111
|
+
* const Component = styled.div`
|
|
112
|
+
* ${styles} &:hover {
|
|
113
|
+
* color: red;
|
|
114
|
+
* }
|
|
115
|
+
* `;
|
|
116
|
+
* ```
|
|
98
117
|
*/
|
|
99
118
|
return;
|
|
100
119
|
}
|
|
@@ -110,7 +110,7 @@ export const isKeyframes = isSupportedImportWrapper('keyframes');
|
|
|
110
110
|
// `styled` is also the explicit default of `styled-components` and `@emotion/styled`, so we also match on default imports generally
|
|
111
111
|
export const isStyled = isSupportedImportWrapper('styled', ['styled-components', '@emotion/styled']);
|
|
112
112
|
export const isImportedFrom = (moduleName, exactMatch = true) => (nodeToCheck, referencesInScope, importSources) => {
|
|
113
|
-
if (!importSources.
|
|
113
|
+
if (!importSources.some(importSource => importSource === moduleName || !exactMatch && importSource.startsWith(moduleName))) {
|
|
114
114
|
// Don't go through the trouble of checking the import sources does not include this
|
|
115
115
|
// We'll assume this is skipped elsewhere.
|
|
116
116
|
return false;
|
|
@@ -84,7 +84,6 @@ var isTokenCall = function isTokenCall(node) {
|
|
|
84
84
|
return false;
|
|
85
85
|
}
|
|
86
86
|
var token = ast.FunctionCall.getArgumentAtPos(node, 0);
|
|
87
|
-
var fallback = ast.FunctionCall.getArgumentAtPos(node, 1);
|
|
88
87
|
if (!token || token.type !== 'Literal') {
|
|
89
88
|
return false;
|
|
90
89
|
}
|
|
@@ -95,7 +94,17 @@ var isTokenCall = function isTokenCall(node) {
|
|
|
95
94
|
}
|
|
96
95
|
|
|
97
96
|
// Not all `token()` calls have a fall back. This is fine, but if there is a fallback, make sure it's the same as the fallback xcss will use
|
|
98
|
-
if (
|
|
97
|
+
if (node.arguments.length === 2) {
|
|
98
|
+
var fallback = ast.FunctionCall.getArgumentAtPos(node, 1);
|
|
99
|
+
|
|
100
|
+
// `getArgumentAtPos` is only able to understand `Literal` and `ObjectExpression` statements
|
|
101
|
+
// If there are 2 args, but `fallback` is undefined, then the fallback is something wild, like `token('space.100, `${gridSize * rem(3)`})`
|
|
102
|
+
if (!fallback) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
if (fallback.type !== 'Literal') {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
99
108
|
if (spaceTokenMap[fallback.value] !== token.value) {
|
|
100
109
|
return false;
|
|
101
110
|
}
|
|
@@ -2,7 +2,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
2
2
|
// Original source from Compiled https://github.com/atlassian-labs/compiled/blob/master/packages/eslint-plugin/src/utils/create-no-tagged-template-expression-rule/index.ts
|
|
3
3
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
4
4
|
|
|
5
|
-
import { getImportSources,
|
|
5
|
+
import { getImportSources, isEmotion } from '../is-supported-import';
|
|
6
6
|
import { generate } from './generate';
|
|
7
7
|
import { getTaggedTemplateExpressionOffset } from './get-tagged-template-expression-offset';
|
|
8
8
|
import { toArguments } from './to-arguments';
|
|
@@ -36,12 +36,11 @@ export var createNoTaggedTemplateExpressionRule = function createNoTaggedTemplat
|
|
|
36
36
|
if (!isUsage(node.tag, references, importSources)) {
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
var isSC = isStyledComponents(node.tag, references, importSources);
|
|
40
39
|
context.report({
|
|
41
40
|
messageId: messageId,
|
|
42
41
|
node: node,
|
|
43
42
|
fix: /*#__PURE__*/_regeneratorRuntime.mark(function fix(fixer) {
|
|
44
|
-
var quasi, source, args, oldCode, withoutQuasi, newCode;
|
|
43
|
+
var quasi, source, args, oldCode, withoutQuasi, newCode, usesEmotion;
|
|
45
44
|
return _regeneratorRuntime.wrap(function fix$(_context) {
|
|
46
45
|
while (1) switch (_context.prev = _context.next) {
|
|
47
46
|
case 0:
|
|
@@ -88,18 +87,28 @@ export var createNoTaggedTemplateExpressionRule = function createNoTaggedTemplat
|
|
|
88
87
|
}
|
|
89
88
|
return _context.abrupt("return");
|
|
90
89
|
case 16:
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
// For styles like `position: initial !important`,
|
|
91
|
+
// Emotion can give typechecking errors when using object syntax
|
|
92
|
+
// due to csstype being overly strict
|
|
93
|
+
usesEmotion = isEmotion(node.tag, references, importSources);
|
|
94
|
+
if (!(usesEmotion && !!newCode.match(/!\s*important/gm))) {
|
|
95
|
+
_context.next = 19;
|
|
93
96
|
break;
|
|
94
97
|
}
|
|
95
98
|
return _context.abrupt("return");
|
|
96
|
-
case
|
|
97
|
-
|
|
99
|
+
case 19:
|
|
100
|
+
if (!/\$\{.*:[\s]*\{/.test(newCode)) {
|
|
101
|
+
_context.next = 21;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
return _context.abrupt("return");
|
|
105
|
+
case 21:
|
|
106
|
+
_context.next = 23;
|
|
98
107
|
return fixer.insertTextBefore(node, newCode);
|
|
99
|
-
case
|
|
100
|
-
_context.next =
|
|
108
|
+
case 23:
|
|
109
|
+
_context.next = 25;
|
|
101
110
|
return fixer.remove(node);
|
|
102
|
-
case
|
|
111
|
+
case 25:
|
|
103
112
|
case "end":
|
|
104
113
|
return _context.stop();
|
|
105
114
|
}
|
|
@@ -115,7 +115,9 @@ export var isStyled = isSupportedImportWrapper('styled', ['styled-components', '
|
|
|
115
115
|
export var isImportedFrom = function isImportedFrom(moduleName) {
|
|
116
116
|
var exactMatch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
117
117
|
return function (nodeToCheck, referencesInScope, importSources) {
|
|
118
|
-
if (!importSources.
|
|
118
|
+
if (!importSources.some(function (importSource) {
|
|
119
|
+
return importSource === moduleName || !exactMatch && importSource.startsWith(moduleName);
|
|
120
|
+
})) {
|
|
119
121
|
// Don't go through the trouble of checking the import sources does not include this
|
|
120
122
|
// We'll assume this is skipped elsewhere.
|
|
121
123
|
return false;
|
|
@@ -5,13 +5,13 @@ declare const _default: {
|
|
|
5
5
|
'icon-label': import("eslint").Rule.RuleModule;
|
|
6
6
|
'no-banned-imports': import("eslint").Rule.RuleModule;
|
|
7
7
|
'no-css-tagged-template-expression': import("eslint").Rule.RuleModule;
|
|
8
|
-
'no-deprecated-apis': import("@typescript-eslint/utils/dist/ts-eslint
|
|
8
|
+
'no-deprecated-apis': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<string, [{
|
|
9
9
|
deprecatedConfig: import("./utils/types").DeprecatedConfig;
|
|
10
|
-
}], import("@typescript-eslint/utils/dist/ts-eslint
|
|
10
|
+
}], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
11
11
|
'no-deprecated-design-token-usage': import("eslint").Rule.RuleModule;
|
|
12
|
-
'no-deprecated-imports': import("@typescript-eslint/utils/dist/ts-eslint
|
|
12
|
+
'no-deprecated-imports': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<string, [{
|
|
13
13
|
deprecatedConfig: import("./utils/types").DeprecatedConfig;
|
|
14
|
-
}], import("@typescript-eslint/utils/dist/ts-eslint
|
|
14
|
+
}], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
15
15
|
'no-empty-styled-expression': import("eslint").Rule.RuleModule;
|
|
16
16
|
'no-exported-css': import("eslint").Rule.RuleModule;
|
|
17
17
|
'no-exported-keyframes': import("eslint").Rule.RuleModule;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const IMPORT_NAME = "AKVisuallyHidden";
|
|
2
2
|
export declare const VISUALLY_HIDDEN_SOURCE = "@atlaskit/visually-hidden";
|
|
3
|
-
export declare const VISUALLY_HIDDEN_IMPORT
|
|
3
|
+
export declare const VISUALLY_HIDDEN_IMPORT = "import AKVisuallyHidden from '@atlaskit/visually-hidden';\n";
|
|
@@ -9,7 +9,7 @@ import type { Rule } from 'eslint';
|
|
|
9
9
|
* @private
|
|
10
10
|
* @deprecated
|
|
11
11
|
*/
|
|
12
|
-
export declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends import("@typescript-eslint/utils/dist/ts-eslint
|
|
12
|
+
export declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends import("@typescript-eslint/utils/dist/ts-eslint").RuleListener = import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<TOptions, TMessageIds, TRuleListener>>) => import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<TMessageIds, TOptions, TRuleListener>;
|
|
13
13
|
export interface LintRule extends Omit<Rule.RuleModule, 'meta'> {
|
|
14
14
|
/**
|
|
15
15
|
* Including this for backwards compat moving from the typescript-eslint util.
|
|
@@ -5,17 +5,17 @@ declare const _default: {
|
|
|
5
5
|
'icon-label': import("eslint").Rule.RuleModule;
|
|
6
6
|
'no-banned-imports': import("eslint").Rule.RuleModule;
|
|
7
7
|
'no-css-tagged-template-expression': import("eslint").Rule.RuleModule;
|
|
8
|
-
'no-deprecated-apis': import("@typescript-eslint/utils/dist/ts-eslint
|
|
8
|
+
'no-deprecated-apis': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<string, [
|
|
9
9
|
{
|
|
10
10
|
deprecatedConfig: import("./utils/types").DeprecatedConfig;
|
|
11
11
|
}
|
|
12
|
-
], import("@typescript-eslint/utils/dist/ts-eslint
|
|
12
|
+
], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
13
13
|
'no-deprecated-design-token-usage': import("eslint").Rule.RuleModule;
|
|
14
|
-
'no-deprecated-imports': import("@typescript-eslint/utils/dist/ts-eslint
|
|
14
|
+
'no-deprecated-imports': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<string, [
|
|
15
15
|
{
|
|
16
16
|
deprecatedConfig: import("./utils/types").DeprecatedConfig;
|
|
17
17
|
}
|
|
18
|
-
], import("@typescript-eslint/utils/dist/ts-eslint
|
|
18
|
+
], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
19
19
|
'no-empty-styled-expression': import("eslint").Rule.RuleModule;
|
|
20
20
|
'no-exported-css': import("eslint").Rule.RuleModule;
|
|
21
21
|
'no-exported-keyframes': import("eslint").Rule.RuleModule;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const IMPORT_NAME = "AKVisuallyHidden";
|
|
2
2
|
export declare const VISUALLY_HIDDEN_SOURCE = "@atlaskit/visually-hidden";
|
|
3
|
-
export declare const VISUALLY_HIDDEN_IMPORT
|
|
3
|
+
export declare const VISUALLY_HIDDEN_IMPORT = "import AKVisuallyHidden from '@atlaskit/visually-hidden';\n";
|
|
@@ -9,7 +9,7 @@ import type { Rule } from 'eslint';
|
|
|
9
9
|
* @private
|
|
10
10
|
* @deprecated
|
|
11
11
|
*/
|
|
12
|
-
export declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends import("@typescript-eslint/utils/dist/ts-eslint
|
|
12
|
+
export declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends import("@typescript-eslint/utils/dist/ts-eslint").RuleListener = import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<TOptions, TMessageIds, TRuleListener>>) => import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<TMessageIds, TOptions, TRuleListener>;
|
|
13
13
|
export interface LintRule extends Omit<Rule.RuleModule, 'meta'> {
|
|
14
14
|
/**
|
|
15
15
|
* Including this for backwards compat moving from the typescript-eslint util.
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
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": "8.37.
|
|
4
|
+
"version": "8.37.3",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
|
+
"license": "Apache-2.0",
|
|
6
7
|
"publishConfig": {
|
|
7
8
|
"registry": "https://registry.npmjs.org/"
|
|
8
9
|
},
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"ts-jest": "26.5.6",
|
|
64
65
|
"ts-node": "^10.9.1",
|
|
65
66
|
"tsconfig-paths": "^4.2.0",
|
|
66
|
-
"typescript": "~4.
|
|
67
|
+
"typescript": "~5.4.2"
|
|
67
68
|
},
|
|
68
69
|
"scripts": {
|
|
69
70
|
"ak-postbuild": "cp -r configs dist",
|
|
@@ -86,4 +87,4 @@
|
|
|
86
87
|
},
|
|
87
88
|
"homepage": "https://atlassian.design/components/eslint-plugin-design-system",
|
|
88
89
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
89
|
-
}
|
|
90
|
+
}
|