@storm-software/eslint 0.83.2 → 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.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)
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
@@ -1077,14 +1077,16 @@ const getStormRulesConfig = (options) => {
1077
1077
  // https://eslint.org/docs/rules/no-restricted-syntax
1078
1078
  "no-restricted-syntax": [
1079
1079
  "error",
1080
- {
1081
- selector: "ForInStatement",
1082
- message: "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."
1083
- },
1084
- {
1085
- selector: "ForOfStatement",
1086
- message: "iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations."
1087
- },
1080
+ // {
1081
+ // selector: "ForInStatement",
1082
+ // message:
1083
+ // "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."
1084
+ // },
1085
+ // {
1086
+ // selector: "ForOfStatement",
1087
+ // message:
1088
+ // "iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations."
1089
+ // },
1088
1090
  {
1089
1091
  selector: "LabeledStatement",
1090
1092
  message: "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."
@@ -1296,7 +1298,7 @@ const getStormRulesConfig = (options) => {
1296
1298
  }
1297
1299
  ]
1298
1300
  };
1299
- if (options.tsConfigType !== "none") {
1301
+ if (options.typescriptEslintConfigType !== "none") {
1300
1302
  rules = {
1301
1303
  ...rules,
1302
1304
  /*************************************************************
@@ -12885,19 +12887,20 @@ function getStormConfig(options = {
12885
12887
  ignores: [],
12886
12888
  tsconfig: "./tsconfig.base.json",
12887
12889
  parserOptions: {},
12888
- tsConfigType: "eslint-recommended",
12890
+ typescriptEslintConfigType: "eslint-recommended",
12889
12891
  useUnicorn: true,
12890
12892
  markdown: {},
12891
12893
  react: {},
12892
12894
  useReactCompiler: false
12893
12895
  }, ...userConfigs) {
12894
12896
  const tsconfig = options.tsconfig ?? "./tsconfig.base.json";
12895
- const tsConfigType = options.tsConfigType || "eslint-recommended";
12897
+ const typescriptEslintConfigType = options.typescriptEslintConfigType || "eslint-recommended";
12896
12898
  const useUnicorn = options.useUnicorn ?? true;
12897
12899
  const react = options.react ?? {};
12898
12900
  const useReactCompiler = options.useReactCompiler ?? false;
12899
12901
  const bannerConfig = {
12900
12902
  ...plugin.configs["recommended"],
12903
+ files: [TS_FILE],
12901
12904
  rules: {
12902
12905
  "banner/banner": [
12903
12906
  "error",
@@ -12982,23 +12985,21 @@ function getStormConfig(options = {
12982
12985
  const typescriptConfigs = [
12983
12986
  eslint.configs.recommended
12984
12987
  ];
12985
- if (tsConfigType !== "none") {
12986
- if (!(tsConfigType in tsEslint$1.configs)) {
12988
+ if (typescriptEslintConfigType !== "none") {
12989
+ if (!(typescriptEslintConfigType in tsEslint$1.configs)) {
12987
12990
  console.warn(
12988
12991
  "Invalid TypeScript ESLint configuration type:",
12989
- tsConfigType
12992
+ typescriptEslintConfigType
12990
12993
  );
12991
12994
  } else {
12992
12995
  typescriptConfigs.push(
12993
- ...tsEslint$1.configs[tsConfigType]?.map((config) => ({
12994
- ...config,
12995
- files: [TS_FILE]
12996
- })) ?? []
12996
+ ...Array.isArray(tsEslint$1.configs[typescriptEslintConfigType]) ? tsEslint$1.configs[typescriptEslintConfigType] : [tsEslint$1.configs[typescriptEslintConfigType]]
12997
12997
  );
12998
12998
  }
12999
12999
  }
13000
13000
  if (useUnicorn) {
13001
13001
  typescriptConfigs.push({
13002
+ files: [TS_FILE],
13002
13003
  plugins: { unicorn },
13003
13004
  rules: {
13004
13005
  ...unicorn.configs["flat/recommended"].rules
@@ -13011,60 +13012,6 @@ function getStormConfig(options = {
13011
13012
  rules: config
13012
13013
  });
13013
13014
  typescriptConfigs.push(bannerConfig);
13014
- configs.push(
13015
- ...tsEslint$1.config({
13016
- files: [TS_FILE],
13017
- extends: typescriptConfigs,
13018
- languageOptions: {
13019
- globals: {
13020
- ...Object.fromEntries(
13021
- Object.keys(globals).flatMap(
13022
- (group) => Object.keys(globals[group]).map((key) => [
13023
- key,
13024
- "readonly"
13025
- ])
13026
- )
13027
- ),
13028
- ...globals.browser,
13029
- ...globals.node,
13030
- "window": "readonly",
13031
- "Storm": "readonly"
13032
- },
13033
- parserOptions: {
13034
- emitDecoratorMetadata: true,
13035
- experimentalDecorators: true,
13036
- project: tsconfig,
13037
- projectService: true,
13038
- sourceType: "module",
13039
- projectFolderIgnoreList: [
13040
- "**/node_modules/**",
13041
- "**/dist/**",
13042
- "**/coverage/**",
13043
- "**/tmp/**",
13044
- "**/.nx/**",
13045
- "**/.tamagui/**",
13046
- "**/.next/**",
13047
- ...options.ignores || []
13048
- ],
13049
- ...options.parserOptions
13050
- }
13051
- },
13052
- rules: {
13053
- ...getStormRulesConfig({ ...options, tsConfigType, useUnicorn }),
13054
- ...options.rules ?? {}
13055
- },
13056
- ignores: [
13057
- "**/node_modules/**",
13058
- "**/dist/**",
13059
- "**/coverage/**",
13060
- "**/tmp/**",
13061
- "**/.nx/**",
13062
- "**/.tamagui/**",
13063
- "**/.next/**",
13064
- ...options.ignores || []
13065
- ]
13066
- })
13067
- );
13068
13015
  if (react) {
13069
13016
  const reactConfigs = [
13070
13017
  {
@@ -13084,7 +13031,7 @@ function getStormConfig(options = {
13084
13031
  },
13085
13032
  {
13086
13033
  ...reactHooks.configs?.recommended,
13087
- files: ["**/*.tsx"],
13034
+ files: [TS_FILE],
13088
13035
  ignores: [
13089
13036
  "**/node_modules/**",
13090
13037
  "**/dist/**",
@@ -13122,10 +13069,10 @@ function getStormConfig(options = {
13122
13069
  }
13123
13070
  });
13124
13071
  }
13125
- configs.push(...reactConfigs);
13072
+ typescriptConfigs.push(...reactConfigs);
13126
13073
  }
13127
13074
  if (options.nextFiles && options.nextFiles.length > 0) {
13128
- configs.push({
13075
+ typescriptConfigs.push({
13129
13076
  ...next.configs["core-web-vitals"],
13130
13077
  ignores: [
13131
13078
  "**/node_modules/**",
@@ -13140,6 +13087,65 @@ function getStormConfig(options = {
13140
13087
  files: options.nextFiles
13141
13088
  });
13142
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
+ );
13143
13149
  if (options.markdown) {
13144
13150
  configs.push(...markdown.configs.recommended);
13145
13151
  configs.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.83.2",
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": {