eslint-plugin-primer-react 6.0.2-rc.cf3a787 → 6.1.0-rc.b2a68e1
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/.eslintignore +2 -0
- package/CHANGELOG.md +6 -0
- package/docs/rules/no-wildcard-imports.md +25 -0
- package/package-lock.json +325 -1003
- package/package.json +3 -3
- package/src/index.js +1 -0
- package/src/rules/__tests__/no-wildcard-imports.test.js +363 -0
- package/src/rules/no-wildcard-imports.js +368 -0
package/.eslintignore
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# eslint-plugin-primer-react
|
|
2
2
|
|
|
3
|
+
## 6.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#225](https://github.com/primer/eslint-plugin-primer-react/pull/225) [`b4698df`](https://github.com/primer/eslint-plugin-primer-react/commit/b4698dfd4686067df6cf73788531fc3f835f7747) Thanks [@joshblack](https://github.com/joshblack)! - Add eslint rule for discouraging use of wildcard imports from @primer/react
|
|
8
|
+
|
|
3
9
|
## 6.0.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# No Wildcard Imports
|
|
2
|
+
|
|
3
|
+
## Rule Details
|
|
4
|
+
|
|
5
|
+
This rule enforces that no wildcard imports are used from `@primer/react`.
|
|
6
|
+
|
|
7
|
+
👎 Examples of **incorrect** code for this rule
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import {Dialog} from '@primer/react/lib-esm/Dialog/Dialog'
|
|
11
|
+
|
|
12
|
+
function ExampleComponent() {
|
|
13
|
+
return <Dialog>{/* ... */}</Dialog>
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
👍 Examples of **correct** code for this rule:
|
|
18
|
+
|
|
19
|
+
```jsx
|
|
20
|
+
import {Dialog} from '@primer/react/experimental'
|
|
21
|
+
|
|
22
|
+
function ExampleComponent() {
|
|
23
|
+
return <Dialog>{/* ... */}</Dialog>
|
|
24
|
+
}
|
|
25
|
+
```
|