@storm-software/eslint 0.83.3 → 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.2-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.d.mts CHANGED
@@ -7008,7 +7008,7 @@ type YmlSpacedComment =
7008
7008
 
7009
7009
  type TypeScriptEslintConfigType = "none" | "all" | "base" | "disable-type-checked" | "eslint-recommended" | "recommended-type-checked-only" | "recommended-type-checked" | "recommended" | "strict-type-checked" | "strict" | "stylistic-type-checked-only" | "stylistic-type-checked" | "stylistic";
7010
7010
  interface GetStormRulesConfigOptions {
7011
- tsConfigType?: TypeScriptEslintConfigType;
7011
+ typescriptEslintConfigType?: TypeScriptEslintConfigType;
7012
7012
  useUnicorn?: boolean;
7013
7013
  }
7014
7014
 
@@ -7036,6 +7036,7 @@ type PresetOptions = GetStormRulesConfigOptions & {
7036
7036
  rules?: RuleOptions;
7037
7037
  ignores?: string[];
7038
7038
  tsconfig?: string;
7039
+ typescriptEslintConfigType?: TypeScriptEslintConfigType;
7039
7040
  parserOptions?: Linter.ParserOptions;
7040
7041
  markdown?: false | Linter.RulesRecord;
7041
7042
  react?: false | Linter.RulesRecord;
package/dist/preset.d.ts CHANGED
@@ -7008,7 +7008,7 @@ type YmlSpacedComment =
7008
7008
 
7009
7009
  type TypeScriptEslintConfigType = "none" | "all" | "base" | "disable-type-checked" | "eslint-recommended" | "recommended-type-checked-only" | "recommended-type-checked" | "recommended" | "strict-type-checked" | "strict" | "stylistic-type-checked-only" | "stylistic-type-checked" | "stylistic";
7010
7010
  interface GetStormRulesConfigOptions {
7011
- tsConfigType?: TypeScriptEslintConfigType;
7011
+ typescriptEslintConfigType?: TypeScriptEslintConfigType;
7012
7012
  useUnicorn?: boolean;
7013
7013
  }
7014
7014
 
@@ -7036,6 +7036,7 @@ type PresetOptions = GetStormRulesConfigOptions & {
7036
7036
  rules?: RuleOptions;
7037
7037
  ignores?: string[];
7038
7038
  tsconfig?: string;
7039
+ typescriptEslintConfigType?: TypeScriptEslintConfigType;
7039
7040
  parserOptions?: Linter.ParserOptions;
7040
7041
  markdown?: false | Linter.RulesRecord;
7041
7042
  react?: false | Linter.RulesRecord;
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';
@@ -1298,7 +1299,7 @@ const getStormRulesConfig = (options) => {
1298
1299
  }
1299
1300
  ]
1300
1301
  };
