eslint-config-un 0.1.1 → 0.1.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.cjs CHANGED
@@ -15579,7 +15579,9 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
15579
15579
  ERROR,
15580
15580
  [
15581
15581
  {
15582
- allowConstantLoopConditions: true
15582
+ allowConstantLoopConditions: true,
15583
+ checkTypePredicates: true
15584
+ // >=8.8.0
15583
15585
  }
15584
15586
  ],
15585
15587
  { disableAutofix: true }
package/dist/index.d.cts CHANGED
@@ -30,6 +30,9 @@ type PickKeysNotStartingWith<O, T extends string> = {
30
30
  type ConstantKeys<T> = {
31
31
  [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K];
32
32
  };
33
+ type PrettifyShallow<T> = {
34
+ [K in keyof T]: T[K];
35
+ };
33
36
 
34
37
  type BuiltinEslintRulesFixed = Pick<AllEslintRules, keyof ConstantKeys<ESLintRules> & keyof AllEslintRules>;
35
38
  interface JsEslintConfigOptions extends ConfigSharedOptions<BuiltinEslintRulesFixed> {
@@ -13777,6 +13780,8 @@ type TypescriptEslintNoUnnecessaryCondition = []|[{
13777
13780
  allowConstantLoopConditions?: boolean
13778
13781
 
13779
13782
  allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean
13783
+
13784
+ checkTypePredicates?: boolean
13780
13785
  }]
13781
13786
  // ----- @typescript-eslint/no-unnecessary-type-assertion -----
13782
13787
  type TypescriptEslintNoUnnecessaryTypeAssertion = []|[{
@@ -15996,6 +16001,8 @@ type DisableAutofixTypescriptEslintNoUnnecessaryCondition = []|[{
15996
16001
  allowConstantLoopConditions?: boolean
15997
16002
 
15998
16003
  allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean
16004
+
16005
+ checkTypePredicates?: boolean
15999
16006
  }]
16000
16007
  // ----- disable-autofix/@typescript-eslint/no-unnecessary-type-assertion -----
16001
16008
  type DisableAutofixTypescriptEslintNoUnnecessaryTypeAssertion = []|[{
@@ -23048,9 +23055,9 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
23048
23055
 
23049
23056
  type EslintSeverity = Eslint.Linter.RuleSeverity;
23050
23057
  type RulesRecord = Eslint.Linter.RulesRecord & RuleOptions;
23051
- type FlatConfigEntry<T extends RulesRecord = RulesRecord> = Omit<Eslint.Linter.FlatConfig, 'files'> & Pick<Eslint.Linter.Config<T>, 'rules'> & {
23058
+ type FlatConfigEntry<T extends RulesRecord = RulesRecord> = PrettifyShallow<Omit<Eslint.Linter.FlatConfig, 'files'> & Pick<Eslint.Linter.Config<T>, 'rules'> & {
23052
23059
  files?: string[];
23053
- };
23060
+ }>;
23054
23061
  type AllEslintRules = PickKeysNotStartingWith<ConstantKeys<FlatConfigEntry['rules'] & {}>, 'disable-autofix/'>;
23055
23062
  type GetRuleOptions<RuleName extends keyof AllEslintRules> = AllEslintRules[RuleName] & {} extends Eslint.Linter.RuleEntry<infer Options> ? Options : never;
23056
23063
  type AllRulesWithPrefix<T extends string> = PickKeysStartingWith<AllEslintRules, T>;
package/dist/index.d.ts CHANGED
@@ -30,6 +30,9 @@ type PickKeysNotStartingWith<O, T extends string> = {
30
30
  type ConstantKeys<T> = {
31
31
  [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K];
32
32
  };
33
+ type PrettifyShallow<T> = {
34
+ [K in keyof T]: T[K];
35
+ };
33
36
 
34
37
  type BuiltinEslintRulesFixed = Pick<AllEslintRules, keyof ConstantKeys<ESLintRules> & keyof AllEslintRules>;
35
38
  interface JsEslintConfigOptions extends ConfigSharedOptions<BuiltinEslintRulesFixed> {
@@ -13777,6 +13780,8 @@ type TypescriptEslintNoUnnecessaryCondition = []|[{
13777
13780
  allowConstantLoopConditions?: boolean
13778
13781
 
13779
13782
  allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean
13783
+
13784
+ checkTypePredicates?: boolean
13780
13785
  }]
13781
13786
  // ----- @typescript-eslint/no-unnecessary-type-assertion -----
13782
13787
  type TypescriptEslintNoUnnecessaryTypeAssertion = []|[{
@@ -15996,6 +16001,8 @@ type DisableAutofixTypescriptEslintNoUnnecessaryCondition = []|[{
15996
16001
  allowConstantLoopConditions?: boolean
15997
16002
 
15998
16003
  allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean
16004
+
16005
+ checkTypePredicates?: boolean
15999
16006
  }]
16000
16007
  // ----- disable-autofix/@typescript-eslint/no-unnecessary-type-assertion -----
16001
16008
  type DisableAutofixTypescriptEslintNoUnnecessaryTypeAssertion = []|[{
@@ -23048,9 +23055,9 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
23048
23055
 
23049
23056
  type EslintSeverity = Eslint.Linter.RuleSeverity;
23050
23057
  type RulesRecord = Eslint.Linter.RulesRecord & RuleOptions;
23051
- type FlatConfigEntry<T extends RulesRecord = RulesRecord> = Omit<Eslint.Linter.FlatConfig, 'files'> & Pick<Eslint.Linter.Config<T>, 'rules'> & {
23058
+ type FlatConfigEntry<T extends RulesRecord = RulesRecord> = PrettifyShallow<Omit<Eslint.Linter.FlatConfig, 'files'> & Pick<Eslint.Linter.Config<T>, 'rules'> & {
23052
23059
  files?: string[];
23053
- };
23060
+ }>;
23054
23061
  type AllEslintRules = PickKeysNotStartingWith<ConstantKeys<FlatConfigEntry['rules'] & {}>, 'disable-autofix/'>;
23055
23062
  type GetRuleOptions<RuleName extends keyof AllEslintRules> = AllEslintRules[RuleName] & {} extends Eslint.Linter.RuleEntry<infer Options> ? Options : never;
23056
23063
  type AllRulesWithPrefix<T extends string> = PickKeysStartingWith<AllEslintRules, T>;
package/dist/index.js CHANGED
@@ -15568,7 +15568,9 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
15568
15568
  ERROR,
15569
15569
  [
15570
15570
  {
15571
- allowConstantLoopConditions: true
15571
+ allowConstantLoopConditions: true,
15572
+ checkTypePredicates: true
15573
+ // >=8.8.0
15572
15574
  }
15573
15575
  ],
15574
15576
  { disableAutofix: true }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.1",
2
+ "version": "0.1.2",
3
3
  "name": "eslint-config-un",
4
4
  "description": "A universal-ish ESLint config aiming to be reasonably strict and easily configurable.",
5
5
  "scripts": {
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@stylistic/eslint-plugin": "^2.8.0",
71
- "@typescript-eslint/parser": "^8.7.0",
71
+ "@typescript-eslint/parser": "^8.8.0",
72
72
  "eslint-config-flat-gitignore": "^0.3.0",
73
73
  "eslint-config-prettier": "^9.1.0",
74
74
  "eslint-import-resolver-typescript": "^3.6.3",
@@ -92,7 +92,7 @@
92
92
  "globals": "^15.9.0",
93
93
  "local-pkg": "^0.5.0",
94
94
  "type-fest": "4.26.1",
95
- "typescript-eslint": "^8.7.0",
95
+ "typescript-eslint": "^8.8.0",
96
96
  "vue-eslint-parser": "^9.4.3"
97
97
  },
98
98
  "pnpm": {