@storm-software/eslint 0.85.0 → 0.85.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.mjs +26 -5
- package/package.json +2 -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 -->
|
package/dist/preset.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import unicorn from 'eslint-plugin-unicorn';
|
|
|
18
18
|
import yml from 'eslint-plugin-yml';
|
|
19
19
|
import globals from 'globals';
|
|
20
20
|
import { writeInfo, writeDebug } from '@storm-software/config-tools';
|
|
21
|
-
import {
|
|
21
|
+
import { defu } from 'defu';
|
|
22
22
|
import tsEslint$1 from 'typescript-eslint';
|
|
23
23
|
import require$$0 from 'eslint/use-at-your-own-risk';
|
|
24
24
|
import require$$0$1 from 'eslint';
|
|
@@ -13175,10 +13175,17 @@ function getStormConfig(options = {
|
|
|
13175
13175
|
}
|
|
13176
13176
|
const result = formatConfig(
|
|
13177
13177
|
"Preset",
|
|
13178
|
-
configs.reduce(
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13178
|
+
configs.reduce((ret, config) => {
|
|
13179
|
+
const existingIndex = ret.findIndex(
|
|
13180
|
+
(existing) => areFilesEqual(existing.files, config.files)
|
|
13181
|
+
);
|
|
13182
|
+
if (existingIndex) {
|
|
13183
|
+
ret[existingIndex] = defu(ret[existingIndex], config);
|
|
13184
|
+
} else {
|
|
13185
|
+
ret.push(config);
|
|
13186
|
+
}
|
|
13187
|
+
return ret;
|
|
13188
|
+
}, [])
|
|
13182
13189
|
);
|
|
13183
13190
|
writeInfo("\u2699\uFE0F Completed generated Storm ESLint configuration objects", {
|
|
13184
13191
|
logLevel: "all"
|
|
@@ -13186,5 +13193,19 @@ function getStormConfig(options = {
|
|
|
13186
13193
|
writeDebug(result, { logLevel: "all" });
|
|
13187
13194
|
return result;
|
|
13188
13195
|
}
|
|
13196
|
+
const areFilesEqual = (files1, files2) => {
|
|
13197
|
+
if (files1 === files2) {
|
|
13198
|
+
return true;
|
|
13199
|
+
}
|
|
13200
|
+
if (files1 == null || files2 == null) {
|
|
13201
|
+
return false;
|
|
13202
|
+
}
|
|
13203
|
+
if (files1.length !== files2.length) {
|
|
13204
|
+
return false;
|
|
13205
|
+
}
|
|
13206
|
+
return files1.every(
|
|
13207
|
+
(file, index) => Array.isArray(file) && Array.isArray(files2?.[index]) ? areFilesEqual(file, files2?.[index]) : file === files2?.[index]
|
|
13208
|
+
);
|
|
13209
|
+
};
|
|
13189
13210
|
|
|
13190
13211
|
export { getStormConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/eslint",
|
|
3
|
-
"version": "0.85.
|
|
3
|
+
"version": "0.85.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "⚡ A package containing the base ESLint configuration used by Storm Software across many projects.",
|
|
6
6
|
"repository": {
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"@cspell/eslint-plugin": "8.13.1",
|
|
75
75
|
"@graphql-eslint/eslint-plugin": "3.20.1",
|
|
76
76
|
"@next/eslint-plugin-next": "14.2.4",
|
|
77
|
+
"defu": "6.1.4",
|
|
77
78
|
"eslint-plugin-es-x": "7.6.0",
|
|
78
79
|
"eslint-plugin-import": "^2.29.1",
|
|
79
80
|
"eslint-plugin-json": "4.0.0",
|
|
@@ -95,7 +96,6 @@
|
|
|
95
96
|
"eslint-plugin-yml": "1.14.0",
|
|
96
97
|
"globals": "^15.8.0",
|
|
97
98
|
"jsonc-eslint-parser": "2.4.0",
|
|
98
|
-
"radash": "12.1.0",
|
|
99
99
|
"synckit": "0.9.0",
|
|
100
100
|
"typescript-eslint": "8.10.0",
|
|
101
101
|
"ws": "8.17.1",
|