js-style-kit 0.8.0 → 0.8.2
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/dist/bin/index.cjs +1 -1
- package/dist/bin/index.cjs.map +1 -1
- package/dist/index.js +16 -6
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
- package/src/eslint/convex/README.md +50 -1
- package/src/eslint/convex/config.ts +14 -1
- package/src/eslint/convex/rules.ts +1 -2
- package/src/eslint/convex/types.ts +1 -2
- package/src/eslint/index.ts +3 -1
- package/src/eslint/unicorn/README.md +17 -0
package/dist/index.js
CHANGED
|
@@ -492,15 +492,14 @@ import { createRequire } from "module";
|
|
|
492
492
|
// src/eslint/convex/rules.ts
|
|
493
493
|
var convexRules = {
|
|
494
494
|
"@convex-dev/import-wrong-runtime": "warn",
|
|
495
|
-
"@convex-dev/no-
|
|
496
|
-
"@convex-dev/
|
|
497
|
-
"@convex-dev/no-old-registered-function-syntax": "warn"
|
|
495
|
+
"@convex-dev/no-old-registered-function-syntax": "warn",
|
|
496
|
+
"@convex-dev/require-args-validator": "warn"
|
|
498
497
|
};
|
|
499
498
|
|
|
500
499
|
// src/eslint/convex/config.ts
|
|
501
500
|
var require2 = createRequire(import.meta.url);
|
|
502
501
|
var convexPlugin = require2("@convex-dev/eslint-plugin");
|
|
503
|
-
var convexConfig = (customRules) => ({
|
|
502
|
+
var convexConfig = (customRules, unicorn2) => ({
|
|
504
503
|
files: ["**/convex/**/*.{ts,js}"],
|
|
505
504
|
name: configNames.convex,
|
|
506
505
|
plugins: {
|
|
@@ -508,7 +507,16 @@ var convexConfig = (customRules) => ({
|
|
|
508
507
|
},
|
|
509
508
|
rules: {
|
|
510
509
|
...convexRules,
|
|
511
|
-
...customRules ?? {}
|
|
510
|
+
...customRules ?? {},
|
|
511
|
+
// Convex files must be camelCase
|
|
512
|
+
...unicorn2 ? {
|
|
513
|
+
"unicorn/filename-case": [
|
|
514
|
+
"warn",
|
|
515
|
+
{
|
|
516
|
+
case: "camelCase"
|
|
517
|
+
}
|
|
518
|
+
]
|
|
519
|
+
} : {}
|
|
512
520
|
}
|
|
513
521
|
});
|
|
514
522
|
|
|
@@ -1703,7 +1711,9 @@ var eslintConfig = ({
|
|
|
1703
1711
|
configs.push(queryConfig(categorizedRules[configNames.query]));
|
|
1704
1712
|
}
|
|
1705
1713
|
if (convex) {
|
|
1706
|
-
configs.push(
|
|
1714
|
+
configs.push(
|
|
1715
|
+
convexConfig(categorizedRules[configNames.convex], Boolean(unicorn2))
|
|
1716
|
+
);
|
|
1707
1717
|
}
|
|
1708
1718
|
if (testing !== false) {
|
|
1709
1719
|
const defaultTestingConfig = {
|