@freehour/eslint-rules 1.0.6 → 1.0.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../lib/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAW5C,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAsB,YAAY,CAAC,EAC/B,IAAY,EACZ,OAAe,EACf,KAAa,EACb,WAAmB,EACnB,SAAiB,EACjB,OAAe,GAClB,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CA8oCtC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../lib/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAY5C,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAsB,YAAY,CAAC,EAC/B,IAAY,EACZ,OAAe,EACf,KAAa,EACb,WAAmB,EACnB,SAAiB,EACjB,OAAe,GAClB,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CA8oCtC"}
package/dist/index.js CHANGED
@@ -7,26 +7,27 @@ import a from "eslint-plugin-react-refresh";
7
7
  import o from "@stylistic/eslint-plugin";
8
8
  import s from "eslint-plugin-import-x";
9
9
  import c from "eslint-plugin-tailwindcss";
10
+ import l from "eslint-plugin-simple-import-sort";
10
11
  //#region lib/config.ts
11
- async function l({ node: l = !1, browser: u = !1, react: d = !1, tailwindcss: f = !1, stylistic: p = !1, imports: m = !1 } = {}) {
12
+ async function u({ node: u = !1, browser: d = !1, react: f = !1, tailwindcss: p = !1, stylistic: m = !1, imports: h = !1 } = {}) {
12
13
  return {
13
14
  languageOptions: {
14
15
  ecmaVersion: "latest",
15
16
  sourceType: "module",
16
17
  parserOptions: {
17
18
  projectService: !0,
18
- ...d && { ecmaFeatures: { jsx: !0 } }
19
+ ...f && { ecmaFeatures: { jsx: !0 } }
19
20
  },
20
21
  parser: n.parser,
21
22
  globals: {
22
- ...u && t.browser,
23
- ...l && t.nodeBuiltin
23
+ ...d && t.browser,
24
+ ...u && t.nodeBuiltin
24
25
  }
25
26
  },
26
27
  settings: {
27
- ...m && { "import-x/resolver-next": [e({ alwaysTryTypes: !0 })] },
28
- ...d && { react: { version: "detect" } },
29
- ...f && { tailwindcss: { callees: [
28
+ ...h && { "import-x/resolver-next": [e({ alwaysTryTypes: !0 })] },
29
+ ...f && { react: { version: "detect" } },
30
+ ...p && { tailwindcss: { callees: [
30
31
  "tw",
31
32
  "clsx",
32
33
  "cn",
@@ -38,14 +39,17 @@ async function l({ node: l = !1, browser: u = !1, react: d = !1, tailwindcss: f
38
39
  },
39
40
  plugins: {
40
41
  "@typescript-eslint": n.plugin,
41
- ...d && {
42
+ ...f && {
42
43
  react: r,
43
44
  "react-hooks": i,
44
45
  "react-refresh": a
45
46
  },
46
- ...p && { "@stylistic": o },
47
- ...m && { "import-x": s },
48
- ...f && { tailwindcss: c }
47
+ ...m && { "@stylistic": o },
48
+ ...h && {
49
+ "import-x": s,
50
+ "simple-import-sort": l
51
+ },
52
+ ...p && { tailwindcss: c }
49
53
  },
50
54
  rules: {
51
55
  "array-callback-return": "error",
@@ -416,7 +420,7 @@ async function l({ node: l = !1, browser: u = !1, react: d = !1, tailwindcss: f
416
420
  "@typescript-eslint/unbound-method": ["error", { ignoreStatic: !0 }],
417
421
  "@typescript-eslint/unified-signatures": "warn",
418
422
  "@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
419
- ...p && {
423
+ ...m && {
420
424
  "@stylistic/array-bracket-newline": "warn",
421
425
  "@stylistic/array-bracket-spacing": "warn",
422
426
  "@stylistic/array-element-newline": ["warn", "consistent"],
@@ -577,7 +581,7 @@ async function l({ node: l = !1, browser: u = !1, react: d = !1, tailwindcss: f
577
581
  "@stylistic/wrap-regex": "off",
578
582
  "@stylistic/yield-star-spacing": "off"
579
583
  },
580
- ...m && {
584
+ ...h && {
581
585
  "no-duplicate-imports": "off",
582
586
  "import-x/export": "error",
583
587
  "import-x/no-deprecated": "warn",
@@ -591,7 +595,7 @@ async function l({ node: l = !1, browser: u = !1, react: d = !1, tailwindcss: f
591
595
  "import-x/no-amd": "error",
592
596
  "import-x/no-commonjs": "error",
593
597
  "import-x/no-import-module-exports": "error",
594
- "import-x/no-nodejs-modules": u && !l ? "error" : "off",
598
+ "import-x/no-nodejs-modules": d && !u ? "error" : "off",
595
599
  "import-x/unambiguous": "error",
596
600
  "import-x/default": "error",
597
601
  "import-x/named": "off",
@@ -632,8 +636,8 @@ async function l({ node: l = !1, browser: u = !1, react: d = !1, tailwindcss: f
632
636
  "import-x/prefer-default-export": "off",
633
637
  "import-x/prefer-namespace-import": "off"
634
638
  },
635
- ...d && {
636
- ...p && {
639
+ ...f && {
640
+ ...m && {
637
641
  "@stylistic/jsx-child-element-spacing": "off",
638
642
  "@stylistic/jsx-closing-bracket-location": "off",
639
643
  "@stylistic/jsx-closing-tag-location": "off",
@@ -794,7 +798,7 @@ async function l({ node: l = !1, browser: u = !1, react: d = !1, tailwindcss: f
794
798
  "react-hooks/incompatible-library": "warn",
795
799
  "react-refresh/only-export-components": ["warn", { allowConstantExport: !0 }]
796
800
  },
797
- ...f && {
801
+ ...p && {
798
802
  "tailwindcss/classnames-order": "warn",
799
803
  "tailwindcss/enforces-negative-arbitrary-values": "warn",
800
804
  "tailwindcss/enforces-shorthand": "warn",
@@ -804,7 +808,7 @@ async function l({ node: l = !1, browser: u = !1, react: d = !1, tailwindcss: f
804
808
  "tailwindcss/no-contradicting-classname": "off",
805
809
  "tailwindcss/no-unnecessary-arbitrary-value": "warn"
806
810
  },
807
- ...m && { "simple-import-sort/imports": ["warn", { groups: [
811
+ ...h && { "simple-import-sort/imports": ["warn", { groups: [
808
812
  ["^\\u0000"],
809
813
  ["^\\w"],
810
814
  ["^@\\w"],
@@ -821,4 +825,4 @@ async function l({ node: l = !1, browser: u = !1, react: d = !1, tailwindcss: f
821
825
  };
822
826
  }
823
827
  //#endregion
824
- export { l as createConfig };
828
+ export { u as createConfig };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "displayName": "eslint-rules",
5
5
  "description": "ESLint rules for TypeScript projects.",
6
- "version": "1.0.6",
6
+ "version": "1.0.8",
7
7
  "type": "module",
8
8
  "repository": {
9
9
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "eslint-plugin-react": "7.37.5",
29
29
  "eslint-plugin-react-hooks": "7.0.1",
30
30
  "eslint-plugin-react-refresh": "0.5.2",
31
- "eslint-plugin-simple-import-sort": "^12.1.1",
31
+ "eslint-plugin-simple-import-sort": "12.1.1",
32
32
  "eslint-plugin-tailwindcss": "4.0.0-beta.0",
33
33
  "typescript-eslint": "8.57.2"
34
34
  },