@vheissulabs/prettier-config 1.0.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 +48 -0
- package/index.js +27 -0
- package/package.json +23 -0
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# @vheissulabs/prettier-config
|
|
2
|
+
|
|
3
|
+
Shared Prettier configuration for VheissuLabs projects.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install --save-dev @vheissulabs/prettier-config
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Add to your `package.json`:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"prettier": "@vheissulabs/prettier-config"
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or create a `.prettierrc.js`:
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
module.exports = require('@vheissulabs/prettier-config')
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Extending the config
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
module.exports = {
|
|
31
|
+
...require('@vheissulabs/prettier-config'),
|
|
32
|
+
printWidth: 120
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## What's included
|
|
37
|
+
|
|
38
|
+
- 4 space indentation
|
|
39
|
+
- No semicolons
|
|
40
|
+
- Single quotes
|
|
41
|
+
- Vue script/style indentation
|
|
42
|
+
- Single attribute per line
|
|
43
|
+
- Import sorting (no blank lines between groups):
|
|
44
|
+
1. `vue`
|
|
45
|
+
2. `@laravel/*`
|
|
46
|
+
3. `@/layouts/*`
|
|
47
|
+
4. `@/components/*`
|
|
48
|
+
5. Relative imports
|
package/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
tabWidth: 4,
|
|
3
|
+
semi: false,
|
|
4
|
+
singleQuote: true,
|
|
5
|
+
vueIndentScriptAndStyle: true,
|
|
6
|
+
singleAttributePerLine: true,
|
|
7
|
+
htmlWhitespaceSensitivity: 'css',
|
|
8
|
+
printWidth: 100,
|
|
9
|
+
plugins: ['@trivago/prettier-plugin-sort-imports'],
|
|
10
|
+
importOrder: [
|
|
11
|
+
'^vue$',
|
|
12
|
+
'^@laravel/(.*)$',
|
|
13
|
+
'^@/layouts/(.*)$',
|
|
14
|
+
'^@/components/(.*)$',
|
|
15
|
+
'^[./]'
|
|
16
|
+
],
|
|
17
|
+
importOrderSeparation: false,
|
|
18
|
+
importOrderSortSpecifiers: true,
|
|
19
|
+
overrides: [
|
|
20
|
+
{
|
|
21
|
+
files: '**/*.yml',
|
|
22
|
+
options: {
|
|
23
|
+
tabWidth: 2
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vheissulabs/prettier-config",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Shared Prettier configuration for VheissuLabs projects",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"prettier",
|
|
8
|
+
"config",
|
|
9
|
+
"vheissulabs"
|
|
10
|
+
],
|
|
11
|
+
"author": "Karl Miller",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/VheissuLabs/PrettierConfig.git"
|
|
16
|
+
},
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"prettier": ">=3.0.0"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@trivago/prettier-plugin-sort-imports": "^5.0.0"
|
|
22
|
+
}
|
|
23
|
+
}
|