eslint-plugin-primer-react 7.0.1 → 7.0.2-rc.1b371c5
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-primer-react",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2-rc.1b371c5",
|
|
4
4
|
"description": "ESLint rules for Primer React",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"eslint-traverse": "^1.0.0",
|
|
35
35
|
"lodash": "^4.17.21",
|
|
36
36
|
"styled-system": "^5.1.5",
|
|
37
|
-
"@typescript-eslint/utils": "8.
|
|
37
|
+
"@typescript-eslint/utils": "8.35.0",
|
|
38
38
|
"typescript": "^5.8.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"eslint": "^8.42.0",
|
|
46
46
|
"eslint-plugin-prettier": "^5.2.1",
|
|
47
47
|
"jest": "^29.7.0",
|
|
48
|
-
"markdownlint-cli2": "^0.
|
|
48
|
+
"markdownlint-cli2": "^0.18.1",
|
|
49
49
|
"markdownlint-cli2-formatter-pretty": "^0.0.7",
|
|
50
50
|
"@typescript-eslint/rule-tester": "7.16.0",
|
|
51
51
|
"@types/jest": "^29.5.13"
|
|
@@ -24,6 +24,9 @@ ruleTester.run('no-deprecated-experimental-components', rule, {
|
|
|
24
24
|
{
|
|
25
25
|
code: `import {DataTable, ActionBar} from '@primer/react/experimental'`,
|
|
26
26
|
},
|
|
27
|
+
{
|
|
28
|
+
code: `import * as RandomComponent from '@primer/react/experimental'`,
|
|
29
|
+
},
|
|
27
30
|
],
|
|
28
31
|
invalid: [
|
|
29
32
|
// Single experimental import
|
|
@@ -42,10 +42,10 @@ module.exports = {
|
|
|
42
42
|
const entrypoint = entrypoints.get(node.source.value)
|
|
43
43
|
|
|
44
44
|
const experimental = node.specifiers.filter(specifier => {
|
|
45
|
-
return entrypoint.has(specifier.imported
|
|
45
|
+
return entrypoint.has(specifier.imported?.name)
|
|
46
46
|
})
|
|
47
47
|
|
|
48
|
-
const components = experimental.map(specifier => specifier.imported
|
|
48
|
+
const components = experimental.map(specifier => specifier.imported?.name)
|
|
49
49
|
|
|
50
50
|
if (experimental.length === 0) {
|
|
51
51
|
return
|