@storm-software/eslint 0.84.0 → 0.84.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 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.0-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,7 @@ 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 { merge } from 'radash';
20
21
  import tsEslint$1 from 'typescript-eslint';
21
22
  import require$$0 from 'eslint/use-at-your-own-risk';
22
23
  import require$$0$1 from 'eslint';
@@ -12982,9 +12983,7 @@ function getStormConfig(options = {
12982
12983
  // User overrides
12983
12984
  ...userConfigs
12984
12985
  ].filter(Boolean);
12985
- const typescriptConfigs = [
12986
- eslint.configs.recommended
12987
- ];
12986
+ configs.push(eslint.configs.recommended);
12988
12987
  if (typescriptEslintConfigType !== "none") {
12989
12988
  if (!(typescriptEslintConfigType in tsEslint$1.configs)) {
12990
12989
  console.warn(
@@ -12992,13 +12991,13 @@ function getStormConfig(options = {
12992
12991
  typescriptEslintConfigType
12993
12992
  );
12994
12993
  } else {
12995
- typescriptConfigs.push(
12994
+ configs.push(
12996
12995
  ...Array.isArray(tsEslint$1.configs[typescriptEslintConfigType]) ? tsEslint$1.configs[typescriptEslintConfigType] : [tsEslint$1.configs[typescriptEslintConfigType]]
12997
12996
  );
12998
12997
  }
12999
12998
  }
13000
12999
  if (useUnicorn) {
13001
- typescriptConfigs.push({
13000
+ configs.push({
13002
13001
  files: [TS_FILE],
13003
13002
  plugins: { unicorn },
13004
13003
  rules: {
@@ -13006,12 +13005,12 @@ function getStormConfig(options = {
13006
13005
  }
13007
13006
  });
13008
13007
  }
13009
- typescriptConfigs.push({
13008
+ configs.push({
13010
13009
  files: [TS_FILE],
13011
13010
  plugins: { tsdoc },
13012
13011
  rules: config
13013
13012
  });
13014
- typescriptConfigs.push(bannerConfig);
13013
+ configs.push(bannerConfig);
13015
13014
  if (react) {
13016
13015
  const reactConfigs = [
13017
13016
  {
@@ -13069,10 +13068,10 @@ function getStormConfig(options = {
13069
13068
  }
13070
13069
  });
13071
13070
  }
13072
- typescriptConfigs.push(...reactConfigs);
13071
+ configs.push(...reactConfigs);
13073
13072
  }
13074
13073
  if (options.nextFiles && options.nextFiles.length > 0) {
13075
- typescriptConfigs.push({
13074
+ configs.push({
13076
13075
  ...next.configs["core-web-vitals"],
13077
13076
  ignores: [
13078
13077
  "**/node_modules/**",
@@ -13087,65 +13086,61 @@ function getStormConfig(options = {
13087
13086
  files: options.nextFiles
13088
13087
  });
13089
13088
  }
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 ?? {}
13089
+ configs.push({
13090
+ files: [TS_FILE],
13091
+ languageOptions: {
13092
+ globals: {
13093
+ ...Object.fromEntries(
13094
+ Object.keys(globals).flatMap(
13095
+ (group) => Object.keys(globals[group]).map((key) => [
13096
+ key,
13097
+ "readonly"
13098
+ ])
13099
+ )
13100
+ ),
13101
+ ...globals.browser,
13102
+ ...globals.node,
13103
+ "window": "readonly",
13104
+ "Storm": "readonly"
13136
13105
  },
13137
- ignores: [
13138
- "**/node_modules/**",
13139
- "**/dist/**",
13140
- "**/coverage/**",
13141
- "**/tmp/**",
13142
- "**/.nx/**",
13143
- "**/.tamagui/**",
13144
- "**/.next/**",
13145
- ...options.ignores || []
13146
- ]
13147
- })
13148
- );
13106
+ parserOptions: {
13107
+ emitDecoratorMetadata: true,
13108
+ experimentalDecorators: true,
13109
+ project: tsconfig,
13110
+ projectService: true,
13111
+ sourceType: "module",
13112
+ projectFolderIgnoreList: [
13113
+ "**/node_modules/**",
13114
+ "**/dist/**",
13115
+ "**/coverage/**",
13116
+ "**/tmp/**",
13117
+ "**/.nx/**",
13118
+ "**/.tamagui/**",
13119
+ "**/.next/**",
13120
+ ...options.ignores || []
13121
+ ],
13122
+ ...options.parserOptions
13123
+ }
13124
+ },
13125
+ rules: {
13126
+ ...getStormRulesConfig({
13127
+ ...options,
13128
+ typescriptEslintConfigType,
13129
+ useUnicorn
13130
+ }),
13131
+ ...options.rules ?? {}
13132
+ },
13133
+ ignores: [
13134
+ "**/node_modules/**",
13135
+ "**/dist/**",
13136
+ "**/coverage/**",
13137
+ "**/tmp/**",
13138
+ "**/.nx/**",
13139
+ "**/.tamagui/**",
13140
+ "**/.next/**",
13141
+ ...options.ignores || []
13142
+ ]
13143
+ });
13149
13144
  if (options.markdown) {
13150
13145
  configs.push(...markdown.configs.recommended);
13151
13146
  configs.push({
@@ -13176,7 +13171,13 @@ function getStormConfig(options = {
13176
13171
  }
13177
13172
  });
13178
13173
  }
13179
- return formatConfig("Preset", configs);
13174
+ return formatConfig(
13175
+ "Preset",
13176
+ configs.reduce(
13177
+ (ret, config) => merge(ret, [config], (c) => c.files),
13178
+ []
13179
+ )
13180
+ );
13180
13181
  }
13181
13182
 
13182
13183
  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.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": {
@@ -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",