@becklyn/prettier 2.0.1-2 → 2.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/.prettierrc.mjs +27 -0
- package/CHANGELOG.md +5 -1
- package/package.json +4 -3
- package/.prettierrc.cjs +0 -25
package/.prettierrc.mjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import CssOrderConfig from "prettier-plugin-css-order";
|
|
2
|
+
import SortImportConfig from "@trivago/prettier-plugin-sort-imports";
|
|
3
|
+
|
|
4
|
+
const config = {
|
|
5
|
+
trailingComma: "es5",
|
|
6
|
+
tabWidth: 4,
|
|
7
|
+
semi: true,
|
|
8
|
+
printWidth: 100,
|
|
9
|
+
singleQuote: false,
|
|
10
|
+
bracketSameLine: true,
|
|
11
|
+
arrowParens: "avoid",
|
|
12
|
+
importOrder: [
|
|
13
|
+
"^react$",
|
|
14
|
+
"^next(.*)$",
|
|
15
|
+
"^styled-components",
|
|
16
|
+
"^@fr(e|a)ym/(.*)$",
|
|
17
|
+
"^@mayd/(.*)$",
|
|
18
|
+
"^[^.@].*",
|
|
19
|
+
"^@(.*)$",
|
|
20
|
+
"^[./]",
|
|
21
|
+
],
|
|
22
|
+
importOrderSeparation: false,
|
|
23
|
+
importOrderSortSpecifiers: true,
|
|
24
|
+
plugins: [SortImportConfig, CssOrderConfig],
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default config;
|
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
2.0
|
|
1
|
+
2.1.0
|
|
2
2
|
=====
|
|
3
3
|
|
|
4
4
|
* (feature) Add sorting of imports via this project.
|
|
5
5
|
* (feature) Add sorting css declarations.
|
|
6
|
+
* (internal) Add `prettier` as dependency.
|
|
7
|
+
* (internal) Add `prettier-plugin-css-order` as dependency.
|
|
8
|
+
* (internal) Write prettier config as mjs.
|
|
9
|
+
* (internal) Add format command.
|
|
6
10
|
|
|
7
11
|
2.0.0
|
|
8
12
|
=====
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@becklyn/prettier",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "The commonly used prettier configuration for projects at Becklyn",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"homepage": "https://github.com/Becklyn/prettier",
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
"url": "https://github.com/Becklyn/prettier.git"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
|
-
"test": "echo 'no tests defined' && exit 0"
|
|
12
|
+
"test": "echo 'no tests defined' && exit 0",
|
|
13
|
+
"format": "prettier --write \"**/*.{ts,tsx,js,mjs,json}\""
|
|
13
14
|
},
|
|
14
|
-
"main": ".prettierrc.
|
|
15
|
+
"main": ".prettierrc.mjs",
|
|
15
16
|
"publishConfig": {
|
|
16
17
|
"access": "public"
|
|
17
18
|
},
|
package/.prettierrc.cjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
"trailingComma": "es5",
|
|
3
|
-
"tabWidth": 4,
|
|
4
|
-
"semi": true,
|
|
5
|
-
"printWidth": 100,
|
|
6
|
-
"singleQuote": false,
|
|
7
|
-
"bracketSameLine": true,
|
|
8
|
-
"arrowParens": "avoid",
|
|
9
|
-
"importOrder": [
|
|
10
|
-
"^react$",
|
|
11
|
-
"^next(.*)$",
|
|
12
|
-
"^styled-components",
|
|
13
|
-
"^@fr(e|a)ym/(.*)$",
|
|
14
|
-
"^@mayd/(.*)$",
|
|
15
|
-
"^[^.@].*",
|
|
16
|
-
"^@(.*)$",
|
|
17
|
-
"^[./]"
|
|
18
|
-
],
|
|
19
|
-
"importOrderSeparation": false,
|
|
20
|
-
"importOrderSortSpecifiers": true,
|
|
21
|
-
"plugins": [
|
|
22
|
-
import("@trivago/prettier-plugin-sort-imports"),
|
|
23
|
-
import("prettier-plugin-css-order"),
|
|
24
|
-
],
|
|
25
|
-
}
|