@tsed/cli-plugin-eslint 7.0.0-beta.7 → 7.0.0-beta.9
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { render } from "@tsed/cli";
|
|
2
2
|
import { PackageManagersModule, ProjectPackageJson } from "@tsed/cli-core";
|
|
3
|
-
import { inject, injectable } from "@tsed/di";
|
|
3
|
+
import { inject, injectable, logger } from "@tsed/di";
|
|
4
4
|
import { TEMPLATE_DIR } from "../utils/templateDir.js";
|
|
5
5
|
export class EslintInitHook {
|
|
6
6
|
$alterRenderFiles(files, data) {
|
|
@@ -29,6 +29,7 @@ export class EslintInitHook {
|
|
|
29
29
|
];
|
|
30
30
|
}
|
|
31
31
|
$alterPackageJson(packageJson, data) {
|
|
32
|
+
logger().info("Alter package.json dependencies by eslint plugin");
|
|
32
33
|
packageJson.addScripts({
|
|
33
34
|
"test:lint": "eslint",
|
|
34
35
|
"test:lint:fix": "eslint --fix"
|
|
@@ -24,6 +24,7 @@ export default defineTemplate({
|
|
|
24
24
|
render(_, data) {
|
|
25
25
|
const imports = [
|
|
26
26
|
'import typescriptEslint from "@typescript-eslint/eslint-plugin";',
|
|
27
|
+
'import typescriptParser from "@typescript-eslint/parser";',
|
|
27
28
|
data.prettier ? 'import pluginPrettierRecommended from "eslint-plugin-prettier/recommended";' : "",
|
|
28
29
|
'import pluginSimpleImportSort from "eslint-plugin-simple-import-sort";',
|
|
29
30
|
data.vitest ? 'import vitest from "eslint-plugin-vitest";' : "",
|
|
@@ -43,7 +44,8 @@ export default [
|
|
|
43
44
|
parser: typescriptParser,
|
|
44
45
|
parserOptions: {
|
|
45
46
|
ecmaVersion: "latest",
|
|
46
|
-
sourceType: "module"
|
|
47
|
+
sourceType: "module",
|
|
48
|
+
tsconfigRootDir: join(import.meta.dirname, "tsconfig.eslint.json")
|
|
47
49
|
},
|
|
48
50
|
globals: {
|
|
49
51
|
...globals.node
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/cli-plugin-eslint",
|
|
3
3
|
"description": "Ts.ED CLI plugin. Add EsLint support",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"source": "./src/index.ts",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"/test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@tsed/cli": "7.0.0-beta.
|
|
26
|
-
"@tsed/cli-core": "7.0.0-beta.
|
|
27
|
-
"@tsed/typescript": "7.0.0-beta.
|
|
25
|
+
"@tsed/cli": "7.0.0-beta.9",
|
|
26
|
+
"@tsed/cli-core": "7.0.0-beta.9",
|
|
27
|
+
"@tsed/typescript": "7.0.0-beta.9",
|
|
28
28
|
"cross-env": "7.0.3",
|
|
29
29
|
"typescript": "5.6.2",
|
|
30
30
|
"vitest": "3.2.4"
|