@storm-software/eslint 0.108.1 → 0.108.2
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-KND2ZTLT.cjs → chunk-5MDD4YRF.cjs} +2 -2
- package/dist/{chunk-TXTXUVRZ.cjs → chunk-KXIBONRP.cjs} +14 -14
- package/dist/{chunk-QDLKHXPX.cjs → chunk-LFYDLNPI.cjs} +1 -1
- package/dist/{chunk-E7T4SNH3.js → chunk-NRAHNCLK.js} +12 -6
- package/dist/{chunk-OGGLIE6C.cjs → chunk-QHCIEM2K.cjs} +2 -2
- package/dist/{chunk-NFPQICLG.cjs → chunk-TT6UR2PT.cjs} +14 -8
- package/dist/preset.cjs +30 -30
- package/dist/preset.js +1 -1
- package/dist/rules/import.cjs +1 -1
- package/dist/rules/jsx-a11y.cjs +1 -1
- package/dist/rules/react-hooks.cjs +1 -1
- package/dist/rules/react.cjs +1 -1
- package/dist/rules/storm.cjs +3 -3
- package/dist/rules/storm.js +1 -1
- package/dist/rules/ts-docs.cjs +1 -1
- package/dist/utils/banner-plugin.cjs +4 -4
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/create-flat-import-plugin.cjs +1 -1
- package/dist/utils/format-config.cjs +3 -3
- package/dist/utils/get-file-banner.cjs +3 -3
- package/dist/utils/ignores.cjs +1 -1
- package/dist/utils/index.cjs +3 -3
- package/package.json +1 -1
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 -->
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
var _chunkESFBJFNUcjs = require('./chunk-ESFBJFNU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkLFYDLNPIcjs = require('./chunk-LFYDLNPI.cjs');
|
|
7
7
|
|
|
8
8
|
// src/utils/get-file-banner.ts
|
|
9
|
-
var getFileBanner = /* @__PURE__ */
|
|
9
|
+
var getFileBanner = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (name = "") => {
|
|
10
10
|
if (!name) {
|
|
11
11
|
name = process.env.STORM_NAMESPACE || "";
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk5MDD4YRFcjs = require('./chunk-5MDD4YRF.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkESFBJFNUcjs = require('./chunk-ESFBJFNU.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkLFYDLNPIcjs = require('./chunk-LFYDLNPI.cjs');
|
|
10
10
|
|
|
11
11
|
// src/utils/banner-plugin.ts
|
|
12
12
|
var _utils = require('@typescript-eslint/utils');
|
|
@@ -18,13 +18,13 @@ function match(actual, expected) {
|
|
|
18
18
|
return expected === actual;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
_chunkLFYDLNPIcjs.__name.call(void 0, match, "match");
|
|
22
22
|
function excludeShebangs(comments) {
|
|
23
23
|
return comments.filter(function(comment) {
|
|
24
24
|
return comment.type !== "Shebang";
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
_chunkLFYDLNPIcjs.__name.call(void 0, excludeShebangs, "excludeShebangs");
|
|
28
28
|
function getLeadingComments(context, node) {
|
|
29
29
|
const all = excludeShebangs(context.getSourceCode().getAllComments(node.body.length ? node.body[0] : node));
|
|
30
30
|
if (all[0].type.toLowerCase() === "block") {
|
|
@@ -41,7 +41,7 @@ function getLeadingComments(context, node) {
|
|
|
41
41
|
}
|
|
42
42
|
return all.slice(0, i);
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
_chunkLFYDLNPIcjs.__name.call(void 0, getLeadingComments, "getLeadingComments");
|
|
45
45
|
function genCommentBody(commentType, textArray, eol, numNewlines) {
|
|
46
46
|
const eols = eol.repeat(numNewlines);
|
|
47
47
|
if (commentType === "block") {
|
|
@@ -50,7 +50,7 @@ function genCommentBody(commentType, textArray, eol, numNewlines) {
|
|
|
50
50
|
return "//" + textArray.join(eol + "//") + eols;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
_chunkLFYDLNPIcjs.__name.call(void 0, genCommentBody, "genCommentBody");
|
|
54
54
|
function genCommentsRange(context, comments, eol) {
|
|
55
55
|
const start = comments[0].range[0];
|
|
56
56
|
let end = comments.slice(-1)[0].range[1];
|
|
@@ -62,19 +62,19 @@ function genCommentsRange(context, comments, eol) {
|
|
|
62
62
|
end
|
|
63
63
|
];
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
_chunkLFYDLNPIcjs.__name.call(void 0, genCommentsRange, "genCommentsRange");
|
|
66
66
|
function genPrependFixer(commentType, node, bannerLines, eol, numNewlines) {
|
|
67
67
|
return function(fixer) {
|
|
68
68
|
return fixer.insertTextBefore(node, genCommentBody(commentType, bannerLines, eol, numNewlines));
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
_chunkLFYDLNPIcjs.__name.call(void 0, genPrependFixer, "genPrependFixer");
|
|
72
72
|
function genReplaceFixer(commentType, context, leadingComments, bannerLines, eol, numNewlines) {
|
|
73
73
|
return function(fixer) {
|
|
74
74
|
return fixer.replaceTextRange(genCommentsRange(context, leadingComments, eol), genCommentBody(commentType, bannerLines, eol, numNewlines));
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
_chunkLFYDLNPIcjs.__name.call(void 0, genReplaceFixer, "genReplaceFixer");
|
|
78
78
|
function getEOL(options) {
|
|
79
79
|
if (options.lineEndings === "unix") {
|
|
80
80
|
return "\n";
|
|
@@ -84,7 +84,7 @@ function getEOL(options) {
|
|
|
84
84
|
}
|
|
85
85
|
return _os2.default.EOL;
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
_chunkLFYDLNPIcjs.__name.call(void 0, getEOL, "getEOL");
|
|
88
88
|
function hasBanner(commentType, src) {
|
|
89
89
|
if (src.startsWith("#!")) {
|
|
90
90
|
const bannerLines = src.split(/\r?\n/);
|
|
@@ -102,7 +102,7 @@ function hasBanner(commentType, src) {
|
|
|
102
102
|
}
|
|
103
103
|
return commentType === "block" && src.startsWith("/*") || commentType === "lint" && src.startsWith("//") || commentType !== "block" && commentType !== "lint" && commentType && src.startsWith(commentType);
|
|
104
104
|
}
|
|
105
|
-
|
|
105
|
+
_chunkLFYDLNPIcjs.__name.call(void 0, hasBanner, "hasBanner");
|
|
106
106
|
function matchesLineEndings(src, num) {
|
|
107
107
|
for (let j = 0; j < num; ++j) {
|
|
108
108
|
const m = src.match(/^(\r\n|\r|\n)/);
|
|
@@ -114,7 +114,7 @@ function matchesLineEndings(src, num) {
|
|
|
114
114
|
}
|
|
115
115
|
return true;
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
_chunkLFYDLNPIcjs.__name.call(void 0, matchesLineEndings, "matchesLineEndings");
|
|
118
118
|
var bannerRule = _utils.ESLintUtils.RuleCreator(() => `https://docs.stormsoftware.com/eslint/rules/banner`)({
|
|
119
119
|
name: "banner",
|
|
120
120
|
meta: {
|
|
@@ -163,7 +163,7 @@ var bannerRule = _utils.ESLintUtils.RuleCreator(() => `https://docs.stormsoftwar
|
|
|
163
163
|
],
|
|
164
164
|
create(context, [{ banner, repositoryName = "", commentType = "block", numNewlines = 2 }]) {
|
|
165
165
|
if (!banner) {
|
|
166
|
-
banner =
|
|
166
|
+
banner = _chunk5MDD4YRFcjs.getFileBanner.call(void 0, repositoryName);
|
|
167
167
|
}
|
|
168
168
|
const options = context.options;
|
|
169
169
|
const eol = getEOL(options);
|
|
@@ -171,7 +171,7 @@ var bannerRule = _utils.ESLintUtils.RuleCreator(() => `https://docs.stormsoftwar
|
|
|
171
171
|
const bannerLines = banner.split(/\r?\n/);
|
|
172
172
|
let fixLines = bannerLines;
|
|
173
173
|
return {
|
|
174
|
-
Program: /* @__PURE__ */
|
|
174
|
+
Program: /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, function(node) {
|
|
175
175
|
if (!hasBanner(commentType, context.sourceCode.getText())) {
|
|
176
176
|
context.report({
|
|
177
177
|
loc: node.loc,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
|
|
4
|
-
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@22.10.5__@swc+core@1.7.26_@swc+
|
|
4
|
+
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@22.10.5__@swc+core@1.7.26_@swc+helpers_ygwpc3jxrer2ex7opbxklnvwxm/node_modules/tsup/assets/cjs_shims.js
|
|
5
5
|
var getImportMetaUrl = /* @__PURE__ */ __name(() => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href, "getImportMetaUrl");
|
|
6
6
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
7
7
|
|
|
@@ -803,10 +803,19 @@ var getStormRulesConfig = /* @__PURE__ */ __name((options) => {
|
|
|
803
803
|
"error",
|
|
804
804
|
"always"
|
|
805
805
|
],
|
|
806
|
-
//
|
|
807
|
-
|
|
806
|
+
// Require or disallow padding lines between statements
|
|
807
|
+
// https://eslint.org/docs/rules/padding-line-between-statements
|
|
808
|
+
"padding-line-between-statements": [
|
|
808
809
|
"error",
|
|
809
|
-
|
|
810
|
+
{
|
|
811
|
+
blankLine: "always",
|
|
812
|
+
prev: [
|
|
813
|
+
"const",
|
|
814
|
+
"let",
|
|
815
|
+
"var"
|
|
816
|
+
],
|
|
817
|
+
next: "return"
|
|
818
|
+
}
|
|
810
819
|
],
|
|
811
820
|
// enforces new line after each method call in the chain to make it
|
|
812
821
|
// more readable and easy to maintain
|
|
@@ -1060,9 +1069,6 @@ var getStormRulesConfig = /* @__PURE__ */ __name((options) => {
|
|
|
1060
1069
|
allowSingleLineBlocks: true
|
|
1061
1070
|
}
|
|
1062
1071
|
],
|
|
1063
|
-
// Require or disallow padding lines between statements
|
|
1064
|
-
// https://eslint.org/docs/rules/padding-line-between-statements
|
|
1065
|
-
"padding-line-between-statements": "off",
|
|
1066
1072
|
// Disallow the use of Math.pow in favor of the ** operator
|
|
1067
1073
|
// https://eslint.org/docs/rules/prefer-exponentiation-operator
|
|
1068
1074
|
"prefer-exponentiation-operator": "error",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLFYDLNPIcjs = require('./chunk-LFYDLNPI.cjs');
|
|
4
4
|
|
|
5
5
|
// src/utils/format-config.ts
|
|
6
|
-
var formatConfig = /* @__PURE__ */
|
|
6
|
+
var formatConfig = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (name, config = []) => {
|
|
7
7
|
return config.map((config2, index) => {
|
|
8
8
|
if (!config2 || config2.name) {
|
|
9
9
|
return _nullishCoalesce(config2, () => ( {}));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLFYDLNPIcjs = require('./chunk-LFYDLNPI.cjs');
|
|
4
4
|
|
|
5
5
|
// src/rules/storm.ts
|
|
6
|
-
var getStormRulesConfig = /* @__PURE__ */
|
|
6
|
+
var getStormRulesConfig = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (options) => {
|
|
7
7
|
let rules = {
|
|
8
8
|
/*************************************************************
|
|
9
9
|
*
|
|
@@ -803,10 +803,19 @@ var getStormRulesConfig = /* @__PURE__ */ _chunkQDLKHXPXcjs.__name.call(void 0,
|
|
|
803
803
|
"error",
|
|
804
804
|
"always"
|
|
805
805
|
],
|
|
806
|
-
//
|
|
807
|
-
|
|
806
|
+
// Require or disallow padding lines between statements
|
|
807
|
+
// https://eslint.org/docs/rules/padding-line-between-statements
|
|
808
|
+
"padding-line-between-statements": [
|
|
808
809
|
"error",
|
|
809
|
-
|
|
810
|
+
{
|
|
811
|
+
blankLine: "always",
|
|
812
|
+
prev: [
|
|
813
|
+
"const",
|
|
814
|
+
"let",
|
|
815
|
+
"var"
|
|
816
|
+
],
|
|
817
|
+
next: "return"
|
|
818
|
+
}
|
|
810
819
|
],
|
|
811
820
|
// enforces new line after each method call in the chain to make it
|
|
812
821
|
// more readable and easy to maintain
|
|
@@ -1060,9 +1069,6 @@ var getStormRulesConfig = /* @__PURE__ */ _chunkQDLKHXPXcjs.__name.call(void 0,
|
|
|
1060
1069
|
allowSingleLineBlocks: true
|
|
1061
1070
|
}
|
|
1062
1071
|
],
|
|
1063
|
-
// Require or disallow padding lines between statements
|
|
1064
|
-
// https://eslint.org/docs/rules/padding-line-between-statements
|
|
1065
|
-
"padding-line-between-statements": "off",
|
|
1066
1072
|
// Disallow the use of Math.pow in favor of the ** operator
|
|
1067
1073
|
// https://eslint.org/docs/rules/prefer-exponentiation-operator
|
|
1068
1074
|
"prefer-exponentiation-operator": "error",
|
package/dist/preset.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQHCIEM2Kcjs = require('./chunk-QHCIEM2K.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkYQQ366F7cjs = require('./chunk-YQQ366F7.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkTT6UR2PTcjs = require('./chunk-TT6UR2PT.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunkJS7W7LMDcjs = require('./chunk-JS7W7LMD.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
16
|
-
require('./chunk-
|
|
15
|
+
var _chunkKXIBONRPcjs = require('./chunk-KXIBONRP.cjs');
|
|
16
|
+
require('./chunk-5MDD4YRF.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -22,7 +22,7 @@ var _chunkESFBJFNUcjs = require('./chunk-ESFBJFNU.cjs');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkLFYDLNPIcjs = require('./chunk-LFYDLNPI.cjs');
|
|
26
26
|
|
|
27
27
|
// src/preset.ts
|
|
28
28
|
var _recommended = require('@cspell/eslint-plugin/recommended'); var _recommended2 = _interopRequireDefault(_recommended);
|
|
@@ -236,20 +236,20 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
236
236
|
// ../config-tools/src/logger/chalk.ts
|
|
237
237
|
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
238
238
|
var chalkDefault = {
|
|
239
|
-
hex: /* @__PURE__ */
|
|
240
|
-
bgHex: /* @__PURE__ */
|
|
241
|
-
whiteBright: /* @__PURE__ */
|
|
239
|
+
hex: /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (_) => (message) => message, "hex"),
|
|
240
|
+
bgHex: /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (_) => ({
|
|
241
|
+
whiteBright: /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (message) => message, "whiteBright")
|
|
242
242
|
}), "bgHex"),
|
|
243
|
-
whiteBright: /* @__PURE__ */
|
|
243
|
+
whiteBright: /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (message) => message, "whiteBright"),
|
|
244
244
|
bold: {
|
|
245
|
-
hex: /* @__PURE__ */
|
|
246
|
-
bgHex: /* @__PURE__ */
|
|
247
|
-
whiteBright: /* @__PURE__ */
|
|
245
|
+
hex: /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (_) => (message) => message, "hex"),
|
|
246
|
+
bgHex: /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (_) => ({
|
|
247
|
+
whiteBright: /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (message) => message, "whiteBright")
|
|
248
248
|
}), "bgHex"),
|
|
249
|
-
whiteBright: /* @__PURE__ */
|
|
249
|
+
whiteBright: /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (message) => message, "whiteBright")
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
var getChalk = /* @__PURE__ */
|
|
252
|
+
var getChalk = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, () => {
|
|
253
253
|
let _chalk = _chalk3.default;
|
|
254
254
|
if (!_optionalChain([_chalk, 'optionalAccess', _2 => _2.hex]) || !_optionalChain([_chalk, 'optionalAccess', _3 => _3.bold, 'optionalAccess', _4 => _4.hex]) || !_optionalChain([_chalk, 'optionalAccess', _5 => _5.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _6 => _6.whiteBright])) {
|
|
255
255
|
_chalk = chalkDefault;
|
|
@@ -258,7 +258,7 @@ var getChalk = /* @__PURE__ */ _chunkQDLKHXPXcjs.__name.call(void 0, () => {
|
|
|
258
258
|
}, "getChalk");
|
|
259
259
|
|
|
260
260
|
// ../config-tools/src/logger/get-log-level.ts
|
|
261
|
-
var getLogLevel = /* @__PURE__ */
|
|
261
|
+
var getLogLevel = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (label) => {
|
|
262
262
|
switch (label) {
|
|
263
263
|
case "all":
|
|
264
264
|
return LogLevel.ALL;
|
|
@@ -282,7 +282,7 @@ var getLogLevel = /* @__PURE__ */ _chunkQDLKHXPXcjs.__name.call(void 0, (label)
|
|
|
282
282
|
}, "getLogLevel");
|
|
283
283
|
|
|
284
284
|
// ../config-tools/src/logger/console.ts
|
|
285
|
-
var getLogFn = /* @__PURE__ */
|
|
285
|
+
var getLogFn = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}) => {
|
|
286
286
|
const _chalk = getChalk();
|
|
287
287
|
const colors = !_optionalChain([config, 'access', _7 => _7.colors, 'optionalAccess', _8 => _8.dark]) && !_optionalChain([config, 'access', _9 => _9.colors, 'optionalAccess', _10 => _10["base"]]) && !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12["base"], 'optionalAccess', _13 => _13.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"], 'optionalAccess', _18 => _18.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _19 => _19.colors, 'optionalAccess', _20 => _20["base"]]) ? _optionalChain([config, 'access', _21 => _21.colors, 'optionalAccess', _22 => _22["base"]]) : DEFAULT_COLOR_CONFIG;
|
|
288
288
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
@@ -331,13 +331,13 @@ var getLogFn = /* @__PURE__ */ _chunkQDLKHXPXcjs.__name.call(void 0, (logLevel =
|
|
|
331
331
|
`);
|
|
332
332
|
};
|
|
333
333
|
}, "getLogFn");
|
|
334
|
-
var writeFatal = /* @__PURE__ */
|
|
335
|
-
var writeError = /* @__PURE__ */
|
|
336
|
-
var writeInfo = /* @__PURE__ */
|
|
337
|
-
var writeDebug = /* @__PURE__ */
|
|
338
|
-
var writeTrace = /* @__PURE__ */
|
|
334
|
+
var writeFatal = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.FATAL, config)(message), "writeFatal");
|
|
335
|
+
var writeError = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ERROR, config)(message), "writeError");
|
|
336
|
+
var writeInfo = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.INFO, config)(message), "writeInfo");
|
|
337
|
+
var writeDebug = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
|
|
338
|
+
var writeTrace = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
|
|
339
339
|
var MAX_DEPTH = 4;
|
|
340
|
-
var formatLogMessage = /* @__PURE__ */
|
|
340
|
+
var formatLogMessage = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (message, options = {}, depth = 0) => {
|
|
341
341
|
if (depth > MAX_DEPTH) {
|
|
342
342
|
return "<max depth>";
|
|
343
343
|
}
|
|
@@ -353,7 +353,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${pre
|
|
|
353
353
|
skip
|
|
354
354
|
}, depth + 1) : message[key]}`).join("\n")}` : message;
|
|
355
355
|
}, "formatLogMessage");
|
|
356
|
-
var _isFunction = /* @__PURE__ */
|
|
356
|
+
var _isFunction = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (value) => {
|
|
357
357
|
try {
|
|
358
358
|
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _23 => _23.constructor]) && _optionalChain([value, 'optionalAccess', _24 => _24.call]) && _optionalChain([value, 'optionalAccess', _25 => _25.apply]));
|
|
359
359
|
} catch (e) {
|
|
@@ -469,7 +469,7 @@ function getStormConfig(options = {
|
|
|
469
469
|
"@cspell/spellchecker": [
|
|
470
470
|
"warn",
|
|
471
471
|
{
|
|
472
|
-
configFile: new URL(cspellConfigFile,
|
|
472
|
+
configFile: new URL(cspellConfigFile, _chunkLFYDLNPIcjs.importMetaUrl).toString(),
|
|
473
473
|
autoFix: true
|
|
474
474
|
}
|
|
475
475
|
]
|
|
@@ -518,10 +518,10 @@ function getStormConfig(options = {
|
|
|
518
518
|
rules: _chunkJS7W7LMDcjs.ts_docs_default
|
|
519
519
|
});
|
|
520
520
|
configs.push({
|
|
521
|
-
...
|
|
521
|
+
..._chunkKXIBONRPcjs.banner_plugin_default.configs["recommended"],
|
|
522
522
|
name: "banner",
|
|
523
523
|
plugins: {
|
|
524
|
-
banner:
|
|
524
|
+
banner: _chunkKXIBONRPcjs.banner_plugin_default
|
|
525
525
|
},
|
|
526
526
|
files: [
|
|
527
527
|
_chunkESFBJFNUcjs.CODE_FILE
|
|
@@ -618,7 +618,7 @@ function getStormConfig(options = {
|
|
|
618
618
|
}
|
|
619
619
|
},
|
|
620
620
|
rules: {
|
|
621
|
-
...
|
|
621
|
+
..._chunkTT6UR2PTcjs.getStormRulesConfig.call(void 0, {
|
|
622
622
|
...options,
|
|
623
623
|
typescriptEslintConfigType,
|
|
624
624
|
useUnicorn,
|
|
@@ -686,7 +686,7 @@ function getStormConfig(options = {
|
|
|
686
686
|
}), {
|
|
687
687
|
logLevel
|
|
688
688
|
});
|
|
689
|
-
const result =
|
|
689
|
+
const result = _chunkQHCIEM2Kcjs.formatConfig.call(void 0, "Preset", configs.reduce((ret, config) => {
|
|
690
690
|
delete config.parserOptions;
|
|
691
691
|
const existingIndex = ret.findIndex((existing) => areFilesEqual(existing.files, config.files));
|
|
692
692
|
if (existingIndex >= 0) {
|
|
@@ -717,8 +717,8 @@ function getStormConfig(options = {
|
|
|
717
717
|
throw error;
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
|
-
|
|
721
|
-
var areFilesEqual = /* @__PURE__ */
|
|
720
|
+
_chunkLFYDLNPIcjs.__name.call(void 0, getStormConfig, "getStormConfig");
|
|
721
|
+
var areFilesEqual = /* @__PURE__ */ _chunkLFYDLNPIcjs.__name.call(void 0, (files1, files2) => {
|
|
722
722
|
if (files1 === files2) {
|
|
723
723
|
return true;
|
|
724
724
|
} else if (!files1 || !files2) {
|
package/dist/preset.js
CHANGED
package/dist/rules/import.cjs
CHANGED
package/dist/rules/jsx-a11y.cjs
CHANGED
package/dist/rules/react.cjs
CHANGED
package/dist/rules/storm.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkTT6UR2PTcjs = require('../chunk-TT6UR2PT.cjs');
|
|
4
|
+
require('../chunk-LFYDLNPI.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.getStormRulesConfig =
|
|
7
|
+
exports.getStormRulesConfig = _chunkTT6UR2PTcjs.getStormRulesConfig;
|
package/dist/rules/storm.js
CHANGED
package/dist/rules/ts-docs.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
var _chunkJS7W7LMDcjs = require('../chunk-JS7W7LMD.cjs');
|
|
4
|
-
require('../chunk-
|
|
4
|
+
require('../chunk-LFYDLNPI.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
exports.default = _chunkJS7W7LMDcjs.ts_docs_default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkKXIBONRPcjs = require('../chunk-KXIBONRP.cjs');
|
|
4
|
+
require('../chunk-5MDD4YRF.cjs');
|
|
5
5
|
require('../chunk-ESFBJFNU.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-LFYDLNPI.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.default =
|
|
9
|
+
exports.default = _chunkKXIBONRPcjs.banner_plugin_default;
|
package/dist/utils/constants.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('../chunk-LFYDLNPI.cjs');
|
|
2
2
|
|
|
3
3
|
// src/utils/create-flat-import-plugin.ts
|
|
4
4
|
var _eslintpluginimport = require('eslint-plugin-import'); var _eslintpluginimport2 = _interopRequireDefault(_eslintpluginimport);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkQHCIEM2Kcjs = require('../chunk-QHCIEM2K.cjs');
|
|
4
|
+
require('../chunk-LFYDLNPI.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.formatConfig =
|
|
7
|
+
exports.formatConfig = _chunkQHCIEM2Kcjs.formatConfig;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk5MDD4YRFcjs = require('../chunk-5MDD4YRF.cjs');
|
|
4
4
|
require('../chunk-ESFBJFNU.cjs');
|
|
5
|
-
require('../chunk-
|
|
5
|
+
require('../chunk-LFYDLNPI.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.getFileBanner =
|
|
8
|
+
exports.getFileBanner = _chunk5MDD4YRFcjs.getFileBanner;
|
package/dist/utils/ignores.cjs
CHANGED
package/dist/utils/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQHCIEM2Kcjs = require('../chunk-QHCIEM2K.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkYQQ366F7cjs = require('../chunk-YQQ366F7.cjs');
|
|
@@ -16,7 +16,7 @@ var _chunkYQQ366F7cjs = require('../chunk-YQQ366F7.cjs');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkESFBJFNUcjs = require('../chunk-ESFBJFNU.cjs');
|
|
19
|
-
require('../chunk-
|
|
19
|
+
require('../chunk-LFYDLNPI.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -30,4 +30,4 @@ require('../chunk-QDLKHXPX.cjs');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
exports.ACRONYMS_LIST = _chunkESFBJFNUcjs.ACRONYMS_LIST; exports.CODE_BLOCK = _chunkESFBJFNUcjs.CODE_BLOCK; exports.CODE_FILE = _chunkESFBJFNUcjs.CODE_FILE; exports.JS_FILE = _chunkESFBJFNUcjs.JS_FILE; exports.JS_FILES = _chunkESFBJFNUcjs.JS_FILES; exports.REACT_RESTRICTED_SYNTAX = _chunkESFBJFNUcjs.REACT_RESTRICTED_SYNTAX; exports.RESTRICTED_GLOBALS = _chunkESFBJFNUcjs.RESTRICTED_GLOBALS; exports.RESTRICTED_MODULES = _chunkESFBJFNUcjs.RESTRICTED_MODULES; exports.RESTRICTED_SYNTAX = _chunkESFBJFNUcjs.RESTRICTED_SYNTAX; exports.TS_FILE = _chunkESFBJFNUcjs.TS_FILE; exports.formatConfig =
|
|
33
|
+
exports.ACRONYMS_LIST = _chunkESFBJFNUcjs.ACRONYMS_LIST; exports.CODE_BLOCK = _chunkESFBJFNUcjs.CODE_BLOCK; exports.CODE_FILE = _chunkESFBJFNUcjs.CODE_FILE; exports.JS_FILE = _chunkESFBJFNUcjs.JS_FILE; exports.JS_FILES = _chunkESFBJFNUcjs.JS_FILES; exports.REACT_RESTRICTED_SYNTAX = _chunkESFBJFNUcjs.REACT_RESTRICTED_SYNTAX; exports.RESTRICTED_GLOBALS = _chunkESFBJFNUcjs.RESTRICTED_GLOBALS; exports.RESTRICTED_MODULES = _chunkESFBJFNUcjs.RESTRICTED_MODULES; exports.RESTRICTED_SYNTAX = _chunkESFBJFNUcjs.RESTRICTED_SYNTAX; exports.TS_FILE = _chunkESFBJFNUcjs.TS_FILE; exports.formatConfig = _chunkQHCIEM2Kcjs.formatConfig; exports.ignores = _chunkYQQ366F7cjs.ignores;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@storm-software/eslint","version":"0.108.
|
|
1
|
+
{"name":"@storm-software/eslint","version":"0.108.2","type":"module","description":"⚡ A package containing the base ESLint configuration used by Storm Software across many projects.","repository":{"type":"github","url":"https://github.com/storm-software/storm-ops","directory":"packages/eslint"},"homepage":"https://stormsoftware.com","bugs":"https://github.com/storm-software/storm-ops/issues","author":{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"},"maintainers":[{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"},{"name":"Pat Sullivan","email":"admin@stormsoftware.com","url":"https://patsullivan.org"}],"contributors":[{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"}],"funding":{"type":"github","url":"https://github.com/sponsors/storm-software"},"license":"Apache-2.0","private":false,"packageManager":"pnpm@9.15.2","engines":{"node":">=22.4.0","pnpm":">=9.15.2"},"main":"./dist/preset.cjs","module":"./dist/preset.js","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/preset.d.ts","default":"./dist/preset.js"},"require":{"types":"./dist/preset.d.cts","default":"./dist/preset.cjs"},"default":{"types":"./dist/preset.d.ts","default":"./dist/preset.js"}},"./index":{"import":{"types":"./dist/preset.d.ts","default":"./dist/preset.js"},"require":{"types":"./dist/preset.d.cts","default":"./dist/preset.cjs"},"default":{"types":"./dist/preset.d.ts","default":"./dist/preset.js"}},"./preset":{"import":{"types":"./dist/preset.d.ts","default":"./dist/preset.js"},"require":{"types":"./dist/preset.d.cts","default":"./dist/preset.cjs"},"default":{"types":"./dist/preset.d.ts","default":"./dist/preset.js"}},"./rules/*":{"import":{"types":"./dist/rules/*.d.ts","default":"./dist/rules/*.js"},"require":{"types":"./dist/rules/*.d.cts","default":"./dist/rules/*.cjs"},"default":{"types":"./dist/rules/*.d.ts","default":"./dist/rules/*.js"}},"./utils/*":{"import":{"types":"./dist/utils/*.d.ts","default":"./dist/utils/*.js"},"require":{"types":"./dist/utils/*.d.cts","default":"./dist/utils/*.cjs"},"default":{"types":"./dist/utils/*.d.ts","default":"./dist/utils/*.js"}}},"types":"./dist/preset.d.ts","files":["dist/**/*"],"keywords":["eslint","eslint-config","eslintconfig","monorepo","storm","storm-ops","sullivanpj"],"peerDependencies":{"@nx/eslint":"^20.3.1","@nx/eslint-plugin":"^20.3.1","eslint":"^9.12.0","graphql":">=16.9.0"},"peerDependenciesMeta":{"@nx/eslint":{"optional":true},"@nx/eslint-plugin":{"optional":true},"eslint":{"optional":false},"graphql":{"optional":true}},"dependencies":{"@cspell/eslint-plugin":"8.13.1","@graphql-eslint/eslint-plugin":"3.20.1","@next/eslint-plugin-next":"14.2.4","defu":"6.1.4","eslint-plugin-es-x":"7.6.0","eslint-plugin-import":"^2.29.1","eslint-plugin-json":"4.0.0","eslint-plugin-jsonc":"2.16.0","eslint-plugin-jsx-a11y":"^6.8.0","eslint-plugin-markdown":"^5.1.0","eslint-plugin-markdownlint":"0.6.0","eslint-plugin-mdx":"3.1.5","eslint-plugin-n":"17.8.1","eslint-plugin-prettier":"^5.0.0","eslint-plugin-promise":"6.2.0","eslint-plugin-react":"^7.34.3","eslint-plugin-react-compiler":"0.0.0-experimental-b6997ec-20240909","eslint-plugin-react-hooks":"^5.1.0","eslint-plugin-relay":"1.8.3","eslint-plugin-sonarjs":"1.0.3","eslint-plugin-storybook":"0.11.0","eslint-plugin-tsdoc":"0.4.0","eslint-plugin-unicorn":"56.0.0","eslint-plugin-yml":"1.14.0","globals":"^15.8.0","jsonc-eslint-parser":"2.4.0","synckit":"0.9.0","typescript-eslint":"^8.13.0","ws":"8.17.1","yaml-eslint-parser":"1.2.3"},"devDependencies":{"@eslint/config-inspector":"^0.5.1","@nx/eslint":"^20.3.1","@nx/eslint-plugin":"^20.3.1","@types/eslint":"^9.6.1","@types/eslint__js":"^8.42.3","@types/node":"^22.10.2","eslint":"^9.12.0","eslint-typegen":"^1.0.0","graphql":">=16.9.0","tsup":"8.3.5","typescript":"^5.7.2"},"publishConfig":{"access":"public"}}
|