js-style-kit 0.6.1 → 0.8.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 (67) hide show
  1. package/README.md +5 -0
  2. package/dist/bin/index.cjs +2 -1
  3. package/dist/bin/index.cjs.map +1 -1
  4. package/dist/index.d.ts +23 -7
  5. package/dist/index.js +135 -36
  6. package/dist/index.js.map +1 -1
  7. package/package.json +10 -7
  8. package/src/eslint/base/README.md +186 -0
  9. package/src/eslint/base/config.ts +37 -0
  10. package/src/eslint/base/rules.ts +444 -0
  11. package/src/eslint/base/types.ts +20 -0
  12. package/src/eslint/constants.ts +52 -0
  13. package/src/eslint/convex/README.md +30 -0
  14. package/src/eslint/convex/config.ts +34 -0
  15. package/src/eslint/convex/rules.ts +8 -0
  16. package/src/eslint/convex/types.ts +8 -0
  17. package/src/eslint/ignores.ts +34 -0
  18. package/src/eslint/import/README.md +397 -0
  19. package/src/eslint/import/config.ts +48 -0
  20. package/src/eslint/import/rules.ts +81 -0
  21. package/src/eslint/index.ts +273 -0
  22. package/src/eslint/jsdoc/README.md +399 -0
  23. package/src/eslint/jsdoc/config.ts +29 -0
  24. package/src/eslint/jsdoc/rules.ts +81 -0
  25. package/src/eslint/jsdoc/types.ts +56 -0
  26. package/src/eslint/nextjs/config.ts +25 -0
  27. package/src/eslint/nextjs/rules.ts +25 -0
  28. package/src/eslint/nextjs/types.ts +27 -0
  29. package/src/eslint/perfectionist/README.md +454 -0
  30. package/src/eslint/perfectionist/config.ts +25 -0
  31. package/src/eslint/perfectionist/rules.ts +39 -0
  32. package/src/eslint/prefer-arrow-function/config.ts +33 -0
  33. package/src/eslint/prefer-arrow-function/types.ts +13 -0
  34. package/src/eslint/process-custom-rules.ts +72 -0
  35. package/src/eslint/query/README.md +254 -0
  36. package/src/eslint/query/config.ts +27 -0
  37. package/src/eslint/query/rules.ts +11 -0
  38. package/src/eslint/query/types.ts +11 -0
  39. package/src/eslint/react/README.md +416 -0
  40. package/src/eslint/react/config.ts +65 -0
  41. package/src/eslint/react/rules.ts +188 -0
  42. package/src/eslint/react/types.ts +26 -0
  43. package/src/eslint/react-refresh/config.ts +28 -0
  44. package/src/eslint/react-refresh/rules.ts +48 -0
  45. package/src/eslint/storybook/README.md +424 -0
  46. package/src/eslint/storybook/config.ts +57 -0
  47. package/src/eslint/testing/README.md +436 -0
  48. package/src/eslint/testing/config.ts +99 -0
  49. package/src/eslint/testing/get-import-restrictions.ts +70 -0
  50. package/src/eslint/testing/jest-rules.ts +47 -0
  51. package/src/eslint/testing/vitest-rules.ts +42 -0
  52. package/src/eslint/turbo/README.md +380 -0
  53. package/src/eslint/turbo/config.ts +26 -0
  54. package/src/eslint/turbo/types.ts +7 -0
  55. package/src/eslint/types.ts +36 -0
  56. package/src/eslint/typescript/README.md +229 -0
  57. package/src/eslint/typescript/config.ts +48 -0
  58. package/src/eslint/typescript/rules.ts +137 -0
  59. package/src/eslint/typescript/types.ts +35 -0
  60. package/src/eslint/unicorn/README.md +497 -0
  61. package/src/eslint/unicorn/config.ts +36 -0
  62. package/src/eslint/unicorn/rules.ts +86 -0
  63. package/src/index.ts +3 -0
  64. package/src/modules.d.ts +5 -0
  65. package/src/prettier/README.md +413 -0
  66. package/src/prettier/index.ts +110 -0
  67. package/src/utils/is-type.ts +60 -0
package/README.md CHANGED
@@ -120,6 +120,8 @@ export default eslintConfig(
120
120
  importPlugin: true, // Import/export validation
121
121
  sorting: true, // Auto-sort imports, objects, etc.
122
122
  unicorn: true, // Enforce file naming and best practices
123
+ // or configure filename case:
124
+ // unicorn: { filenameCase: "kebabCase" }, // "camelCase" | "kebabCase" | "pascalCase" | "snakeCase"
123
125
  jsdoc: { requireJsdoc: false }, // JSDoc validation
124
126
 
125
127
  // Framework & tools
@@ -127,6 +129,7 @@ export default eslintConfig(
127
129
  testing: { framework: "vitest" }, // Test framework config
128
130
  storybook: false, // Storybook rules
129
131
  turbo: false, // Turborepo rules
132
+ convex: false, // Convex backend rules
130
133
 
131
134
  // Advanced
132
135
  ignores: [], // Additional ignore patterns
@@ -164,6 +167,7 @@ Each configuration has detailed documentation:
164
167
  - [JSDoc](./src/eslint/jsdoc/README.md) - Documentation validation
165
168
  - [Storybook](./src/eslint/storybook/README.md) - Component story rules
166
169
  - [Turborepo](./src/eslint/turbo/README.md) - Monorepo rules
170
+ - [Convex](./src/eslint/convex/README.md) - Convex backend rules
167
171
 
168
172
  ### Prettier Options
169
173
 
@@ -281,6 +285,7 @@ export default eslintConfig(
281
285
  - [`eslint-plugin-turbo`](https://www.npmjs.com/package/eslint-plugin-turbo) - Turborepo rules
282
286
  - [`eslint-plugin-vitest`](https://www.npmjs.com/package/eslint-plugin-vitest) - Vitest rules
283
287
  - [`eslint-plugin-jest`](https://www.npmjs.com/package/eslint-plugin-jest) - Jest rules
288
+ - [`@convex-dev/eslint-plugin`](https://docs.convex.dev/eslint) - Convex backend rules
284
289
 
285
290
  ### Prettier Plugins
286
291
 
@@ -3541,7 +3541,8 @@ var getDependencies = () => {
3541
3541
  "package.json"
3542
3542
  );
3543
3543
  try {
3544
- if (import_node_fs3.default.existsSync(nodeModulesPath)) {
3544
+ const exists = import_node_fs3.default.existsSync(nodeModulesPath);
3545
+ if (exists) {
3545
3546
  const jsStyleKitPackageJson = JSON.parse(
3546
3547
  import_node_fs3.default.readFileSync(nodeModulesPath, "utf8")
3547
3548
  );