@storm-software/eslint 0.107.3 → 0.108.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.
- package/README.md +1 -1
- package/dist/preset.cjs +19 -8
- package/dist/preset.js +17 -6
- 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 -->
|
package/dist/preset.cjs
CHANGED
|
@@ -17,6 +17,7 @@ require('./chunk-KND2ZTLT.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
|
|
20
21
|
var _chunkESFBJFNUcjs = require('./chunk-ESFBJFNU.cjs');
|
|
21
22
|
|
|
22
23
|
|
|
@@ -24,6 +25,7 @@ var _chunkESFBJFNUcjs = require('./chunk-ESFBJFNU.cjs');
|
|
|
24
25
|
var _chunkQDLKHXPXcjs = require('./chunk-QDLKHXPX.cjs');
|
|
25
26
|
|
|
26
27
|
// src/preset.ts
|
|
28
|
+
var _recommended = require('@cspell/eslint-plugin/recommended'); var _recommended2 = _interopRequireDefault(_recommended);
|
|
27
29
|
var _js = require('@eslint/js'); var _js2 = _interopRequireDefault(_js);
|
|
28
30
|
var _eslintpluginnext = require('@next/eslint-plugin-next'); var _eslintpluginnext2 = _interopRequireDefault(_eslintpluginnext);
|
|
29
31
|
var _nxjs = require('@nx/eslint-plugin/nx.js'); var _nxjs2 = _interopRequireDefault(_nxjs);
|
|
@@ -333,6 +335,7 @@ var writeFatal = /* @__PURE__ */ _chunkQDLKHXPXcjs.__name.call(void 0, (message,
|
|
|
333
335
|
var writeError = /* @__PURE__ */ _chunkQDLKHXPXcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ERROR, config)(message), "writeError");
|
|
334
336
|
var writeInfo = /* @__PURE__ */ _chunkQDLKHXPXcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.INFO, config)(message), "writeInfo");
|
|
335
337
|
var writeDebug = /* @__PURE__ */ _chunkQDLKHXPXcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
|
|
338
|
+
var writeTrace = /* @__PURE__ */ _chunkQDLKHXPXcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
|
|
336
339
|
var MAX_DEPTH = 4;
|
|
337
340
|
var formatLogMessage = /* @__PURE__ */ _chunkQDLKHXPXcjs.__name.call(void 0, (message, options = {}, depth = 0) => {
|
|
338
341
|
if (depth > MAX_DEPTH) {
|
|
@@ -362,7 +365,7 @@ var _isFunction = /* @__PURE__ */ _chunkQDLKHXPXcjs.__name.call(void 0, (value)
|
|
|
362
365
|
var _defu = require('defu');
|
|
363
366
|
var _eslintpluginjson = require('eslint-plugin-json'); var _eslintpluginjson2 = _interopRequireDefault(_eslintpluginjson);
|
|
364
367
|
var _eslintpluginmarkdown = require('eslint-plugin-markdown'); var _eslintpluginmarkdown2 = _interopRequireDefault(_eslintpluginmarkdown);
|
|
365
|
-
var
|
|
368
|
+
var _recommended3 = require('eslint-plugin-prettier/recommended'); var _recommended4 = _interopRequireDefault(_recommended3);
|
|
366
369
|
var _eslintpluginreact = require('eslint-plugin-react'); var _eslintpluginreact2 = _interopRequireDefault(_eslintpluginreact);
|
|
367
370
|
var _eslintpluginreactcompiler = require('eslint-plugin-react-compiler'); var _eslintpluginreactcompiler2 = _interopRequireDefault(_eslintpluginreactcompiler);
|
|
368
371
|
var _eslintpluginreacthooks = require('eslint-plugin-react-hooks'); var _eslintpluginreacthooks2 = _interopRequireDefault(_eslintpluginreacthooks);
|
|
@@ -381,7 +384,7 @@ function getStormConfig(options = {
|
|
|
381
384
|
nx: {},
|
|
382
385
|
useReactCompiler: false,
|
|
383
386
|
logLevel: "info",
|
|
384
|
-
cspellConfigFile: "
|
|
387
|
+
cspellConfigFile: "./.vscode/cspell.json"
|
|
385
388
|
}, ...userConfigs) {
|
|
386
389
|
const tsconfig = options.tsconfig;
|
|
387
390
|
const parserOptions = options.parserOptions;
|
|
@@ -392,11 +395,11 @@ function getStormConfig(options = {
|
|
|
392
395
|
const useReactCompiler = _nullishCoalesce(options.useReactCompiler, () => ( false));
|
|
393
396
|
const logLevel = _nullishCoalesce(options.logLevel, () => ( "info"));
|
|
394
397
|
const globals = _nullishCoalesce(options.globals, () => ( {}));
|
|
395
|
-
const cspellConfigFile = options.cspellConfigFile || "
|
|
398
|
+
const cspellConfigFile = options.cspellConfigFile || "./.vscode/cspell.json";
|
|
396
399
|
try {
|
|
397
400
|
const configs = [
|
|
398
401
|
// Prettier
|
|
399
|
-
|
|
402
|
+
_recommended4.default,
|
|
400
403
|
// Import
|
|
401
404
|
// https://www.npmjs.com/package/eslint-plugin-import
|
|
402
405
|
// { plugins: { import: importEslint } },
|
|
@@ -438,6 +441,7 @@ function getStormConfig(options = {
|
|
|
438
441
|
"error",
|
|
439
442
|
{
|
|
440
443
|
buildTargets: [
|
|
444
|
+
"build-base",
|
|
441
445
|
"build"
|
|
442
446
|
],
|
|
443
447
|
ignoredDependencies: [
|
|
@@ -459,9 +463,9 @@ function getStormConfig(options = {
|
|
|
459
463
|
..._eslintpluginyml2.default.configs["flat/prettier"],
|
|
460
464
|
// CSpell
|
|
461
465
|
{
|
|
462
|
-
...
|
|
466
|
+
..._recommended2.default,
|
|
463
467
|
rules: {
|
|
464
|
-
...
|
|
468
|
+
..._recommended2.default.rules,
|
|
465
469
|
"@cspell/spellchecker": [
|
|
466
470
|
"warn",
|
|
467
471
|
{
|
|
@@ -514,13 +518,13 @@ function getStormConfig(options = {
|
|
|
514
518
|
rules: _chunkJS7W7LMDcjs.ts_docs_default
|
|
515
519
|
});
|
|
516
520
|
configs.push({
|
|
517
|
-
|
|
521
|
+
..._chunkTXTXUVRZcjs.banner_plugin_default.configs["recommended"],
|
|
518
522
|
name: "banner",
|
|
519
523
|
plugins: {
|
|
520
524
|
banner: _chunkTXTXUVRZcjs.banner_plugin_default
|
|
521
525
|
},
|
|
522
526
|
files: [
|
|
523
|
-
_chunkESFBJFNUcjs.
|
|
527
|
+
_chunkESFBJFNUcjs.CODE_FILE
|
|
524
528
|
],
|
|
525
529
|
rules: {
|
|
526
530
|
"banner/banner": [
|
|
@@ -675,6 +679,13 @@ function getStormConfig(options = {
|
|
|
675
679
|
}
|
|
676
680
|
});
|
|
677
681
|
}
|
|
682
|
+
writeTrace(formatLogMessage(configs, {
|
|
683
|
+
skip: [
|
|
684
|
+
"globals"
|
|
685
|
+
]
|
|
686
|
+
}), {
|
|
687
|
+
logLevel
|
|
688
|
+
});
|
|
678
689
|
const result = _chunkOGGLIE6Ccjs.formatConfig.call(void 0, "Preset", configs.reduce((ret, config) => {
|
|
679
690
|
delete config.parserOptions;
|
|
680
691
|
const existingIndex = ret.findIndex((existing) => areFilesEqual(existing.files, config.files));
|
package/dist/preset.js
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
import "./chunk-Y67QTC5U.js";
|
|
17
17
|
import {
|
|
18
18
|
CODE_BLOCK,
|
|
19
|
+
CODE_FILE,
|
|
19
20
|
TS_FILE
|
|
20
21
|
} from "./chunk-RTM5LCEB.js";
|
|
21
22
|
import {
|
|
@@ -23,6 +24,7 @@ import {
|
|
|
23
24
|
} from "./chunk-SHUYVCID.js";
|
|
24
25
|
|
|
25
26
|
// src/preset.ts
|
|
27
|
+
import cspell from "@cspell/eslint-plugin/recommended";
|
|
26
28
|
import eslint from "@eslint/js";
|
|
27
29
|
import next from "@next/eslint-plugin-next";
|
|
28
30
|
import nxPlugin from "@nx/eslint-plugin/nx.js";
|
|
@@ -332,6 +334,7 @@ var writeFatal = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.F
|
|
|
332
334
|
var writeError = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.ERROR, config)(message), "writeError");
|
|
333
335
|
var writeInfo = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.INFO, config)(message), "writeInfo");
|
|
334
336
|
var writeDebug = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
|
|
337
|
+
var writeTrace = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
|
|
335
338
|
var MAX_DEPTH = 4;
|
|
336
339
|
var formatLogMessage = /* @__PURE__ */ __name((message, options = {}, depth = 0) => {
|
|
337
340
|
if (depth > MAX_DEPTH) {
|
|
@@ -380,7 +383,7 @@ function getStormConfig(options = {
|
|
|
380
383
|
nx: {},
|
|
381
384
|
useReactCompiler: false,
|
|
382
385
|
logLevel: "info",
|
|
383
|
-
cspellConfigFile: "
|
|
386
|
+
cspellConfigFile: "./.vscode/cspell.json"
|
|
384
387
|
}, ...userConfigs) {
|
|
385
388
|
const tsconfig = options.tsconfig;
|
|
386
389
|
const parserOptions = options.parserOptions;
|
|
@@ -391,7 +394,7 @@ function getStormConfig(options = {
|
|
|
391
394
|
const useReactCompiler = options.useReactCompiler ?? false;
|
|
392
395
|
const logLevel = options.logLevel ?? "info";
|
|
393
396
|
const globals = options.globals ?? {};
|
|
394
|
-
const cspellConfigFile = options.cspellConfigFile || "
|
|
397
|
+
const cspellConfigFile = options.cspellConfigFile || "./.vscode/cspell.json";
|
|
395
398
|
try {
|
|
396
399
|
const configs = [
|
|
397
400
|
// Prettier
|
|
@@ -437,6 +440,7 @@ function getStormConfig(options = {
|
|
|
437
440
|
"error",
|
|
438
441
|
{
|
|
439
442
|
buildTargets: [
|
|
443
|
+
"build-base",
|
|
440
444
|
"build"
|
|
441
445
|
],
|
|
442
446
|
ignoredDependencies: [
|
|
@@ -458,9 +462,9 @@ function getStormConfig(options = {
|
|
|
458
462
|
...yml.configs["flat/prettier"],
|
|
459
463
|
// CSpell
|
|
460
464
|
{
|
|
461
|
-
...
|
|
465
|
+
...cspell,
|
|
462
466
|
rules: {
|
|
463
|
-
...
|
|
467
|
+
...cspell.rules,
|
|
464
468
|
"@cspell/spellchecker": [
|
|
465
469
|
"warn",
|
|
466
470
|
{
|
|
@@ -513,13 +517,13 @@ function getStormConfig(options = {
|
|
|
513
517
|
rules: ts_docs_default
|
|
514
518
|
});
|
|
515
519
|
configs.push({
|
|
516
|
-
|
|
520
|
+
...banner_plugin_default.configs["recommended"],
|
|
517
521
|
name: "banner",
|
|
518
522
|
plugins: {
|
|
519
523
|
banner: banner_plugin_default
|
|
520
524
|
},
|
|
521
525
|
files: [
|
|
522
|
-
|
|
526
|
+
CODE_FILE
|
|
523
527
|
],
|
|
524
528
|
rules: {
|
|
525
529
|
"banner/banner": [
|
|
@@ -674,6 +678,13 @@ function getStormConfig(options = {
|
|
|
674
678
|
}
|
|
675
679
|
});
|
|
676
680
|
}
|
|
681
|
+
writeTrace(formatLogMessage(configs, {
|
|
682
|
+
skip: [
|
|
683
|
+
"globals"
|
|
684
|
+
]
|
|
685
|
+
}), {
|
|
686
|
+
logLevel
|
|
687
|
+
});
|
|
677
688
|
const result = formatConfig("Preset", configs.reduce((ret, config) => {
|
|
678
689
|
delete config.parserOptions;
|
|
679
690
|
const existingIndex = ret.findIndex((existing) => areFilesEqual(existing.files, config.files));
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@storm-software/eslint","version":"0.
|
|
1
|
+
{"name":"@storm-software/eslint","version":"0.108.1","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"}}
|