@hiddenability/opinionated-defaults 0.0.22 → 0.0.24

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 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
- - eslintConfigPrettier (Runs prettier as ESLint rules)
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,6 +48,7 @@ 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:
@@ -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,
@@ -6,9 +6,6 @@ const config = [
6
6
  eslintPluginUnicorn.configs.recommended,
7
7
  {
8
8
  rules: {
9
- "unicorn/prevent-abbreviations": ["off"],
10
- "unicorn/no-array-for-each": ["off"],
11
- "unicorn/no-array-reduce": ["off"],
12
9
  "unicorn/filename-case": [
13
10
  "error",
14
11
  {
@@ -16,7 +13,10 @@ const config = [
16
13
  kebabCase: true
17
14
  }
18
15
  }
19
- ]
16
+ ],
17
+ "unicorn/no-array-for-each": ["off"],
18
+ "unicorn/no-array-reduce": ["off"],
19
+ "unicorn/prevent-abbreviations": ["off"]
20
20
  }
21
21
  },
22
22
  {
@@ -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';
@@ -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";
@@ -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,
@@ -0,0 +1,2 @@
1
+ declare const perfectionistConfig: any[];
2
+ export default perfectionistConfig;
@@ -0,0 +1,3 @@
1
+ import perfectionist from "eslint-plugin-perfectionist";
2
+ const perfectionistConfig = [perfectionist.configs["recommended-natural"]];
3
+ export default perfectionistConfig;
@@ -20,8 +20,8 @@ const typescriptConfig = [
20
20
  caughtErrors: `all`,
21
21
  caughtErrorsIgnorePattern: `^_`,
22
22
  destructuredArrayIgnorePattern: `^_`,
23
- varsIgnorePattern: `^_`,
24
- ignoreRestSiblings: true
23
+ ignoreRestSiblings: true,
24
+ varsIgnorePattern: `^_`
25
25
  }
26
26
  ]
27
27
  }
@@ -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
  );
@@ -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
- bracketSameLine: false,
12
- plugins: ["@trivago/prettier-plugin-sort-imports"],
13
- importOrderSeparation: true,
14
- importOrderSortSpecifiers: true
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;
@@ -1,4 +1,5 @@
1
- export { default as prettierConfigBase } from './base';
2
1
  export { default as prettierConfigAstro } from './astro';
3
- export { default as prettierConfigTailwind } from './tailwind';
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';
@@ -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 prettierConfigTailwind } from "./tailwind.mjs";
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";
@@ -0,0 +1,3 @@
1
+ import { type Config } from 'prettier';
2
+ declare const sortConfig: Config;
3
+ export default sortConfig;
@@ -0,0 +1,6 @@
1
+ const sortConfig = {
2
+ importOrderSeparation: true,
3
+ importOrderSortSpecifiers: true,
4
+ plugins: ["@trivago/prettier-plugin-sort-imports"]
5
+ };
6
+ export default sortConfig;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hiddenability/opinionated-defaults",
3
- "description": "Opinionated default configurations for dev tools.",
4
- "version": "0.0.22",
3
+ "description": "Opinionated default configurations for webdev tools.",
4
+ "version": "0.0.24",
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 && bun run lint && unbuild",
13
- "prepack": "bun run test run && bun run lint && unbuild",
14
- "lint": "eslint . --fix",
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,17 +29,17 @@
28
29
  "dist"
29
30
  ],
30
31
  "dependencies": {
31
- "eslint": "^9.30.1",
32
- "prettier": "3.6.2",
33
32
  "@eslint/js": "^9.30.1",
34
33
  "@next/eslint-plugin-next": "^15.3.5",
35
34
  "@stylistic/eslint-plugin": "^5.1.0",
36
35
  "@trivago/prettier-plugin-sort-imports": "^5.2.2",
37
36
  "@types/lodash": "^4.17.20",
37
+ "eslint": "^9.30.1",
38
38
  "eslint-config-prettier": "^10.1.5",
39
39
  "eslint-plugin-astro": "^1.3.1",
40
40
  "eslint-plugin-functional": "^9.0.2",
41
41
  "eslint-plugin-no-relative-import-paths": "^1.6.1",
42
+ "eslint-plugin-perfectionist": "^4.15.0",
42
43
  "eslint-plugin-prefer-arrow-functions": "^3.6.2",
43
44
  "eslint-plugin-prettier": "^5.5.1",
44
45
  "eslint-plugin-react": "^7.37.5",
@@ -48,6 +49,7 @@
48
49
  "eslint-plugin-unicorn": "^59.0.1",
49
50
  "jiti": "^2.4.2",
50
51
  "lodash": "^4.17.21",
52
+ "prettier": "3.6.2",
51
53
  "prettier-plugin-astro": "^0.14.1",
52
54
  "prettier-plugin-tailwindcss": "0.6.13",
53
55
  "typescript-eslint": "^8.36.0"