@northern.tech/prettier-config 0.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.
Files changed (3) hide show
  1. package/base.js +19 -0
  2. package/package.json +25 -0
  3. package/react.js +12 -0
package/base.js ADDED
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @see https://prettier.io/docs/en/configuration.html
3
+ * @type {import("prettier").Config}
4
+ */
5
+ const config = {
6
+ arrowParens: 'avoid',
7
+ endOfLine: 'lf',
8
+ importOrderSeparation: true,
9
+ importOrderSortSpecifiers: true,
10
+ plugins: ['@trivago/prettier-plugin-sort-imports'],
11
+ printWidth: 160,
12
+ quoteProps: 'preserve',
13
+ singleQuote: true,
14
+ tabWidth: 2,
15
+ trailingComma: 'none',
16
+ useTabs: false
17
+ };
18
+
19
+ export default config;
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@northern.tech/prettier-config",
3
+ "version": "0.0.0",
4
+ "private": false,
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "files": [
8
+ "base.js",
9
+ "react.js"
10
+ ],
11
+ "dependencies": {
12
+ "@trivago/prettier-plugin-sort-imports": "4.3.0"
13
+ },
14
+ "devDependencies": {
15
+ "tsup": "8.3.5"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "scripts": {
21
+ "build": "tsup base.js react.js",
22
+ "publish": "npm publish",
23
+ "pre-publish": "npm publish --tag next"
24
+ }
25
+ }
package/react.js ADDED
@@ -0,0 +1,12 @@
1
+ import repoConfig from './base.js';
2
+
3
+ /**
4
+ * @see https://prettier.io/docs/en/configuration.html
5
+ * @type {import("prettier").Config}
6
+ */
7
+ const config = {
8
+ ...repoConfig,
9
+ importOrder: ['^react*', '@emotion/*|@mui/*|tss-react/*', '<THIRD_PARTY_MODULES>', '^[./]']
10
+ };
11
+
12
+ export default config;