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.
- package/README.md +5 -0
- package/dist/bin/index.cjs +2 -1
- package/dist/bin/index.cjs.map +1 -1
- package/dist/index.d.ts +23 -7
- package/dist/index.js +135 -36
- package/dist/index.js.map +1 -1
- package/package.json +10 -7
- package/src/eslint/base/README.md +186 -0
- package/src/eslint/base/config.ts +37 -0
- package/src/eslint/base/rules.ts +444 -0
- package/src/eslint/base/types.ts +20 -0
- package/src/eslint/constants.ts +52 -0
- package/src/eslint/convex/README.md +30 -0
- package/src/eslint/convex/config.ts +34 -0
- package/src/eslint/convex/rules.ts +8 -0
- package/src/eslint/convex/types.ts +8 -0
- package/src/eslint/ignores.ts +34 -0
- package/src/eslint/import/README.md +397 -0
- package/src/eslint/import/config.ts +48 -0
- package/src/eslint/import/rules.ts +81 -0
- package/src/eslint/index.ts +273 -0
- package/src/eslint/jsdoc/README.md +399 -0
- package/src/eslint/jsdoc/config.ts +29 -0
- package/src/eslint/jsdoc/rules.ts +81 -0
- package/src/eslint/jsdoc/types.ts +56 -0
- package/src/eslint/nextjs/config.ts +25 -0
- package/src/eslint/nextjs/rules.ts +25 -0
- package/src/eslint/nextjs/types.ts +27 -0
- package/src/eslint/perfectionist/README.md +454 -0
- package/src/eslint/perfectionist/config.ts +25 -0
- package/src/eslint/perfectionist/rules.ts +39 -0
- package/src/eslint/prefer-arrow-function/config.ts +33 -0
- package/src/eslint/prefer-arrow-function/types.ts +13 -0
- package/src/eslint/process-custom-rules.ts +72 -0
- package/src/eslint/query/README.md +254 -0
- package/src/eslint/query/config.ts +27 -0
- package/src/eslint/query/rules.ts +11 -0
- package/src/eslint/query/types.ts +11 -0
- package/src/eslint/react/README.md +416 -0
- package/src/eslint/react/config.ts +65 -0
- package/src/eslint/react/rules.ts +188 -0
- package/src/eslint/react/types.ts +26 -0
- package/src/eslint/react-refresh/config.ts +28 -0
- package/src/eslint/react-refresh/rules.ts +48 -0
- package/src/eslint/storybook/README.md +424 -0
- package/src/eslint/storybook/config.ts +57 -0
- package/src/eslint/testing/README.md +436 -0
- package/src/eslint/testing/config.ts +99 -0
- package/src/eslint/testing/get-import-restrictions.ts +70 -0
- package/src/eslint/testing/jest-rules.ts +47 -0
- package/src/eslint/testing/vitest-rules.ts +42 -0
- package/src/eslint/turbo/README.md +380 -0
- package/src/eslint/turbo/config.ts +26 -0
- package/src/eslint/turbo/types.ts +7 -0
- package/src/eslint/types.ts +36 -0
- package/src/eslint/typescript/README.md +229 -0
- package/src/eslint/typescript/config.ts +48 -0
- package/src/eslint/typescript/rules.ts +137 -0
- package/src/eslint/typescript/types.ts +35 -0
- package/src/eslint/unicorn/README.md +497 -0
- package/src/eslint/unicorn/config.ts +36 -0
- package/src/eslint/unicorn/rules.ts +86 -0
- package/src/index.ts +3 -0
- package/src/modules.d.ts +5 -0
- package/src/prettier/README.md +413 -0
- package/src/prettier/index.ts +110 -0
- 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
|
|
package/dist/bin/index.cjs
CHANGED
|
@@ -3541,7 +3541,8 @@ var getDependencies = () => {
|
|
|
3541
3541
|
"package.json"
|
|
3542
3542
|
);
|
|
3543
3543
|
try {
|
|
3544
|
-
|
|
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
|
);
|