@tsparticles/cli 3.0.0 → 3.0.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.
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.lint = lint;
|
|
4
7
|
const eslint_1 = require("eslint");
|
|
8
|
+
const config_1 = require("eslint/config");
|
|
9
|
+
const eslint_config_1 = __importDefault(require("@tsparticles/eslint-config"));
|
|
5
10
|
/**
|
|
6
11
|
* @param ci -
|
|
7
12
|
* @returns true if the linting was successful
|
|
@@ -10,7 +15,7 @@ async function lint(ci) {
|
|
|
10
15
|
console.log("ESLint - started on src");
|
|
11
16
|
let res;
|
|
12
17
|
try {
|
|
13
|
-
const eslint = new eslint_1.ESLint({ fix: !ci });
|
|
18
|
+
const eslint = new eslint_1.ESLint({ baseConfig: (0, config_1.defineConfig)([eslint_config_1.default]), fix: !ci });
|
|
14
19
|
const results = await eslint.lintFiles(["src"]), errors = eslint_1.ESLint.getErrorResults(results);
|
|
15
20
|
await eslint_1.ESLint.outputFixes(results);
|
|
16
21
|
const formatter = await eslint.loadFormatter("stylish"), resultText = formatter.format(results), minimumLength = 0;
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"prettier": "@tsparticles/prettier-config",
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@babel/core": "^7.23.9",
|
|
86
|
-
"@tsparticles/cli": "^3.0.
|
|
86
|
+
"@tsparticles/cli": "^3.0.1",
|
|
87
87
|
"@tsparticles/eslint-config": "^2.2.1",
|
|
88
88
|
"@tsparticles/prettier-config": "^2.1.6",
|
|
89
89
|
"@tsparticles/tsconfig": "^2.1.7",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
},
|
|
12
12
|
"prettier": "@tsparticles/prettier-config",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@tsparticles/eslint-config": "^3.0.
|
|
15
|
-
"@tsparticles/prettier-config": "^3.0.
|
|
16
|
-
"@tsparticles/tsconfig": "^3.0.
|
|
17
|
-
"@tsparticles/webpack-plugin": "^3.0.
|
|
14
|
+
"@tsparticles/eslint-config": "^3.0.3",
|
|
15
|
+
"@tsparticles/prettier-config": "^3.0.1",
|
|
16
|
+
"@tsparticles/tsconfig": "^3.0.1",
|
|
17
|
+
"@tsparticles/webpack-plugin": "^3.0.3",
|
|
18
18
|
"commander": "^14.0.0",
|
|
19
19
|
"eslint": "^9.34.0",
|
|
20
20
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ESLint } from "eslint";
|
|
2
|
+
import { defineConfig } from "eslint/config";
|
|
3
|
+
import tsParticlesESLintConfig from "@tsparticles/eslint-config";
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* @param ci -
|
|
@@ -10,7 +12,7 @@ export async function lint(ci: boolean): Promise<boolean> {
|
|
|
10
12
|
let res: boolean;
|
|
11
13
|
|
|
12
14
|
try {
|
|
13
|
-
const eslint = new ESLint({ fix: !ci });
|
|
15
|
+
const eslint = new ESLint({ baseConfig: defineConfig([tsParticlesESLintConfig]), fix: !ci });
|
|
14
16
|
|
|
15
17
|
const results = await eslint.lintFiles(["src"]),
|
|
16
18
|
errors = ESLint.getErrorResults(results);
|