@storm-software/eslint 0.82.0 → 0.83.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.81.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)
24
+ [![Version](https://img.shields.io/badge/version-0.82.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
@@ -12890,6 +12890,8 @@ function getStormConfig(options = {
12890
12890
  ignores: [],
12891
12891
  tsconfig: "./tsconfig.base.json",
12892
12892
  parserOptions: {},
12893
+ tsConfigType: "eslint-recommended",
12894
+ useUnicorn: true,
12893
12895
  markdown: {},
12894
12896
  react: {},
12895
12897
  useReactCompiler: false
@@ -12899,8 +12901,6 @@ function getStormConfig(options = {
12899
12901
  const react = options.react ?? {};
12900
12902
  const useReactCompiler = options.useReactCompiler ?? false;
12901
12903
  const configs = [
12902
- // https://eslint.org/docs/latest/rules/
12903
- eslint.configs.recommended,
12904
12904
  // Prettier
12905
12905
  prettierConfig,
12906
12906
  // Import
@@ -12913,13 +12913,6 @@ function getStormConfig(options = {
12913
12913
  // Banner
12914
12914
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12915
12915
  ...plugin.configs["recommended"],
12916
- // TSDoc
12917
- // https://www.npmjs.com/package/eslint-plugin-tsdoc
12918
- {
12919
- files: [TS_FILE],
12920
- plugins: { tsdoc },
12921
- rules: config
12922
- },
12923
12916
  // NX
12924
12917
  {
12925
12918
  plugins: { "@nx": nxPlugin }
@@ -12983,75 +12976,94 @@ function getStormConfig(options = {
12983
12976
  // User overrides
12984
12977
  ...userConfigs
12985
12978
  ].filter(Boolean);
12979
+ const typescriptConfigs = [
12980
+ eslint.configs.recommended
12981
+ ];
12986
12982
  if (tsConfigType !== "none") {
12987
- configs.push(
12988
- ...tsEslint$1.configs[tsConfigType]?.map((config) => ({
12989
- ...config,
12990
- files: [TS_FILE]
12991
- // We use TS config only for TS files
12992
- })) ?? []
12993
- );
12983
+ if (!(tsConfigType in tsEslint$1.configs)) {
12984
+ console.warn(
12985
+ "Invalid TypeScript ESLint configuration type:",
12986
+ tsConfigType
12987
+ );
12988
+ } else {
12989
+ typescriptConfigs.push(
12990
+ ...tsEslint$1.configs[tsConfigType]?.map((config) => ({
12991
+ ...config,
12992
+ files: [TS_FILE]
12993
+ })) ?? []
12994
+ );
12995
+ }
12994
12996
  }
12995
12997
  if (useUnicorn) {
12996
- configs.push({
12998
+ typescriptConfigs.push({
12997
12999
  plugins: { unicorn },
12998
13000
  rules: {
12999
13001
  ...unicorn.configs["flat/recommended"].rules
13000
13002
  }
13001
13003
  });
13002
13004
  }
13003
- const typescriptConfig = {
13005
+ typescriptConfigs.push({
13004
13006
  files: [TS_FILE],
13005
- languageOptions: {
13006
- globals: {
13007
- ...Object.fromEntries(
13008
- Object.keys(globals).flatMap(
13009
- (group) => Object.keys(globals[group]).map((key) => [
13010
- key,
13011
- "readonly"
13012
- ])
13013
- )
13014
- ),
13015
- ...globals.browser,
13016
- ...globals.node,
13017
- "window": "readonly",
13018
- "Storm": "readonly"
13007
+ plugins: { tsdoc },
13008
+ rules: config
13009
+ });
13010
+ typescriptConfigs.push(
13011
+ ...plugin.configs["recommended"]
13012
+ );
13013
+ configs.push(
13014
+ ...tsEslint$1.config({
13015
+ files: [TS_FILE],
13016
+ extends: typescriptConfigs,
13017
+ languageOptions: {
13018
+ globals: {
13019
+ ...Object.fromEntries(
13020
+ Object.keys(globals).flatMap(
13021
+ (group) => Object.keys(globals[group]).map((key) => [
13022
+ key,
13023
+ "readonly"
13024
+ ])
13025
+ )
13026
+ ),
13027
+ ...globals.browser,
13028
+ ...globals.node,
13029
+ "window": "readonly",
13030
+ "Storm": "readonly"
13031
+ },
13032
+ parserOptions: {
13033
+ emitDecoratorMetadata: true,
13034
+ experimentalDecorators: true,
13035
+ project: options.tsconfig ? options.tsconfig : "./tsconfig.base.json",
13036
+ projectService: true,
13037
+ sourceType: "module",
13038
+ projectFolderIgnoreList: [
13039
+ "**/node_modules/**",
13040
+ "**/dist/**",
13041
+ "**/coverage/**",
13042
+ "**/tmp/**",
13043
+ "**/.nx/**",
13044
+ "**/.tamagui/**",
13045
+ "**/.next/**",
13046
+ ...options.ignores || []
13047
+ ],
13048
+ ...options.parserOptions
13049
+ }
13019
13050
  },
13020
- parserOptions: {
13021
- emitDecoratorMetadata: true,
13022
- experimentalDecorators: true,
13023
- project: options.tsconfig ? options.tsconfig : "./tsconfig.base.json",
13024
- projectService: true,
13025
- sourceType: "module",
13026
- projectFolderIgnoreList: [
13027
- "**/node_modules/**",
13028
- "**/dist/**",
13029
- "**/coverage/**",
13030
- "**/tmp/**",
13031
- "**/.nx/**",
13032
- "**/.tamagui/**",
13033
- "**/.next/**",
13034
- ...options.ignores || []
13035
- ],
13036
- ...options.parserOptions
13037
- }
13038
- },
13039
- rules: {
13040
- ...getStormRulesConfig({ ...options, tsConfigType, useUnicorn }),
13041
- ...options.rules ?? {}
13042
- },
13043
- ignores: [
13044
- "**/node_modules/**",
13045
- "**/dist/**",
13046
- "**/coverage/**",
13047
- "**/tmp/**",
13048
- "**/.nx/**",
13049
- "**/.tamagui/**",
13050
- "**/.next/**",
13051
- ...options.ignores || []
13052
- ]
13053
- };
13054
- configs.push(typescriptConfig);
13051
+ rules: {
13052
+ ...getStormRulesConfig({ ...options, tsConfigType, useUnicorn }),
13053
+ ...options.rules ?? {}
13054
+ },
13055
+ ignores: [
13056
+ "**/node_modules/**",
13057
+ "**/dist/**",
13058
+ "**/coverage/**",
13059
+ "**/tmp/**",
13060
+ "**/.nx/**",
13061
+ "**/.tamagui/**",
13062
+ "**/.next/**",
13063
+ ...options.ignores || []
13064
+ ]
13065
+ })
13066
+ );
13055
13067
  if (react) {
13056
13068
  const reactConfigs = [
13057
13069
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.82.0",
3
+ "version": "0.83.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": {