@isentinel/eslint-config 6.0.0-beta.1 → 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 +140 -3
- package/dist/index.mjs +9 -3
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -650,6 +650,114 @@ interface RuleOptions {
|
|
|
650
650
|
* @see https://eslint.org/docs/latest/rules/dot-notation
|
|
651
651
|
*/
|
|
652
652
|
'dot-notation'?: Linter.RuleEntry<DotNotation>;
|
|
653
|
+
/**
|
|
654
|
+
* Disallow dependencies in favor of more performant or secure alternatives
|
|
655
|
+
*/
|
|
656
|
+
'e18e/ban-dependencies'?: Linter.RuleEntry<E18EBanDependencies>;
|
|
657
|
+
/**
|
|
658
|
+
* Disallow `delete` on properties — V8 deoptimizes the object to dictionary mode
|
|
659
|
+
*/
|
|
660
|
+
'e18e/no-delete-property'?: Linter.RuleEntry<[]>;
|
|
661
|
+
/**
|
|
662
|
+
* Prefer optimized alternatives to `indexOf()` equality checks
|
|
663
|
+
*/
|
|
664
|
+
'e18e/no-indexof-equality'?: Linter.RuleEntry<[]>;
|
|
665
|
+
/**
|
|
666
|
+
* Disallow spreading the accumulator inside a `reduce` callback (O(N²) growth)
|
|
667
|
+
*/
|
|
668
|
+
'e18e/no-spread-in-reduce'?: Linter.RuleEntry<[]>;
|
|
669
|
+
/**
|
|
670
|
+
* Prefer Array.prototype.at() over length-based indexing
|
|
671
|
+
*/
|
|
672
|
+
'e18e/prefer-array-at'?: Linter.RuleEntry<[]>;
|
|
673
|
+
/**
|
|
674
|
+
* Prefer Array.prototype.fill() over Array.from or map with constant values
|
|
675
|
+
*/
|
|
676
|
+
'e18e/prefer-array-fill'?: Linter.RuleEntry<[]>;
|
|
677
|
+
/**
|
|
678
|
+
* Prefer Array.from(iterable, mapper) over [...iterable].map(mapper) to avoid intermediate array allocation
|
|
679
|
+
*/
|
|
680
|
+
'e18e/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
681
|
+
/**
|
|
682
|
+
* Prefer Array.some() over Array.find() and Array.filter().length checks when checking for element existence
|
|
683
|
+
*/
|
|
684
|
+
'e18e/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
685
|
+
/**
|
|
686
|
+
* Prefer Array.prototype.toReversed() over copying and reversing arrays
|
|
687
|
+
*/
|
|
688
|
+
'e18e/prefer-array-to-reversed'?: Linter.RuleEntry<[]>;
|
|
689
|
+
/**
|
|
690
|
+
* Prefer Array.prototype.toSorted() over copying and sorting arrays
|
|
691
|
+
*/
|
|
692
|
+
'e18e/prefer-array-to-sorted'?: Linter.RuleEntry<[]>;
|
|
693
|
+
/**
|
|
694
|
+
* Prefer Array.prototype.toSpliced() over copying and splicing arrays
|
|
695
|
+
*/
|
|
696
|
+
'e18e/prefer-array-to-spliced'?: Linter.RuleEntry<[]>;
|
|
697
|
+
/**
|
|
698
|
+
* Prefer Date.now() over new Date().getTime() and +new Date()
|
|
699
|
+
*/
|
|
700
|
+
'e18e/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
701
|
+
/**
|
|
702
|
+
* Prefer the exponentiation operator ** over Math.pow()
|
|
703
|
+
*/
|
|
704
|
+
'e18e/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>;
|
|
705
|
+
/**
|
|
706
|
+
* Prefer Array.prototype.flatMap() over .map(fn).flat() to avoid the intermediate array
|
|
707
|
+
*/
|
|
708
|
+
'e18e/prefer-flatmap-over-map-flat'?: Linter.RuleEntry<[]>;
|
|
709
|
+
/**
|
|
710
|
+
* Prefer `Map.prototype.getOrInsert()` over reading an entry with a default and writing it back
|
|
711
|
+
*/
|
|
712
|
+
'e18e/prefer-get-or-insert'?: Linter.RuleEntry<[]>;
|
|
713
|
+
/**
|
|
714
|
+
* Prefer .includes() over indexOf() comparisons for arrays and strings
|
|
715
|
+
*/
|
|
716
|
+
'e18e/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
717
|
+
/**
|
|
718
|
+
* Prefer String.prototype.{includes,startsWith,endsWith} over equivalent regex.test() calls
|
|
719
|
+
*/
|
|
720
|
+
'e18e/prefer-includes-over-regex-test'?: Linter.RuleEntry<[]>;
|
|
721
|
+
/**
|
|
722
|
+
* Prefer inline equality checks over temporary object creation for simple comparisons
|
|
723
|
+
*/
|
|
724
|
+
'e18e/prefer-inline-equality'?: Linter.RuleEntry<[]>;
|
|
725
|
+
/**
|
|
726
|
+
* Prefer nullish coalescing operator (?? and ??=) over verbose null checks
|
|
727
|
+
*/
|
|
728
|
+
'e18e/prefer-nullish-coalescing'?: Linter.RuleEntry<[]>;
|
|
729
|
+
/**
|
|
730
|
+
* Prefer Object.hasOwn() over Object.prototype.hasOwnProperty.call() and obj.hasOwnProperty()
|
|
731
|
+
*/
|
|
732
|
+
'e18e/prefer-object-has-own'?: Linter.RuleEntry<[]>;
|
|
733
|
+
/**
|
|
734
|
+
* prefer `RegExp.test()` over `String.match()` and `RegExp.exec()` when only checking for match existence
|
|
735
|
+
*/
|
|
736
|
+
'e18e/prefer-regex-test'?: Linter.RuleEntry<[]>;
|
|
737
|
+
/**
|
|
738
|
+
* Prefer spread syntax over Array.concat(), Array.from(), Object.assign({}, ...), and Function.apply()
|
|
739
|
+
*/
|
|
740
|
+
'e18e/prefer-spread-syntax'?: Linter.RuleEntry<[]>;
|
|
741
|
+
/**
|
|
742
|
+
* Prefer hoisting an `Intl.Collator` instance over calling localeCompare in a sort callback
|
|
743
|
+
*/
|
|
744
|
+
'e18e/prefer-static-collator'?: Linter.RuleEntry<[]>;
|
|
745
|
+
/**
|
|
746
|
+
* Prefer defining regular expressions at module scope to avoid re-compilation on every function call
|
|
747
|
+
*/
|
|
748
|
+
'e18e/prefer-static-regex'?: Linter.RuleEntry<[]>;
|
|
749
|
+
/**
|
|
750
|
+
* Prefer String.fromCharCode() over String.fromCodePoint() for code points below 0x10000
|
|
751
|
+
*/
|
|
752
|
+
'e18e/prefer-string-fromcharcode'?: Linter.RuleEntry<[]>;
|
|
753
|
+
/**
|
|
754
|
+
* Prefer passing function and arguments directly to setTimeout/setInterval instead of wrapping in an arrow function or using bind
|
|
755
|
+
*/
|
|
756
|
+
'e18e/prefer-timer-args'?: Linter.RuleEntry<[]>;
|
|
757
|
+
/**
|
|
758
|
+
* Prefer URL.canParse() over try-catch blocks for URL validation
|
|
759
|
+
*/
|
|
760
|
+
'e18e/prefer-url-canparse'?: Linter.RuleEntry<[]>;
|
|
653
761
|
/**
|
|
654
762
|
* Require or disallow newline at the end of files
|
|
655
763
|
* @see https://eslint.org/docs/latest/rules/eol-last
|
|
@@ -10477,6 +10585,11 @@ type DotLocation = [] | [("object" | "property")]; // ----- dot-notation -----
|
|
|
10477
10585
|
type DotNotation = [] | [{
|
|
10478
10586
|
allowKeywords?: boolean;
|
|
10479
10587
|
allowPattern?: string;
|
|
10588
|
+
}]; // ----- e18e/ban-dependencies -----
|
|
10589
|
+
type E18EBanDependencies = [] | [{
|
|
10590
|
+
presets?: string[];
|
|
10591
|
+
modules?: string[];
|
|
10592
|
+
allowed?: string[];
|
|
10480
10593
|
}]; // ----- eol-last -----
|
|
10481
10594
|
type EolLast = [] | [("always" | "never" | "unix" | "windows")]; // ----- eqeqeq -----
|
|
10482
10595
|
type Eqeqeq = ([] | ["always"] | ["always", {
|
|
@@ -19109,7 +19222,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
19109
19222
|
exceptRange?: boolean;
|
|
19110
19223
|
onlyEquality?: boolean;
|
|
19111
19224
|
}]; // Names of all the configs
|
|
19112
|
-
type ConfigNames = 'isentinel/cease-nonsense/setup' | 'isentinel/cease-nonsense' | 'isentinel/typescript/rules-type-aware' | 'isentinel/eslint/comments' | 'isentinel/eslint/comments/src' | 'isentinel/eslint-plugin/setup' | 'isentinel/eslint-plugin/rules' | 'isentinel/flawless/setup' | 'isentinel/flawless/ts/rules-type-aware' | 'isentinel/flawless/tsx/rules-type-aware' | 'isentinel/gitignore' | 'isentinel/ignores' | 'isentinel/imports/rules' | 'isentinel/imports/game' | 'isentinel/javascript/setup' | 'isentinel/javascript/rules' | 'isentinel/jsdoc/setup' | 'isentinel/jsdoc' | 'isentinel/jsonc/setup' | 'isentinel/jsonc/rules' | 'isentinel/markdown/setup' | 'isentinel/markdown/processor' | 'isentinel/markdown/parser' | 'isentinel/markdown/disables' | 'isentinel/node/rules' | 'isentinel/oxfmt/setup' | 'isentinel/oxfmt/javascript' | 'isentinel/oxfmt/typescript' | 'isentinel/oxfmt/css' | 'isentinel/oxfmt/scss' | 'isentinel/oxfmt/less' | 'isentinel/oxfmt/html' | 'isentinel/oxfmt/markdown' | 'isentinel/oxfmt/graphql' | 'isentinel/oxfmt/json' | 'isentinel/oxfmt/yaml' | 'isentinel/package-json/setup' | 'isentinel/package-json' | 'isentinel/package-json/root' | 'isentinel/perfectionist/setup' | 'isentinel/perfectionist' | 'isentinel/perfectionist/jsx' | 'isentinel/pnpm/setup' | 'isentinel/pnpm/package-json' | 'isentinel/pnpm/pnpm-workspace-yaml' | 'isentinel/promise' | 'isentinel/react/setup' | 'isentinel/react/setup/naming' | 'isentinel/react/rules' | 'isentinel/react/type-aware-rules' | 'isentinel/roblox/setup' | 'isentinel/roblox/parser' | 'isentinel/roblox/type-aware-parser' | 'isentinel/roblox' | 'isentinel/roblox/rules-type-aware' | 'isentinel/roblox/format-lua/setup' | 'isentinel/roblox/format-lua' | 'isentinel/sonarjs' | 'isentinel/spelling/setup' | 'isentinel/spelling' | 'isentinel/stylistic/setup' | 'isentinel/stylistic' | 'isentinel/stylistic/ts' | 'isentinel/stylistic/js' | 'isentinel/stylistic/markdown-code' | 'isentinel/test/jest/setup' | 'isentinel/test/jest/rules' | 'isentinel/test/vitest/setup' | 'isentinel/test/vitest/rules' | 'isentinel/toml/setup' | 'isentinel/toml/rules' | 'isentinel/typescript/setup' | 'isentinel/typescript/parser' | 'isentinel/typescript/type-aware-parser' | 'isentinel/typescript/rules' | 'isentinel/typescript/rules-type-aware' | 'isentinel/typescript/erasable-syntax-only' | 'isentinel/unicorn/setup' | 'isentinel/unicorn/rules' | 'isentinel/unicorn/root' | 'isentinel/yaml/setup' | 'isentinel/yaml/rules';
|
|
19225
|
+
type ConfigNames = 'isentinel/cease-nonsense/setup' | 'isentinel/cease-nonsense' | 'isentinel/typescript/rules-type-aware' | 'isentinel/eslint/comments' | 'isentinel/eslint/comments/src' | 'isentinel/e18e/rules' | 'isentinel/eslint-plugin/setup' | 'isentinel/eslint-plugin/rules' | 'isentinel/flawless/setup' | 'isentinel/flawless/ts/rules-type-aware' | 'isentinel/flawless/tsx/rules-type-aware' | 'isentinel/gitignore' | 'isentinel/ignores' | 'isentinel/imports/rules' | 'isentinel/imports/game' | 'isentinel/javascript/setup' | 'isentinel/javascript/rules' | 'isentinel/jsdoc/setup' | 'isentinel/jsdoc' | 'isentinel/jsonc/setup' | 'isentinel/jsonc/rules' | 'isentinel/markdown/setup' | 'isentinel/markdown/processor' | 'isentinel/markdown/parser' | 'isentinel/markdown/disables' | 'isentinel/node/rules' | 'isentinel/oxfmt/setup' | 'isentinel/oxfmt/javascript' | 'isentinel/oxfmt/typescript' | 'isentinel/oxfmt/css' | 'isentinel/oxfmt/scss' | 'isentinel/oxfmt/less' | 'isentinel/oxfmt/html' | 'isentinel/oxfmt/markdown' | 'isentinel/oxfmt/graphql' | 'isentinel/oxfmt/json' | 'isentinel/oxfmt/yaml' | 'isentinel/package-json/setup' | 'isentinel/package-json' | 'isentinel/package-json/root' | 'isentinel/perfectionist/setup' | 'isentinel/perfectionist' | 'isentinel/perfectionist/jsx' | 'isentinel/pnpm/setup' | 'isentinel/pnpm/package-json' | 'isentinel/pnpm/pnpm-workspace-yaml' | 'isentinel/promise' | 'isentinel/react/setup' | 'isentinel/react/setup/naming' | 'isentinel/react/rules' | 'isentinel/react/type-aware-rules' | 'isentinel/roblox/setup' | 'isentinel/roblox/parser' | 'isentinel/roblox/type-aware-parser' | 'isentinel/roblox' | 'isentinel/roblox/rules-type-aware' | 'isentinel/roblox/format-lua/setup' | 'isentinel/roblox/format-lua' | 'isentinel/sonarjs' | 'isentinel/spelling/setup' | 'isentinel/spelling' | 'isentinel/stylistic/setup' | 'isentinel/stylistic' | 'isentinel/stylistic/ts' | 'isentinel/stylistic/js' | 'isentinel/stylistic/markdown-code' | 'isentinel/test/jest/setup' | 'isentinel/test/jest/rules' | 'isentinel/test/vitest/setup' | 'isentinel/test/vitest/rules' | 'isentinel/toml/setup' | 'isentinel/toml/rules' | 'isentinel/typescript/setup' | 'isentinel/typescript/parser' | 'isentinel/typescript/type-aware-parser' | 'isentinel/typescript/rules' | 'isentinel/typescript/rules-type-aware' | 'isentinel/typescript/erasable-syntax-only' | 'isentinel/unicorn/setup' | 'isentinel/unicorn/rules' | 'isentinel/unicorn/root' | 'isentinel/yaml/setup' | 'isentinel/yaml/rules';
|
|
19113
19226
|
//#endregion
|
|
19114
19227
|
//#region src/types.d.ts
|
|
19115
19228
|
type Awaitable<T> = Promise<T> | T;
|
|
@@ -19405,6 +19518,28 @@ type ReactConfig = ESLintReactSettings & OptionsOverridesTypeAware & {
|
|
|
19405
19518
|
} & {
|
|
19406
19519
|
filenameCase?: "kebabCase" | "pascalCase";
|
|
19407
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
|
+
}
|
|
19408
19543
|
interface SpellCheckConfig {
|
|
19409
19544
|
/**
|
|
19410
19545
|
* Whether or not to run the spell checker in the editor.
|
|
@@ -19639,6 +19774,8 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsProjectType {
|
|
|
19639
19774
|
* @default auto-detect based on the dependencies
|
|
19640
19775
|
*/
|
|
19641
19776
|
typescript?: OptionsTypescript;
|
|
19777
|
+
/** Supply custom options for eslint-plugin-unicorn. */
|
|
19778
|
+
unicorn?: OptionsUnicorn;
|
|
19642
19779
|
/**
|
|
19643
19780
|
* Enable YAML support.
|
|
19644
19781
|
*
|
|
@@ -19798,7 +19935,7 @@ declare function toml(options?: OptionsFiles & OptionsOverrides & OptionsStylist
|
|
|
19798
19935
|
declare function typescript(options?: OptionsComponentExtensions & OptionsFiles & OptionsOverridesTypeAware & OptionsStylistic & OptionsTypeScriptErasableOnly & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes): Promise<Array<TypedFlatConfigItem>>;
|
|
19799
19936
|
//#endregion
|
|
19800
19937
|
//#region src/configs/unicorn.d.ts
|
|
19801
|
-
declare function unicorn(options?: OptionsHasRoblox & OptionsStylistic & {
|
|
19938
|
+
declare function unicorn(options?: OptionsHasRoblox & OptionsStylistic & OptionsUnicorn & {
|
|
19802
19939
|
root?: Array<string>;
|
|
19803
19940
|
}): Promise<Array<TypedFlatConfigItem>>;
|
|
19804
19941
|
//#endregion
|
|
@@ -19870,4 +20007,4 @@ declare const GLOB_BUILD_TOOLS: Array<string>;
|
|
|
19870
20007
|
declare const GLOB_ALL_SRC: string[];
|
|
19871
20008
|
declare const GLOB_EXCLUDE: string[];
|
|
19872
20009
|
//#endregion
|
|
19873
|
-
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
|
@@ -574,6 +574,7 @@ async function disables(options) {
|
|
|
574
574
|
files: [...GLOB_TESTS],
|
|
575
575
|
rules: {
|
|
576
576
|
"antfu/no-top-level-await": "off",
|
|
577
|
+
"e18e/prefer-static-regex": "off",
|
|
577
578
|
"max-lines": "off",
|
|
578
579
|
"max-lines-per-function": "off",
|
|
579
580
|
"no-empty-function": "off",
|
|
@@ -1997,6 +1998,7 @@ async function isentinel(options, ...userConfigs) {
|
|
|
1997
1998
|
componentExts: componentExtensions,
|
|
1998
1999
|
stylistic: stylisticOptions
|
|
1999
2000
|
}), unicorn({
|
|
2001
|
+
...resolveSubOptions(options, "unicorn"),
|
|
2000
2002
|
root: rootGlobs,
|
|
2001
2003
|
stylistic: stylisticOptions
|
|
2002
2004
|
}));
|
|
@@ -4210,7 +4212,11 @@ const abbreviations = {
|
|
|
4210
4212
|
utils: false
|
|
4211
4213
|
};
|
|
4212
4214
|
async function unicorn(options = {}) {
|
|
4213
|
-
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
|
+
};
|
|
4214
4220
|
const pluginUnicorn = await interopDefault(import("eslint-plugin-unicorn"));
|
|
4215
4221
|
const rootGlobs = mergeGlobs(GLOB_ROOT.map(toSourceGlob), customRootGlobs?.map(toSourceGlob));
|
|
4216
4222
|
return [
|
|
@@ -4238,7 +4244,7 @@ async function unicorn(options = {}) {
|
|
|
4238
4244
|
"unicorn/isolated-functions": "error",
|
|
4239
4245
|
"unicorn/name-replacements": ["error", {
|
|
4240
4246
|
checkFilenames: true,
|
|
4241
|
-
replacements
|
|
4247
|
+
replacements
|
|
4242
4248
|
}],
|
|
4243
4249
|
"unicorn/no-array-sort-for-min-max": "error",
|
|
4244
4250
|
"unicorn/no-async-promise-finally": "error",
|
|
@@ -4354,7 +4360,7 @@ async function unicorn(options = {}) {
|
|
|
4354
4360
|
files: rootGlobs,
|
|
4355
4361
|
rules: { "unicorn/name-replacements": ["error", {
|
|
4356
4362
|
checkFilenames: false,
|
|
4357
|
-
replacements
|
|
4363
|
+
replacements
|
|
4358
4364
|
}] }
|
|
4359
4365
|
}
|
|
4360
4366
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isentinel/eslint-config",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
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.
|
|
121
|
+
"@isentinel/eslint-config": "6.0.0-beta.3"
|
|
122
122
|
},
|
|
123
123
|
"peerDependencies": {
|
|
124
124
|
"@vitest/eslint-plugin": "^1.6.4",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"eslint-plugin-eslint-plugin": "^7.0.0",
|
|
127
127
|
"eslint-plugin-jest": "^29.15.0",
|
|
128
128
|
"eslint-plugin-jest-extended": "^3.0.0",
|
|
129
|
-
"eslint-plugin-n": "^17.0.0",
|
|
129
|
+
"eslint-plugin-n": "^17.0.0 || ^18.0.0",
|
|
130
130
|
"eslint-plugin-react-jsx": "^5.10.0",
|
|
131
131
|
"eslint-plugin-react-naming-convention": "^5.10.0",
|
|
132
132
|
"eslint-plugin-react-x": "^5.10.0"
|