@storm-software/eslint 0.85.1 → 0.85.3
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.d.mts +1 -1
- package/dist/preset.d.ts +1 -1
- package/dist/preset.mjs +49 -66
- 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.d.mts
CHANGED
|
@@ -7049,6 +7049,6 @@ type PresetOptions = GetStormRulesConfigOptions & {
|
|
|
7049
7049
|
* @param options - The preset options.
|
|
7050
7050
|
* @param userConfigs - Additional ESLint configurations.
|
|
7051
7051
|
*/
|
|
7052
|
-
declare function getStormConfig(options?: PresetOptions, ...userConfigs: Linter.FlatConfig[]): Linter.FlatConfig[];
|
|
7052
|
+
declare function getStormConfig(options?: PresetOptions, ...userConfigs: Linter.FlatConfig[]): Linter.FlatConfig<Linter.RulesRecord>[];
|
|
7053
7053
|
|
|
7054
7054
|
export { type PresetModuleBoundary, type PresetModuleBoundaryDepConstraints, type PresetOptions, getStormConfig };
|
package/dist/preset.d.ts
CHANGED
|
@@ -7049,6 +7049,6 @@ type PresetOptions = GetStormRulesConfigOptions & {
|
|
|
7049
7049
|
* @param options - The preset options.
|
|
7050
7050
|
* @param userConfigs - Additional ESLint configurations.
|
|
7051
7051
|
*/
|
|
7052
|
-
declare function getStormConfig(options?: PresetOptions, ...userConfigs: Linter.FlatConfig[]): Linter.FlatConfig[];
|
|
7052
|
+
declare function getStormConfig(options?: PresetOptions, ...userConfigs: Linter.FlatConfig[]): Linter.FlatConfig<Linter.RulesRecord>[];
|
|
7053
7053
|
|
|
7054
7054
|
export { type PresetModuleBoundary, type PresetModuleBoundaryDepConstraints, type PresetOptions, getStormConfig };
|
package/dist/preset.mjs
CHANGED
|
@@ -12884,6 +12884,39 @@ const formatConfig = (name, config = []) => {
|
|
|
12884
12884
|
});
|
|
12885
12885
|
};
|
|
12886
12886
|
|
|
12887
|
+
const ignores = [
|
|
12888
|
+
"**/.git/**",
|
|
12889
|
+
"**/node_modules/**",
|
|
12890
|
+
"**/src/generators/**/files/**/*",
|
|
12891
|
+
"**/dist/**",
|
|
12892
|
+
"**/tmp/**",
|
|
12893
|
+
"**/coverage/**",
|
|
12894
|
+
"**/bench/**",
|
|
12895
|
+
"**/.wrangler/**",
|
|
12896
|
+
"**/.docusaurus/**",
|
|
12897
|
+
"**/.tamagui/**",
|
|
12898
|
+
"**/tamagui.css",
|
|
12899
|
+
"**/.nx/**",
|
|
12900
|
+
"**/.next/**",
|
|
12901
|
+
"**/workbox*.js",
|
|
12902
|
+
"**/sw*.js",
|
|
12903
|
+
"**/service-worker.js",
|
|
12904
|
+
"**/fallback*.js",
|
|
12905
|
+
"**/ios/**",
|
|
12906
|
+
"**/.android/**",
|
|
12907
|
+
"**/.DS_Store/**",
|
|
12908
|
+
"**/Thumbs.db/**",
|
|
12909
|
+
"**/.cspellcache",
|
|
12910
|
+
"**/package-lock.*",
|
|
12911
|
+
"**/npm-lock.*",
|
|
12912
|
+
"**/pnpm-lock.*",
|
|
12913
|
+
"**/pnpm-lock.*",
|
|
12914
|
+
"**/bun.lockb",
|
|
12915
|
+
"**/cargo.lock",
|
|
12916
|
+
"**/next-env.d.ts",
|
|
12917
|
+
"**/CODEOWNERS"
|
|
12918
|
+
];
|
|
12919
|
+
|
|
12887
12920
|
function getStormConfig(options = {
|
|
12888
12921
|
rules: {},
|
|
12889
12922
|
ignores: [],
|
|
@@ -13018,31 +13051,13 @@ function getStormConfig(options = {
|
|
|
13018
13051
|
{
|
|
13019
13052
|
...reactPlugin.configs?.recommended,
|
|
13020
13053
|
files: ["**/*.tsx"],
|
|
13021
|
-
ignores: [
|
|
13022
|
-
"**/node_modules/**",
|
|
13023
|
-
"**/dist/**",
|
|
13024
|
-
"**/coverage/**",
|
|
13025
|
-
"**/tmp/**",
|
|
13026
|
-
"**/.nx/**",
|
|
13027
|
-
"**/.tamagui/**",
|
|
13028
|
-
"**/.next/**",
|
|
13029
|
-
...options.ignores || []
|
|
13030
|
-
],
|
|
13054
|
+
ignores: [...ignores, ...options.ignores || []],
|
|
13031
13055
|
...react
|
|
13032
13056
|
},
|
|
13033
13057
|
{
|
|
13034
13058
|
...reactHooks.configs?.recommended,
|
|
13035
13059
|
files: [TS_FILE],
|
|
13036
|
-
ignores: [
|
|
13037
|
-
"**/node_modules/**",
|
|
13038
|
-
"**/dist/**",
|
|
13039
|
-
"**/coverage/**",
|
|
13040
|
-
"**/tmp/**",
|
|
13041
|
-
"**/.nx/**",
|
|
13042
|
-
"**/.tamagui/**",
|
|
13043
|
-
"**/.next/**",
|
|
13044
|
-
...options.ignores || []
|
|
13045
|
-
]
|
|
13060
|
+
ignores: [...ignores, ...options.ignores || []]
|
|
13046
13061
|
}
|
|
13047
13062
|
// {
|
|
13048
13063
|
// files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
|
|
@@ -13052,16 +13067,7 @@ function getStormConfig(options = {
|
|
|
13052
13067
|
if (useReactCompiler) {
|
|
13053
13068
|
reactConfigs.push({
|
|
13054
13069
|
files: ["**/*.tsx"],
|
|
13055
|
-
ignores: [
|
|
13056
|
-
"**/node_modules/**",
|
|
13057
|
-
"**/dist/**",
|
|
13058
|
-
"**/coverage/**",
|
|
13059
|
-
"**/tmp/**",
|
|
13060
|
-
"**/.nx/**",
|
|
13061
|
-
"**/.tamagui/**",
|
|
13062
|
-
"**/.next/**",
|
|
13063
|
-
...options.ignores || []
|
|
13064
|
-
],
|
|
13070
|
+
ignores: [...ignores, ...options.ignores || []],
|
|
13065
13071
|
plugins: {
|
|
13066
13072
|
"react-compiler": reactCompiler
|
|
13067
13073
|
},
|
|
@@ -13075,16 +13081,7 @@ function getStormConfig(options = {
|
|
|
13075
13081
|
if (options.nextFiles && options.nextFiles.length > 0) {
|
|
13076
13082
|
configs.push({
|
|
13077
13083
|
...next.configs["core-web-vitals"],
|
|
13078
|
-
ignores: [
|
|
13079
|
-
"**/node_modules/**",
|
|
13080
|
-
"**/dist/**",
|
|
13081
|
-
"**/coverage/**",
|
|
13082
|
-
"**/tmp/**",
|
|
13083
|
-
"**/.nx/**",
|
|
13084
|
-
"**/.tamagui/**",
|
|
13085
|
-
"**/.next/**",
|
|
13086
|
-
...options.ignores || []
|
|
13087
|
-
],
|
|
13084
|
+
ignores: [...options.ignores || []],
|
|
13088
13085
|
files: options.nextFiles
|
|
13089
13086
|
});
|
|
13090
13087
|
}
|
|
@@ -13111,16 +13108,7 @@ function getStormConfig(options = {
|
|
|
13111
13108
|
project: tsconfig,
|
|
13112
13109
|
projectService: true,
|
|
13113
13110
|
sourceType: "module",
|
|
13114
|
-
projectFolderIgnoreList: [
|
|
13115
|
-
"**/node_modules/**",
|
|
13116
|
-
"**/dist/**",
|
|
13117
|
-
"**/coverage/**",
|
|
13118
|
-
"**/tmp/**",
|
|
13119
|
-
"**/.nx/**",
|
|
13120
|
-
"**/.tamagui/**",
|
|
13121
|
-
"**/.next/**",
|
|
13122
|
-
...options.ignores || []
|
|
13123
|
-
],
|
|
13111
|
+
projectFolderIgnoreList: [...ignores, ...options.ignores || []],
|
|
13124
13112
|
...options.parserOptions
|
|
13125
13113
|
}
|
|
13126
13114
|
},
|
|
@@ -13132,16 +13120,7 @@ function getStormConfig(options = {
|
|
|
13132
13120
|
}),
|
|
13133
13121
|
...options.rules ?? {}
|
|
13134
13122
|
},
|
|
13135
|
-
ignores: [
|
|
13136
|
-
"**/node_modules/**",
|
|
13137
|
-
"**/dist/**",
|
|
13138
|
-
"**/coverage/**",
|
|
13139
|
-
"**/tmp/**",
|
|
13140
|
-
"**/.nx/**",
|
|
13141
|
-
"**/.tamagui/**",
|
|
13142
|
-
"**/.next/**",
|
|
13143
|
-
...options.ignores || []
|
|
13144
|
-
]
|
|
13123
|
+
ignores: [...ignores, ...options.ignores || []]
|
|
13145
13124
|
});
|
|
13146
13125
|
if (options.markdown) {
|
|
13147
13126
|
configs.push(...markdown.configs.recommended);
|
|
@@ -13173,13 +13152,17 @@ function getStormConfig(options = {
|
|
|
13173
13152
|
}
|
|
13174
13153
|
});
|
|
13175
13154
|
}
|
|
13155
|
+
writeInfo("\u2699\uFE0F Merging generated Storm ESLint configuration objects", {
|
|
13156
|
+
logLevel: "all"
|
|
13157
|
+
});
|
|
13158
|
+
writeDebug(configs, { logLevel: "all" });
|
|
13176
13159
|
const result = formatConfig(
|
|
13177
13160
|
"Preset",
|
|
13178
13161
|
configs.reduce((ret, config) => {
|
|
13179
13162
|
const existingIndex = ret.findIndex(
|
|
13180
13163
|
(existing) => areFilesEqual(existing.files, config.files)
|
|
13181
13164
|
);
|
|
13182
|
-
if (existingIndex) {
|
|
13165
|
+
if (existingIndex >= 0) {
|
|
13183
13166
|
ret[existingIndex] = defu(ret[existingIndex], config);
|
|
13184
13167
|
} else {
|
|
13185
13168
|
ret.push(config);
|
|
@@ -13196,15 +13179,15 @@ function getStormConfig(options = {
|
|
|
13196
13179
|
const areFilesEqual = (files1, files2) => {
|
|
13197
13180
|
if (files1 === files2) {
|
|
13198
13181
|
return true;
|
|
13199
|
-
}
|
|
13200
|
-
if (files1 == null || files2 == null) {
|
|
13182
|
+
} else if (!files1 || !files2) {
|
|
13201
13183
|
return false;
|
|
13202
|
-
}
|
|
13203
|
-
|
|
13184
|
+
} else if (typeof files1 === "string" && typeof files2 !== "string" || typeof files1 !== "string" && typeof files2 === "string" || Array.isArray(files1) && !Array.isArray(files2) || !Array.isArray(files1) && Array.isArray(files2)) {
|
|
13185
|
+
return false;
|
|
13186
|
+
} else if (files1.length !== files2.length) {
|
|
13204
13187
|
return false;
|
|
13205
13188
|
}
|
|
13206
13189
|
return files1.every(
|
|
13207
|
-
(file, index) => Array.isArray(file) && Array.isArray(files2?.[index]) ? areFilesEqual(file, files2?.[index]) : file === files2?.[index]
|
|
13190
|
+
(file, index) => Array.isArray(file) && Array.isArray(files2?.[index]) ? areFilesEqual(file, files2?.[index]) : !Array.isArray(file) && !Array.isArray(files2?.[index]) ? file?.toLowerCase() === files2?.[index]?.toLowerCase() : file === files2
|
|
13208
13191
|
);
|
|
13209
13192
|
};
|
|
13210
13193
|
|
package/package.json
CHANGED