@ts-dev-tools/react 1.6.1 → 1.8.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/README.md +1 -1
- package/dist/eslint-plugin-ts-dev-tools/index.d.ts +2 -0
- package/dist/eslint-plugin-ts-dev-tools/index.js +32 -0
- package/dist/install/migrations/20240412185501-eslint-config.d.ts +2 -0
- package/dist/install/migrations/20240412185501-eslint-config.js +53 -0
- package/package.json +8 -31
package/README.md
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
+
if (ar || !(i in from)) {
|
|
16
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
+
ar[i] = from[i];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
+
};
|
|
22
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
+
};
|
|
25
|
+
var _a, _b, _c;
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
var index_js_1 = __importDefault(require("@ts-dev-tools/core/dist/eslint-plugin-ts-dev-tools/index.js"));
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
29
|
+
var reactPlugin = require("eslint-plugin-react");
|
|
30
|
+
exports.default = __spreadArray(__spreadArray([], index_js_1.default, true), [
|
|
31
|
+
__assign(__assign({}, reactPlugin.configs.flat.recommended), { settings: __assign(__assign({}, (_a = reactPlugin.configs.flat.recommended) === null || _a === void 0 ? void 0 : _a.settings), { react: __assign(__assign({}, (_c = (_b = reactPlugin.configs.flat.recommended) === null || _b === void 0 ? void 0 : _b.settings) === null || _c === void 0 ? void 0 : _c.react), { version: "detect" }) }) }),
|
|
32
|
+
], false);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.up = void 0;
|
|
40
|
+
var FileService_1 = require("@ts-dev-tools/core/dist/services/FileService");
|
|
41
|
+
var up = function (absoluteProjectDir) { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
+
var eslintConfigFilePath;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
eslintConfigFilePath = "".concat(absoluteProjectDir, "/eslint.config.mjs");
|
|
45
|
+
if (FileService_1.FileService.fileExists(eslintConfigFilePath) &&
|
|
46
|
+
!FileService_1.FileService.getFileContent(eslintConfigFilePath).includes("import tsDevToolsCore from \"@ts-dev-tools/core/dist/eslint-plugin-ts-dev-tools/index.js\";")) {
|
|
47
|
+
return [2 /*return*/];
|
|
48
|
+
}
|
|
49
|
+
FileService_1.FileService.putFileContent(eslintConfigFilePath, "import { default as tsDevToolsReact } from \"@ts-dev-tools/react/dist/eslint-plugin-ts-dev-tools/index.js\";\nexport default tsDevToolsReact.default;\n");
|
|
50
|
+
return [2 /*return*/];
|
|
51
|
+
});
|
|
52
|
+
}); };
|
|
53
|
+
exports.up = up;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts-dev-tools/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "TS dev tools for React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"linter",
|
|
7
7
|
"prettier",
|
|
8
8
|
"git-hooks"
|
|
9
9
|
],
|
|
10
|
-
"author": "
|
|
10
|
+
"author": "ESCEMI <contact@escemi.com>",
|
|
11
11
|
"homepage": "https://github.com/escemi-tech/ts-dev-tools",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"directories": {
|
|
@@ -44,41 +44,18 @@
|
|
|
44
44
|
"url": "https://github.com/escemi-tech/ts-dev-tools/issues"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@testing-library/jest-dom": "^6.
|
|
48
|
-
"@testing-library/react": "^
|
|
49
|
-
"@ts-dev-tools/core": "^1.
|
|
50
|
-
"@types/react": "^18.
|
|
47
|
+
"@testing-library/jest-dom": "^6.5.0",
|
|
48
|
+
"@testing-library/react": "^16.0.0",
|
|
49
|
+
"@ts-dev-tools/core": "^1.8.0",
|
|
50
|
+
"@types/react": "^18.3.4",
|
|
51
51
|
"@types/react-dom": "^18.0.9",
|
|
52
|
-
"eslint-plugin-react": "^7.
|
|
52
|
+
"eslint-plugin-react": "^7.35.0",
|
|
53
53
|
"jest-environment-jsdom": "^29.3.1",
|
|
54
54
|
"react-test-renderer": "^18.2.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"pinst": "^3.0.0"
|
|
58
58
|
},
|
|
59
|
-
"eslintConfig": {
|
|
60
|
-
"env": {
|
|
61
|
-
"es2021": true
|
|
62
|
-
},
|
|
63
|
-
"extends": [
|
|
64
|
-
"eslint:recommended",
|
|
65
|
-
"plugin:@typescript-eslint/recommended",
|
|
66
|
-
"plugin:jest/recommended",
|
|
67
|
-
"prettier"
|
|
68
|
-
],
|
|
69
|
-
"parser": "@typescript-eslint/parser",
|
|
70
|
-
"parserOptions": {
|
|
71
|
-
"ecmaFeatures": {
|
|
72
|
-
"jsx": true
|
|
73
|
-
},
|
|
74
|
-
"ecmaVersion": 12,
|
|
75
|
-
"sourceType": "module"
|
|
76
|
-
},
|
|
77
|
-
"plugins": [
|
|
78
|
-
"@typescript-eslint",
|
|
79
|
-
"jest"
|
|
80
|
-
]
|
|
81
|
-
},
|
|
82
59
|
"prettier": {
|
|
83
60
|
"semi": true,
|
|
84
61
|
"printWidth": 100,
|
|
@@ -104,5 +81,5 @@
|
|
|
104
81
|
"github-actions"
|
|
105
82
|
]
|
|
106
83
|
},
|
|
107
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "88607c189fa08fc434f9055b9f741134e6798235"
|
|
108
85
|
}
|