@storm-software/eslint 0.83.3 → 0.84.0

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.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)
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
@@ -1298,7 +1298,7 @@ const getStormRulesConfig = (options) => {
1298
1298
  }
1299
1299
  ]
1300
1300
  };
1301
- if (options.tsConfigType !== "none") {
1301
+ if (options.typescriptEslintConfigType !== "none") {
1302
1302
  rules = {
1303
1303
  ...rules,
1304
1304
  /*************************************************************
@@ -12887,19 +12887,20 @@ function getStormConfig(options = {
12887
12887
  ignores: [],
12888
12888
  tsconfig: "./tsconfig.base.json",
12889
12889
  parserOptions: {},
12890
- tsConfigType: "eslint-recommended",
12890
+ typescriptEslintConfigType: "eslint-recommended",
12891
12891
  useUnicorn: true,
12892
12892
  markdown: {},
12893
12893
  react: {},
12894
12894
  useReactCompiler: false
12895
12895
  }, ...userConfigs) {
12896
12896
  const tsconfig = options.tsconfig ?? "./tsconfig.base.json";
12897
- const tsConfigType = options.tsConfigType || "eslint-recommended";
12897
+ const typescriptEslintConfigType = options.typescriptEslintConfigType || "eslint-recommended";
12898
12898
  const useUnicorn = options.useUnicorn ?? true;
12899
12899
  const react = options.react ?? {};
12900
12900
  const useReactCompiler = options.useReactCompiler ?? false;
12901
12901
  const bannerConfig = {
12902
12902
  ...plugin.configs["recommended"],
12903
+ files: [TS_FILE],
12903
12904
  rules: {
12904
12905
  "banner/banner": [
12905
12906
  "error",
@@ -12984,23 +12985,21 @@ function getStormConfig(options = {
12984
12985
  const typescriptConfigs = [
12985
12986
  eslint.configs.recommended
12986
12987
  ];
12987
- if (tsConfigType !== "none") {
12988
- if (!(tsConfigType in tsEslint$1.configs)) {
12988
+ if (typescriptEslintConfigType !== "none") {
12989
+ if (!(typescriptEslintConfigType in tsEslint$1.configs)) {
12989
12990
  console.warn(
12990
12991
  "Invalid TypeScript ESLint configuration type:",
12991
- tsConfigType
12992
+ typescriptEslintConfigType
12992
12993
  );
12993
12994
  } else {
12994
12995
  typescriptConfigs.push(
12995
- ...tsEslint$1.configs[tsConfigType]?.map((config) => ({
12996
- ...config,
12997
- files: [TS_FILE]
12998
- })) ?? []
12996
+ ...Array.isArray(tsEslint$1.configs[typescriptEslintConfigType]) ? tsEslint$1.configs[typescriptEslintConfigType] : [tsEslint$1.configs[typescriptEslintConfigType]]
12999
12997
  );
13000
12998
  }
13001
12999
  }
13002
13000
  if (useUnicorn) {
13003
13001
  typescriptConfigs.push({
13002
+ files: [TS_FILE],
13004
13003
  plugins: { unicorn },
13005
13004
  rules: {
13006
13005
  ...unicorn.configs["flat/recommended"].rules
@@ -13013,60 +13012,6 @@ function getStormConfig(options = {
13013
13012
  rules: config
13014
13013
  });
13015
13014
  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
- );
13070
13015
  if (react) {
13071
13016
  const reactConfigs = [
13072
13017
  {
@@ -13086,7 +13031,7 @@ function getStormConfig(options = {
13086
13031
  },
13087
13032
  {
13088
13033
  ...reactHooks.configs?.recommended,
13089
- files: ["**/*.tsx"],
13034
+ files: [TS_FILE],
13090
13035
  ignores: [
13091
13036
  "**/node_modules/**",
13092
13037
  "**/dist/**",
@@ -13124,10 +13069,10 @@ function getStormConfig(options = {
13124
13069
  }
13125
13070
  });
13126
13071
  }
13127
- configs.push(...reactConfigs);
13072
+ typescriptConfigs.push(...reactConfigs);
13128
13073
  }
13129
13074
  if (options.nextFiles && options.nextFiles.length > 0) {
13130
- configs.push({
13075
+ typescriptConfigs.push({
13131
13076
  ...next.configs["core-web-vitals"],
13132
13077
  ignores: [
13133
13078
  "**/node_modules/**",
@@ -13142,6 +13087,65 @@ function getStormConfig(options = {
13142
13087
  files: options.nextFiles
13143
13088
  });
13144
13089
  }
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 ?? {}
13136
+ },
13137
+ ignores: [
13138
+ "**/node_modules/**",
13139
+ "**/dist/**",
13140
+ "**/coverage/**",
13141
+ "**/tmp/**",
13142
+ "**/.nx/**",
13143
+ "**/.tamagui/**",
13144
+ "**/.next/**",
13145
+ ...options.ignores || []
13146
+ ]
13147
+ })
13148
+ );
13145
13149
  if (options.markdown) {
13146
13150
  configs.push(...markdown.configs.recommended);
13147
13151
  configs.push({
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.0",
4
4
  "type": "module",
5
5
  "description": "⚡ A package containing the base ESLint configuration used by Storm Software across many projects.",
6
6
  "repository": {
@@ -96,7 +96,7 @@
96
96
  "globals": "^15.8.0",
97
97
  "jsonc-eslint-parser": "2.4.0",
98
98
  "synckit": "0.9.0",
99
- "typescript-eslint": "8.6.0",
99
+ "typescript-eslint": "8.10.0",
100
100
  "ws": "8.17.1",
101
101
  "yaml-eslint-parser": "1.2.3"
102
102
  },
@@ -110,6 +110,7 @@
110
110
  "eslint": "9.5.0",
111
111
  "eslint-typegen": "^0.2.4",
112
112
  "graphql": ">=16.9.0",
113
+ "typescript": ">=5.5.3",
113
114
  "unbuild": "^2.0.0"
114
115
  },
115
116
  "publishConfig": {