@debbl/eslint-config 3.2.4 → 3.3.1

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.cjs CHANGED
@@ -946,6 +946,7 @@ var typeAwareRules = {
946
946
  "@typescript-eslint/no-unsafe-return": "error",
947
947
  "@typescript-eslint/restrict-plus-operands": "error",
948
948
  "@typescript-eslint/restrict-template-expressions": "error",
949
+ "@typescript-eslint/strict-boolean-expressions": "error",
949
950
  "@typescript-eslint/unbound-method": "error"
950
951
  };
951
952
  var typescript = async (options) => {
@@ -953,7 +954,8 @@ var typescript = async (options) => {
953
954
  overrides = {},
954
955
  componentExts = [],
955
956
  parserOptions = {},
956
- tsconfigPath
957
+ tsconfigPath,
958
+ enableSolid = false
957
959
  } = options ?? {};
958
960
  const [pluginTs, parserTs] = await Promise.all([
959
961
  interopDefault(import("@typescript-eslint/eslint-plugin")),
@@ -964,7 +966,10 @@ var typescript = async (options) => {
964
966
  // Install the plugins without globs, so they can be configured separately.
965
967
  name: "eslint/typescript/setup",
966
968
  plugins: {
967
- "@typescript-eslint": pluginTs
969
+ "@typescript-eslint": pluginTs,
970
+ ...enableSolid ? {
971
+ solid: await interopDefault(import("eslint-plugin-solid"))
972
+ } : {}
968
973
  }
969
974
  },
970
975
  {
@@ -985,6 +990,10 @@ var typescript = async (options) => {
985
990
  rules: {
986
991
  ...pluginTs.configs["eslint-recommended"].overrides[0].rules,
987
992
  ...pluginTs.configs.strict.rules,
993
+ ...enableSolid ? {
994
+ "solid/jsx-no-undef": ["error", { typescriptEnabled: true }],
995
+ "solid/no-unknown-namespaces": "off"
996
+ } : {},
988
997
  "no-dupe-class-members": "off",
989
998
  "no-invalid-this": "off",
990
999
  "no-loss-of-precision": "off",
@@ -1622,6 +1631,7 @@ function config(options = {}) {
1622
1631
  ignores: enableGitignore = true,
1623
1632
  vue: enableVue,
1624
1633
  react: enableReact,
1634
+ solid: enableSolid,
1625
1635
  typescript: enableTypeScript,
1626
1636
  tailwindcss: enableTailwindcss,
1627
1637
  componentExts = []
@@ -1637,12 +1647,12 @@ function config(options = {}) {
1637
1647
  unicorn(),
1638
1648
  perfectionist()
1639
1649
  );
1640
- if (enableVue)
1641
- componentExts.push("vue");
1650
+ if (enableVue) componentExts.push("vue");
1642
1651
  if (enableTypeScript) {
1643
1652
  configs.push(
1644
1653
  typescript({
1645
1654
  ...typeof enableTypeScript !== "boolean" ? enableTypeScript : {},
1655
+ enableSolid,
1646
1656
  componentExts
1647
1657
  })
1648
1658
  );
package/dist/index.d.cts CHANGED
@@ -47,7 +47,9 @@ declare function sortPackageJson(): Promise<ConfigItem[]>;
47
47
  */
48
48
  declare function sortTsconfig(): Promise<ConfigItem[]>;
49
49
 
50
- type TypeScriptConfig = (options?: OptionsComponentExts & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & OptionsOverrides) => ReturnType<ConfigFn>;
50
+ type TypeScriptConfig = (options?: OptionsComponentExts & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & OptionsOverrides & {
51
+ enableSolid?: boolean;
52
+ }) => ReturnType<ConfigFn>;
51
53
  declare const typescript: TypeScriptConfig;
52
54
 
53
55
  declare function unicorn(): Promise<ConfigItem[]>;
@@ -155,6 +157,12 @@ interface OptionsConfig extends OptionsComponentExts {
155
157
  * @default false
156
158
  */
157
159
  react?: boolean | GetConfigOption<ReactConfig>;
160
+ /**
161
+ * Enable solid support, Passing an object to enable Next.js support.
162
+ *
163
+ * @default false
164
+ */
165
+ solid?: boolean;
158
166
  /**
159
167
  * Enable JSONC support.
160
168
  *
package/dist/index.d.ts CHANGED
@@ -47,7 +47,9 @@ declare function sortPackageJson(): Promise<ConfigItem[]>;
47
47
  */
48
48
  declare function sortTsconfig(): Promise<ConfigItem[]>;
49
49
 
50
- type TypeScriptConfig = (options?: OptionsComponentExts & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & OptionsOverrides) => ReturnType<ConfigFn>;
50
+ type TypeScriptConfig = (options?: OptionsComponentExts & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & OptionsOverrides & {
51
+ enableSolid?: boolean;
52
+ }) => ReturnType<ConfigFn>;
51
53
  declare const typescript: TypeScriptConfig;
52
54
 
53
55
  declare function unicorn(): Promise<ConfigItem[]>;
@@ -155,6 +157,12 @@ interface OptionsConfig extends OptionsComponentExts {
155
157
  * @default false
156
158
  */
157
159
  react?: boolean | GetConfigOption<ReactConfig>;
160
+ /**
161
+ * Enable solid support, Passing an object to enable Next.js support.
162
+ *
163
+ * @default false
164
+ */
165
+ solid?: boolean;
158
166
  /**
159
167
  * Enable JSONC support.
160
168
  *
package/dist/index.js CHANGED
@@ -864,6 +864,7 @@ var typeAwareRules = {
864
864
  "@typescript-eslint/no-unsafe-return": "error",
865
865
  "@typescript-eslint/restrict-plus-operands": "error",
866
866
  "@typescript-eslint/restrict-template-expressions": "error",
867
+ "@typescript-eslint/strict-boolean-expressions": "error",
867
868
  "@typescript-eslint/unbound-method": "error"
868
869
  };
869
870
  var typescript = async (options) => {
@@ -871,7 +872,8 @@ var typescript = async (options) => {
871
872
  overrides = {},
872
873
  componentExts = [],
873
874
  parserOptions = {},
874
- tsconfigPath
875
+ tsconfigPath,
876
+ enableSolid = false
875
877
  } = options ?? {};
876
878
  const [pluginTs, parserTs] = await Promise.all([
877
879
  interopDefault(import("@typescript-eslint/eslint-plugin")),
@@ -882,7 +884,10 @@ var typescript = async (options) => {
882
884
  // Install the plugins without globs, so they can be configured separately.
883
885
  name: "eslint/typescript/setup",
884
886
  plugins: {
885
- "@typescript-eslint": pluginTs
887
+ "@typescript-eslint": pluginTs,
888
+ ...enableSolid ? {
889
+ solid: await interopDefault(import("eslint-plugin-solid"))
890
+ } : {}
886
891
  }
887
892
  },
888
893
  {
@@ -903,6 +908,10 @@ var typescript = async (options) => {
903
908
  rules: {
904
909
  ...pluginTs.configs["eslint-recommended"].overrides[0].rules,
905
910
  ...pluginTs.configs.strict.rules,
911
+ ...enableSolid ? {
912
+ "solid/jsx-no-undef": ["error", { typescriptEnabled: true }],
913
+ "solid/no-unknown-namespaces": "off"
914
+ } : {},
906
915
  "no-dupe-class-members": "off",
907
916
  "no-invalid-this": "off",
908
917
  "no-loss-of-precision": "off",
@@ -1540,6 +1549,7 @@ function config(options = {}) {
1540
1549
  ignores: enableGitignore = true,
1541
1550
  vue: enableVue,
1542
1551
  react: enableReact,
1552
+ solid: enableSolid,
1543
1553
  typescript: enableTypeScript,
1544
1554
  tailwindcss: enableTailwindcss,
1545
1555
  componentExts = []
@@ -1555,12 +1565,12 @@ function config(options = {}) {
1555
1565
  unicorn(),
1556
1566
  perfectionist()
1557
1567
  );
1558
- if (enableVue)
1559
- componentExts.push("vue");
1568
+ if (enableVue) componentExts.push("vue");
1560
1569
  if (enableTypeScript) {
1561
1570
  configs.push(
1562
1571
  typescript({
1563
1572
  ...typeof enableTypeScript !== "boolean" ? enableTypeScript : {},
1573
+ enableSolid,
1564
1574
  componentExts
1565
1575
  })
1566
1576
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@debbl/eslint-config",
3
3
  "type": "module",
4
- "version": "3.2.4",
4
+ "version": "3.3.1",
5
5
  "description": "Brendan Dash's ESLint config",
6
6
  "author": "Debbl <me@aiwan.run> (https://github.com/Debbl/)",
7
7
  "license": "MIT",
@@ -26,53 +26,54 @@
26
26
  "eslint": ">=8.40.0"
27
27
  },
28
28
  "dependencies": {
29
- "@next/eslint-plugin-next": "^14.2.3",
30
- "@typescript-eslint/eslint-plugin": "^7.11.0",
31
- "@typescript-eslint/parser": "^7.11.0",
29
+ "@next/eslint-plugin-next": "^14.2.4",
30
+ "@typescript-eslint/eslint-plugin": "^7.13.0",
31
+ "@typescript-eslint/parser": "^7.13.0",
32
32
  "eslint-config-prettier": "^9.1.0",
33
33
  "eslint-mdx": "^3.1.5",
34
34
  "eslint-plugin-eslint-comments": "^3.2.0",
35
35
  "eslint-plugin-import-x": "^0.5.1",
36
- "eslint-plugin-jsdoc": "^48.2.6",
36
+ "eslint-plugin-jsdoc": "^48.2.12",
37
37
  "eslint-plugin-jsonc": "^2.16.0",
38
38
  "eslint-plugin-markdown": "^5.0.0",
39
39
  "eslint-plugin-mdx": "^3.1.5",
40
- "eslint-plugin-n": "^17.7.0",
40
+ "eslint-plugin-n": "^17.9.0",
41
41
  "eslint-plugin-no-only-tests": "^3.1.0",
42
- "eslint-plugin-perfectionist": "^2.10.0",
42
+ "eslint-plugin-perfectionist": "^2.11.0",
43
43
  "eslint-plugin-prettier": "^5.1.3",
44
44
  "eslint-plugin-react": "^7.34.2",
45
45
  "eslint-plugin-react-compiler": "0.0.0-experimental-a97cca1-20240529",
46
46
  "eslint-plugin-react-hooks": "4.6.2",
47
47
  "eslint-plugin-react-refresh": "^0.4.7",
48
- "eslint-plugin-tailwindcss": "^3.17.0",
48
+ "eslint-plugin-solid": "^0.14.0",
49
+ "eslint-plugin-tailwindcss": "^3.17.3",
49
50
  "eslint-plugin-toml": "^0.11.0",
50
- "eslint-plugin-unicorn": "^53.0.0",
51
- "eslint-plugin-unused-imports": "^4.0.0",
51
+ "eslint-plugin-unicorn": "^54.0.0",
52
+ "eslint-plugin-unused-imports": "^3.2.0",
52
53
  "eslint-plugin-vitest": "^0.5.4",
53
54
  "eslint-plugin-vue": "^9.26.0",
54
55
  "eslint-plugin-yml": "^1.14.0",
55
- "globals": "^15.3.0",
56
+ "globals": "^15.4.0",
56
57
  "jsonc-eslint-parser": "^2.4.0",
57
- "prettier": "^3.2.5",
58
- "prettier-plugin-tailwindcss": "^0.5.14",
58
+ "prettier": "^3.3.2",
59
+ "prettier-plugin-tailwindcss": "^0.6.4",
59
60
  "toml-eslint-parser": "^0.9.3",
60
- "vue-eslint-parser": "^9.4.2",
61
+ "vue-eslint-parser": "^9.4.3",
61
62
  "yaml-eslint-parser": "^1.2.3"
62
63
  },
63
64
  "devDependencies": {
64
- "@eslint/config-inspector": "^0.4.8",
65
+ "@eslint/config-inspector": "^0.4.11",
65
66
  "@types/eslint": "^8.56.10",
66
- "@types/node": "^20.12.12",
67
+ "@types/node": "^20.14.2",
67
68
  "@types/react": "^18.3.3",
68
69
  "bumpp": "^9.4.1",
69
- "eslint": "^8.57.0",
70
- "execa": "^9.1.0",
70
+ "eslint": "8.57.0",
71
+ "execa": "^9.2.0",
71
72
  "fast-glob": "^3.3.2",
72
73
  "fs-extra": "^11.2.0",
73
74
  "react": "^18.3.1",
74
75
  "sucrase": "^3.35.0",
75
- "tsup": "^8.0.2",
76
+ "tsup": "^8.1.0",
76
77
  "typescript": "^5.4.5",
77
78
  "vitest": "^1.6.0"
78
79
  },