@vinicunca/eslint-config 2.7.0-beta.1 → 2.7.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 +16 -15
- package/dist/index.d.cts +250 -886
- package/dist/index.d.ts +250 -886
- package/dist/index.js +16 -14
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// ../node_modules/.pnpm/@vinicunca+perkakas@1.0.
|
|
1
|
+
// ../node_modules/.pnpm/@vinicunca+perkakas@1.0.3/node_modules/@vinicunca/perkakas/dist/chunk-HLL46USD.js
|
|
2
2
|
function r(e2) {
|
|
3
3
|
if (typeof e2 != "object" || e2 === null) return false;
|
|
4
4
|
let o = Object.getPrototypeOf(e2);
|
|
5
5
|
return o === null || o === Object.prototype;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
// ../node_modules/.pnpm/@vinicunca+perkakas@1.0.
|
|
8
|
+
// ../node_modules/.pnpm/@vinicunca+perkakas@1.0.3/node_modules/@vinicunca/perkakas/dist/chunk-AZUJCNUP.js
|
|
9
9
|
function e(o) {
|
|
10
10
|
return typeof o == "boolean";
|
|
11
11
|
}
|
|
@@ -183,9 +183,6 @@ var parserPlain = {
|
|
|
183
183
|
}
|
|
184
184
|
})
|
|
185
185
|
};
|
|
186
|
-
function toArray(value) {
|
|
187
|
-
return Array.isArray(value) ? value : [value];
|
|
188
|
-
}
|
|
189
186
|
|
|
190
187
|
// src/configs/stylistic.ts
|
|
191
188
|
var STR_PARENS_NEW_LINE = "parens-new-line";
|
|
@@ -1035,18 +1032,21 @@ async function react(options = {}) {
|
|
|
1035
1032
|
} = options;
|
|
1036
1033
|
const [
|
|
1037
1034
|
pluginReact,
|
|
1038
|
-
pluginReactHooks
|
|
1035
|
+
pluginReactHooks,
|
|
1036
|
+
parserTs
|
|
1039
1037
|
] = await Promise.all([
|
|
1038
|
+
interopDefault(import("@eslint-react/eslint-plugin")),
|
|
1040
1039
|
// @ts-expect-error missing types
|
|
1041
|
-
interopDefault(import("eslint-plugin-react")),
|
|
1042
|
-
|
|
1043
|
-
interopDefault(import("eslint-plugin-react-hooks"))
|
|
1040
|
+
interopDefault(import("eslint-plugin-react-hooks")),
|
|
1041
|
+
interopDefault(import("@typescript-eslint/parser"))
|
|
1044
1042
|
]);
|
|
1043
|
+
const plugins = pluginReact.configs.all.plugins;
|
|
1045
1044
|
return [
|
|
1046
1045
|
{
|
|
1047
1046
|
name: "vinicunca/react/setup",
|
|
1048
1047
|
plugins: {
|
|
1049
|
-
"react":
|
|
1048
|
+
"react": plugins["@eslint-react"],
|
|
1049
|
+
"react-dom": plugins["@eslint-react/dom"],
|
|
1050
1050
|
"react-hooks": pluginReactHooks
|
|
1051
1051
|
},
|
|
1052
1052
|
settings: {
|
|
@@ -1058,11 +1058,13 @@ async function react(options = {}) {
|
|
|
1058
1058
|
{
|
|
1059
1059
|
files,
|
|
1060
1060
|
languageOptions: {
|
|
1061
|
+
parser: parserTs,
|
|
1061
1062
|
parserOptions: {
|
|
1062
1063
|
ecmaFeatures: {
|
|
1063
1064
|
jsx: true
|
|
1064
1065
|
}
|
|
1065
|
-
}
|
|
1066
|
+
},
|
|
1067
|
+
sourceType: "module"
|
|
1066
1068
|
},
|
|
1067
1069
|
name: "vinicunca/react/rules",
|
|
1068
1070
|
rules: {
|
|
@@ -1435,7 +1437,7 @@ async function typescript(options = {}) {
|
|
|
1435
1437
|
const ignoresTypeAware = options.ignoresTypeAware ?? [
|
|
1436
1438
|
`${GLOB_MARKDOWN}/**`
|
|
1437
1439
|
];
|
|
1438
|
-
const tsconfigPath = options?.tsconfigPath ?
|
|
1440
|
+
const tsconfigPath = options?.tsconfigPath ? options.tsconfigPath : void 0;
|
|
1439
1441
|
const isTypeAware = !!tsconfigPath;
|
|
1440
1442
|
const typeAwareRules = {
|
|
1441
1443
|
"dot-notation": OFF,
|
|
@@ -1526,7 +1528,7 @@ async function typescript(options = {}) {
|
|
|
1526
1528
|
"no-use-before-define": OFF,
|
|
1527
1529
|
"no-useless-constructor": OFF,
|
|
1528
1530
|
"ts/array-type": [ERROR, { default: "generic" }],
|
|
1529
|
-
"ts/ban-ts-comment": [
|
|
1531
|
+
"ts/ban-ts-comment": ["error", { "ts-expect-error": "allow-with-description" }],
|
|
1530
1532
|
"ts/consistent-type-definitions": [ERROR, "interface"],
|
|
1531
1533
|
"ts/consistent-type-imports": [ERROR, { disallowTypeAnnotations: false, prefer: "type-imports" }],
|
|
1532
1534
|
"ts/explicit-function-return-type": OFF,
|
|
@@ -1538,6 +1540,7 @@ async function typescript(options = {}) {
|
|
|
1538
1540
|
"ts/no-dupe-class-members": ERROR,
|
|
1539
1541
|
"ts/no-empty-function": OFF,
|
|
1540
1542
|
"ts/no-empty-interface": OFF,
|
|
1543
|
+
"ts/no-empty-object-type": ["error", { allowInterfaces: "always" }],
|
|
1541
1544
|
"ts/no-explicit-any": OFF,
|
|
1542
1545
|
"ts/no-import-type-side-effects": ERROR,
|
|
1543
1546
|
"ts/no-invalid-this": ERROR,
|
|
@@ -2116,7 +2119,6 @@ export {
|
|
|
2116
2119
|
sortTsconfig,
|
|
2117
2120
|
stylistic,
|
|
2118
2121
|
test,
|
|
2119
|
-
toArray,
|
|
2120
2122
|
typescript,
|
|
2121
2123
|
unicorn,
|
|
2122
2124
|
unocss,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vinicunca/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.7.
|
|
4
|
+
"version": "2.7.1",
|
|
5
5
|
"description": "Vinicunca ESLint config",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "praburangki",
|
|
@@ -58,24 +58,24 @@
|
|
|
58
58
|
"eslint": ">=8.57.0"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
+
"@eslint-react/eslint-plugin": "^1.5.26",
|
|
61
62
|
"@stylistic/eslint-plugin": "^2.6.0-beta.0",
|
|
62
|
-
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.
|
|
63
|
-
"@typescript-eslint/parser": "8.0.0-alpha.
|
|
64
|
-
"@unocss/eslint-plugin": "^0.61.
|
|
65
|
-
"eslint-config-flat-gitignore": "^0.1.
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.40",
|
|
64
|
+
"@typescript-eslint/parser": "8.0.0-alpha.40",
|
|
65
|
+
"@unocss/eslint-plugin": "^0.61.3",
|
|
66
|
+
"eslint-config-flat-gitignore": "^0.1.7",
|
|
66
67
|
"eslint-flat-config-utils": "^0.2.5",
|
|
67
68
|
"eslint-merge-processors": "^0.1.0",
|
|
68
69
|
"eslint-plugin-antfu": "^2.3.4",
|
|
69
70
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
70
71
|
"eslint-plugin-format": "^0.1.2",
|
|
71
|
-
"eslint-plugin-import-x": "^0.
|
|
72
|
-
"eslint-plugin-jsdoc": "^48.
|
|
72
|
+
"eslint-plugin-import-x": "^3.0.1",
|
|
73
|
+
"eslint-plugin-jsdoc": "^48.7.0",
|
|
73
74
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
74
|
-
"eslint-plugin-markdown": "^5.
|
|
75
|
+
"eslint-plugin-markdown": "^5.1.0",
|
|
75
76
|
"eslint-plugin-n": "^17.9.0",
|
|
76
77
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
77
78
|
"eslint-plugin-perfectionist": "^2.11.0",
|
|
78
|
-
"eslint-plugin-react": "^7.34.3",
|
|
79
79
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
80
80
|
"eslint-plugin-regexp": "^2.6.0",
|
|
81
81
|
"eslint-plugin-sonarjs": "^1.0.3",
|