@vuebro/configs 1.1.31 → 1.1.33
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 +120 -1
- package/dist/eslint.config.js +0 -7
- package/package.json +1 -1
- package/tsconfig.json +1 -0
package/README.md
CHANGED
|
@@ -1 +1,120 @@
|
|
|
1
|
-
# configs
|
|
1
|
+
# @vuebro/configs
|
|
2
|
+
|
|
3
|
+
A collection of shared configuration files for Vue.js projects with TypeScript, ESLint, Prettier, UnoCSS, and Vite. This package provides a comprehensive setup for modern Vue development with Pug support, ensuring consistent code style and best practices across projects.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **ESLint Configuration**: Comprehensive linting setup with Vue, TypeScript, and Pug support
|
|
8
|
+
- **Prettier Configuration**: Code formatting with plugins for Pug, JSDoc, Tailwind CSS, and package.json
|
|
9
|
+
- **TypeScript Configuration**: Strict TypeScript setup with Vue-specific configurations
|
|
10
|
+
- **UnoCSS Configuration**: Utility-first CSS framework with Pug extractor and various transformers
|
|
11
|
+
- **Vite Configuration**: Optimized build tool configuration for Vue projects
|
|
12
|
+
- **Pug Support**: Full integration with Pug templating engine
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @vuebro/configs --save-dev
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
### ESLint
|
|
23
|
+
|
|
24
|
+
To use the ESLint configuration, add this to your `eslint.config.js` or `eslint.config.ts`:
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import configs from "@vuebro/configs/eslint";
|
|
28
|
+
|
|
29
|
+
export default configs;
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Prettier
|
|
33
|
+
|
|
34
|
+
To use the Prettier configuration, add this to your `prettierrc.config.js` or `prettierrc.config.ts`:
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
import config from "@vuebro/configs/prettierrc";
|
|
38
|
+
|
|
39
|
+
export default config;
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### TypeScript
|
|
43
|
+
|
|
44
|
+
To use the TypeScript configuration, extend it in your `tsconfig.json`:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"extends": "@vuebro/configs/tsconfig.json"
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### UnoCSS
|
|
53
|
+
|
|
54
|
+
To use the UnoCSS configuration, add this to your `uno.config.js` or `uno.config.ts`:
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
import config from "@vuebro/configs/uno";
|
|
58
|
+
|
|
59
|
+
export default config;
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
You can also use the UnoCSS presets with:
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
import presets from "@vuebro/configs/uno/presets";
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Vite
|
|
69
|
+
|
|
70
|
+
To use the Vite configuration, add this to your `vite.config.js` or `vite.config.ts`:
|
|
71
|
+
|
|
72
|
+
```js
|
|
73
|
+
import config from "@vuebro/configs/vite";
|
|
74
|
+
|
|
75
|
+
export default config;
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## What's Included
|
|
79
|
+
|
|
80
|
+
### ESLint Config
|
|
81
|
+
- Vue best practices with `eslint-plugin-vue`
|
|
82
|
+
- TypeScript support with `@vue/eslint-config-typescript`
|
|
83
|
+
- Pug template support with `eslint-plugin-vue-pug`
|
|
84
|
+
- Import/export rules with `eslint-plugin-import-x`
|
|
85
|
+
- Documentation rules with `eslint-plugin-jsdoc`
|
|
86
|
+
- Style consistency with `eslint-plugin-perfectionist`
|
|
87
|
+
- Integration with Prettier using `eslint-plugin-prettier`
|
|
88
|
+
|
|
89
|
+
### Prettier Config
|
|
90
|
+
- Automatic line ending handling
|
|
91
|
+
- Pug template formatting via `@prettier/plugin-pug`
|
|
92
|
+
- Enhanced JSDoc formatting with `prettier-plugin-jsdoc`
|
|
93
|
+
- Tailwind CSS class sorting with `prettier-plugin-tailwindcss`
|
|
94
|
+
- package.json formatting with `prettier-plugin-packagejson`
|
|
95
|
+
|
|
96
|
+
### UnoCSS Config
|
|
97
|
+
- Pug template extractor
|
|
98
|
+
- Arbitrary variants extractor
|
|
99
|
+
- Transformer for variant groups
|
|
100
|
+
- Transformer for directives
|
|
101
|
+
- Transformer for class compilation
|
|
102
|
+
|
|
103
|
+
### Vite Config
|
|
104
|
+
- Vue plugin integration
|
|
105
|
+
- UnoCSS plugin integration
|
|
106
|
+
- Vue DevTools plugin
|
|
107
|
+
- Alias configuration (`@` maps to `./src`)
|
|
108
|
+
- Dynamic app version injection
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
This project is licensed under the AGPL-3.0-or-later License - see the [LICENSE](LICENSE) file for details.
|
|
113
|
+
|
|
114
|
+
## Author
|
|
115
|
+
|
|
116
|
+
jbruwes
|
|
117
|
+
|
|
118
|
+
## Contributing
|
|
119
|
+
|
|
120
|
+
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
|
package/dist/eslint.config.js
CHANGED
|
@@ -24,13 +24,6 @@ export default defineConfigWithVueTs(gitignore(), {
|
|
|
24
24
|
],
|
|
25
25
|
files: ["**/*.{ts,vue}"],
|
|
26
26
|
rules: {
|
|
27
|
-
"import-x/no-extraneous-dependencies": [
|
|
28
|
-
"error",
|
|
29
|
-
{
|
|
30
|
-
devDependencies: ["*.config.ts"],
|
|
31
|
-
whitelist: ["electron"],
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
27
|
"jsdoc/tag-lines": ["warn", "any", { startLines: 1 }],
|
|
35
28
|
},
|
|
36
29
|
}, deMorganConfigs.recommended, importXConfigs.recommended, importXConfigs.typescript, dependConfigs["flat/recommended"], json.configs.recommended, markdown.configs.recommended, packageJsonConfigs.recommended, prettierConfigsRecommended);
|
package/package.json
CHANGED