@storm-software/eslint 0.159.9 → 0.159.10
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-F5ULWOMY.js → chunk-CUPYXBSI.js} +2 -2
- package/dist/{chunk-7HV2SCAT.js → chunk-DFS5UIRQ.js} +8 -8
- package/dist/preset.js +1590 -24
- package/dist/types.d.ts +1 -1
- package/dist/utils/banner-plugin.js +2 -2
- package/dist/utils/get-file-banner.d.ts +4 -1
- package/dist/utils/get-file-banner.js +1 -1
- package/package.json +4 -2
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 -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFileBanner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DFS5UIRQ.js";
|
|
4
4
|
import {
|
|
5
5
|
GLOB_SRC
|
|
6
6
|
} from "./chunk-Z4QO5BZJ.js";
|
|
@@ -110,7 +110,7 @@ function matchesLineEndings(src, num) {
|
|
|
110
110
|
return true;
|
|
111
111
|
}
|
|
112
112
|
var bannerRule = ESLintUtils.RuleCreator(
|
|
113
|
-
() => `https://
|
|
113
|
+
() => `https://developer.stormsoftware.com/eslint/rules/banner`
|
|
114
114
|
)({
|
|
115
115
|
name: "banner",
|
|
116
116
|
meta: {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
|
|
8
8
|
// src/utils/get-file-banner.ts
|
|
9
9
|
init_esm_shims();
|
|
10
|
-
var getFileBanner = (name = "") => {
|
|
10
|
+
var getFileBanner = (name = "", workspaceConfig) => {
|
|
11
11
|
if (!name) {
|
|
12
12
|
name = process.env.STORM_NAME || "";
|
|
13
13
|
}
|
|
@@ -15,7 +15,7 @@ var getFileBanner = (name = "") => {
|
|
|
15
15
|
for (let i = 0; i < name.length + 2 && padding.length > 4; i++) {
|
|
16
16
|
padding = padding.slice(0, -1);
|
|
17
17
|
}
|
|
18
|
-
let titleName = name;
|
|
18
|
+
let titleName = name || workspaceConfig?.name;
|
|
19
19
|
if (titleName) {
|
|
20
20
|
if (titleName?.startsWith("@")) {
|
|
21
21
|
titleName = titleName.slice(1);
|
|
@@ -27,7 +27,7 @@ var getFileBanner = (name = "") => {
|
|
|
27
27
|
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
28
28
|
}).join(" ");
|
|
29
29
|
}
|
|
30
|
-
const license = (process.env.STORM_LICENSE
|
|
30
|
+
const license = (process.env.STORM_LICENSE || workspaceConfig?.license || "Apache-2.0").split(" ").filter((word) => word && word.toLowerCase() !== "license").join(" ");
|
|
31
31
|
return ` -------------------------------------------------------------------
|
|
32
32
|
|
|
33
33
|
${padding}\u26A1 Storm Software ${titleName ? `- ${titleName}` : ""}
|
|
@@ -35,12 +35,12 @@ ${padding}\u26A1 Storm Software ${titleName ? `- ${titleName}` : ""}
|
|
|
35
35
|
This code was released as part of ${titleName ? `the ${titleName}` : "a Storm Software"} project. ${titleName ? titleName : "The project"}
|
|
36
36
|
is maintained by Storm Software under the ${license} license, and is
|
|
37
37
|
free for commercial and private use. For more information, please visit
|
|
38
|
-
our licensing page at ${process.env.STORM_LICENSING
|
|
38
|
+
our licensing page at ${process.env.STORM_LICENSING || workspaceConfig?.licensing || `https://stormsoftware.com/${name ? `projects/${name}/` : ""}license`}.
|
|
39
39
|
|
|
40
|
-
Website: ${process.env.STORM_HOMEPAGE
|
|
41
|
-
Repository: ${process.env.STORM_REPOSITORY
|
|
42
|
-
Documentation: ${process.env.STORM_DOCS
|
|
43
|
-
Contact: ${process.env.STORM_HOMEPAGE
|
|
40
|
+
Website: ${process.env.STORM_HOMEPAGE || workspaceConfig?.homepage || "https://stormsoftware.com"}
|
|
41
|
+
Repository: ${process.env.STORM_REPOSITORY || workspaceConfig?.repository || `https://github.com/storm-software${name ? `/${name}` : ""}`}
|
|
42
|
+
Documentation: ${process.env.STORM_DOCS || workspaceConfig?.docs || `https://docs.stormsoftware.com/${name ? `projects/${name}/` : ""}`}
|
|
43
|
+
Contact: ${(process.env.STORM_HOMEPAGE || workspaceConfig?.homepage || "https://stormsoftware.com").endsWith("/") ? (process.env.STORM_HOMEPAGE || workspaceConfig?.homepage || "https://stormsoftware.com").slice(-1) : process.env.STORM_HOMEPAGE || workspaceConfig?.homepage || "https://stormsoftware.com"}/contact
|
|
44
44
|
|
|
45
45
|
SPDX-License-Identifier: ${license}
|
|
46
46
|
|