@hiddenability/opinionated-defaults 0.0.23 → 0.0.25
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 +23 -0
- package/dist/eslint/base.mjs +0 -2
- package/dist/eslint/index.d.ts +1 -0
- package/dist/eslint/index.mjs +1 -0
- package/dist/eslint/perfectionist.d.ts +2 -0
- package/dist/eslint/perfectionist.mjs +3 -0
- package/package.json +15 -13
package/README.md
CHANGED
|
@@ -115,6 +115,29 @@ const prettierConfig = merge(
|
|
|
115
115
|
export default prettierConfig;
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
+
#### TailwindCSS Plugin:
|
|
119
|
+
|
|
120
|
+
When using `prettier-config-tailwind`, make sure to specify the CSS file that contains the `@import "tailwindcss"` directive.
|
|
121
|
+
|
|
122
|
+
For example, given the following css file:
|
|
123
|
+
```css
|
|
124
|
+
// /app/styles.css
|
|
125
|
+
@import 'tailwindcss';
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
This should be a minimal version of your Prettier config:
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
// prettier.config.mjs
|
|
132
|
+
import { prettierConfigTailwind } from '@hiddenability/opinionated-defaults/prettier';
|
|
133
|
+
|
|
134
|
+
const prettierConfig = merge(
|
|
135
|
+
prettierConfigTailwind,
|
|
136
|
+
{ tailwindStylesheet: './app/styles.css' }
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
118
141
|
## TODO:
|
|
119
142
|
|
|
120
143
|
- Improve repository structure (How to manage configuration options within eslint dir?).
|
package/dist/eslint/base.mjs
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import js from "@eslint/js";
|
|
2
|
-
import perfectionist from "eslint-plugin-perfectionist";
|
|
3
2
|
import preferArrowFunctions from "eslint-plugin-prefer-arrow-functions";
|
|
4
3
|
import eslintPluginUnicorn from "eslint-plugin-unicorn";
|
|
5
4
|
const config = [
|
|
6
5
|
js.configs.recommended,
|
|
7
6
|
eslintPluginUnicorn.configs.recommended,
|
|
8
|
-
perfectionist.configs["recommended-natural"],
|
|
9
7
|
{
|
|
10
8
|
rules: {
|
|
11
9
|
"unicorn/filename-case": [
|
package/dist/eslint/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { default as eslintConfigBase } from './base';
|
|
|
3
3
|
export { default as eslintConfigElysia } from './elysia';
|
|
4
4
|
export { default as eslintConfigFunctional } from './functional';
|
|
5
5
|
export { default as eslintConfigNext } from './next';
|
|
6
|
+
export { default as eslintConfigPefectionist } from './perfectionist';
|
|
6
7
|
export { default as eslintConfigPrettier } from './prettier';
|
|
7
8
|
export { default as eslintConfigReact } from './react';
|
|
8
9
|
export { default as eslintConfigRelative } from './relative';
|
package/dist/eslint/index.mjs
CHANGED
|
@@ -3,6 +3,7 @@ export { default as eslintConfigBase } from "./base.mjs";
|
|
|
3
3
|
export { default as eslintConfigElysia } from "./elysia.mjs";
|
|
4
4
|
export { default as eslintConfigFunctional } from "./functional.mjs";
|
|
5
5
|
export { default as eslintConfigNext } from "./next.mjs";
|
|
6
|
+
export { default as eslintConfigPefectionist } from "./perfectionist.mjs";
|
|
6
7
|
export { default as eslintConfigPrettier } from "./prettier.mjs";
|
|
7
8
|
export { default as eslintConfigReact } from "./react.mjs";
|
|
8
9
|
export { default as eslintConfigRelative } from "./relative.mjs";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hiddenability/opinionated-defaults",
|
|
3
|
-
"description": "Opinionated default configurations for
|
|
4
|
-
"version": "0.0.
|
|
3
|
+
"description": "Opinionated default configurations for webdev tools.",
|
|
4
|
+
"version": "0.0.25",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "bun run test run &&
|
|
13
|
-
"prepack": "bun run test run &&
|
|
14
|
-
"lint": "eslint .
|
|
12
|
+
"build": "bun run test run && unbuild",
|
|
13
|
+
"prepack": "bun run test run && unbuild",
|
|
14
|
+
"lint": "eslint .",
|
|
15
|
+
"lint:fix": "eslint . --fix",
|
|
15
16
|
"test": "vitest"
|
|
16
17
|
},
|
|
17
18
|
"exports": {
|
|
@@ -28,15 +29,16 @@
|
|
|
28
29
|
"dist"
|
|
29
30
|
],
|
|
30
31
|
"dependencies": {
|
|
31
|
-
"@eslint/js": "^9.
|
|
32
|
-
"@next/eslint-plugin-next": "^15.
|
|
33
|
-
"@stylistic/eslint-plugin": "^5.
|
|
32
|
+
"@eslint/js": "^9.31.0",
|
|
33
|
+
"@next/eslint-plugin-next": "^15.4.1",
|
|
34
|
+
"@stylistic/eslint-plugin": "^5.2.0",
|
|
34
35
|
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
35
36
|
"@types/lodash": "^4.17.20",
|
|
36
|
-
"eslint": "^9.
|
|
37
|
+
"eslint": "^9.31.0",
|
|
37
38
|
"eslint-config-prettier": "^10.1.5",
|
|
38
39
|
"eslint-plugin-astro": "^1.3.1",
|
|
39
40
|
"eslint-plugin-functional": "^9.0.2",
|
|
41
|
+
"eslint-plugin-import": "^2.32.0",
|
|
40
42
|
"eslint-plugin-no-relative-import-paths": "^1.6.1",
|
|
41
43
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
42
44
|
"eslint-plugin-prefer-arrow-functions": "^3.6.2",
|
|
@@ -44,17 +46,17 @@
|
|
|
44
46
|
"eslint-plugin-react": "^7.37.5",
|
|
45
47
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
46
48
|
"eslint-plugin-solid": "^0.14.5",
|
|
47
|
-
"eslint-plugin-turbo": "^2.5.
|
|
49
|
+
"eslint-plugin-turbo": "^2.5.5",
|
|
48
50
|
"eslint-plugin-unicorn": "^59.0.1",
|
|
49
51
|
"jiti": "^2.4.2",
|
|
50
52
|
"lodash": "^4.17.21",
|
|
51
53
|
"prettier": "3.6.2",
|
|
52
54
|
"prettier-plugin-astro": "^0.14.1",
|
|
53
|
-
"prettier-plugin-tailwindcss": "0.6.
|
|
54
|
-
"typescript-eslint": "^8.
|
|
55
|
+
"prettier-plugin-tailwindcss": "0.6.14",
|
|
56
|
+
"typescript-eslint": "^8.37.0"
|
|
55
57
|
},
|
|
56
58
|
"devDependencies": {
|
|
57
|
-
"@hiddenability/opinionated-defaults": "^0.0.
|
|
59
|
+
"@hiddenability/opinionated-defaults": "^0.0.24",
|
|
58
60
|
"@types/bun": "^1.2.18",
|
|
59
61
|
"typescript": "^5.8.3",
|
|
60
62
|
"unbuild": "^3.5.0",
|