@ecotechlib/core 1.0.5 → 1.1.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/package.json +1 -1
- package/src/prettier.config.mjs +36 -18
package/package.json
CHANGED
package/src/prettier.config.mjs
CHANGED
|
@@ -1,20 +1,38 @@
|
|
|
1
1
|
/** @type {import('prettier').Config} */
|
|
2
2
|
export default {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
3
|
+
// 100-120 is the modern sweet spot for wide monitors, prevents excessive line breaks
|
|
4
|
+
printWidth: 100,
|
|
5
|
+
|
|
6
|
+
// Tabs are trending for accessibility (allows users to set their own visual width)
|
|
7
|
+
tabWidth: 4,
|
|
8
|
+
useTabs: true,
|
|
9
|
+
|
|
10
|
+
// Semi-colons are the industry standard for preventing ASI (Automatic Semicolon Insertion) bugs
|
|
11
|
+
semi: true,
|
|
12
|
+
|
|
13
|
+
// Single quotes are standard in the JS/TS ecosystem; JSX usually matches for consistency
|
|
14
|
+
singleQuote: true,
|
|
15
|
+
jsxSingleQuote: true,
|
|
16
|
+
|
|
17
|
+
// "all" is the top trend: keeps Git diffs clean when adding new elements to objects/arrays
|
|
18
|
+
trailingComma: 'all',
|
|
19
|
+
|
|
20
|
+
// Keeps code concise by removing parens around single-argument arrow functions
|
|
21
|
+
arrowParens: 'avoid',
|
|
22
|
+
|
|
23
|
+
// Adds spaces inside object literals { likeThis } for better readability
|
|
24
|
+
bracketSpacing: true,
|
|
25
|
+
|
|
26
|
+
// Ensures HTML/JSX closing brackets stay on the same line as the last prop
|
|
27
|
+
bracketSameLine: false,
|
|
28
|
+
|
|
29
|
+
// IMPORT SORTING: Keeps the top of your files organized automatically
|
|
30
|
+
plugins: ['@trivago/prettier-plugin-sort-imports'],
|
|
31
|
+
|
|
32
|
+
// Customizing the order: External libs -> Internal Aliases -> Relative paths
|
|
33
|
+
importOrder: ['<THIRD_PARTY_MODULES>', '^@/(.*)$', '^[./]'],
|
|
34
|
+
// Adds a blank line between the groups defined above
|
|
35
|
+
importOrderSeparation: true,
|
|
36
|
+
importOrderSortSpecifiers: true,
|
|
37
|
+
importOrderCaseInsensitive: true,
|
|
38
|
+
};
|