@storm-software/eslint 0.123.1 → 0.123.3

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/dist/preset.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Linter } from 'eslint';
2
2
  import { FlatConfigComposer } from 'eslint-flat-config-utils';
3
- import { O as OptionsConfig, R as RuleOptions, T as TypedFlatConfigItem, A as Awaitable, C as ConfigNames } from './types-Drnq7vws.js';
3
+ import { O as OptionsConfig, R as RuleOptions, T as TypedFlatConfigItem, A as Awaitable, C as ConfigNames } from './types-CHy285SF.js';
4
4
  import '@nx/eslint-plugin/src/utils/runtime-lint-utils';
5
5
  import '@stylistic/eslint-plugin';
6
6
  import '@typescript-eslint/parser';
package/dist/preset.js CHANGED
@@ -166,8 +166,8 @@ __name(disables, "disables");
166
166
  var StylisticConfigDefaults = {
167
167
  indent: 2,
168
168
  jsx: true,
169
- quotes: "single",
170
- semi: false
169
+ quotes: "double",
170
+ semi: true
171
171
  };
172
172
  async function stylistic(options = {}) {
173
173
  const { indent, jsx: jsx2, overrides = {}, quotes, semi } = {
@@ -787,7 +787,7 @@ async function javascript(options = {}) {
787
787
  },
788
788
  {
789
789
  // Banner
790
- ...banner_plugin_default.configs["recommended"],
790
+ ...banner_plugin_default.configs?.["recommended"],
791
791
  name: "storm/javascript/banner",
792
792
  plugins: {
793
793
  banner: banner_plugin_default
@@ -3014,6 +3014,7 @@ async function toml(options = {}) {
3014
3014
  __name(toml, "toml");
3015
3015
 
3016
3016
  // src/configs/typescript.ts
3017
+ import { existsSync } from "node:fs";
3017
3018
  import process from "node:process";
3018
3019
  async function typescript(options = {}) {
3019
3020
  const { componentExts = [], overrides = {}, overridesTypeAware = {}, parserOptions = {}, type = "app" } = options;
@@ -3030,7 +3031,20 @@ async function typescript(options = {}) {
3030
3031
  `${GLOB_MARKDOWN}/**`,
3031
3032
  GLOB_ASTRO_TS
3032
3033
  ];
3033
- const tsconfigPath = options?.tsconfigPath ? options.tsconfigPath : void 0;
3034
+ let tsconfigPath = options?.tsconfigPath ? options.tsconfigPath : void 0;
3035
+ if (!tsconfigPath) {
3036
+ if (existsSync("tsconfig.json")) {
3037
+ tsconfigPath = "tsconfig.json";
3038
+ } else if (existsSync("tsconfig.base.json")) {
3039
+ tsconfigPath = "tsconfig.base.json";
3040
+ } else if (existsSync("tsconfig.app.json")) {
3041
+ tsconfigPath = "tsconfig.app.json";
3042
+ } else if (existsSync("tsconfig.lib.json")) {
3043
+ tsconfigPath = "tsconfig.lib.json";
3044
+ } else {
3045
+ console.warn("No tsconfig.json found. Consider adding a tsconfig.json file to your project's ESLint configuration.");
3046
+ }
3047
+ }
3034
3048
  const isTypeAware = !!tsconfigPath;
3035
3049
  const typeAwareRules = {
3036
3050
  "dot-notation": "off",
@@ -3422,7 +3436,7 @@ async function cspell(options = {}) {
3422
3436
  const { configFile = "./.vscode/cspell.json" } = options;
3423
3437
  return [
3424
3438
  {
3425
- name: "storm/cspell",
3439
+ name: "storm/cspell/rules",
3426
3440
  ...cspellConfig,
3427
3441
  rules: {
3428
3442
  ...cspellConfig.rules,
@@ -14224,7 +14224,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
14224
14224
  onlyEquality?: boolean
14225
14225
  }]
14226
14226
  // Names of all the configs
14227
- type ConfigNames = 'storm/astro/setup' | 'storm/astro/rules' | 'storm/formatter/setup' | 'storm/imports/rules' | 'storm/javascript/setup' | 'storm/javascript/banner' | 'storm/javascript/rules' | 'antfu/jsx/setup' | 'storm/jsdoc/rules' | 'storm/jsonc/setup' | 'storm/jsonc/rules' | 'storm/markdown/setup' | 'storm/markdown/processor' | 'storm/markdown/parser' | 'storm/markdown/disables' | 'storm/node/rules' | 'storm/perfectionist/setup' | 'storm/react/setup' | 'storm/react/rules' | 'storm/sort/package-json' | 'storm/stylistic/rules' | 'storm/test/setup' | 'storm/test/rules' | 'storm/toml/setup' | 'storm/toml/rules' | 'storm/regexp/rules' | 'storm/typescript/setup' | 'storm/typescript/parser' | 'storm/typescript/rules' | 'storm/unicorn/rules' | 'storm/unocss' | 'storm/yaml/setup' | 'storm/yaml/rules'
14227
+ type ConfigNames = 'storm/astro/setup' | 'storm/astro/rules' | 'storm/formatter/setup' | 'storm/imports/rules' | 'storm/javascript/setup' | 'storm/javascript/banner' | 'storm/javascript/rules' | 'antfu/jsx/setup' | 'storm/jsdoc/rules' | 'storm/jsonc/setup' | 'storm/jsonc/rules' | 'storm/markdown/setup' | 'storm/markdown/processor' | 'storm/markdown/parser' | 'storm/markdown/disables' | 'storm/node/rules' | 'storm/perfectionist/setup' | 'storm/react/setup' | 'storm/react/rules' | 'storm/sort/package-json' | 'storm/stylistic/rules' | 'storm/test/setup' | 'storm/test/rules' | 'storm/toml/setup' | 'storm/toml/rules' | 'storm/regexp/rules' | 'storm/typescript/setup' | 'storm/typescript/parser' | 'storm/typescript/type-aware-parser' | 'storm/typescript/rules' | 'storm/typescript/rules-type-aware' | 'storm/unicorn/rules' | 'storm/unocss' | 'storm/yaml/setup' | 'storm/yaml/rules'
14228
14228
 
14229
14229
  /**
14230
14230
  * Vendor types from Prettier so we don't rely on the dependency.
@@ -14457,8 +14457,7 @@ interface OptionsTypeScriptWithTypes {
14457
14457
  */
14458
14458
  overridesTypeAware?: TypedFlatConfigItem["rules"];
14459
14459
  }
14460
- interface StylisticConfig extends Pick<StylisticCustomizeOptions, "indent" | "quotes" | "jsx" | "semi"> {
14461
- }
14460
+ type StylisticConfig = Pick<StylisticCustomizeOptions, "indent" | "quotes" | "jsx" | "semi">;
14462
14461
  interface OptionsOverrides {
14463
14462
  overrides?: TypedFlatConfigItem["rules"];
14464
14463
  }
@@ -1,5 +1,5 @@
1
1
  import { Awaitable } from 'eslint-flat-config-utils';
2
- import { T as TypedFlatConfigItem } from '../types-Drnq7vws.js';
2
+ import { T as TypedFlatConfigItem } from '../types-CHy285SF.js';
3
3
  import '@nx/eslint-plugin/src/utils/runtime-lint-utils';
4
4
  import '@stylistic/eslint-plugin';
5
5
  import '@typescript-eslint/parser';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.123.1",
3
+ "version": "0.123.3",
4
4
  "type": "module",
5
5
  "description": "⚡ A package containing the base ESLint configuration used by Storm Software across many projects.",
6
6
  "repository": {