eslint-plugin-export-component 0.0.0-alpha.2 → 0.0.0-alpha.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/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # eslint-plugin-export-component
2
+
3
+ ESLint plugin that moves `export default` onto the function declaration line.
4
+
5
+ ```ts
6
+ // before
7
+ function Example() {}
8
+ export default Example
9
+
10
+ // after (auto-fixable)
11
+ export default function Example() {}
12
+ ```
13
+
14
+ Only functions whose name starts with an uppercase letter (components) are reported.
15
+
16
+ ## Install
17
+
18
+ ```sh
19
+ npm i -D eslint eslint-plugin-export-component
20
+ ```
21
+
22
+ Requires ESLint 9+ (flat config).
23
+
24
+ ## Usage
25
+
26
+ ```js
27
+ // eslint.config.js
28
+ import { configs } from 'eslint-plugin-export-component'
29
+
30
+ export default [configs.recommended]
31
+ ```
32
+
33
+ ## Rules
34
+
35
+ | Rule | Fixable |
36
+ | -------------------------------- | ------- |
37
+ | `inline-default-export-function` | ✅ |