@storm-software/eslint 0.84.0 → 0.84.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 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
- [![Version](https://img.shields.io/badge/version-0.83.3-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.84.1-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
package/dist/preset.mjs CHANGED
@@ -17,6 +17,8 @@ import tsdoc from 'eslint-plugin-tsdoc';
17
17
  import unicorn from 'eslint-plugin-unicorn';
18
18
  import yml from 'eslint-plugin-yml';
19
19
  import globals from 'globals';
20
+ import { writeInfo, writeDebug } from '@storm-software/config-tools/utilities/logger';
21
+ import { merge } from 'radash';
20
22
  import tsEslint$1 from 'typescript-eslint';
21
23
  import require$$0 from 'eslint/use-at-your-own-risk';
22
24
  import require$$0$1 from 'eslint';
@@ -12850,8 +12852,8 @@ const plugin = {
12850
12852
  plugin.configs && (plugin.configs.recommended = {
12851
12853
  name: "banner/recommended",
12852
12854
  plugins: { banner: plugin },
12853
- files: [
12854
- CODE_FILE,
12855
+ files: [CODE_FILE],
12856
+ ignores: [
12855
12857
  "!**/docs/**/*",
12856
12858
  "!**/crates/**/*",
12857
12859
  "!**/tmp/**/*",
@@ -12898,16 +12900,6 @@ function getStormConfig(options = {
12898
12900
  const useUnicorn = options.useUnicorn ?? true;
12899
12901
  const react = options.react ?? {};
12900
12902
  const useReactCompiler = options.useReactCompiler ?? false;
12901
- const bannerConfig = {
12902
- ...plugin.configs["recommended"],
12903
- files: [TS_FILE],
12904
- rules: {
12905
- "banner/banner": [
12906
- "error",
12907
- { commentType: "block", numNewlines: 2, repositoryName: options.name }
12908
- ]
12909
- }
12910
- };
12911
12903
  const configs = [
12912
12904
  // Prettier
12913
12905
  prettierConfig,
@@ -12918,7 +12910,7 @@ function getStormConfig(options = {
12918
12910
  // files: [CODE_FILE],
12919
12911
  // rules: importRules
12920
12912
  // },
12921
- bannerConfig,
12913
+ // bannerConfig,
12922
12914
  // NX
12923
12915
  {
12924
12916
  plugins: { "@nx": nxPlugin }
@@ -12982,9 +12974,7 @@ function getStormConfig(options = {
12982
12974
  // User overrides
12983
12975
  ...userConfigs
12984
12976
  ].filter(Boolean);
12985
- const typescriptConfigs = [
12986
- eslint.configs.recommended
12987
- ];
12977
+ configs.push(eslint.configs.recommended);
12988
12978
  if (typescriptEslintConfigType !== "none") {
12989
12979
  if (!(typescriptEslintConfigType in tsEslint$1.configs)) {
12990
12980
  console.warn(
@@ -12992,13 +12982,13 @@ function getStormConfig(options = {
12992
12982
  typescriptEslintConfigType
12993
12983
  );
12994
12984
  } else {
12995
- typescriptConfigs.push(
12985
+ configs.push(
12996
12986
  ...Array.isArray(tsEslint$1.configs[typescriptEslintConfigType]) ? tsEslint$1.configs[typescriptEslintConfigType] : [tsEslint$1.configs[typescriptEslintConfigType]]
12997
12987
  );
12998
12988
  }
12999
12989
  }
13000
12990
  if (useUnicorn) {
13001
- typescriptConfigs.push({
12991
+ configs.push({
13002
12992
  files: [TS_FILE],
13003
12993
  plugins: { unicorn },
13004
12994
  rules: {
@@ -13006,12 +12996,23 @@ function getStormConfig(options = {
13006
12996
  }
13007
12997
  });
13008
12998
  }
13009
- typescriptConfigs.push({
12999
+ configs.push({
13010
13000
  files: [TS_FILE],
13011
13001
  plugins: { tsdoc },
13012
13002
  rules: config
13013
13003
  });
13014
- typescriptConfigs.push(bannerConfig);
13004
+ configs.push({
13005
+ // ...banner.configs!["recommended"],
13006
+ name: "banner",
13007
+ plugins: { banner: plugin },
13008
+ files: [TS_FILE],
13009
+ rules: {
13010
+ "banner/banner": [
13011
+ "error",
13012
+ { commentType: "block", numNewlines: 2, repositoryName: options.name }
13013
+ ]
13014
+ }
13015
+ });
13015
13016
  if (react) {
13016
13017
  const reactConfigs = [
13017
13018
  {
@@ -13069,10 +13070,10 @@ function getStormConfig(options = {
13069
13070
  }
13070
13071
  });
13071
13072
  }
13072
- typescriptConfigs.push(...reactConfigs);
13073
+ configs.push(...reactConfigs);
13073
13074
  }
13074
13075
  if (options.nextFiles && options.nextFiles.length > 0) {
13075
- typescriptConfigs.push({
13076
+ configs.push({
13076
13077
  ...next.configs["core-web-vitals"],
13077
13078
  ignores: [
13078
13079
  "**/node_modules/**",
@@ -13087,65 +13088,61 @@ function getStormConfig(options = {
13087
13088
  files: options.nextFiles
13088
13089
  });
13089
13090
  }
13090
- configs.push(
13091
- ...tsEslint$1.config({
13092
- files: [TS_FILE],
13093
- extends: typescriptConfigs,
13094
- languageOptions: {
13095
- globals: {
13096
- ...Object.fromEntries(
13097
- Object.keys(globals).flatMap(
13098
- (group) => Object.keys(globals[group]).map((key) => [
13099
- key,
13100
- "readonly"
13101
- ])
13102
- )
13103
- ),
13104
- ...globals.browser,
13105
- ...globals.node,
13106
- "window": "readonly",
13107
- "Storm": "readonly"
13108
- },
13109
- parser: tsEslint$1.parser,
13110
- parserOptions: {
13111
- emitDecoratorMetadata: true,
13112
- experimentalDecorators: true,
13113
- project: tsconfig,
13114
- projectService: true,
13115
- sourceType: "module",
13116
- projectFolderIgnoreList: [
13117
- "**/node_modules/**",
13118
- "**/dist/**",
13119
- "**/coverage/**",
13120
- "**/tmp/**",
13121
- "**/.nx/**",
13122
- "**/.tamagui/**",
13123
- "**/.next/**",
13124
- ...options.ignores || []
13125
- ],
13126
- ...options.parserOptions
13127
- }
13128
- },
13129
- rules: {
13130
- ...getStormRulesConfig({
13131
- ...options,
13132
- typescriptEslintConfigType,
13133
- useUnicorn
13134
- }),
13135
- ...options.rules ?? {}
13091
+ configs.push({
13092
+ files: [TS_FILE],
13093
+ languageOptions: {
13094
+ globals: {
13095
+ ...Object.fromEntries(
13096
+ Object.keys(globals).flatMap(
13097
+ (group) => Object.keys(globals[group]).map((key) => [
13098
+ key,
13099
+ "readonly"
13100
+ ])
13101
+ )
13102
+ ),
13103
+ ...globals.browser,
13104
+ ...globals.node,
13105
+ "window": "readonly",
13106
+ "Storm": "readonly"
13136
13107
  },
13137
- ignores: [
13138
- "**/node_modules/**",
13139
- "**/dist/**",
13140
- "**/coverage/**",
13141
- "**/tmp/**",
13142
- "**/.nx/**",
13143
- "**/.tamagui/**",
13144
- "**/.next/**",
13145
- ...options.ignores || []
13146
- ]
13147
- })
13148
- );
13108
+ parserOptions: {
13109
+ emitDecoratorMetadata: true,
13110
+ experimentalDecorators: true,
13111
+ project: tsconfig,
13112
+ projectService: true,
13113
+ sourceType: "module",
13114
+ projectFolderIgnoreList: [
13115
+ "**/node_modules/**",
13116
+ "**/dist/**",
13117
+ "**/coverage/**",
13118
+ "**/tmp/**",
13119
+ "**/.nx/**",
13120
+ "**/.tamagui/**",
13121
+ "**/.next/**",
13122
+ ...options.ignores || []
13123
+ ],
13124
+ ...options.parserOptions
13125
+ }
13126
+ },
13127
+ rules: {
13128
+ ...getStormRulesConfig({
13129
+ ...options,
13130
+ typescriptEslintConfigType,
13131
+ useUnicorn
13132
+ }),
13133
+ ...options.rules ?? {}
13134
+ },
13135
+ ignores: [
13136
+ "**/node_modules/**",
13137
+ "**/dist/**",
13138
+ "**/coverage/**",
13139
+ "**/tmp/**",
13140
+ "**/.nx/**",
13141
+ "**/.tamagui/**",
13142
+ "**/.next/**",
13143
+ ...options.ignores || []
13144
+ ]
13145
+ });
13149
13146
  if (options.markdown) {
13150
13147
  configs.push(...markdown.configs.recommended);
13151
13148
  configs.push({
@@ -13176,7 +13173,18 @@ function getStormConfig(options = {
13176
13173
  }
13177
13174
  });
13178
13175
  }
13179
- return formatConfig("Preset", configs);
13176
+ const result = formatConfig(
13177
+ "Preset",
13178
+ configs.reduce(
13179
+ (ret, config) => merge(ret, [config], (c) => c.files),
13180
+ []
13181
+ )
13182
+ );
13183
+ writeInfo("\u2699\uFE0F Completed generated Storm ESLint configuration objects", {
13184
+ logLevel: "all"
13185
+ });
13186
+ writeDebug(result, { logLevel: "all" });
13187
+ return result;
13180
13188
  }
13181
13189
 
13182
13190
  export { getStormConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.84.0",
3
+ "version": "0.84.2",
4
4
  "type": "module",
5
5
  "description": "⚡ A package containing the base ESLint configuration used by Storm Software across many projects.",
6
6
  "repository": {
@@ -95,6 +95,7 @@
95
95
  "eslint-plugin-yml": "1.14.0",
96
96
  "globals": "^15.8.0",
97
97
  "jsonc-eslint-parser": "2.4.0",
98
+ "radash": "12.1.0",
98
99
  "synckit": "0.9.0",
99
100
  "typescript-eslint": "8.10.0",
100
101
  "ws": "8.17.1",