@byscripts/eslint-plugin 0.3.2 → 0.4.0
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 +38 -0
- package/package.json +5 -1
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @byscripts/eslint-plugin
|
|
2
|
+
|
|
3
|
+
Custom ESLint rules for Vue 3 projects.
|
|
4
|
+
|
|
5
|
+
## Rules
|
|
6
|
+
|
|
7
|
+
| Rule | Description | Fixable |
|
|
8
|
+
| ------------------------------------- | ----------------------------------------------------------- | ------- |
|
|
9
|
+
| `byscripts/vue-block-attribute-order` | Enforces attribute order on `<script>` and `<style>` blocks | Yes |
|
|
10
|
+
|
|
11
|
+
### `vue-block-attribute-order`
|
|
12
|
+
|
|
13
|
+
Default order:
|
|
14
|
+
|
|
15
|
+
- `<script>`: `lang`, `setup`
|
|
16
|
+
- `<style>`: `lang`, `scoped`
|
|
17
|
+
|
|
18
|
+
Custom order via rule options:
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
"byscripts/vue-block-attribute-order": ["error", {
|
|
22
|
+
script: ["setup", "lang"],
|
|
23
|
+
style: ["scoped", "lang"],
|
|
24
|
+
}]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Dev
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pnpm build # compile src/ -> dist/index.mjs + dist/index.d.mts
|
|
31
|
+
pnpm publish --access public # publish to npm
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
|
|
36
|
+
- Built with `tsdown --dts`
|
|
37
|
+
- Peer dependency: `eslint ^9.22.0`
|
|
38
|
+
- Requires `vue-eslint-parser` in the consumer project (for `parserServices.getDocumentFragment()`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byscripts/eslint-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"url": "https://github.com/ByScripts/toolbox"
|
|
6
|
+
},
|
|
4
7
|
"type": "module",
|
|
5
8
|
"files": [
|
|
6
9
|
"dist"
|
|
@@ -18,6 +21,7 @@
|
|
|
18
21
|
"peerDependencies": {
|
|
19
22
|
"eslint": "^9.22.0"
|
|
20
23
|
},
|
|
24
|
+
"license": "MIT",
|
|
21
25
|
"scripts": {
|
|
22
26
|
"build": "tsdown --dts"
|
|
23
27
|
}
|