@hiddenability/opinionated-defaults 0.0.21 → 0.0.23
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 +10 -6
- package/dist/eslint/astro.mjs +1 -1
- package/dist/eslint/base.mjs +7 -5
- package/dist/eslint/next.mjs +1 -1
- package/dist/eslint/typescript.mjs +2 -2
- package/dist/prettier/astro.mjs +3 -3
- package/dist/prettier/base.mjs +7 -10
- package/dist/prettier/index.d.ts +3 -2
- package/dist/prettier/index.mjs +3 -2
- package/dist/prettier/sort-imports.d.ts +3 -0
- package/dist/prettier/sort-imports.mjs +6 -0
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -13,18 +13,19 @@ A collection of opinionated tooling configurations.
|
|
|
13
13
|
#### Exports:
|
|
14
14
|
|
|
15
15
|
- eslintConfigAstro (Astro)
|
|
16
|
-
- eslintConfigElysia (Elysia.js)
|
|
17
|
-
- eslintConfigNext (Next.js)
|
|
18
|
-
- eslintConfigTurbo (Turborepo)
|
|
19
16
|
- eslintConfigBase (General rules for every project)
|
|
17
|
+
- eslintConfigElysia (Elysia.js)
|
|
20
18
|
- eslintConfigFunctional (Enforces functional style)
|
|
21
|
-
-
|
|
19
|
+
- eslintConfigNext (Next.js)
|
|
20
|
+
- eslintConfigPrettier (Runs Prettier as ESLint rules)
|
|
22
21
|
- eslintConfigReact (General rules for React)
|
|
23
22
|
- eslintConfigRelative (Enforces the use of absolute import paths using path aliases)
|
|
24
23
|
- eslintConfigStylistic (Enforces code-style through ESLint rules)
|
|
24
|
+
- eslintConfigTurbo (Turborepo)
|
|
25
25
|
|
|
26
26
|
#### Included plugins:
|
|
27
27
|
|
|
28
|
+
- [eslint-plugin-astro](https://github.com/ota-meshi/eslint-plugin-astro)
|
|
28
29
|
- [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier)
|
|
29
30
|
- [eslint-plugin-no-relative-import-paths](https://github.com/MelvinVermeer/eslint-plugin-no-relative-import-paths)
|
|
30
31
|
- [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react)
|
|
@@ -32,8 +33,8 @@ A collection of opinionated tooling configurations.
|
|
|
32
33
|
- [eslint-plugin-turbo](https://github.com/vercel/turborepo/tree/main/packages/eslint-plugin-turbo)
|
|
33
34
|
- [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)
|
|
34
35
|
- [eslint-plugin-functional](https://github.com/eslint-functional/eslint-plugin-functional)
|
|
35
|
-
- [eslint-plugin-astro](https://github.com/ota-meshi/eslint-plugin-astro)
|
|
36
36
|
- [eslint-plugin-next](https://github.com/vercel/next.js/tree/canary/packages/eslint-plugin-next)
|
|
37
|
+
- [eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist)
|
|
37
38
|
- [eslint-stylistic](https://github.com/eslint-stylistic/eslint-stylistic)
|
|
38
39
|
|
|
39
40
|
### Prettier:
|
|
@@ -47,12 +48,14 @@ A collection of opinionated tooling configurations.
|
|
|
47
48
|
- prettierConfigAstro (Astro prettier rules with Tailwind class ordering)
|
|
48
49
|
- prettierConfigNext (Rules for Next.js with Tailwind class ordering)
|
|
49
50
|
- prettierConfigBase (General rules for every project)
|
|
51
|
+
- prettierConfigSortImports (Prettier-based import sorting)
|
|
50
52
|
- configMerge (used to merge configurations)
|
|
51
53
|
|
|
52
54
|
#### Included plugins:
|
|
53
55
|
|
|
54
56
|
- [prettier-plugin-astro](https://github.com/withastro/prettier-plugin-astro)
|
|
55
57
|
- [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss)
|
|
58
|
+
- [prettier-plugin-sort-imports](https://github.com/trivago/prettier-plugin-sort-imports)
|
|
56
59
|
|
|
57
60
|
## Installation:
|
|
58
61
|
|
|
@@ -105,7 +108,8 @@ const prettierConfig = merge(
|
|
|
105
108
|
prettierConfig2,
|
|
106
109
|
{
|
|
107
110
|
/* your custom rules */
|
|
108
|
-
}
|
|
111
|
+
},
|
|
112
|
+
/*...*/
|
|
109
113
|
);
|
|
110
114
|
|
|
111
115
|
export default prettierConfig;
|
package/dist/eslint/astro.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import eslintPluginAstro from "eslint-plugin-astro";
|
|
1
2
|
import baseConfig from "./base.mjs";
|
|
2
3
|
import relativeConfig from "./relative.mjs";
|
|
3
4
|
import tsConfig from "./typescript.mjs";
|
|
4
|
-
import eslintPluginAstro from "eslint-plugin-astro";
|
|
5
5
|
const astroConfig = [
|
|
6
6
|
...baseConfig,
|
|
7
7
|
...tsConfig,
|
package/dist/eslint/base.mjs
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import js from "@eslint/js";
|
|
2
|
+
import perfectionist from "eslint-plugin-perfectionist";
|
|
2
3
|
import preferArrowFunctions from "eslint-plugin-prefer-arrow-functions";
|
|
3
4
|
import eslintPluginUnicorn from "eslint-plugin-unicorn";
|
|
4
5
|
const config = [
|
|
5
6
|
js.configs.recommended,
|
|
6
7
|
eslintPluginUnicorn.configs.recommended,
|
|
8
|
+
perfectionist.configs["recommended-natural"],
|
|
7
9
|
{
|
|
8
10
|
rules: {
|
|
9
|
-
"unicorn/prevent-abbreviations": ["off"],
|
|
10
|
-
"unicorn/no-array-for-each": ["off"],
|
|
11
|
-
"unicorn/no-array-reduce": ["off"],
|
|
12
11
|
"unicorn/filename-case": [
|
|
13
12
|
"error",
|
|
14
13
|
{
|
|
@@ -16,7 +15,10 @@ const config = [
|
|
|
16
15
|
kebabCase: true
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
]
|
|
18
|
+
],
|
|
19
|
+
"unicorn/no-array-for-each": ["off"],
|
|
20
|
+
"unicorn/no-array-reduce": ["off"],
|
|
21
|
+
"unicorn/prevent-abbreviations": ["off"]
|
|
20
22
|
}
|
|
21
23
|
},
|
|
22
24
|
{
|
|
@@ -41,7 +43,7 @@ const config = [
|
|
|
41
43
|
]
|
|
42
44
|
},
|
|
43
45
|
{
|
|
44
|
-
ignores: ["dist/"]
|
|
46
|
+
ignores: ["**/dist/"]
|
|
45
47
|
}
|
|
46
48
|
];
|
|
47
49
|
export default config;
|
package/dist/eslint/next.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import pluginNext from "@next/eslint-plugin-next";
|
|
1
2
|
import baseConfig from "./base.mjs";
|
|
2
3
|
import reactConfig from "./react.mjs";
|
|
3
4
|
import relativeConfig from "./relative.mjs";
|
|
4
5
|
import tsConfig from "./typescript.mjs";
|
|
5
|
-
import pluginNext from "@next/eslint-plugin-next";
|
|
6
6
|
const nextJsConfig = [
|
|
7
7
|
...baseConfig,
|
|
8
8
|
...reactConfig,
|
package/dist/prettier/astro.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import baseConfig from "./base.mjs";
|
|
2
1
|
import lodash from "lodash";
|
|
2
|
+
import baseConfig from "./base.mjs";
|
|
3
3
|
const { merge } = lodash;
|
|
4
4
|
const astroConfig = merge(
|
|
5
5
|
{
|
|
6
|
-
plugins: ["prettier-plugin-astro"],
|
|
7
6
|
overrides: [
|
|
8
7
|
{
|
|
9
8
|
files: "*.astro",
|
|
10
9
|
options: { parser: "astro" }
|
|
11
10
|
}
|
|
12
|
-
]
|
|
11
|
+
],
|
|
12
|
+
plugins: ["prettier-plugin-astro"]
|
|
13
13
|
},
|
|
14
14
|
baseConfig
|
|
15
15
|
);
|
package/dist/prettier/base.mjs
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
const config = {
|
|
2
|
-
trailingComma: "all",
|
|
3
|
-
singleQuote: true,
|
|
4
|
-
jsxSingleQuote: true,
|
|
5
|
-
tabWidth: 2,
|
|
6
2
|
arrowParens: "always",
|
|
3
|
+
bracketSameLine: false,
|
|
7
4
|
bracketSpacing: true,
|
|
8
|
-
useTabs: false,
|
|
9
|
-
semi: true,
|
|
10
5
|
experimentalTernaries: true,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
jsxSingleQuote: true,
|
|
7
|
+
semi: true,
|
|
8
|
+
singleQuote: true,
|
|
9
|
+
tabWidth: 2,
|
|
10
|
+
trailingComma: "all",
|
|
11
|
+
useTabs: false
|
|
15
12
|
};
|
|
16
13
|
export default config;
|
package/dist/prettier/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { default as prettierConfigBase } from './base';
|
|
2
1
|
export { default as prettierConfigAstro } from './astro';
|
|
3
|
-
export { default as
|
|
2
|
+
export { default as prettierConfigBase } from './base';
|
|
4
3
|
export { merge } from './merge';
|
|
4
|
+
export { default as prettierConfigSortImports } from './sort-imports';
|
|
5
|
+
export { default as prettierConfigTailwind } from './tailwind';
|
package/dist/prettier/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { default as prettierConfigBase } from "./base.mjs";
|
|
2
1
|
export { default as prettierConfigAstro } from "./astro.mjs";
|
|
3
|
-
export { default as
|
|
2
|
+
export { default as prettierConfigBase } from "./base.mjs";
|
|
4
3
|
export { merge } from "./merge.mjs";
|
|
4
|
+
export { default as prettierConfigSortImports } from "./sort-imports.mjs";
|
|
5
|
+
export { default as prettierConfigTailwind } from "./tailwind.mjs";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hiddenability/opinionated-defaults",
|
|
3
3
|
"description": "Opinionated default configurations for dev tools.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.23",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"eslint": "^9.
|
|
32
|
-
"
|
|
33
|
-
"@eslint
|
|
34
|
-
"@next/eslint-plugin-next": "^15.4.0-canary.93",
|
|
35
|
-
"@stylistic/eslint-plugin": "^4.4.1",
|
|
31
|
+
"@eslint/js": "^9.30.1",
|
|
32
|
+
"@next/eslint-plugin-next": "^15.3.5",
|
|
33
|
+
"@stylistic/eslint-plugin": "^5.1.0",
|
|
36
34
|
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
37
|
-
"@types/lodash": "^4.17.
|
|
35
|
+
"@types/lodash": "^4.17.20",
|
|
36
|
+
"eslint": "^9.30.1",
|
|
38
37
|
"eslint-config-prettier": "^10.1.5",
|
|
39
38
|
"eslint-plugin-astro": "^1.3.1",
|
|
40
39
|
"eslint-plugin-functional": "^9.0.2",
|
|
41
40
|
"eslint-plugin-no-relative-import-paths": "^1.6.1",
|
|
41
|
+
"eslint-plugin-perfectionist": "^4.15.0",
|
|
42
42
|
"eslint-plugin-prefer-arrow-functions": "^3.6.2",
|
|
43
|
-
"eslint-plugin-prettier": "^5.5.
|
|
43
|
+
"eslint-plugin-prettier": "^5.5.1",
|
|
44
44
|
"eslint-plugin-react": "^7.37.5",
|
|
45
45
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
46
46
|
"eslint-plugin-solid": "^0.14.5",
|
|
@@ -48,13 +48,14 @@
|
|
|
48
48
|
"eslint-plugin-unicorn": "^59.0.1",
|
|
49
49
|
"jiti": "^2.4.2",
|
|
50
50
|
"lodash": "^4.17.21",
|
|
51
|
+
"prettier": "3.6.2",
|
|
51
52
|
"prettier-plugin-astro": "^0.14.1",
|
|
52
|
-
"prettier-plugin-tailwindcss": "0.6.
|
|
53
|
-
"typescript-eslint": "^8.
|
|
53
|
+
"prettier-plugin-tailwindcss": "0.6.13",
|
|
54
|
+
"typescript-eslint": "^8.36.0"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
|
-
"@hiddenability/opinionated-defaults": "^0.0.
|
|
57
|
-
"@types/bun": "^1.2.
|
|
57
|
+
"@hiddenability/opinionated-defaults": "^0.0.21",
|
|
58
|
+
"@types/bun": "^1.2.18",
|
|
58
59
|
"typescript": "^5.8.3",
|
|
59
60
|
"unbuild": "^3.5.0",
|
|
60
61
|
"vitest": "^3.2.4"
|