@storm-software/eslint 0.157.0 → 0.158.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/chunk-7T36VVWK.js +43 -0
- package/dist/{chunk-WYU7W4UW.js → chunk-BAVB43QE.js} +5 -1
- package/dist/{chunk-HO6DXXZX.js → chunk-BQ3XWEU5.js} +5 -0
- package/dist/{chunk-RU7GXBCG.js → chunk-ESAVAG6Q.js} +5 -0
- package/dist/{chunk-DLORY5AL.js → chunk-NRW2A543.js} +5 -1
- package/dist/{chunk-Z2ZQTZDC.js → chunk-O55S2RN4.js} +5 -0
- package/dist/{chunk-5ALLOW52.js → chunk-QCZ5YENA.js} +13 -9
- package/dist/{chunk-2AFQKKSX.js → chunk-RI5KJEVZ.js} +10 -6
- package/dist/{chunk-EJ2FSS2J.js → chunk-VPGAL7NG.js} +5 -0
- package/dist/preset.js +530 -36
- package/dist/types.d.ts +92 -55
- package/dist/types.js +6 -0
- package/dist/utils/banner-plugin.js +4 -3
- package/dist/utils/combine.js +5 -0
- package/dist/utils/constants.js +2 -1
- package/dist/utils/correct-paths.js +2 -1
- package/dist/utils/find-workspace-root.js +3 -2
- package/dist/utils/format-config.js +2 -1
- package/dist/utils/get-file-banner.d.ts +2 -2
- package/dist/utils/get-file-banner.js +3 -2
- package/dist/utils/helpers.js +2 -1
- package/dist/utils/index.js +8 -2
- package/dist/utils/tsconfig-path.js +3 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __esm = (fn, res) => function __init() {
|
|
8
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
9
|
+
};
|
|
10
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
|
|
30
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__23d29aaa007764500c48e48a9770b339/node_modules/tsup/assets/esm_shims.js
|
|
31
|
+
import { fileURLToPath } from "url";
|
|
32
|
+
import path from "path";
|
|
33
|
+
var init_esm_shims = __esm({
|
|
34
|
+
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__23d29aaa007764500c48e48a9770b339/node_modules/tsup/assets/esm_shims.js"() {
|
|
35
|
+
"use strict";
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
__commonJS,
|
|
41
|
+
__toESM,
|
|
42
|
+
init_esm_shims
|
|
43
|
+
};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
correctPaths
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ESAVAG6Q.js";
|
|
4
|
+
import {
|
|
5
|
+
init_esm_shims
|
|
6
|
+
} from "./chunk-7T36VVWK.js";
|
|
4
7
|
|
|
5
8
|
// src/utils/find-workspace-root.ts
|
|
9
|
+
init_esm_shims();
|
|
6
10
|
import { existsSync } from "node:fs";
|
|
7
11
|
import { join } from "node:path";
|
|
8
12
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
joinPaths
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ESAVAG6Q.js";
|
|
4
|
+
import {
|
|
5
|
+
init_esm_shims
|
|
6
|
+
} from "./chunk-7T36VVWK.js";
|
|
4
7
|
|
|
5
8
|
// src/utils/tsconfig-path.ts
|
|
9
|
+
init_esm_shims();
|
|
6
10
|
import { existsSync } from "node:fs";
|
|
7
11
|
function getTsConfigPath(basePath = "./") {
|
|
8
12
|
let tsconfigPath = "tsconfig.json";
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ACRONYMS_LIST
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VPGAL7NG.js";
|
|
4
|
+
import {
|
|
5
|
+
init_esm_shims
|
|
6
|
+
} from "./chunk-7T36VVWK.js";
|
|
4
7
|
|
|
5
8
|
// src/utils/get-file-banner.ts
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
init_esm_shims();
|
|
10
|
+
var getFileBanner = (name = "") => {
|
|
11
|
+
if (!name) {
|
|
12
|
+
name = process.env.STORM_NAME || "";
|
|
9
13
|
}
|
|
10
14
|
let padding = " ";
|
|
11
|
-
for (let i = 0; i <
|
|
15
|
+
for (let i = 0; i < name.length + 2 && padding.length > 4; i++) {
|
|
12
16
|
padding = padding.slice(0, -1);
|
|
13
17
|
}
|
|
14
|
-
let titleName =
|
|
18
|
+
let titleName = name;
|
|
15
19
|
if (titleName) {
|
|
16
20
|
if (titleName?.startsWith("@")) {
|
|
17
21
|
titleName = titleName.slice(1);
|
|
@@ -31,11 +35,11 @@ ${padding}\u26A1 Storm Software ${titleName ? `- ${titleName}` : ""}
|
|
|
31
35
|
This code was released as part of ${titleName ? `the ${titleName}` : "a Storm Software"} project. ${titleName ? titleName : "The project"}
|
|
32
36
|
is maintained by Storm Software under the ${license} license, and is
|
|
33
37
|
free for commercial and private use. For more information, please visit
|
|
34
|
-
our licensing page at ${process.env.STORM_LICENSING ? process.env.STORM_LICENSING : `https://stormsoftware.com/${
|
|
38
|
+
our licensing page at ${process.env.STORM_LICENSING ? process.env.STORM_LICENSING : `https://stormsoftware.com/${name ? `projects/${name}/` : ""}license`}.
|
|
35
39
|
|
|
36
40
|
Website: ${process.env.STORM_HOMEPAGE ?? "https://stormsoftware.com"}
|
|
37
|
-
Repository: ${process.env.STORM_REPOSITORY ?? `https://github.com/storm-software${
|
|
38
|
-
Documentation: ${process.env.STORM_DOCS ? process.env.STORM_DOCS : `https://stormsoftware.com/${
|
|
41
|
+
Repository: ${process.env.STORM_REPOSITORY ?? `https://github.com/storm-software${name ? `/${name}` : ""}`}
|
|
42
|
+
Documentation: ${process.env.STORM_DOCS ? process.env.STORM_DOCS : `https://stormsoftware.com/${name ? `projects/${name}/` : ""}docs`}
|
|
39
43
|
Contact: ${process.env.STORM_HOMEPAGE ? process.env.STORM_HOMEPAGE.endsWith("/") ? process.env.STORM_HOMEPAGE.slice(-1) : process.env.STORM_HOMEPAGE : "https://stormsoftware.com"}/contact
|
|
40
44
|
|
|
41
45
|
SPDX-License-Identifier: ${license}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFileBanner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QCZ5YENA.js";
|
|
4
4
|
import {
|
|
5
5
|
GLOB_SRC
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VPGAL7NG.js";
|
|
7
|
+
import {
|
|
8
|
+
init_esm_shims
|
|
9
|
+
} from "./chunk-7T36VVWK.js";
|
|
7
10
|
|
|
8
11
|
// src/utils/banner-plugin.ts
|
|
12
|
+
init_esm_shims();
|
|
9
13
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
10
14
|
import os from "node:os";
|
|
11
15
|
function match(actual, expected) {
|
|
@@ -121,7 +125,7 @@ var bannerRule = ESLintUtils.RuleCreator(
|
|
|
121
125
|
type: "string",
|
|
122
126
|
description: "The banner to enforce at the top of the file. If not provided, the banner will be read from the file specified in the commentStart option"
|
|
123
127
|
},
|
|
124
|
-
|
|
128
|
+
name: {
|
|
125
129
|
type: "string",
|
|
126
130
|
description: "The name of the repository to use when reading the banner from a file."
|
|
127
131
|
},
|
|
@@ -153,7 +157,7 @@ var bannerRule = ESLintUtils.RuleCreator(
|
|
|
153
157
|
},
|
|
154
158
|
defaultOptions: [
|
|
155
159
|
{
|
|
156
|
-
|
|
160
|
+
name: "",
|
|
157
161
|
commentType: "block",
|
|
158
162
|
numNewlines: 2,
|
|
159
163
|
lineEndings: "unix"
|
|
@@ -162,14 +166,14 @@ var bannerRule = ESLintUtils.RuleCreator(
|
|
|
162
166
|
create(context, [
|
|
163
167
|
{
|
|
164
168
|
banner,
|
|
165
|
-
|
|
169
|
+
name = "",
|
|
166
170
|
commentType = "block",
|
|
167
171
|
numNewlines = 2,
|
|
168
172
|
lineEndings = "unix"
|
|
169
173
|
}
|
|
170
174
|
]) {
|
|
171
175
|
if (!banner) {
|
|
172
|
-
banner = getFileBanner(
|
|
176
|
+
banner = getFileBanner(name);
|
|
173
177
|
}
|
|
174
178
|
const options = context.options;
|
|
175
179
|
const eol = getEOL({ lineEndings, ...options });
|