1301
- if (options.tsConfigType !== "none") {
1302
+ if (options.typescriptEslintConfigType !== "none") {
1302
1303
  rules = {
1303
1304
  ...rules,
1304
1305
  /*************************************************************
@@ -12887,19 +12888,20 @@ function getStormConfig(options = {
12887
12888
  ignores: [],
12888
12889
  tsconfig: "./tsconfig.base.json",
12889
12890
  parserOptions: {},
12890
- tsConfigType: "eslint-recommended",
12891
+ typescriptEslintConfigType: "eslint-recommended",
12891
12892
  useUnicorn: true,
12892
12893
  markdown: {},
12893
12894
  react: {},
12894
12895
  useReactCompiler: false
12895
12896
  }, ...userConfigs) {
12896
12897
  const tsconfig = options.tsconfig ?? "./tsconfig.base.json";
12897
- const tsConfigType = options.tsConfigType || "eslint-recommended";
12898
+ const typescriptEslintConfigType = options.typescriptEslintConfigType || "eslint-recommended";
12898
12899
  const useUnicorn = options.useUnicorn ?? true;
12899
12900
  const react = options.react ?? {};
12900
12901
  const useReactCompiler = options.useReactCompiler ?? false;
12901
12902
  const bannerConfig = {
12902
12903
  ...plugin.configs["recommended"],
12904
+ files: [TS_FILE],
12903
12905
  rules: {
12904
12906
  "banner/banner": [
12905
12907
  "error",
@@ -12981,92 +12983,34 @@ function getStormConfig(options = {
12981
12983
  // User overrides
12982
12984
  ...userConfigs
12983
12985
  ].filter(Boolean);
12984
- const typescriptConfigs = [
12985
- eslint.configs.recommended
12986
- ];
12987
- if (tsConfigType !== "none") {
12988
- if (!(tsConfigType in tsEslint$1.configs)) {
12986
+ configs.push(eslint.configs.recommended);
12987
+ if (typescriptEslintConfigType !== "none") {
12988
+ if (!(typescriptEslintConfigType in tsEslint$1.configs)) {
12989
12989
  console.warn(
12990
12990
  "Invalid TypeScript ESLint configuration type:",
12991
- tsConfigType
12991
+ typescriptEslintConfigType
12992
12992
  );
12993
12993
  } else {
12994
- typescriptConfigs.push(
12995
- ...tsEslint$1.configs[tsConfigType]?.map((config) => ({
12996
- ...config,
12997
- files: [TS_FILE]
12998
- })) ?? []
12994
+ configs.push(
12995
+ ...Array.isArray(tsEslint$1.configs[typescriptEslintConfigType]) ? tsEslint$1.configs[typescriptEslintConfigType] : [tsEslint$1.configs[typescriptEslintConfigType]]
12999
12996
  );
13000
12997
  }
13001
12998
  }
13002
12999
  if (useUnicorn) {
13003
- typescriptConfigs.push({
13000
+ configs.push({
13001
+ files: [TS_FILE],
13004
13002
  plugins: { unicorn },
13005
13003
  rules: {
13006
13004
  ...unicorn.configs["flat/recommended"].rules
13007
13005
  }
13008
13006
  });
13009
13007
  }
13010
- typescriptConfigs.push({
13008
+ configs.push({
13011
13009
  files: [TS_FILE],
13012
13010
  plugins: { tsdoc },
13013
13011
  rules: config
13014
13012
  });
13015
- typescriptConfigs.push(bannerConfig);
13016
- configs.push(
13017
- ...tsEslint$1.config({
13018
- files: [TS_FILE],
13019
- extends: typescriptConfigs,
13020
- languageOptions: {
13021
- globals: {
13022
- ...Object.fromEntries(
13023
- Object.keys(globals).flatMap(
13024
- (group) => Object.keys(globals[group]).map((key) => [
13025
- key,
13026
- "readonly"
13027
- ])
13028
- )
13029
- ),
13030
- ...globals.browser,
13031
- ...globals.node,
13032
- "window": "readonly",
13033
- "Storm": "readonly"
13034
- },
13035
- parserOptions: {
13036
- emitDecoratorMetadata: true,
13037
- experimentalDecorators: true,
13038
- project: tsconfig,
13039
- projectService: true,
13040
- sourceType: "module",
13041
- projectFolderIgnoreList: [
13042
- "**/node_modules/**",
13043
- "**/dist/**",
13044
- "**/coverage/**",
13045
- "**/tmp/**",
13046
- "**/.nx/**",
13047
- "**/.tamagui/**",
13048
- "**/.next/**",
13049
- ...options.ignores || []
13050
- ],
13051
- ...options.parserOptions
13052
- }
13053
- },
13054
- rules: {
13055
- ...getStormRulesConfig({ ...options, tsConfigType, useUnicorn }),
13056
- ...options.rules ?? {}
13057
- },
13058
- ignores: [
13059
- "**/node_modules/**",
13060
- "**/dist/**",
13061
- "**/coverage/**",
13062
- "**/tmp/**",
13063
- "**/.nx/**",
13064
- "**/.tamagui/**",
13065
- "**/.next/**",
13066
- ...options.ignores || []
13067
- ]
13068
- })
13069
- );
13013
+ configs.push(bannerConfig);
13070
13014
  if (react) {
13071
13015
  const reactConfigs = [
13072
13016
  {
@@ -13086,7 +13030,7 @@ function getStormConfig(options = {
13086
13030
  },
13087
13031
  {
13088
13032
  ...reactHooks.configs?.recommended,
13089
- files: ["**/*.tsx"],
13033
+ files: [TS_FILE],
13090
13034
  ignores: [
13091
13035
  "**/node_modules/**",
13092
13036
  "**/dist/**",
@@ -13142,6 +13086,61 @@ function getStormConfig(options = {
13142
13086
  files: options.nextFiles
13143
13087
  });
13144
13088
  }
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"
13105
+ },
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
+ });
13145
13144
  if (options.markdown) {
13146
13145
  configs.push(...markdown.configs.recommended);
13147
13146
  configs.push({
@@ -13172,7 +13171,13 @@ function getStormConfig(options = {
13172
13171
  }
13173
13172
  });
13174
13173
  }
13175
- return formatConfig("Preset", configs);
13174
+ return formatConfig(
13175
+ "Preset",
13176
+ configs.reduce(
13177
+ (ret, config) => merge(ret, [config], (c) => c.files),
13178
+ []
13179
+ )
13180
+ );
13176
13181
  }
13177
13182
 
13178
13183
  export { getStormConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.83.3",
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,8 +95,9 @@
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
- "typescript-eslint": "8.6.0",
100
+ "typescript-eslint": "8.10.0",
100
101
  "ws": "8.17.1",
101
102
  "yaml-eslint-parser": "1.2.3"
102
103
  },
@@ -110,6 +111,7 @@
110
111
  "eslint": "9.5.0",
111
112
  "eslint-typegen": "^0.2.4",
112
113
  "graphql": ">=16.9.0",
114
+ "typescript": ">=5.5.3",
113
115
  "unbuild": "^2.0.0"
114
116
  },
115
117
  "publishConfig": {