@debbl/eslint-config 3.2.4 → 3.3.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/dist/index.cjs +13 -2
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +13 -2
- package/package.json +2 -1
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 = []
|
|
@@ -1643,6 +1653,7 @@ function config(options = {}) {
|
|
|
1643
1653
|
configs.push(
|
|
1644
1654
|
typescript({
|
|
1645
1655
|
...typeof enableTypeScript !== "boolean" ? enableTypeScript : {},
|
|
1656
|
+
enableSolid,
|
|
1646
1657
|
componentExts
|
|
1647
1658
|
})
|
|
1648
1659
|
);
|
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
|
|
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
|
|
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 = []
|
|
@@ -1561,6 +1571,7 @@ function config(options = {}) {
|
|
|
1561
1571
|
configs.push(
|
|
1562
1572
|
typescript({
|
|
1563
1573
|
...typeof enableTypeScript !== "boolean" ? enableTypeScript : {},
|
|
1574
|
+
enableSolid,
|
|
1564
1575
|
componentExts
|
|
1565
1576
|
})
|
|
1566
1577
|
);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@debbl/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.3.0",
|
|
5
5
|
"description": "Brendan Dash's ESLint config",
|
|
6
6
|
"author": "Debbl <me@aiwan.run> (https://github.com/Debbl/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -45,6 +45,7 @@
|
|
|
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-solid": "^0.14.0",
|
|
48
49
|
"eslint-plugin-tailwindcss": "^3.17.0",
|
|
49
50
|
"eslint-plugin-toml": "^0.11.0",
|
|
50
51
|
"eslint-plugin-unicorn": "^53.0.0",
|