@isentinel/eslint-config 6.0.0-beta.1 → 6.0.0-beta.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.mts +114 -1
- package/dist/index.mjs +1 -0
- 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;
|
package/dist/index.mjs
CHANGED
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.2",
|
|
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.2"
|
|
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"
|