@isentinel/eslint-config 5.0.0-beta.7 → 5.0.0-beta.9

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/index.d.mts CHANGED
@@ -17578,6 +17578,9 @@ type ConfigNames = 'isentinel/cease-nonsense' | 'isentinel/eslint/comments' | 'i
17578
17578
  //#endregion
17579
17579
  //#region src/utils.d.ts
17580
17580
  type ExtractRuleOptions<T> = T extends Linter.RuleEntry<infer U> ? U : never;
17581
+ declare function isInGitHooksOrLintStaged(): boolean;
17582
+ declare function isInAgentSession(): boolean;
17583
+ declare function isInEditorEnvironment(): boolean;
17581
17584
  //#endregion
17582
17585
  //#region src/types.d.ts
17583
17586
  type Awaitable<T> = Promise<T> | T;
@@ -17724,6 +17727,14 @@ interface OptionsJest {
17724
17727
  extended?: boolean;
17725
17728
  }
17726
17729
  interface OptionsVitest {
17730
+ /**
17731
+ * Enable the `eslint-plugin-jest-extended` ruleset.
17732
+ *
17733
+ * Requires `jest-extended` to be installed.
17734
+ *
17735
+ * @default false
17736
+ */
17737
+ extended?: boolean;
17727
17738
  /**
17728
17739
  * Enable typecheck rules for Vitest.
17729
17740
  *
@@ -18245,4 +18256,4 @@ declare const GLOB_BUILD_TOOLS: Array<string>;
18245
18256
  declare const GLOB_ALL_SRC: string[];
18246
18257
  declare const GLOB_EXCLUDE: string[];
18247
18258
  //#endregion
18248
- export { Awaitable, type ConfigNames, type FlatConfigComposer, GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BUILD_TOOLS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_XML, GLOB_YAML, GitignoreOptions, JsdocOptions, NamedFlatConfigItem, NamedOptionsConfig, OptionsComponentExtensions, OptionsConfig, OptionsFiles, OptionsFilesTypeAware, OptionsFormatters, OptionsHasRoblox, OptionsHasTypeScript, OptionsIsInEditor, OptionsJest, OptionsOverrides, OptionsOverridesTypeAware, OptionsPnpm, OptionsProjectType, OptionsStylistic, OptionsTestFramework, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVitest, type OxfmtOptions, PerfectionistConfig, type PrettierOptions, ReactConfig, Rules, SpellCheckConfig, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, ceaseNonsense, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, eslintPlugin, flawless, gitignore, ignores, imports, javascript, jsdoc, jsonc, markdown, node, oxfmt, packageJson, perfectionist, pnpm, promise, react, roblox, sonarjs, sortGithubAction, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic, test, toml, typescript, unicorn, yaml };
18259
+ export { Awaitable, type ConfigNames, type FlatConfigComposer, GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BUILD_TOOLS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_XML, GLOB_YAML, GitignoreOptions, JsdocOptions, NamedFlatConfigItem, NamedOptionsConfig, OptionsComponentExtensions, OptionsConfig, OptionsFiles, OptionsFilesTypeAware, OptionsFormatters, OptionsHasRoblox, OptionsHasTypeScript, OptionsIsInEditor, OptionsJest, OptionsOverrides, OptionsOverridesTypeAware, OptionsPnpm, OptionsProjectType, OptionsStylistic, OptionsTestFramework, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVitest, type OxfmtOptions, PerfectionistConfig, type PrettierOptions, ReactConfig, Rules, SpellCheckConfig, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, ceaseNonsense, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, eslintPlugin, flawless, gitignore, ignores, imports, isInAgentSession, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, oxfmt, packageJson, perfectionist, pnpm, promise, react, roblox, sonarjs, sortGithubAction, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic, test, toml, typescript, unicorn, yaml };
package/dist/index.mjs CHANGED
@@ -3439,10 +3439,20 @@ async function test(options = {}) {
3439
3439
  if (enableVitest) {
3440
3440
  await ensurePackages(["@vitest/eslint-plugin"]);
3441
3441
  const vitestPlugin = await interopDefault(import("@vitest/eslint-plugin"));
3442
+ const useJestExtended = jestOptions.extended === true;
3443
+ const jestExtendedPlugin = await (async () => {
3444
+ if (!useJestExtended) return;
3445
+ await ensurePackages(["eslint-plugin-jest-extended"]);
3446
+ return interopDefault(import("eslint-plugin-jest-extended"));
3447
+ })();
3442
3448
  pluginVitest ??= { ...vitestPlugin };
3449
+ pluginJestExtended ??= { ...jestExtendedPlugin };
3443
3450
  configs.push({
3444
3451
  name: "isentinel/test/vitest/setup",
3445
- plugins: { vitest: pluginVitest }
3452
+ plugins: {
3453
+ vitest: pluginVitest,
3454
+ ...useJestExtended ? { "jest-extended": pluginJestExtended } : {}
3455
+ }
3446
3456
  }, {
3447
3457
  name: "isentinel/test/vitest/rules",
3448
3458
  files,
@@ -3521,6 +3531,13 @@ async function test(options = {}) {
3521
3531
  ignoreTypeOfDescribeName: true,
3522
3532
  mustMatch: { it: ["^should", "Test title must start with \"should\""] }
3523
3533
  }],
3534
+ ...useJestExtended ? {
3535
+ "jest-extended/prefer-to-be-array": "error",
3536
+ "jest-extended/prefer-to-be-false": "error",
3537
+ "jest-extended/prefer-to-be-object": "error",
3538
+ "jest-extended/prefer-to-be-true": "error",
3539
+ "jest-extended/prefer-to-have-been-called-once": "error"
3540
+ } : {},
3524
3541
  ...stylistic !== false ? { "vitest/padding-around-all": "warn" } : {},
3525
3542
  ...overrides
3526
3543
  },
@@ -3928,4 +3945,4 @@ async function yaml(options = {}) {
3928
3945
  }
3929
3946
 
3930
3947
  //#endregion
3931
- export { GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BUILD_TOOLS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, ceaseNonsense, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, eslintPlugin, flawless, gitignore, ignores, imports, javascript, jsdoc, jsonc, markdown, node, oxfmt, packageJson, perfectionist, pnpm, promise, react, roblox, sonarjs, sortGithubAction, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic, test, toml, typescript, unicorn, yaml };
3948
+ export { GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BUILD_TOOLS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, ceaseNonsense, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, eslintPlugin, flawless, gitignore, ignores, imports, isInAgentSession, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, oxfmt, packageJson, perfectionist, pnpm, promise, react, roblox, sonarjs, sortGithubAction, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic, test, toml, typescript, unicorn, yaml };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isentinel/eslint-config",
3
- "version": "5.0.0-beta.7",
3
+ "version": "5.0.0-beta.9",
4
4
  "description": "iSentinel's ESLint config",
5
5
  "keywords": [
6
6
  "eslint-config",
@@ -131,7 +131,7 @@
131
131
  "type-fest": "5.4.4",
132
132
  "typescript": "5.9.3",
133
133
  "unplugin-unused": "0.5.7",
134
- "@isentinel/eslint-config": "5.0.0-beta.7"
134
+ "@isentinel/eslint-config": "5.0.0-beta.9"
135
135
  },
136
136
  "peerDependencies": {
137
137
  "@vitest/eslint-plugin": "^1.6.4",