@powerlines/plugin-eslint 0.8.127 → 0.8.129
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/helpers/format-message.cjs +27 -3
- package/dist/helpers/format-message.d.cts +16 -1
- package/dist/helpers/format-message.d.mts +16 -1
- package/dist/helpers/format-message.mjs +25 -1
- package/dist/helpers/index.cjs +3 -4
- package/dist/helpers/index.d.cts +1 -2
- package/dist/helpers/index.d.mts +1 -2
- package/dist/helpers/index.mjs +1 -2
- package/dist/index.cjs +5 -7
- package/dist/index.d.cts +3 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +2 -4
- package/dist/powerlines/src/types/babel.d.mts +2 -0
- package/dist/powerlines/src/types/build.d.cts +145 -0
- package/dist/powerlines/src/types/build.d.mts +145 -0
- package/dist/powerlines/src/types/commands.d.cts +8 -0
- package/dist/powerlines/src/types/commands.d.mts +9 -0
- package/dist/powerlines/src/types/config.d.cts +376 -0
- package/dist/powerlines/src/types/config.d.mts +376 -0
- package/dist/powerlines/src/types/context.d.cts +403 -0
- package/dist/powerlines/src/types/context.d.mts +405 -0
- package/dist/powerlines/src/types/fs.d.cts +486 -0
- package/dist/powerlines/src/types/fs.d.mts +486 -0
- package/dist/powerlines/src/types/hooks.d.mts +2 -0
- package/dist/powerlines/src/types/plugin.d.cts +231 -0
- package/dist/powerlines/src/types/plugin.d.mts +231 -0
- package/dist/powerlines/src/types/resolved.d.cts +81 -0
- package/dist/powerlines/src/types/resolved.d.mts +81 -0
- package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
- package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.d.cts +1 -2
- package/dist/types/index.d.mts +1 -2
- package/dist/types/index.mjs +0 -3
- package/dist/types/plugin.cjs +0 -1
- package/dist/types/plugin.d.cts +69 -1
- package/dist/types/plugin.d.mts +69 -1
- package/dist/types/plugin.mjs +0 -2
- package/package.json +4 -4
- package/dist/format-message-B0zrT_tN.d.cts +0 -17
- package/dist/format-message-Bt4W9wqe.cjs +0 -38
- package/dist/format-message-CKuUKX7C.mjs +0 -27
- package/dist/format-message-Ck01aLfz.d.mts +0 -17
- package/dist/helpers-B15z10jN.mjs +0 -1
- package/dist/helpers-LF26RHol.cjs +0 -0
- package/dist/index-9iG2qHLe.d.mts +0 -1
- package/dist/index-D-CYNcT9.d.mts +0 -1
- package/dist/index-D4ELpJXS.d.cts +0 -1
- package/dist/index-DLoAMD9J.d.cts +0 -1
- package/dist/plugin-B9rqWpLs.d.mts +0 -1821
- package/dist/plugin-ifZVa20V.mjs +0 -1
- package/dist/plugin-nQ-T2aMa.d.cts +0 -1821
- package/dist/plugin-pBKbb5K9.cjs +0 -0
- package/dist/types-U3zd8PTP.mjs +0 -1
- package/dist/types-o3zWarRp.cjs +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
|
|
2
|
+
import ts from "typescript";
|
|
3
|
+
|
|
4
|
+
//#region ../powerlines/src/types/tsconfig.d.ts
|
|
5
|
+
type ReflectionMode = "default" | "explicit" | "never";
|
|
6
|
+
type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
12
|
+
* - `minimal` - Only the essential type information is captured.
|
|
13
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
14
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
15
|
+
*/
|
|
16
|
+
type ReflectionLevel = "minimal" | "normal" | "verbose";
|
|
17
|
+
interface DeepkitOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
20
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
21
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
22
|
+
*/
|
|
23
|
+
reflection?: RawReflectionMode;
|
|
24
|
+
/**
|
|
25
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
29
|
+
* - `minimal` - Only the essential type information is captured.
|
|
30
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
31
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
32
|
+
*/
|
|
33
|
+
reflectionLevel?: ReflectionLevel;
|
|
34
|
+
}
|
|
35
|
+
type TSCompilerOptions = CompilerOptions & DeepkitOptions;
|
|
36
|
+
/**
|
|
37
|
+
* The TypeScript compiler configuration.
|
|
38
|
+
*
|
|
39
|
+
* @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
|
40
|
+
*/
|
|
41
|
+
interface TSConfig extends Omit<TsConfigJson, "reflection"> {
|
|
42
|
+
/**
|
|
43
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
44
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
45
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
46
|
+
*/
|
|
47
|
+
reflection?: RawReflectionMode;
|
|
48
|
+
/**
|
|
49
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
53
|
+
* - `minimal` - Only the essential type information is captured.
|
|
54
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
55
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
56
|
+
*/
|
|
57
|
+
reflectionLevel?: ReflectionLevel;
|
|
58
|
+
/**
|
|
59
|
+
* Instructs the TypeScript compiler how to compile `.ts` files.
|
|
60
|
+
*/
|
|
61
|
+
compilerOptions?: TSCompilerOptions;
|
|
62
|
+
}
|
|
63
|
+
type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
64
|
+
originalTsconfigJson: TsConfigJson;
|
|
65
|
+
tsconfigJson: TSConfig;
|
|
66
|
+
tsconfigFilePath: string;
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { ParsedTypeScriptConfig, TSConfig };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
|
|
2
|
+
import ts from "typescript";
|
|
3
|
+
|
|
4
|
+
//#region ../powerlines/src/types/tsconfig.d.ts
|
|
5
|
+
type ReflectionMode = "default" | "explicit" | "never";
|
|
6
|
+
type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
12
|
+
* - `minimal` - Only the essential type information is captured.
|
|
13
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
14
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
15
|
+
*/
|
|
16
|
+
type ReflectionLevel = "minimal" | "normal" | "verbose";
|
|
17
|
+
interface DeepkitOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
20
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
21
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
22
|
+
*/
|
|
23
|
+
reflection?: RawReflectionMode;
|
|
24
|
+
/**
|
|
25
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
29
|
+
* - `minimal` - Only the essential type information is captured.
|
|
30
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
31
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
32
|
+
*/
|
|
33
|
+
reflectionLevel?: ReflectionLevel;
|
|
34
|
+
}
|
|
35
|
+
type TSCompilerOptions = CompilerOptions & DeepkitOptions;
|
|
36
|
+
/**
|
|
37
|
+
* The TypeScript compiler configuration.
|
|
38
|
+
*
|
|
39
|
+
* @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
|
40
|
+
*/
|
|
41
|
+
interface TSConfig extends Omit<TsConfigJson, "reflection"> {
|
|
42
|
+
/**
|
|
43
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
44
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
45
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
46
|
+
*/
|
|
47
|
+
reflection?: RawReflectionMode;
|
|
48
|
+
/**
|
|
49
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
53
|
+
* - `minimal` - Only the essential type information is captured.
|
|
54
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
55
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
56
|
+
*/
|
|
57
|
+
reflectionLevel?: ReflectionLevel;
|
|
58
|
+
/**
|
|
59
|
+
* Instructs the TypeScript compiler how to compile `.ts` files.
|
|
60
|
+
*/
|
|
61
|
+
compilerOptions?: TSCompilerOptions;
|
|
62
|
+
}
|
|
63
|
+
type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
64
|
+
originalTsconfigJson: TsConfigJson;
|
|
65
|
+
tsconfigJson: TSConfig;
|
|
66
|
+
tsconfigFilePath: string;
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { ParsedTypeScriptConfig, TSConfig };
|
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-D4ELpJXS.cjs";
|
|
1
|
+
import { ESLintPluginContext, ESLintPluginOptions, ESLintPluginResolvedConfig, ESLintPluginUserConfig, __ΩESLintPluginContext, __ΩESLintPluginOptions, __ΩESLintPluginResolvedConfig, __ΩESLintPluginUserConfig } from "./plugin.cjs";
|
|
3
2
|
export { ESLintPluginContext, ESLintPluginOptions, ESLintPluginResolvedConfig, ESLintPluginUserConfig, __ΩESLintPluginContext, __ΩESLintPluginOptions, __ΩESLintPluginResolvedConfig, __ΩESLintPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-9iG2qHLe.mjs";
|
|
1
|
+
import { ESLintPluginContext, ESLintPluginOptions, ESLintPluginResolvedConfig, ESLintPluginUserConfig, __ΩESLintPluginContext, __ΩESLintPluginOptions, __ΩESLintPluginResolvedConfig, __ΩESLintPluginUserConfig } from "./plugin.mjs";
|
|
3
2
|
export { ESLintPluginContext, ESLintPluginOptions, ESLintPluginResolvedConfig, ESLintPluginUserConfig, __ΩESLintPluginContext, __ΩESLintPluginOptions, __ΩESLintPluginResolvedConfig, __ΩESLintPluginUserConfig };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.cjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require('../plugin-pBKbb5K9.cjs');
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,2 +1,70 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UserConfig } from "../powerlines/src/types/config.cjs";
|
|
2
|
+
import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
|
|
3
|
+
import { PluginContext } from "../powerlines/src/types/context.cjs";
|
|
4
|
+
import { ESLint } from "eslint";
|
|
5
|
+
import { LegacyESLint } from "eslint/use-at-your-own-risk";
|
|
6
|
+
|
|
7
|
+
//#region src/types/plugin.d.ts
|
|
8
|
+
interface ESLintPluginOptions {
|
|
9
|
+
/**
|
|
10
|
+
* The path to the ESLint configuration file.
|
|
11
|
+
*/
|
|
12
|
+
configFile?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to report errors only
|
|
15
|
+
*/
|
|
16
|
+
reportErrorsOnly?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The maximum number of warnings to allow before failing the process
|
|
19
|
+
*/
|
|
20
|
+
maxWarnings?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The output file to write the results to.
|
|
23
|
+
*/
|
|
24
|
+
outputFile?: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to automatically fix problems
|
|
27
|
+
*
|
|
28
|
+
* @defaultValue true
|
|
29
|
+
*/
|
|
30
|
+
fix?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The type of ESLint configuration to use.
|
|
33
|
+
*/
|
|
34
|
+
type?: "base" | "recommended" | "strict";
|
|
35
|
+
/**
|
|
36
|
+
* Options to be passed to the ESLint generator.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* These options will be override any other values passed to the ESLint generator.
|
|
40
|
+
*/
|
|
41
|
+
override?: Partial<ESLint.Options>;
|
|
42
|
+
}
|
|
43
|
+
interface ESLintPluginUserConfig extends UserConfig {
|
|
44
|
+
/**
|
|
45
|
+
* Options for the ESLint plugin.
|
|
46
|
+
*/
|
|
47
|
+
lint?: {
|
|
48
|
+
eslint?: ESLintPluginOptions;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
interface ESLintPluginResolvedConfig extends ResolvedConfig {
|
|
52
|
+
/**
|
|
53
|
+
* Options for the ESLint plugin.
|
|
54
|
+
*/
|
|
55
|
+
lint: {
|
|
56
|
+
eslint: ESLintPluginOptions;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
type ESLintPluginContext<TResolvedConfig extends ESLintPluginResolvedConfig = ESLintPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
60
|
+
/**
|
|
61
|
+
* The initialized ESLint application.
|
|
62
|
+
*/
|
|
63
|
+
eslint: ESLint | LegacyESLint;
|
|
64
|
+
};
|
|
65
|
+
declare type __ΩESLintPluginOptions = any[];
|
|
66
|
+
declare type __ΩESLintPluginUserConfig = any[];
|
|
67
|
+
declare type __ΩESLintPluginResolvedConfig = any[];
|
|
68
|
+
declare type __ΩESLintPluginContext = any[];
|
|
69
|
+
//#endregion
|
|
2
70
|
export { ESLintPluginContext, ESLintPluginOptions, ESLintPluginResolvedConfig, ESLintPluginUserConfig, __ΩESLintPluginContext, __ΩESLintPluginOptions, __ΩESLintPluginResolvedConfig, __ΩESLintPluginUserConfig };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,2 +1,70 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UserConfig } from "../powerlines/src/types/config.mjs";
|
|
2
|
+
import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
|
|
3
|
+
import { PluginContext } from "../powerlines/src/types/context.mjs";
|
|
4
|
+
import { ESLint } from "eslint";
|
|
5
|
+
import { LegacyESLint } from "eslint/use-at-your-own-risk";
|
|
6
|
+
|
|
7
|
+
//#region src/types/plugin.d.ts
|
|
8
|
+
interface ESLintPluginOptions {
|
|
9
|
+
/**
|
|
10
|
+
* The path to the ESLint configuration file.
|
|
11
|
+
*/
|
|
12
|
+
configFile?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to report errors only
|
|
15
|
+
*/
|
|
16
|
+
reportErrorsOnly?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The maximum number of warnings to allow before failing the process
|
|
19
|
+
*/
|
|
20
|
+
maxWarnings?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The output file to write the results to.
|
|
23
|
+
*/
|
|
24
|
+
outputFile?: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to automatically fix problems
|
|
27
|
+
*
|
|
28
|
+
* @defaultValue true
|
|
29
|
+
*/
|
|
30
|
+
fix?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The type of ESLint configuration to use.
|
|
33
|
+
*/
|
|
34
|
+
type?: "base" | "recommended" | "strict";
|
|
35
|
+
/**
|
|
36
|
+
* Options to be passed to the ESLint generator.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* These options will be override any other values passed to the ESLint generator.
|
|
40
|
+
*/
|
|
41
|
+
override?: Partial<ESLint.Options>;
|
|
42
|
+
}
|
|
43
|
+
interface ESLintPluginUserConfig extends UserConfig {
|
|
44
|
+
/**
|
|
45
|
+
* Options for the ESLint plugin.
|
|
46
|
+
*/
|
|
47
|
+
lint?: {
|
|
48
|
+
eslint?: ESLintPluginOptions;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
interface ESLintPluginResolvedConfig extends ResolvedConfig {
|
|
52
|
+
/**
|
|
53
|
+
* Options for the ESLint plugin.
|
|
54
|
+
*/
|
|
55
|
+
lint: {
|
|
56
|
+
eslint: ESLintPluginOptions;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
type ESLintPluginContext<TResolvedConfig extends ESLintPluginResolvedConfig = ESLintPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
60
|
+
/**
|
|
61
|
+
* The initialized ESLint application.
|
|
62
|
+
*/
|
|
63
|
+
eslint: ESLint | LegacyESLint;
|
|
64
|
+
};
|
|
65
|
+
declare type __ΩESLintPluginOptions = any[];
|
|
66
|
+
declare type __ΩESLintPluginUserConfig = any[];
|
|
67
|
+
declare type __ΩESLintPluginResolvedConfig = any[];
|
|
68
|
+
declare type __ΩESLintPluginContext = any[];
|
|
69
|
+
//#endregion
|
|
2
70
|
export { ESLintPluginContext, ESLintPluginOptions, ESLintPluginResolvedConfig, ESLintPluginUserConfig, __ΩESLintPluginContext, __ΩESLintPluginOptions, __ΩESLintPluginResolvedConfig, __ΩESLintPluginUserConfig };
|
package/dist/types/plugin.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-eslint",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.129",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for running ESLint on the codebase.",
|
|
6
6
|
"repository": {
|
|
@@ -105,13 +105,13 @@
|
|
|
105
105
|
"@stryke/path": "^0.24.1",
|
|
106
106
|
"defu": "^6.1.4",
|
|
107
107
|
"eslint": "^9.39.2",
|
|
108
|
-
"powerlines": "^0.36.
|
|
108
|
+
"powerlines": "^0.36.29"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
-
"@powerlines/nx": "^0.11.
|
|
111
|
+
"@powerlines/nx": "^0.11.55",
|
|
112
112
|
"@storm-software/tsup": "^0.2.73",
|
|
113
113
|
"@types/node": "^24.10.4"
|
|
114
114
|
},
|
|
115
115
|
"publishConfig": { "access": "public" },
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "bfbde2cda62a5307013bf11d1ef6a8500bcbc4b1"
|
|
117
117
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
//#region src/helpers/format-message.d.ts
|
|
2
|
-
declare enum MessageSeverity {
|
|
3
|
-
Warning = 1,
|
|
4
|
-
Error = 2,
|
|
5
|
-
}
|
|
6
|
-
interface LintMessage {
|
|
7
|
-
ruleId: string | null;
|
|
8
|
-
severity: MessageSeverity;
|
|
9
|
-
message: string;
|
|
10
|
-
line: number;
|
|
11
|
-
column: number;
|
|
12
|
-
}
|
|
13
|
-
declare function formatMessage(dir: string, messages: LintMessage[], filePath: string): string;
|
|
14
|
-
declare type __ΩMessageSeverity = any[];
|
|
15
|
-
declare type __ΩLintMessage = any[];
|
|
16
|
-
//#endregion
|
|
17
|
-
export { formatMessage as a, __ΩMessageSeverity as i, MessageSeverity as n, __ΩLintMessage as r, LintMessage as t };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
let __stryke_path_find = require("@stryke/path/find");
|
|
2
|
-
let __stryke_path_normalize = require("@stryke/path/normalize");
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/format-message.ts
|
|
5
|
-
let MessageSeverity = /* @__PURE__ */ function(MessageSeverity$1) {
|
|
6
|
-
MessageSeverity$1[MessageSeverity$1["Warning"] = 1] = "Warning";
|
|
7
|
-
MessageSeverity$1[MessageSeverity$1["Error"] = 2] = "Error";
|
|
8
|
-
return MessageSeverity$1;
|
|
9
|
-
}({});
|
|
10
|
-
function formatMessage(dir, messages, filePath) {
|
|
11
|
-
let fileName = (0, __stryke_path_normalize.correctPath)((0, __stryke_path_find.relative)(dir, filePath));
|
|
12
|
-
if (!fileName.startsWith(".")) fileName = `./${fileName}`;
|
|
13
|
-
let output = `\n${fileName}`;
|
|
14
|
-
for (let i = 0; i < messages.length; i++) {
|
|
15
|
-
const { message, severity, line, column, ruleId } = messages[i];
|
|
16
|
-
output += "\n";
|
|
17
|
-
if (line && column) output = `${output + line.toString()}:${column.toString()} `;
|
|
18
|
-
if (severity === MessageSeverity.Warning) output += `Warning: `;
|
|
19
|
-
else output += `Error: `;
|
|
20
|
-
output += message;
|
|
21
|
-
if (ruleId) output += ` ${ruleId}`;
|
|
22
|
-
}
|
|
23
|
-
return output;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
Object.defineProperty(exports, 'MessageSeverity', {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function () {
|
|
30
|
-
return MessageSeverity;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
Object.defineProperty(exports, 'formatMessage', {
|
|
34
|
-
enumerable: true,
|
|
35
|
-
get: function () {
|
|
36
|
-
return formatMessage;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { relative } from "@stryke/path/find";
|
|
2
|
-
import { correctPath } from "@stryke/path/normalize";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/format-message.ts
|
|
5
|
-
let MessageSeverity = /* @__PURE__ */ function(MessageSeverity$1) {
|
|
6
|
-
MessageSeverity$1[MessageSeverity$1["Warning"] = 1] = "Warning";
|
|
7
|
-
MessageSeverity$1[MessageSeverity$1["Error"] = 2] = "Error";
|
|
8
|
-
return MessageSeverity$1;
|
|
9
|
-
}({});
|
|
10
|
-
function formatMessage(dir, messages, filePath) {
|
|
11
|
-
let fileName = correctPath(relative(dir, filePath));
|
|
12
|
-
if (!fileName.startsWith(".")) fileName = `./${fileName}`;
|
|
13
|
-
let output = `\n${fileName}`;
|
|
14
|
-
for (let i = 0; i < messages.length; i++) {
|
|
15
|
-
const { message, severity, line, column, ruleId } = messages[i];
|
|
16
|
-
output += "\n";
|
|
17
|
-
if (line && column) output = `${output + line.toString()}:${column.toString()} `;
|
|
18
|
-
if (severity === MessageSeverity.Warning) output += `Warning: `;
|
|
19
|
-
else output += `Error: `;
|
|
20
|
-
output += message;
|
|
21
|
-
if (ruleId) output += ` ${ruleId}`;
|
|
22
|
-
}
|
|
23
|
-
return output;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
export { formatMessage as n, MessageSeverity as t };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
//#region src/helpers/format-message.d.ts
|
|
2
|
-
declare enum MessageSeverity {
|
|
3
|
-
Warning = 1,
|
|
4
|
-
Error = 2,
|
|
5
|
-
}
|
|
6
|
-
interface LintMessage {
|
|
7
|
-
ruleId: string | null;
|
|
8
|
-
severity: MessageSeverity;
|
|
9
|
-
message: string;
|
|
10
|
-
line: number;
|
|
11
|
-
column: number;
|
|
12
|
-
}
|
|
13
|
-
declare function formatMessage(dir: string, messages: LintMessage[], filePath: string): string;
|
|
14
|
-
declare type __ΩMessageSeverity = any[];
|
|
15
|
-
declare type __ΩLintMessage = any[];
|
|
16
|
-
//#endregion
|
|
17
|
-
export { formatMessage as a, __ΩMessageSeverity as i, MessageSeverity as n, __ΩLintMessage as r, LintMessage as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|