@eslint-react/eslint-plugin 1.8.0-beta.1 → 1.8.0-beta.3
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/README.md +24 -24
- package/dist/index.d.mts +555 -16
- package/dist/index.d.ts +555 -16
- package/dist/index.js +16 -14
- package/dist/index.mjs +13 -14
- package/package.json +10 -13
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var shared = require('@eslint-react/shared');
|
|
4
6
|
var reactDebug = require('eslint-plugin-react-debug');
|
|
5
7
|
var reactDom = require('eslint-plugin-react-dom');
|
|
@@ -38,7 +40,7 @@ var R__namespace = /*#__PURE__*/_interopNamespace(R);
|
|
|
38
40
|
|
|
39
41
|
// package.json
|
|
40
42
|
var name = "@eslint-react/eslint-plugin";
|
|
41
|
-
var version = "1.8.0-beta.
|
|
43
|
+
var version = "1.8.0-beta.3";
|
|
42
44
|
function transformKeys(obj, transform) {
|
|
43
45
|
if (tools.typeOf(obj) !== "object") return obj;
|
|
44
46
|
const res = {};
|
|
@@ -232,8 +234,7 @@ var debugPreset = {
|
|
|
232
234
|
var allPresetEntries = R__namespace.entries(allPreset);
|
|
233
235
|
var offPreset = R__namespace.fromEntries(allPresetEntries.map(([key]) => [key, "off"]));
|
|
234
236
|
var offDomPreset = R__namespace.fromEntries(R__namespace.entries(domPreset).map(([key]) => [key, "off"]));
|
|
235
|
-
var
|
|
236
|
-
var flatConfigPlugins = {
|
|
237
|
+
var plugins = {
|
|
237
238
|
"@eslint-react": react__namespace,
|
|
238
239
|
"@eslint-react/debug": reactDebug__namespace,
|
|
239
240
|
"@eslint-react/dom": reactDom__namespace,
|
|
@@ -242,16 +243,16 @@ var flatConfigPlugins = {
|
|
|
242
243
|
};
|
|
243
244
|
function createLegacyConfig(rules6, settings = shared.DEFAULT_ESLINT_REACT_SETTINGS) {
|
|
244
245
|
return {
|
|
245
|
-
plugins:
|
|
246
|
+
plugins: ["@eslint-react"],
|
|
246
247
|
rules: padKeysLeft(rules6, "@eslint-react/"),
|
|
247
248
|
settings: {
|
|
248
249
|
"react-x": settings
|
|
249
250
|
}
|
|
250
251
|
};
|
|
251
252
|
}
|
|
252
|
-
function
|
|
253
|
+
function createConfig(rules6, settings = shared.DEFAULT_ESLINT_REACT_SETTINGS) {
|
|
253
254
|
return {
|
|
254
|
-
plugins
|
|
255
|
+
plugins,
|
|
255
256
|
rules: padKeysLeft(rules6, "@eslint-react/"),
|
|
256
257
|
settings: {
|
|
257
258
|
"react-x": settings
|
|
@@ -264,13 +265,13 @@ var src_default = {
|
|
|
264
265
|
version
|
|
265
266
|
},
|
|
266
267
|
configs: {
|
|
267
|
-
all:
|
|
268
|
-
debug:
|
|
269
|
-
dom:
|
|
270
|
-
off:
|
|
271
|
-
"off-dom":
|
|
272
|
-
recommended:
|
|
273
|
-
"recommended-type-checked":
|
|
268
|
+
all: createConfig(allPreset),
|
|
269
|
+
debug: createConfig(debugPreset),
|
|
270
|
+
dom: createConfig(domPreset, domPresetSettings),
|
|
271
|
+
off: createConfig(offPreset),
|
|
272
|
+
"off-dom": createConfig(offDomPreset),
|
|
273
|
+
recommended: createConfig(recommendedPreset),
|
|
274
|
+
"recommended-type-checked": createConfig(recommendedTypeCheckedPreset),
|
|
274
275
|
// eslint-disable-next-line perfectionist/sort-objects
|
|
275
276
|
"all-legacy": createLegacyConfig(allPreset),
|
|
276
277
|
"debug-legacy": createLegacyConfig(debugPreset),
|
|
@@ -289,4 +290,5 @@ var src_default = {
|
|
|
289
290
|
}
|
|
290
291
|
};
|
|
291
292
|
|
|
292
|
-
|
|
293
|
+
exports.default = src_default;
|
|
294
|
+
exports.plugins = plugins;
|
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { typeOf } from '@eslint-react/tools';
|
|
|
11
11
|
|
|
12
12
|
// package.json
|
|
13
13
|
var name = "@eslint-react/eslint-plugin";
|
|
14
|
-
var version = "1.8.0-beta.
|
|
14
|
+
var version = "1.8.0-beta.3";
|
|
15
15
|
function transformKeys(obj, transform) {
|
|
16
16
|
if (typeOf(obj) !== "object") return obj;
|
|
17
17
|
const res = {};
|
|
@@ -205,8 +205,7 @@ var debugPreset = {
|
|
|
205
205
|
var allPresetEntries = R.entries(allPreset);
|
|
206
206
|
var offPreset = R.fromEntries(allPresetEntries.map(([key]) => [key, "off"]));
|
|
207
207
|
var offDomPreset = R.fromEntries(R.entries(domPreset).map(([key]) => [key, "off"]));
|
|
208
|
-
var
|
|
209
|
-
var flatConfigPlugins = {
|
|
208
|
+
var plugins = {
|
|
210
209
|
"@eslint-react": react,
|
|
211
210
|
"@eslint-react/debug": reactDebug,
|
|
212
211
|
"@eslint-react/dom": reactDom,
|
|
@@ -215,16 +214,16 @@ var flatConfigPlugins = {
|
|
|
215
214
|
};
|
|
216
215
|
function createLegacyConfig(rules6, settings = DEFAULT_ESLINT_REACT_SETTINGS) {
|
|
217
216
|
return {
|
|
218
|
-
plugins:
|
|
217
|
+
plugins: ["@eslint-react"],
|
|
219
218
|
rules: padKeysLeft(rules6, "@eslint-react/"),
|
|
220
219
|
settings: {
|
|
221
220
|
"react-x": settings
|
|
222
221
|
}
|
|
223
222
|
};
|
|
224
223
|
}
|
|
225
|
-
function
|
|
224
|
+
function createConfig(rules6, settings = DEFAULT_ESLINT_REACT_SETTINGS) {
|
|
226
225
|
return {
|
|
227
|
-
plugins
|
|
226
|
+
plugins,
|
|
228
227
|
rules: padKeysLeft(rules6, "@eslint-react/"),
|
|
229
228
|
settings: {
|
|
230
229
|
"react-x": settings
|
|
@@ -237,13 +236,13 @@ var src_default = {
|
|
|
237
236
|
version
|
|
238
237
|
},
|
|
239
238
|
configs: {
|
|
240
|
-
all:
|
|
241
|
-
debug:
|
|
242
|
-
dom:
|
|
243
|
-
off:
|
|
244
|
-
"off-dom":
|
|
245
|
-
recommended:
|
|
246
|
-
"recommended-type-checked":
|
|
239
|
+
all: createConfig(allPreset),
|
|
240
|
+
debug: createConfig(debugPreset),
|
|
241
|
+
dom: createConfig(domPreset, domPresetSettings),
|
|
242
|
+
off: createConfig(offPreset),
|
|
243
|
+
"off-dom": createConfig(offDomPreset),
|
|
244
|
+
recommended: createConfig(recommendedPreset),
|
|
245
|
+
"recommended-type-checked": createConfig(recommendedTypeCheckedPreset),
|
|
247
246
|
// eslint-disable-next-line perfectionist/sort-objects
|
|
248
247
|
"all-legacy": createLegacyConfig(allPreset),
|
|
249
248
|
"debug-legacy": createLegacyConfig(debugPreset),
|
|
@@ -262,4 +261,4 @@ var src_default = {
|
|
|
262
261
|
}
|
|
263
262
|
};
|
|
264
263
|
|
|
265
|
-
export { src_default as default };
|
|
264
|
+
export { src_default as default, plugins };
|
package/package.json
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/eslint-plugin",
|
|
3
|
-
"version": "1.8.0-beta.
|
|
3
|
+
"version": "1.8.0-beta.3",
|
|
4
4
|
"description": "The main ESLint plugin of ESLint React. Contains all the rules and presets of ESLint React.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
7
7
|
"eslint-plugin",
|
|
8
8
|
"eslint-react",
|
|
9
9
|
"react",
|
|
10
|
-
"ts",
|
|
11
10
|
"tsx",
|
|
12
|
-
"typescript",
|
|
13
|
-
"typescript-eslint",
|
|
14
11
|
"typescript-react"
|
|
15
12
|
],
|
|
16
13
|
"homepage": "https://github.com/rel1cx/eslint-react",
|
|
@@ -51,14 +48,14 @@
|
|
|
51
48
|
"@typescript-eslint/types": "^8.0.0",
|
|
52
49
|
"@typescript-eslint/utils": "^8.0.0",
|
|
53
50
|
"remeda": "^2.6.0",
|
|
54
|
-
"@eslint-react/
|
|
55
|
-
"eslint-plugin-react-debug": "1.8.0-beta.
|
|
56
|
-
"
|
|
57
|
-
"@eslint-react/
|
|
58
|
-
"eslint-plugin-react-
|
|
59
|
-
"eslint-
|
|
60
|
-
"eslint-plugin-react-
|
|
61
|
-
"eslint-plugin-react-
|
|
51
|
+
"@eslint-react/shared": "1.8.0-beta.3",
|
|
52
|
+
"eslint-plugin-react-debug": "1.8.0-beta.3",
|
|
53
|
+
"eslint-plugin-react-dom": "1.8.0-beta.3",
|
|
54
|
+
"@eslint-react/types": "1.8.0-beta.3",
|
|
55
|
+
"eslint-plugin-react-hooks-extra": "1.8.0-beta.3",
|
|
56
|
+
"@eslint-react/tools": "1.8.0-beta.3",
|
|
57
|
+
"eslint-plugin-react-naming-convention": "1.8.0-beta.3",
|
|
58
|
+
"eslint-plugin-react-x": "1.8.0-beta.3"
|
|
62
59
|
},
|
|
63
60
|
"devDependencies": {
|
|
64
61
|
"tsup": "8.2.3"
|
|
@@ -83,7 +80,7 @@
|
|
|
83
80
|
"access": "public"
|
|
84
81
|
},
|
|
85
82
|
"scripts": {
|
|
86
|
-
"build": "tsup",
|
|
83
|
+
"build": "tsup --dts-resolve",
|
|
87
84
|
"lint:publish": "pnpm publint",
|
|
88
85
|
"lint:type": "tsc --noEmit"
|
|
89
86
|
}
|