-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.prettierrc.cjs
58 lines (55 loc) · 1.42 KB
/
.prettierrc.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const packageJson = require('./package.json');
const sortedPackages = Object.keys(packageJson.dependencies)
.concat(Object.keys(packageJson.devDependencies))
.sort()
.map((p) => `^${p.replace('/', '\\/')}.*`)
.join('|');
/** @type {import("prettier").Config} */
const config = {
singleQuote: true,
plugins: [
'prettier-plugin-organize-attributes',
'prettier-plugin-tailwindcss',
'@ianvs/prettier-plugin-sort-imports',
],
htmlWhitespaceSensitivity: 'ignore',
importOrderParserPlugins: ['typescript', 'decorators-legacy'],
importOrder: [
sortedPackages,
'',
'^@[\\w-]+\\/(.*)$',
'',
'^((\\.\\.\\/)|(\\.\\/\\.\\.\\/)|(\\.\\.))',
'',
'^\\./',
],
attributeGroups: [
'^(id|name)$',
'$ANGULAR_STRUCTURAL_DIRECTIVE',
'^app',
'^al',
'$ANGULAR_ELEMENT_REF',
'data-testid',
'tabindex',
'$ALT',
'$ARIA',
'$ROLE',
'$TYPE',
'$CLASS',
'ngClass',
'^\\[style',
'ANGULAR_ANIMATION',
'$ANGULAR_ANIMATION_INPUT',
'^\\[attr',
'$ANGULAR_TWO_WAY_BINDING',
'$ANGULAR_INPUT',
'^(\\(blur\\)|\\(focus\\)|)$',
'^(\\(click\\)|\\(dbclick\\)|\\(submit\\))$',
'^(\\(cut\\)|\\(copy\\)|\\(paste\\))$',
'^(\\(keyup\\)|\\(keypress\\)|\\(keydown\\))$',
'^(\\(mouseup\\)|\\(mousedown\\)|\\(mouseenter\\)|\\(scroll\\))$',
'^(\\(drag\\)|\\(drop\\)|\\(dragover\\))$',
'$ANGULAR_OUTPUT',
],
};
module.exports = config;