@zayne-labs/eslint-config 0.2.8 → 0.2.11

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/index.js CHANGED
@@ -482,6 +482,7 @@ var tailwindcss = async (options = {}) => {
482
482
  settings: {
483
483
  tailwindcss: {
484
484
  callees: ["tv", "cnMerge", "cn", "cnJoin", "twMerge", "twJoin"],
485
+ classRegex: "^class(Name|Names)?$",
485
486
  cssFiles: [],
486
487
  removeDuplicates: false,
487
488
  // Turned off cuz prettier already handles this via plugin
@@ -623,7 +624,11 @@ var unicorn = async (options = {}) => {
623
624
  }
624
625
  }
625
626
  ],
626
- ...type === "lib" ? { "unicorn/prefer-global-this": "warn" } : { "unicorn/prefer-global-this": "off" },
627
+ ...type === "app" ? {
628
+ "unicorn/prefer-global-this": "off"
629
+ } : {
630
+ "unicorn/prefer-global-this": "warn"
631
+ },
627
632
  "unicorn/new-for-builtins": "off",
628
633
  "unicorn/no-array-for-each": "off",
629
634
  "unicorn/no-array-reduce": "off",
@@ -948,7 +953,7 @@ var jsdoc = async (options = {}) => {
948
953
  "jsdoc/implements-on-classes": "warn",
949
954
  "jsdoc/no-defaults": "warn",
950
955
  "jsdoc/no-multi-asterisks": "warn",
951
- "jsdoc/require-description": "warn",
956
+ "jsdoc/require-description": ["warn", { descriptionStyle: "any" }],
952
957
  "jsdoc/require-param-name": "warn",
953
958
  "jsdoc/require-property": "warn",
954
959
  "jsdoc/require-property-description": "warn",
@@ -958,7 +963,8 @@ var jsdoc = async (options = {}) => {
958
963
  "jsdoc/require-yields-check": "warn",
959
964
  ...stylistic2 && {
960
965
  "jsdoc/check-alignment": "warn",
961
- "jsdoc/multiline-blocks": "warn"
966
+ "jsdoc/multiline-blocks": "warn",
967
+ "jsdoc/require-description": ["warn", { descriptionStyle: "tag" }]
962
968
  },
963
969
  ...overrides
964
970
  }
@@ -973,8 +979,8 @@ var defaultPluginRenameMap = {
973
979
  "@eslint-react/hooks-extra": "react-hooks-extra",
974
980
  "@eslint-react/naming-convention": "react-naming-convention",
975
981
  "@eslint-react/web-api": "react-web-api",
982
+ /* eslint-disable perfectionist/sort-objects */
976
983
  // @eslint-react has to be below the rest to avoid rename issues
977
- // eslint-disable-next-line perfectionist/sort-objects
978
984
  "@eslint-react": "react",
979
985
  "@next/next": "nextjs-next",
980
986
  "@stylistic": "stylistic",
@@ -1024,29 +1030,16 @@ var react = async (options = {}) => {
1024
1030
  files,
1025
1031
  name: "zayne/react/rules",
1026
1032
  rules: {
1027
- "react/avoid-shorthand-boolean": "error",
1028
- "react/function-component-definition": "off",
1029
- "react/no-array-index-key": "error",
1030
- "react/no-children-count": "off",
1031
- "react/no-children-only": "off",
1032
- "react/no-children-prop": "error",
1033
- "react/no-clone-element": "off",
1034
- "react/no-complex-conditional-rendering": "warn",
1035
- "react/no-missing-component-display-name": "error",
1036
- "react/no-useless-fragment": "error",
1037
- "react/prefer-destructuring-assignment": "error",
1038
- "react/prefer-shorthand-fragment": "error",
1039
- // eslint-disable-next-line perfectionist/sort-objects
1033
+ // Hook rules
1040
1034
  "react-hooks-extra/ensure-custom-hooks-using-other-hooks": "error",
1041
1035
  "react-hooks-extra/no-unnecessary-use-callback": "warn",
1042
1036
  "react-hooks-extra/no-unnecessary-use-memo": "warn",
1043
1037
  "react-hooks-extra/prefer-use-state-lazy-initialization": "error",
1044
- "react-naming-convention/component-name": "warn",
1045
- "react-naming-convention/use-state": "warn",
1046
- // Hook rules
1047
- // eslint-disable-next-line perfectionist/sort-objects
1048
1038
  "react-hooks/exhaustive-deps": "warn",
1049
1039
  "react-hooks/rules-of-hooks": "error",
1040
+ // Naming convention rules
1041
+ "react-naming-convention/component-name": "warn",
1042
+ "react-naming-convention/use-state": "warn",
1050
1043
  // React refresh rules
1051
1044
  "react-refresh/only-export-components": [
1052
1045
  "warn",
@@ -1072,6 +1065,19 @@ var react = async (options = {}) => {
1072
1065
  ]
1073
1066
  }
1074
1067
  ],
1068
+ // Regular React rules
1069
+ "react/avoid-shorthand-boolean": "error",
1070
+ "react/function-component-definition": "off",
1071
+ "react/no-array-index-key": "error",
1072
+ "react/no-children-count": "off",
1073
+ "react/no-children-only": "off",
1074
+ "react/no-children-prop": "error",
1075
+ "react/no-clone-element": "off",
1076
+ "react/no-complex-conditional-rendering": "warn",
1077
+ "react/no-missing-component-display-name": "error",
1078
+ "react/no-useless-fragment": "error",
1079
+ "react/prefer-destructuring-assignment": "error",
1080
+ "react/prefer-shorthand-fragment": "error",
1075
1081
  ...overrides
1076
1082
  }
1077
1083
  }
@@ -1341,7 +1347,7 @@ var sortTsconfig = () => [
1341
1347
 
1342
1348
  // src/configs/node.ts
1343
1349
  var node = async (options = {}) => {
1344
- const { overrides, security = false, type } = options;
1350
+ const { overrides, security = false, type = "app" } = options;
1345
1351
  const eslintPluginNode = await interopDefault(import('eslint-plugin-n'));
1346
1352
  const eslintPluginSecurity = await interopDefault(import('eslint-plugin-security'));
1347
1353
  return [
@@ -1370,7 +1376,10 @@ var node = async (options = {}) => {
1370
1376
  "node/no-path-concat": "error",
1371
1377
  "node/no-unpublished-import": "off",
1372
1378
  "node/process-exit-as-throw": "error",
1373
- ...type === "app" && {
1379
+ ...type === "lib-strict" ? {
1380
+ "node/no-unsupported-features/es-syntax": "error",
1381
+ "node/no-unsupported-features/node-builtins": "error"
1382
+ } : {
1374
1383
  "node/no-unsupported-features/es-syntax": "off",
1375
1384
  "node/no-unsupported-features/node-builtins": "off"
1376
1385
  },