@isentinel/eslint-config 1.1.2 → 1.2.2

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.ts CHANGED
@@ -3027,105 +3027,105 @@ interface RuleOptions {
3027
3027
  */
3028
3028
  'rest-spread-spacing'?: Linter.RuleEntry<RestSpreadSpacing>
3029
3029
  /**
3030
- * Warns against falsy strings and numbers
3031
- * @see lua-truthiness
3030
+ * Enforces the use of lua truthiness
3031
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/lua-truthiness/documentation.md
3032
3032
  */
3033
3033
  'roblox/lua-truthiness'?: Linter.RuleEntry<[]>
3034
3034
  /**
3035
- * Bans LuaTuples boolean expressions
3036
- * @see misleading-luatuple-checks
3035
+ * Disallow the use of LuaTuple in conditional expressions
3036
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/misleading-lua-tuple-checks/documentation.md
3037
3037
  */
3038
- 'roblox/misleading-luatuple-checks'?: Linter.RuleEntry<[]>
3038
+ 'roblox/misleading-lua-tuple-checks'?: Linter.RuleEntry<[]>
3039
3039
  /**
3040
- * Bans prototype from being used
3041
- * @see no-any
3040
+ * Disallow values of type `any`. Use `unknown` instead
3041
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-any/documentation.md
3042
3042
  */
3043
- 'roblox/no-any'?: Linter.RuleEntry<[]>
3043
+ 'roblox/no-any'?: Linter.RuleEntry<RobloxNoAny>
3044
3044
  /**
3045
- * Disallows usage of pairs() and ipairs() with Array<T>
3046
- * @see no-array-pairs
3045
+ * Disallow usage of pairs() and ipairs() with Array<T>
3046
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-array-pairs/documentation.md
3047
3047
  */
3048
3048
  'roblox/no-array-pairs'?: Linter.RuleEntry<[]>
3049
3049
  /**
3050
- * Bans enum declaration merging
3051
- * @see no-enum-merging
3050
+ * Disallow merging enum declarations
3051
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-enum-merging/documentation.md
3052
3052
  */
3053
3053
  'roblox/no-enum-merging'?: Linter.RuleEntry<[]>
3054
3054
  /**
3055
- * Bans using `export =` on a let variable
3056
- * @see no-export-assignment-let
3055
+ * Disallow using `export =` on a let variable
3056
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-export-assignment-let/documentation.md
3057
3057
  */
3058
3058
  'roblox/no-export-assignment-let'?: Linter.RuleEntry<[]>
3059
3059
  /**
3060
- * Disallows iterating with a for-in loop
3061
- * @see no-for-in
3060
+ * Disallow iterating with a for-in loop
3061
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-for-in/documentation.md
3062
3062
  */
3063
3063
  'roblox/no-for-in'?: Linter.RuleEntry<[]>
3064
3064
  /**
3065
- * Bans function expression names
3066
- * @see no-function-expression-id
3065
+ * Disallow the use of function expression names
3066
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-function-expression-name/documentation.md
3067
3067
  */
3068
- 'roblox/no-function-expression-id'?: Linter.RuleEntry<[]>
3068
+ 'roblox/no-function-expression-name'?: Linter.RuleEntry<[]>
3069
3069
  /**
3070
- * Disallows getters and setters
3071
- * @see no-getters-or-setters
3070
+ * Disallow getters and setters
3071
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-get-set/documentation.md
3072
3072
  */
3073
- 'roblox/no-getters-or-setters'?: Linter.RuleEntry<[]>
3073
+ 'roblox/no-get-set'?: Linter.RuleEntry<[]>
3074
3074
  /**
3075
- * Bans globalThis from being used
3076
- * @see no-global-this
3075
+ * Disallow the use of Luau reserved keywords as identifiers
3076
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-invalid-identifier/documentation.md
3077
3077
  */
3078
- 'roblox/no-global-this'?: Linter.RuleEntry<[]>
3078
+ 'roblox/no-invalid-identifier'?: Linter.RuleEntry<[]>
3079
3079
  /**
3080
- * Bans namespace declaration merging
3081
- * @see no-namespace-merging
3080
+ * Disallow merging namespace declarations
3081
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-namespace-merging/documentation.md
3082
3082
  */
3083
3083
  'roblox/no-namespace-merging'?: Linter.RuleEntry<[]>
3084
3084
  /**
3085
- * Bans null from being used
3086
- * @see no-null
3085
+ * Disallow usage of the `null` keyword
3086
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-null/documentation.md
3087
3087
  */
3088
3088
  'roblox/no-null'?: Linter.RuleEntry<[]>
3089
3089
  /**
3090
- * Bans math operators from being used on data types
3091
- * @see no-object-math
3090
+ * Disallow using objects in mathematical operations
3091
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-object-math/documentation.md
3092
3092
  */
3093
3093
  'roblox/no-object-math'?: Linter.RuleEntry<[]>
3094
3094
  /**
3095
- * Bans spread elements not last in a list of arguments from being used
3096
- * @see no-preceding-spread-element
3095
+ * Disallow .new() on objects without a .new() method
3096
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-post-fix-new/documentation.md
3097
3097
  */
3098
- 'roblox/no-preceding-spread-element'?: Linter.RuleEntry<[]>
3098
+ 'roblox/no-post-fix-new'?: Linter.RuleEntry<[]>
3099
3099
  /**
3100
- * Bans private identifiers from being used
3101
- * @see no-private-identifier
3100
+ * Disallow spread elements not last in a list of arguments
3101
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-preceding-spread-element/documentation.md
3102
3102
  */
3103
- 'roblox/no-private-identifier'?: Linter.RuleEntry<[]>
3103
+ 'roblox/no-preceding-spread-element'?: Linter.RuleEntry<[]>
3104
3104
  /**
3105
- * Bans prototype from being used
3106
- * @see no-prototype
3105
+ * Disallow the use of private identifiers (`#`)
3106
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-private-identifier/documentation.md
3107
3107
  */
3108
- 'roblox/no-prototype'?: Linter.RuleEntry<[]>
3108
+ 'roblox/no-private-identifier'?: Linter.RuleEntry<[]>
3109
3109
  /**
3110
- * Bans calling .new() on Roblox objects (helps transition to TS)
3111
- * @see no-rbx-postfix-new
3110
+ * Disallow unsupported syntax in roblox-ts
3111
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-unsupported-syntax/documentation.md
3112
3112
  */
3113
- 'roblox/no-rbx-postfix-new'?: Linter.RuleEntry<[]>
3113
+ 'roblox/no-unsupported-syntax'?: Linter.RuleEntry<[]>
3114
3114
  /**
3115
- * Disallows the regex operator
3116
- * @see no-regex
3115
+ * Disallow using `typeof` to check for value types
3116
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/no-value-typeof/documentation.md
3117
3117
  */
3118
- 'roblox/no-regex'?: Linter.RuleEntry<[]>
3118
+ 'roblox/no-value-typeof'?: Linter.RuleEntry<[]>
3119
3119
  /**
3120
- * Bans spread destructuring from being used
3121
- * @see no-spread-destructuring
3120
+ * Enforce use of task library alternatives
3121
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/prefer-task-library/documentation.md
3122
3122
  */
3123
- 'roblox/no-spread-destructuring'?: Linter.RuleEntry<[]>
3123
+ 'roblox/prefer-task-library'?: Linter.RuleEntry<[]>
3124
3124
  /**
3125
- * Disallows the typeof operator for values
3126
- * @see no-value-typeof
3125
+ * Enforce use of .size() instead of .length or .size property
3126
+ * @see https://github.com/christopher-buss/eslint-plugin-roblox-ts-x/tree/main/src/rules/size-method/documentation.md
3127
3127
  */
3128
- 'roblox/no-value-typeof'?: Linter.RuleEntry<[]>
3128
+ 'roblox/size-method'?: Linter.RuleEntry<[]>
3129
3129
  /**
3130
3130
  * Require or disallow semicolons instead of ASI
3131
3131
  * @see https://eslint.org/docs/latest/rules/semi
@@ -5905,6 +5905,11 @@ interface RuleOptions {
5905
5905
  * @see https://typescript-eslint.io/rules/no-unnecessary-type-constraint
5906
5906
  */
5907
5907
  'ts/no-unnecessary-type-constraint'?: Linter.RuleEntry<[]>
5908
+ /**
5909
+ * Disallow conversion idioms when they do not change the type or value of the expression
5910
+ * @see https://typescript-eslint.io/rules/no-unnecessary-type-conversion
5911
+ */
5912
+ 'ts/no-unnecessary-type-conversion'?: Linter.RuleEntry<[]>
5908
5913
  /**
5909
5914
  * Disallow type parameters that aren't used multiple times
5910
5915
  * @see https://typescript-eslint.io/rules/no-unnecessary-type-parameters
@@ -6166,6 +6171,7 @@ interface RuleOptions {
6166
6171
  /**
6167
6172
  * Require type annotations in certain places
6168
6173
  * @see https://typescript-eslint.io/rules/typedef
6174
+ * @deprecated
6169
6175
  */
6170
6176
  'ts/typedef'?: Linter.RuleEntry<TsTypedef>
6171
6177
  /**
@@ -11710,6 +11716,11 @@ type RequireUnicodeRegexp = []|[{
11710
11716
  }]
11711
11717
  // ----- rest-spread-spacing -----
11712
11718
  type RestSpreadSpacing = []|[("always" | "never")]
11719
+ // ----- roblox/no-any -----
11720
+ type RobloxNoAny = []|[{
11721
+
11722
+ fixToUnknown?: boolean
11723
+ }]
11713
11724
  // ----- semi -----
11714
11725
  type Semi = ([]|["never"]|["never", {
11715
11726
  beforeStatementContinuationChars?: ("always" | "any" | "never")
@@ -14247,6 +14258,8 @@ type TsOnlyThrowError = []|[{
14247
14258
  package: string
14248
14259
  })[]
14249
14260
 
14261
+ allowRethrowing?: boolean
14262
+
14250
14263
  allowThrowingAny?: boolean
14251
14264
 
14252
14265
  allowThrowingUnknown?: boolean
@@ -14976,7 +14989,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
14976
14989
  onlyEquality?: boolean
14977
14990
  }]
14978
14991
  // Names of all the configs
14979
- type ConfigNames = 'style/eslint/comments' | 'style/formatters/setup' | 'style/ignores' | 'style/imports' | 'style/import-sort' | 'style/imports/game' | 'style/jsdoc' | 'style/jsonc/setup' | 'style/jsonc/rules' | 'style/markdown/setup' | 'style/markdown/processor' | 'style/markdown/parser' | 'style/markdown/disables' | 'style/package-json' | 'style/perfectionist' | 'style/pnpm/package-json' | 'style/pnpm/pnpm-workspace-yaml' | 'style/prettier' | 'style/promise' | 'style/react/setup' | 'style/react/rules' | 'style/roblox' | 'style/shopify' | 'style/sonarjs' | 'style/sort-tsconfig' | 'style/spelling' | 'style/stylistic' | 'style/test/setup' | 'style/test/rules' | 'style/typescript/setup' | 'style/typescript/rules' | 'style/unicorn' | 'style/yaml:setup' | 'style/yaml/rules'
14992
+ type ConfigNames = 'style/eslint/comments' | 'style/formatters/setup' | 'style/ignores' | 'style/imports' | 'style/import-sort' | 'style/imports/game' | 'style/javascript/setup' | 'style/javascript/rules' | 'style/jsdoc' | 'style/jsonc/setup' | 'style/jsonc/rules' | 'style/markdown/setup' | 'style/markdown/processor' | 'style/markdown/parser' | 'style/markdown/disables' | 'style/package-json' | 'style/perfectionist' | 'style/pnpm/package-json' | 'style/pnpm/pnpm-workspace-yaml' | 'style/prettier' | 'style/promise' | 'style/react/setup' | 'style/react/rules' | 'style/react/type-aware-rules' | 'style/roblox' | 'style/shopify' | 'style/sonarjs' | 'style/sort-tsconfig' | 'style/spelling' | 'style/stylistic' | 'style/test/setup' | 'style/test/rules' | 'style/typescript/setup' | 'style/typescript/parser' | 'style/typescript/type-aware-parser' | 'style/typescript/rules' | 'style/unicorn' | 'style/yaml:setup' | 'style/yaml/rules'
14980
14993
 
14981
14994
  type Awaitable<T> = Promise<T> | T;
14982
14995
  interface JsDocOptions {
@@ -15203,7 +15216,7 @@ interface OptionsTypeScriptParserOptions {
15203
15216
  /**
15204
15217
  * Glob patterns for files that should not be type aware.
15205
15218
  *
15206
- * @default \["**\/*.md\/**", "**\/*.astro/*.ts"]
15219
+ * @default \["**\/*.md\/**"]
15207
15220
  */
15208
15221
  ignoresTypeAware?: Array<string>;
15209
15222
  /** Additional parser options for TypeScript. */
@@ -15211,11 +15224,19 @@ interface OptionsTypeScriptParserOptions {
15211
15224
  }
15212
15225
  interface OptionsTypeScriptWithTypes {
15213
15226
  /**
15214
- * When this options is provided, type aware rules will be enabled.
15227
+ * Provide a path to the TypeScript configuration file to use a different
15228
+ * default to 'tsconfig.json'.
15215
15229
  *
15216
15230
  * @see https://typescript-eslint.io/linting/typed-linting/
15217
15231
  */
15218
- tsconfigPath?: Array<string> | string;
15232
+ tsconfigPath?: string;
15233
+ /**
15234
+ * Enable Type-Aware linting.
15235
+ *
15236
+ * @default true
15237
+ * @see https://typescript-eslint.io/linting/typed-linting/
15238
+ */
15239
+ typeAware?: boolean;
15219
15240
  }
15220
15241
  interface PerfectionistConfig {
15221
15242
  customClassGroups?: Array<string>;
@@ -15251,6 +15272,8 @@ declare function ignores(): Promise<Array<TypedFlatConfigItem>>;
15251
15272
 
15252
15273
  declare function imports(options?: OptionsProjectType & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
15253
15274
 
15275
+ declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<Array<TypedFlatConfigItem>>;
15276
+
15254
15277
  declare function jsdoc(options?: JsDocOptions & OptionsProjectType & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
15255
15278
 
15256
15279
  declare function jsonc(options?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
@@ -15276,7 +15299,7 @@ declare function prettier(options?: OptionsComponentExtensions & OptionsFiles &
15276
15299
 
15277
15300
  declare function promise(): Promise<Array<TypedFlatConfigItem>>;
15278
15301
 
15279
- declare function react(options?: OptionsFiles & OptionsStylistic & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & ReactConfig): Promise<Array<TypedFlatConfigItem>>;
15302
+ declare function react(options?: OptionsComponentExtensions & OptionsFiles & OptionsStylistic & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & ReactConfig): Promise<Array<TypedFlatConfigItem>>;
15280
15303
 
15281
15304
  declare function roblox(options?: OptionsComponentExtensions & OptionsFiles & OptionsOverrides & OptionsStylistic & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes, formatLua?: boolean): Promise<Array<TypedFlatConfigItem>>;
15282
15305
 
@@ -15383,8 +15406,19 @@ type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
15383
15406
  * @returns The combined array.
15384
15407
  */
15385
15408
  declare function combine(...configs: Array<Awaitable<Array<TypedFlatConfigItem> | TypedFlatConfigItem>>): Promise<Array<TypedFlatConfigItem>>;
15409
+ declare function createTsParser(options: {
15410
+ componentExtensions?: Array<string>;
15411
+ configName: string;
15412
+ files: Array<string>;
15413
+ ignores?: Array<string>;
15414
+ parser: any;
15415
+ parserOptions?: any;
15416
+ tsconfigPath?: string;
15417
+ typeAware: boolean;
15418
+ }): TypedFlatConfigItem;
15386
15419
  declare function ensurePackages(packages: Array<string | undefined>): Promise<void>;
15387
15420
  declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): any;
15421
+ declare function getTsConfig(tsconfigPath?: string): string | undefined;
15388
15422
  declare function interopDefault<T>(dynamicImport: Awaitable<T>): Promise<T extends {
15389
15423
  default: infer U;
15390
15424
  } ? U : T>;
@@ -15438,4 +15472,4 @@ declare function renameRules(rules: Record<string, any>, map: Record<string, str
15438
15472
  declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
15439
15473
  declare function toArray<T>(value: Array<T> | T): Array<T>;
15440
15474
 
15441
- export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_YAML, type JsDocOptions, type OptionsComponentExtensions, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsProjectType, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type PerfectionistConfig, type ReactConfig, type ResolvedOptions, type Rules, type SpellCheckConfig, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, combine, comments, style as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnvironment, isInGitHooksOrLintStaged, jsdoc, jsonc, markdown, packageJson, parserPlain, perfectionist, pnpm, prettier, promise, react, renamePluginInConfigs, renameRules, resolveSubOptions, roblox, shopify, sonarjs, sortTsconfig, spelling, style, stylistic, toArray, toml, typescript, unicorn, yaml };
15475
+ export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_YAML, type JsDocOptions, type OptionsComponentExtensions, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsProjectType, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type PerfectionistConfig, type ReactConfig, type ResolvedOptions, type Rules, type SpellCheckConfig, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, combine, comments, createTsParser, style as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, getTsConfig, ignores, imports, interopDefault, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, packageJson, parserPlain, perfectionist, pnpm, prettier, promise, react, renamePluginInConfigs, renameRules, resolveSubOptions, roblox, shopify, sonarjs, sortTsconfig, spelling, style, stylistic, toArray, toml, typescript, unicorn, yaml };