@isentinel/eslint-config 6.0.0-beta.2 → 6.0.0-beta.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/index.d.mts CHANGED
@@ -19518,6 +19518,28 @@ type ReactConfig = ESLintReactSettings & OptionsOverridesTypeAware & {
19518
19518
  } & {
19519
19519
  filenameCase?: "kebabCase" | "pascalCase";
19520
19520
  };
19521
+ interface OptionsUnicorn {
19522
+ /**
19523
+ * Additional entries merged into the built-in `unicorn/name-replacements`
19524
+ * list.
19525
+ *
19526
+ * Entries are shallow-merged over the defaults, so you can add new
19527
+ * replacements or disable a built-in one (set it to `false`) without
19528
+ * replacing the whole list.
19529
+ *
19530
+ * @example
19531
+ *
19532
+ * ```ts
19533
+ * nameReplacements: {
19534
+ * // Add: flag `props` and suggest `properties`.
19535
+ * props: { properties: true },
19536
+ * // Remove: stop flagging `dist`.
19537
+ * dist: false,
19538
+ * };
19539
+ * ```
19540
+ */
19541
+ nameReplacements?: NonNullable<ExtractRuleOptions<NonNullable<RuleOptions["unicorn/name-replacements"]>>[0]>["replacements"];
19542
+ }
19521
19543
  interface SpellCheckConfig {
19522
19544
  /**
19523
19545
  * Whether or not to run the spell checker in the editor.
@@ -19752,6 +19774,8 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsProjectType {
19752
19774
  * @default auto-detect based on the dependencies
19753
19775
  */
19754
19776
  typescript?: OptionsTypescript;
19777
+ /** Supply custom options for eslint-plugin-unicorn. */
19778
+ unicorn?: OptionsUnicorn;
19755
19779
  /**
19756
19780
  * Enable YAML support.
19757
19781
  *
@@ -19911,7 +19935,7 @@ declare function toml(options?: OptionsFiles & OptionsOverrides & OptionsStylist
19911
19935
  declare function typescript(options?: OptionsComponentExtensions & OptionsFiles & OptionsOverridesTypeAware & OptionsStylistic & OptionsTypeScriptErasableOnly & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes): Promise<Array<TypedFlatConfigItem>>;
19912
19936
  //#endregion
19913
19937
  //#region src/configs/unicorn.d.ts
19914
- declare function unicorn(options?: OptionsHasRoblox & OptionsStylistic & {
19938
+ declare function unicorn(options?: OptionsHasRoblox & OptionsStylistic & OptionsUnicorn & {
19915
19939
  root?: Array<string>;
19916
19940
  }): Promise<Array<TypedFlatConfigItem>>;
19917
19941
  //#endregion
@@ -19983,4 +20007,4 @@ declare const GLOB_BUILD_TOOLS: Array<string>;
19983
20007
  declare const GLOB_ALL_SRC: string[];
19984
20008
  declare const GLOB_EXCLUDE: string[];
19985
20009
  //#endregion
19986
- 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_MISE, 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, OptionsE18e, 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, e18e, eslintPlugin, flawless, gitignore, ignores, imports, isInAgentSession, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, oxfmt, packageJson, perfectionist, pnpm, promise, react, roblox, sonarjs, sortGithubAction, sortMiseToml, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic, test, toml, typescript, unicorn, yaml };
20010
+ 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_MISE, 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, OptionsE18e, OptionsFiles, OptionsFilesTypeAware, OptionsFormatters, OptionsHasRoblox, OptionsHasTypeScript, OptionsIsInEditor, OptionsJest, OptionsOverrides, OptionsOverridesTypeAware, OptionsPnpm, OptionsProjectType, OptionsStylistic, OptionsTestFramework, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsVitest, type OxfmtOptions, PerfectionistConfig, type PrettierOptions, ReactConfig, Rules, SpellCheckConfig, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, ceaseNonsense, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, e18e, eslintPlugin, flawless, gitignore, ignores, imports, isInAgentSession, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, oxfmt, packageJson, perfectionist, pnpm, promise, react, roblox, sonarjs, sortGithubAction, sortMiseToml, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic, test, toml, typescript, unicorn, yaml };
package/dist/index.mjs CHANGED
@@ -1998,6 +1998,7 @@ async function isentinel(options, ...userConfigs) {
1998
1998
  componentExts: componentExtensions,
1999
1999
  stylistic: stylisticOptions
2000
2000
  }), unicorn({
2001
+ ...resolveSubOptions(options, "unicorn"),
2001
2002
  root: rootGlobs,
2002
2003
  stylistic: stylisticOptions
2003
2004
  }));
@@ -4211,7 +4212,11 @@ const abbreviations = {
4211
4212
  utils: false
4212
4213
  };
4213
4214
  async function unicorn(options = {}) {
4214
- const { roblox = true, root: customRootGlobs, stylistic = true } = options;
4215
+ const { nameReplacements, roblox = true, root: customRootGlobs, stylistic = true } = options;
4216
+ const replacements = {
4217
+ ...abbreviations,
4218
+ ...nameReplacements
4219
+ };
4215
4220
  const pluginUnicorn = await interopDefault(import("eslint-plugin-unicorn"));
4216
4221
  const rootGlobs = mergeGlobs(GLOB_ROOT.map(toSourceGlob), customRootGlobs?.map(toSourceGlob));
4217
4222
  return [
@@ -4239,7 +4244,7 @@ async function unicorn(options = {}) {
4239
4244
  "unicorn/isolated-functions": "error",
4240
4245
  "unicorn/name-replacements": ["error", {
4241
4246
  checkFilenames: true,
4242
- replacements: abbreviations
4247
+ replacements
4243
4248
  }],
4244
4249
  "unicorn/no-array-sort-for-min-max": "error",
4245
4250
  "unicorn/no-async-promise-finally": "error",
@@ -4355,7 +4360,7 @@ async function unicorn(options = {}) {
4355
4360
  files: rootGlobs,
4356
4361
  rules: { "unicorn/name-replacements": ["error", {
4357
4362
  checkFilenames: false,
4358
- replacements: abbreviations
4363
+ replacements
4359
4364
  }] }
4360
4365
  }
4361
4366
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isentinel/eslint-config",
3
- "version": "6.0.0-beta.2",
3
+ "version": "6.0.0-beta.3",
4
4
  "description": "iSentinel's ESLint config",
5
5
  "keywords": [
6
6
  "eslint-config",
@@ -118,7 +118,7 @@
118
118
  "type-fest": "5.7.0",
119
119
  "typescript": "6.0.3",
120
120
  "unplugin-unused": "0.5.7",
121
- "@isentinel/eslint-config": "6.0.0-beta.2"
121
+ "@isentinel/eslint-config": "6.0.0-beta.3"
122
122
  },
123
123
  "peerDependencies": {
124
124
  "@vitest/eslint-plugin": "^1.6.4",