@atlaskit/eslint-plugin-design-system 10.6.1 → 10.7.1
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 +19 -1
- package/constellation/index/props.mdx +2 -3
- package/dist/cjs/rules/consistent-css-prop-usage/index.js +33 -3
- package/dist/cjs/rules/use-tokens-typography/index.js +1 -1
- package/dist/cjs/rules/use-tokens-typography/transformers/style-object.js +4 -1
- package/dist/es2019/rules/consistent-css-prop-usage/index.js +35 -3
- package/dist/es2019/rules/use-tokens-typography/index.js +1 -1
- package/dist/es2019/rules/use-tokens-typography/transformers/style-object.js +4 -1
- package/dist/esm/rules/consistent-css-prop-usage/index.js +33 -3
- package/dist/esm/rules/use-tokens-typography/index.js +1 -1
- package/dist/esm/rules/use-tokens-typography/transformers/style-object.js +4 -1
- package/package.json +87 -95
- package/report.api.md +91 -90
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/eslint-plugin-design-system
|
|
2
2
|
|
|
3
|
+
## 10.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#111413](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/111413)
|
|
8
|
+
[`492737dbcfc65`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/492737dbcfc65) -
|
|
9
|
+
Fixes `consistent-css-prop-usage` to prevent unsafe auto-fixes. Previously style declarations
|
|
10
|
+
could be hoisted out of components even if they referenced variables only defined in the
|
|
11
|
+
component's scope.
|
|
12
|
+
|
|
13
|
+
## 10.7.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#110808](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110808)
|
|
18
|
+
[`24a3703dbdfe3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/24a3703dbdfe3) -
|
|
19
|
+
Change use-tokens-typography rule to only suggest fixes.
|
|
20
|
+
|
|
3
21
|
## 10.6.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -188,7 +206,7 @@
|
|
|
188
206
|
|
|
189
207
|
- [#91506](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91506)
|
|
190
208
|
[`2724a3783955`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2724a3783955) -
|
|
191
|
-
Add support for React 18.
|
|
209
|
+
Add support for React 18 in non-strict mode.
|
|
192
210
|
|
|
193
211
|
## 9.4.1
|
|
194
212
|
|
|
@@ -8,9 +8,8 @@ module.exports = {
|
|
|
8
8
|
};
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
We don't recommended maintaining your own configuration.
|
|
12
|
-
|
|
13
|
-
Add the plugin to your `.eslintrc.js` file.
|
|
11
|
+
We don't recommended maintaining your own configuration. If you do not use our config you will need
|
|
12
|
+
to specify individual rules and configuration. Add the plugin to your `.eslintrc.js` file.
|
|
14
13
|
|
|
15
14
|
```diff
|
|
16
15
|
module.exports = {
|
|
@@ -12,6 +12,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
12
12
|
var _eslintCodemodUtils = require("eslint-codemod-utils");
|
|
13
13
|
var _estraverse = _interopRequireDefault(require("estraverse"));
|
|
14
14
|
var _assign = _interopRequireDefault(require("lodash/assign"));
|
|
15
|
+
var _findVariable = require("@atlaskit/eslint-utils/find-variable");
|
|
15
16
|
var _isSupportedImport = require("@atlaskit/eslint-utils/is-supported-import");
|
|
16
17
|
var _astNodes = require("../../ast-nodes");
|
|
17
18
|
var _createRule = require("../utils/create-rule");
|
|
@@ -250,11 +251,40 @@ var JSXExpressionLinter = /*#__PURE__*/function () {
|
|
|
250
251
|
key: "potentiallyHasLocalVariable",
|
|
251
252
|
value: function potentiallyHasLocalVariable(node) {
|
|
252
253
|
var _this2 = this;
|
|
254
|
+
/**
|
|
255
|
+
* If we've passed an `Identifier` then it is an identifier that's been
|
|
256
|
+
* passed to the `css` prop.
|
|
257
|
+
*
|
|
258
|
+
* We need to check its initializer to see if it is safe to auto-fix.
|
|
259
|
+
*/
|
|
260
|
+
if (node.type === 'Identifier') {
|
|
261
|
+
var variable = (0, _findVariable.findVariable)({
|
|
262
|
+
identifier: node,
|
|
263
|
+
sourceCode: this.context.getSourceCode()
|
|
264
|
+
});
|
|
265
|
+
if (!variable) {
|
|
266
|
+
// If we cannot resolve the variable then we cannot check it, so assume worst-case.
|
|
267
|
+
return true;
|
|
268
|
+
}
|
|
269
|
+
return variable.defs.some(function (def) {
|
|
270
|
+
// If the binding isn't from a variable declaration we assume worst-case.
|
|
271
|
+
if (def.type !== 'Variable') {
|
|
272
|
+
return true;
|
|
273
|
+
}
|
|
274
|
+
var init = def.node.init;
|
|
275
|
+
if (!init) {
|
|
276
|
+
// If there is no initializer something weird is happening so assume worst-case.
|
|
277
|
+
return true;
|
|
278
|
+
}
|
|
279
|
+
return _this2.potentiallyHasLocalVariable(init);
|
|
280
|
+
});
|
|
281
|
+
}
|
|
253
282
|
var hasPotentiallyLocalVariable = false;
|
|
254
283
|
var isImportedVariable = function isImportedVariable(identifier) {
|
|
255
284
|
return !!(0, _getImportNodeBySource.getModuleOfIdentifier)(_this2.context.getSourceCode(), identifier);
|
|
256
285
|
};
|
|
257
286
|
_estraverse.default.traverse(node, {
|
|
287
|
+
fallback: 'iteration',
|
|
258
288
|
enter: function enter(node, _parent) {
|
|
259
289
|
if ((0, _eslintCodemodUtils.isNodeOfType)(node, 'SpreadElement') ||
|
|
260
290
|
// @ts-expect-error remove once we can be sure that no parser interprets
|
|
@@ -342,15 +372,15 @@ var JSXExpressionLinter = /*#__PURE__*/function () {
|
|
|
342
372
|
}
|
|
343
373
|
var moduleString;
|
|
344
374
|
var fixes = [];
|
|
375
|
+
if (this.potentiallyHasLocalVariable(node)) {
|
|
376
|
+
return [];
|
|
377
|
+
}
|
|
345
378
|
if (node.type === 'Identifier') {
|
|
346
379
|
var identifier = node;
|
|
347
380
|
var declarator = identifier.parent.parent;
|
|
348
381
|
moduleString = sourceCode.getText(declarator);
|
|
349
382
|
fixes.push(fixer.remove(declarator));
|
|
350
383
|
} else {
|
|
351
|
-
if (this.potentiallyHasLocalVariable(node)) {
|
|
352
|
-
return [];
|
|
353
|
-
}
|
|
354
384
|
var _declarator = this.getDeclaratorString();
|
|
355
385
|
var text = sourceCode.getText(node);
|
|
356
386
|
|
|
@@ -158,7 +158,10 @@ var StyleObject = exports.StyleObject = {
|
|
|
158
158
|
data: {
|
|
159
159
|
payload: "fontSize:".concat(fontSizeRaw)
|
|
160
160
|
},
|
|
161
|
-
|
|
161
|
+
suggest: [{
|
|
162
|
+
desc: "Convert to font token",
|
|
163
|
+
fix: StyleObject._fix(fixerRefs, context)
|
|
164
|
+
}]
|
|
162
165
|
});
|
|
163
166
|
} else if (!matchingTokens.length) {
|
|
164
167
|
context.report({
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { getIdentifierInParentScope, insertAtStartOfFile, insertImportDeclaration, isNodeOfType } from 'eslint-codemod-utils';
|
|
4
4
|
import estraverse from 'estraverse';
|
|
5
5
|
import assign from 'lodash/assign';
|
|
6
|
+
import { findVariable } from '@atlaskit/eslint-utils/find-variable';
|
|
6
7
|
import { CSS_IN_JS_IMPORTS } from '@atlaskit/eslint-utils/is-supported-import';
|
|
7
8
|
import { Import } from '../../ast-nodes';
|
|
8
9
|
import { createLintRule } from '../utils/create-rule';
|
|
@@ -217,9 +218,40 @@ class JSXExpressionLinter {
|
|
|
217
218
|
* @returns Whether the node potentially has a local variable (and thus is not safe to hoist).
|
|
218
219
|
*/
|
|
219
220
|
potentiallyHasLocalVariable(node) {
|
|
221
|
+
/**
|
|
222
|
+
* If we've passed an `Identifier` then it is an identifier that's been
|
|
223
|
+
* passed to the `css` prop.
|
|
224
|
+
*
|
|
225
|
+
* We need to check its initializer to see if it is safe to auto-fix.
|
|
226
|
+
*/
|
|
227
|
+
if (node.type === 'Identifier') {
|
|
228
|
+
const variable = findVariable({
|
|
229
|
+
identifier: node,
|
|
230
|
+
sourceCode: this.context.getSourceCode()
|
|
231
|
+
});
|
|
232
|
+
if (!variable) {
|
|
233
|
+
// If we cannot resolve the variable then we cannot check it, so assume worst-case.
|
|
234
|
+
return true;
|
|
235
|
+
}
|
|
236
|
+
return variable.defs.some(def => {
|
|
237
|
+
// If the binding isn't from a variable declaration we assume worst-case.
|
|
238
|
+
if (def.type !== 'Variable') {
|
|
239
|
+
return true;
|
|
240
|
+
}
|
|
241
|
+
const {
|
|
242
|
+
init
|
|
243
|
+
} = def.node;
|
|
244
|
+
if (!init) {
|
|
245
|
+
// If there is no initializer something weird is happening so assume worst-case.
|
|
246
|
+
return true;
|
|
247
|
+
}
|
|
248
|
+
return this.potentiallyHasLocalVariable(init);
|
|
249
|
+
});
|
|
250
|
+
}
|
|
220
251
|
let hasPotentiallyLocalVariable = false;
|
|
221
252
|
const isImportedVariable = identifier => !!getModuleOfIdentifier(this.context.getSourceCode(), identifier);
|
|
222
253
|
estraverse.traverse(node, {
|
|
254
|
+
fallback: 'iteration',
|
|
223
255
|
enter: function (node, _parent) {
|
|
224
256
|
if (isNodeOfType(node, 'SpreadElement') ||
|
|
225
257
|
// @ts-expect-error remove once we can be sure that no parser interprets
|
|
@@ -303,15 +335,15 @@ class JSXExpressionLinter {
|
|
|
303
335
|
}
|
|
304
336
|
let moduleString;
|
|
305
337
|
let fixes = [];
|
|
338
|
+
if (this.potentiallyHasLocalVariable(node)) {
|
|
339
|
+
return [];
|
|
340
|
+
}
|
|
306
341
|
if (node.type === 'Identifier') {
|
|
307
342
|
const identifier = node;
|
|
308
343
|
const declarator = identifier.parent.parent;
|
|
309
344
|
moduleString = sourceCode.getText(declarator);
|
|
310
345
|
fixes.push(fixer.remove(declarator));
|
|
311
346
|
} else {
|
|
312
|
-
if (this.potentiallyHasLocalVariable(node)) {
|
|
313
|
-
return [];
|
|
314
|
-
}
|
|
315
347
|
const declarator = this.getDeclaratorString();
|
|
316
348
|
const text = sourceCode.getText(node);
|
|
317
349
|
|
|
@@ -152,7 +152,10 @@ export const StyleObject = {
|
|
|
152
152
|
data: {
|
|
153
153
|
payload: `fontSize:${fontSizeRaw}`
|
|
154
154
|
},
|
|
155
|
-
|
|
155
|
+
suggest: [{
|
|
156
|
+
desc: `Convert to font token`,
|
|
157
|
+
fix: StyleObject._fix(fixerRefs, context)
|
|
158
|
+
}]
|
|
156
159
|
});
|
|
157
160
|
} else if (!matchingTokens.length) {
|
|
158
161
|
context.report({
|
|
@@ -7,6 +7,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
7
7
|
import { getIdentifierInParentScope, insertAtStartOfFile, insertImportDeclaration, isNodeOfType } from 'eslint-codemod-utils';
|
|
8
8
|
import estraverse from 'estraverse';
|
|
9
9
|
import assign from 'lodash/assign';
|
|
10
|
+
import { findVariable } from '@atlaskit/eslint-utils/find-variable';
|
|
10
11
|
import { CSS_IN_JS_IMPORTS } from '@atlaskit/eslint-utils/is-supported-import';
|
|
11
12
|
import { Import } from '../../ast-nodes';
|
|
12
13
|
import { createLintRule } from '../utils/create-rule';
|
|
@@ -243,11 +244,40 @@ var JSXExpressionLinter = /*#__PURE__*/function () {
|
|
|
243
244
|
key: "potentiallyHasLocalVariable",
|
|
244
245
|
value: function potentiallyHasLocalVariable(node) {
|
|
245
246
|
var _this2 = this;
|
|
247
|
+
/**
|
|
248
|
+
* If we've passed an `Identifier` then it is an identifier that's been
|
|
249
|
+
* passed to the `css` prop.
|
|
250
|
+
*
|
|
251
|
+
* We need to check its initializer to see if it is safe to auto-fix.
|
|
252
|
+
*/
|
|
253
|
+
if (node.type === 'Identifier') {
|
|
254
|
+
var variable = findVariable({
|
|
255
|
+
identifier: node,
|
|
256
|
+
sourceCode: this.context.getSourceCode()
|
|
257
|
+
});
|
|
258
|
+
if (!variable) {
|
|
259
|
+
// If we cannot resolve the variable then we cannot check it, so assume worst-case.
|
|
260
|
+
return true;
|
|
261
|
+
}
|
|
262
|
+
return variable.defs.some(function (def) {
|
|
263
|
+
// If the binding isn't from a variable declaration we assume worst-case.
|
|
264
|
+
if (def.type !== 'Variable') {
|
|
265
|
+
return true;
|
|
266
|
+
}
|
|
267
|
+
var init = def.node.init;
|
|
268
|
+
if (!init) {
|
|
269
|
+
// If there is no initializer something weird is happening so assume worst-case.
|
|
270
|
+
return true;
|
|
271
|
+
}
|
|
272
|
+
return _this2.potentiallyHasLocalVariable(init);
|
|
273
|
+
});
|
|
274
|
+
}
|
|
246
275
|
var hasPotentiallyLocalVariable = false;
|
|
247
276
|
var isImportedVariable = function isImportedVariable(identifier) {
|
|
248
277
|
return !!getModuleOfIdentifier(_this2.context.getSourceCode(), identifier);
|
|
249
278
|
};
|
|
250
279
|
estraverse.traverse(node, {
|
|
280
|
+
fallback: 'iteration',
|
|
251
281
|
enter: function enter(node, _parent) {
|
|
252
282
|
if (isNodeOfType(node, 'SpreadElement') ||
|
|
253
283
|
// @ts-expect-error remove once we can be sure that no parser interprets
|
|
@@ -335,15 +365,15 @@ var JSXExpressionLinter = /*#__PURE__*/function () {
|
|
|
335
365
|
}
|
|
336
366
|
var moduleString;
|
|
337
367
|
var fixes = [];
|
|
368
|
+
if (this.potentiallyHasLocalVariable(node)) {
|
|
369
|
+
return [];
|
|
370
|
+
}
|
|
338
371
|
if (node.type === 'Identifier') {
|
|
339
372
|
var identifier = node;
|
|
340
373
|
var declarator = identifier.parent.parent;
|
|
341
374
|
moduleString = sourceCode.getText(declarator);
|
|
342
375
|
fixes.push(fixer.remove(declarator));
|
|
343
376
|
} else {
|
|
344
|
-
if (this.potentiallyHasLocalVariable(node)) {
|
|
345
|
-
return [];
|
|
346
|
-
}
|
|
347
377
|
var _declarator = this.getDeclaratorString();
|
|
348
378
|
var text = sourceCode.getText(node);
|
|
349
379
|
|
|
@@ -152,7 +152,10 @@ export var StyleObject = {
|
|
|
152
152
|
data: {
|
|
153
153
|
payload: "fontSize:".concat(fontSizeRaw)
|
|
154
154
|
},
|
|
155
|
-
|
|
155
|
+
suggest: [{
|
|
156
|
+
desc: "Convert to font token",
|
|
157
|
+
fix: StyleObject._fix(fixerRefs, context)
|
|
158
|
+
}]
|
|
156
159
|
});
|
|
157
160
|
} else if (!matchingTokens.length) {
|
|
158
161
|
context.report({
|
package/package.json
CHANGED
|
@@ -1,96 +1,88 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"styling": [
|
|
90
|
-
"static",
|
|
91
|
-
"emotion"
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
"homepage": "https://atlassian.design/components/eslint-plugin-design-system"
|
|
96
|
-
}
|
|
2
|
+
"name": "@atlaskit/eslint-plugin-design-system",
|
|
3
|
+
"description": "The essential plugin for use with the Atlassian Design System.",
|
|
4
|
+
"version": "10.7.1",
|
|
5
|
+
"author": "Atlassian Pty Ltd",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"atlassian": {
|
|
11
|
+
"team": "Design System Team",
|
|
12
|
+
"releaseModel": "continuous",
|
|
13
|
+
"productPushConsumption": ["jira"],
|
|
14
|
+
"website": {
|
|
15
|
+
"name": "ESLint plugin",
|
|
16
|
+
"category": "Tooling"
|
|
17
|
+
},
|
|
18
|
+
"runReact18": true
|
|
19
|
+
},
|
|
20
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
21
|
+
"main": "dist/cjs/index.js",
|
|
22
|
+
"module": "dist/esm/index.js",
|
|
23
|
+
"module:es2019": "dist/es2019/index.js",
|
|
24
|
+
"types": "dist/types/index.d.ts",
|
|
25
|
+
"typesVersions": {
|
|
26
|
+
">=4.5 <4.9": {
|
|
27
|
+
"*": ["dist/types-ts4.5/*", "dist/types-ts4.5/index.d.ts"]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"atlaskit:src": "src/index.tsx",
|
|
32
|
+
"af:exports": {
|
|
33
|
+
".": "./src/index.tsx"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"react": "^16.8.0 || ^17.0.0 || ~18.2.0"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@atlaskit/eslint-utils": "^1.6.0",
|
|
40
|
+
"@atlaskit/tokens": "*",
|
|
41
|
+
"@babel/runtime": "^7.0.0",
|
|
42
|
+
"@typescript-eslint/utils": "^5.48.1",
|
|
43
|
+
"ajv": "^6.12.6",
|
|
44
|
+
"eslint-codemod-utils": "^1.8.6",
|
|
45
|
+
"esquery": "^1.5.0",
|
|
46
|
+
"estraverse": "^5.3.0",
|
|
47
|
+
"lodash": "^4.17.21",
|
|
48
|
+
"semver": "^7.5.2"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@af/formatting": "*",
|
|
52
|
+
"@atlaskit/ds-lib": "^2.3.0",
|
|
53
|
+
"@atlaskit/theme": "^12.9.0",
|
|
54
|
+
"@atlassian/codegen": "*",
|
|
55
|
+
"@atlassian/eslint-utils": "^0.5.0",
|
|
56
|
+
"@emotion/react": "^11.7.1",
|
|
57
|
+
"@emotion/styled": "^11.0.0",
|
|
58
|
+
"@types/eslint": "^8.56.6",
|
|
59
|
+
"@types/esquery": "^1.5.3",
|
|
60
|
+
"@types/estraverse": "^5.1.7",
|
|
61
|
+
"eslint": "^8.49.0",
|
|
62
|
+
"jscodeshift": "^0.13.0",
|
|
63
|
+
"outdent": "^0.5.0",
|
|
64
|
+
"react": "^16.8.0",
|
|
65
|
+
"ts-jest": "26.5.6",
|
|
66
|
+
"ts-node": "^10.9.1",
|
|
67
|
+
"tsconfig-paths": "^4.2.0",
|
|
68
|
+
"typescript": "~5.4.2"
|
|
69
|
+
},
|
|
70
|
+
"scripts": {
|
|
71
|
+
"ak-postbuild": "cp -r configs dist",
|
|
72
|
+
"codegen": "ts-node -r tsconfig-paths/register ./scripts/codegen.tsx",
|
|
73
|
+
"codegen-token-maps": "ts-node -r tsconfig-paths/register ./scripts/token-maps/codegen-token-maps.tsx"
|
|
74
|
+
},
|
|
75
|
+
"techstack": {
|
|
76
|
+
"@atlassian/frontend": {
|
|
77
|
+
"import-structure": "atlassian-conventions",
|
|
78
|
+
"circular-dependencies": "file-and-folder-level"
|
|
79
|
+
},
|
|
80
|
+
"@repo/internal": {
|
|
81
|
+
"dom-events": "use-bind-event-listener",
|
|
82
|
+
"design-system": "v1",
|
|
83
|
+
"deprecation": "no-deprecated-imports",
|
|
84
|
+
"styling": ["static", "emotion"]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"homepage": "https://atlassian.design/components/eslint-plugin-design-system"
|
|
88
|
+
}
|
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/eslint-plugin-design-system"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -21,48 +22,48 @@ import { RuleModule } from '@typescript-eslint/utils/dist/ts-eslint/Rule';
|
|
|
21
22
|
|
|
22
23
|
// @public (undocumented)
|
|
23
24
|
export const configs: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
25
|
+
all: {
|
|
26
|
+
plugins: string[];
|
|
27
|
+
rules: {
|
|
28
|
+
'@atlaskit/design-system/consistent-css-prop-usage': string;
|
|
29
|
+
'@atlaskit/design-system/ensure-design-token-usage': string;
|
|
30
|
+
'@atlaskit/design-system/ensure-design-token-usage/preview': string;
|
|
31
|
+
'@atlaskit/design-system/icon-label': string;
|
|
32
|
+
'@atlaskit/design-system/no-banned-imports': string;
|
|
33
|
+
'@atlaskit/design-system/no-css-tagged-template-expression': string;
|
|
34
|
+
'@atlaskit/design-system/no-deprecated-apis': string;
|
|
35
|
+
'@atlaskit/design-system/no-deprecated-design-token-usage': string;
|
|
36
|
+
'@atlaskit/design-system/no-deprecated-imports': string;
|
|
37
|
+
'@atlaskit/design-system/no-margin': string;
|
|
38
|
+
'@atlaskit/design-system/no-nested-styles': string;
|
|
39
|
+
'@atlaskit/design-system/no-physical-properties': string;
|
|
40
|
+
'@atlaskit/design-system/no-unsafe-design-token-usage': string;
|
|
41
|
+
'@atlaskit/design-system/no-unsupported-drag-and-drop-libraries': string;
|
|
42
|
+
'@atlaskit/design-system/prefer-primitives': string;
|
|
43
|
+
'@atlaskit/design-system/use-drawer-label': string;
|
|
44
|
+
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
45
|
+
'@atlaskit/design-system/use-primitives': string;
|
|
46
|
+
'@atlaskit/design-system/use-visually-hidden': string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
recommended: {
|
|
50
|
+
plugins: string[];
|
|
51
|
+
rules: {
|
|
52
|
+
'@atlaskit/design-system/consistent-css-prop-usage': string;
|
|
53
|
+
'@atlaskit/design-system/ensure-design-token-usage': string;
|
|
54
|
+
'@atlaskit/design-system/icon-label': string;
|
|
55
|
+
'@atlaskit/design-system/no-banned-imports': string;
|
|
56
|
+
'@atlaskit/design-system/no-deprecated-apis': string;
|
|
57
|
+
'@atlaskit/design-system/no-deprecated-design-token-usage': string;
|
|
58
|
+
'@atlaskit/design-system/no-deprecated-imports': string;
|
|
59
|
+
'@atlaskit/design-system/no-nested-styles': string;
|
|
60
|
+
'@atlaskit/design-system/no-unsafe-design-token-usage': string;
|
|
61
|
+
'@atlaskit/design-system/no-unsupported-drag-and-drop-libraries': string;
|
|
62
|
+
'@atlaskit/design-system/use-drawer-label': string;
|
|
63
|
+
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
64
|
+
'@atlaskit/design-system/use-visually-hidden': string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
66
67
|
};
|
|
67
68
|
|
|
68
69
|
// @public (undocumented)
|
|
@@ -70,73 +71,73 @@ type DeprecatedConfig = DeprecatedImportConfig | DeprecatedJSXAttributeConfig;
|
|
|
70
71
|
|
|
71
72
|
// @public (undocumented)
|
|
72
73
|
type DeprecatedImportConfig = {
|
|
73
|
-
|
|
74
|
+
[key: string]: DeprecatedImportConfigEntry;
|
|
74
75
|
};
|
|
75
76
|
|
|
76
77
|
// @public (undocumented)
|
|
77
78
|
type DeprecatedImportConfigEntry = {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
message?: string;
|
|
80
|
+
importSpecifiers?: {
|
|
81
|
+
importName: string;
|
|
82
|
+
message: string;
|
|
83
|
+
}[];
|
|
83
84
|
};
|
|
84
85
|
|
|
85
86
|
// @public (undocumented)
|
|
86
87
|
type DeprecatedJSXAttributeConfig = {
|
|
87
|
-
|
|
88
|
+
[key: string]: DeprecatedJSXAttributeConfigEntry[];
|
|
88
89
|
};
|
|
89
90
|
|
|
90
91
|
// @public (undocumented)
|
|
91
92
|
type DeprecatedJSXAttributeConfigEntry = {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
moduleSpecifier: string;
|
|
94
|
+
namedSpecifiers?: string[];
|
|
95
|
+
actionableVersion?: string;
|
|
95
96
|
};
|
|
96
97
|
|
|
97
98
|
// @public (undocumented)
|
|
98
99
|
export const filterActionableDeprecations: (
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
originalDeprecatedConfig: string,
|
|
101
|
+
rootPackageJson: string,
|
|
101
102
|
) => string;
|
|
102
103
|
|
|
103
104
|
// @public (undocumented)
|
|
104
105
|
export const rules: {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
106
|
+
'consistent-css-prop-usage': Rule.RuleModule;
|
|
107
|
+
'ensure-design-token-usage': Rule.RuleModule;
|
|
108
|
+
'ensure-design-token-usage/preview': Rule.RuleModule;
|
|
109
|
+
'icon-label': Rule.RuleModule;
|
|
110
|
+
'no-banned-imports': Rule.RuleModule;
|
|
111
|
+
'no-css-tagged-template-expression': Rule.RuleModule;
|
|
112
|
+
'no-deprecated-apis': RuleModule<
|
|
113
|
+
string,
|
|
114
|
+
[
|
|
115
|
+
{
|
|
116
|
+
deprecatedConfig: DeprecatedConfig;
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
RuleListener
|
|
120
|
+
>;
|
|
121
|
+
'no-deprecated-design-token-usage': Rule.RuleModule;
|
|
122
|
+
'no-deprecated-imports': RuleModule<
|
|
123
|
+
string,
|
|
124
|
+
[
|
|
125
|
+
{
|
|
126
|
+
deprecatedConfig: DeprecatedConfig;
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
RuleListener
|
|
130
|
+
>;
|
|
131
|
+
'no-margin': Rule.RuleModule;
|
|
132
|
+
'no-nested-styles': Rule.RuleModule;
|
|
133
|
+
'no-physical-properties': Rule.RuleModule;
|
|
134
|
+
'no-unsafe-design-token-usage': Rule.RuleModule;
|
|
135
|
+
'no-unsupported-drag-and-drop-libraries': Rule.RuleModule;
|
|
136
|
+
'prefer-primitives': Rule.RuleModule;
|
|
137
|
+
'use-drawer-label': Rule.RuleModule;
|
|
138
|
+
'use-href-in-link-item': Rule.RuleModule;
|
|
139
|
+
'use-primitives': Rule.RuleModule;
|
|
140
|
+
'use-visually-hidden': Rule.RuleModule;
|
|
140
141
|
};
|
|
141
142
|
|
|
142
143
|
// (No @packageDocumentation comment for this package)
|