eslint-plugin-ts-type-forge 0.8.5 → 0.8.6

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.
Files changed (36) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.mts +1 -1
  3. package/dist/index.d.mts.map +1 -1
  4. package/dist/plugin.d.mts +1 -1
  5. package/dist/plugin.d.mts.map +1 -1
  6. package/dist/plugin.mjs +1 -0
  7. package/dist/plugin.mjs.map +1 -1
  8. package/dist/rule-types.d.mts +4 -4
  9. package/dist/rule-types.d.mts.map +1 -1
  10. package/dist/rules/import-style.d.mts +1 -1
  11. package/dist/rules/import-style.d.mts.map +1 -1
  12. package/dist/rules/no-side-effect-import.d.mts +1 -1
  13. package/dist/rules/no-side-effect-import.d.mts.map +1 -1
  14. package/dist/rules/prefer-canonical-length-constrained-tuple.d.mts +1 -1
  15. package/dist/rules/prefer-canonical-length-constrained-tuple.d.mts.map +1 -1
  16. package/dist/rules/prefer-readonly-or-mutable-record.d.mts +1 -1
  17. package/dist/rules/prefer-readonly-or-mutable-record.d.mts.map +1 -1
  18. package/dist/rules/prefer-strict-or-relaxed-utility-type.d.mts +1 -1
  19. package/dist/rules/prefer-strict-or-relaxed-utility-type.d.mts.map +1 -1
  20. package/dist/rules/rewrite-rule-utils.d.mts +1 -1
  21. package/dist/rules/rewrite-rule-utils.d.mts.map +1 -1
  22. package/dist/types.d.mts +2 -2
  23. package/dist/types.d.mts.map +1 -1
  24. package/package.json +7 -7
  25. package/src/index.mts +1 -1
  26. package/src/plugin.mts +4 -3
  27. package/src/plugin.test.mts +0 -13
  28. package/src/rule-types.mts +4 -4
  29. package/src/rules/import-style.mts +1 -1
  30. package/src/rules/no-side-effect-import.mts +1 -1
  31. package/src/rules/prefer-canonical-length-constrained-tuple.mts +1 -1
  32. package/src/rules/prefer-readonly-or-mutable-record.mts +1 -1
  33. package/src/rules/prefer-strict-or-relaxed-utility-type.mts +1 -1
  34. package/src/rules/rewrite-rule-utils.mts +1 -1
  35. package/src/rules/rules.mts +1 -1
  36. package/src/types.mts +2 -2
package/README.md CHANGED
@@ -227,7 +227,7 @@ sitting in a file that type-checks.
227
227
  import 'ts-type-forge';
228
228
 
229
229
  // ✅ types are reached by name
230
- import { type NonEmptyArray } from 'ts-type-forge';
230
+ import type { NonEmptyArray } from 'ts-type-forge';
231
231
  ```
232
232
 
233
233
  The fix deletes the import along with its line. Only the bare specifier matches:
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { eslintPluginTsTypeForge } from './plugin.mjs';
2
2
  export type { EslintTsTypeForgeRules, EslintTsTypeForgeRulesOption, } from './rule-types.mjs';
3
3
  export { tsTypeForgeRules } from './rules/index.mjs';
4
- export { type ESLintFlatConfig, type ESLintPlugin } from './types.mjs';
4
+ export type { ESLintFlatConfig, ESLintPlugin } from './types.mjs';
5
5
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,YAAY,EACV,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,YAAY,EACV,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
package/dist/plugin.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { type ESLintPlugin } from './types.mjs';
1
+ import type { ESLintPlugin } from './types.mjs';
2
2
  export declare const eslintPluginTsTypeForge: {
3
3
  readonly meta: {
4
4
  readonly name: 'eslint-plugin-ts-type-forge';
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","sourceRoot":"","sources":["../src/plugin.mts"],"names":[],"mappings":"AACA,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAkCvE,eAAO,MAAM,uBAAuB;;iBAEhC,IAAI,EAAE,6BAA6B;;;;;;;;;;;;;;;;;;;QAInC,oDAAoD;iBACpD,WAAW;2BAtBP,2BAA2B;;yBAQ3B,eAAe,EAAI,YAAY;;;gEAlBE,OAAO;oFACa,OAAO;0EACjB,OAAO;4EACL,OAAO;gFACH,OAAO;;;;CA8B/B,CAAC"}
1
+ {"version":3,"file":"plugin.d.mts","sourceRoot":"","sources":["../src/plugin.mts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,aAAa,CAAC;AAmClE,eAAO,MAAM,uBAAuB;;iBAEhC,IAAI,EAAE,6BAA6B;;;;;;;;;;;;;;;;;;;QAInC,oDAAoD;iBACpD,WAAW;2BAtBP,2BAA2B;;yBAQ3B,eAAe,EAAI,YAAY;;;gEAlBE,OAAO;oFACa,OAAO;0EACjB,OAAO;4EACL,OAAO;gFACH,OAAO;;;;CA8B/B,CAAC"}
package/dist/plugin.mjs CHANGED
@@ -5,6 +5,7 @@ import { tsTypeForgeRules } from './rules/index.mjs';
5
5
 
6
6
 
7
7
 
8
+
8
9
  const recommendedRules = {
9
10
  'ts-type-forge/no-side-effect-import': 'error',
10
11
  'ts-type-forge/prefer-canonical-length-constrained-tuple': 'error',
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.mjs","sourceRoot":"","sources":["../src/plugin.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;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uB,GAAG;IACrC,IAAI,EAAE;QACJ,IAAI,EAAE,6BAA6B;KACpC;IACD,KAAK,EAAE,gBAAgB;IACvB,OAAO,EAAE;QACP,oDAAoD;QACpD,WAAW,EAAE,iBAAiB;KAC/B;CAC8B,CAAC"}
@@ -1,7 +1,7 @@
1
- import { type TSESLint } from '@typescript-eslint/utils';
2
- import { type Linter } from 'eslint';
3
- import { type TypeEq } from 'ts-type-forge';
4
- import { type tsTypeForgeRules } from './rules/index.mjs';
1
+ import type { TSESLint } from '@typescript-eslint/utils';
2
+ import type { Linter } from 'eslint';
3
+ import type { TypeEq } from 'ts-type-forge';
4
+ import type { tsTypeForgeRules } from './rules/index.mjs';
5
5
  type SpreadOptionsIfIsArray<T extends readonly [Linter.StringSeverity, unknown]> = T[1] extends readonly unknown[] ? readonly [Linter.StringSeverity, ...T[1]] : T;
6
6
  /**
7
7
  * Extracts the options tuple type of a rule from its TypeScript
@@ -1 +1 @@
1
- {"version":3,"file":"rule-types.d.mts","sourceRoot":"","sources":["../src/rule-types.mts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,KAAK,sBAAsB,CACzB,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,IACjD,CAAC,CAAC,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,GAC/B,SAAS,CAAC,MAAM,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GACzC,CAAC,CAAC;AAEN;;;;GAIG;AACH,KAAK,aAAa,CAAC,IAAI,SAAS,MAAM,OAAO,gBAAgB,IAC3D,CAAC,OAAO,gBAAgB,CAAC,C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B,CAAC,OAAO,CAAC;IACzF,qDAAqD,EAAE,gCAAgC,CAAC,OAAO,CAAC;CACjG,CAAC,CAAC;AAIH,KAAK,UAAU,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC;AAEpC,MAAM,MAAM,kBAAkB,GAAG,UAAU,CACzC,MAAM,CACJ,MAAM,sBAAsB,EAC5B,iBAAiB,MAAM,OAAO,gBAAgB,EAAE,CACjD,CACF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type TSESLint, type TSESTree } from '@typescript-eslint/utils';
1
+ import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
2
2
  /** `JSONSchema4`, reached through the public rule-module types. */
3
3
  type JsonSchema = Exclude<TSESLint.RuleModule<string, readonly unknown[]>['meta']['schema'], readonly unknown[]>;
4
4
  export type ImportStyle = 'global' | 'named';
@@ -1 +1 @@
1
- {"version":3,"file":"import-style.d.mts","sourceRoot":"","sources":["../../src/rules/import-style.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAUxE,mEAAmE;AACnE,KAAK,UAAU,GAAG,OAAO,CACvB,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EACjE,SAAS,OAAO,EAAE,CACnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7C,eAAO,MAAM,oBAAoB,EAAE,WAAqB,CAAC;AAEzD,eAAO,MAAM,4BAA4B,EAAE,UAW1C,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,YACjB,QAAQ,CAAC,OAAO,iBACV,MAAM,eACR,WAAW,KACvB,QAAQ,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,SAW1D,CAAC"}
1
+ {"version":3,"file":"import-style.d.mts","sourceRoot":"","sources":["../../src/rules/import-style.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAUnE,mEAAmE;AACnE,KAAK,UAAU,GAAG,OAAO,CACvB,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EACjE,SAAS,OAAO,EAAE,CACnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7C,eAAO,MAAM,oBAAoB,EAAE,WAAqB,CAAC;AAEzD,eAAO,MAAM,4BAA4B,EAAE,UAW1C,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,YACjB,QAAQ,CAAC,OAAO,iBACV,MAAM,eACR,WAAW,KACvB,QAAQ,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,SAW1D,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type TSESLint } from '@typescript-eslint/utils';
1
+ import type { TSESLint } from '@typescript-eslint/utils';
2
2
  type Options = readonly [];
3
3
  type MessageIds = 'removeSideEffectImport';
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"no-side-effect-import.d.mts","sourceRoot":"","sources":["../../src/rules/no-side-effect-import.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,0BAA0B,CAAC;AAIxE,KAAK,OAAO,GAAG,SAAS,EAAE,CAAC;AAE3B,KAAK,UAAU,GAAG,wBAAwB,CAAC;AAE3C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,OAAO,CA8B9D,CAAC"}
1
+ {"version":3,"file":"no-side-effect-import.d.mts","sourceRoot":"","sources":["../../src/rules/no-side-effect-import.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAInE,KAAK,OAAO,GAAG,SAAS,EAAE,CAAC;AAE3B,KAAK,UAAU,GAAG,wBAAwB,CAAC;AAE3C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,OAAO,CA8B9D,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type TSESLint } from '@typescript-eslint/utils';
1
+ import type { TSESLint } from '@typescript-eslint/utils';
2
2
  type Options = readonly [
3
3
  Readonly<{
4
4
  importStyle?: 'global' | 'named';
@@ -1 +1 @@
1
- {"version":3,"file":"prefer-canonical-length-constrained-tuple.d.mts","sourceRoot":"","sources":["../../src/rules/prefer-canonical-length-constrained-tuple.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAiBzD,KAAK,OAAO,GAAG,SAAS;IACtB,QAAQ,CAAC;QACP,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;QACjC,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;CACJ,CAAC;AAEF,KAAK,UAAU,GAAG,mBAAmB,CAAC;AAQtC,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,UAAU,CACrE,UAAU,EACV,OAAO,CAiFC,CAAC"}
1
+ {"version":3,"file":"prefer-canonical-length-constrained-tuple.d.mts","sourceRoot":"","sources":["../../src/rules/prefer-canonical-length-constrained-tuple.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAiBzD,KAAK,OAAO,GAAG,SAAS;IACtB,QAAQ,CAAC;QACP,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;QACjC,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;CACJ,CAAC;AAEF,KAAK,UAAU,GAAG,mBAAmB,CAAC;AAQtC,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,UAAU,CACrE,UAAU,EACV,OAAO,CAiFC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type TSESLint } from '@typescript-eslint/utils';
1
+ import type { TSESLint } from '@typescript-eslint/utils';
2
2
  type Options = readonly [
3
3
  Readonly<{
4
4
  importStyle?: 'global' | 'named';
@@ -1 +1 @@
1
- {"version":3,"file":"prefer-readonly-or-mutable-record.d.mts","sourceRoot":"","sources":["../../src/rules/prefer-readonly-or-mutable-record.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAUzD,KAAK,OAAO,GAAG,SAAS;IACtB,QAAQ,CAAC;QACP,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;KAClC,CAAC,CAAC;CACJ,CAAC;AAEF,KAAK,UAAU,GAAG,4BAA4B,GAAG,aAAa,CAAC;AAW/D,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,UAAU,CAC7D,UAAU,EACV,OAAO,CA4CC,CAAC"}
1
+ {"version":3,"file":"prefer-readonly-or-mutable-record.d.mts","sourceRoot":"","sources":["../../src/rules/prefer-readonly-or-mutable-record.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAUzD,KAAK,OAAO,GAAG,SAAS;IACtB,QAAQ,CAAC;QACP,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;KAClC,CAAC,CAAC;CACJ,CAAC;AAEF,KAAK,UAAU,GAAG,4BAA4B,GAAG,aAAa,CAAC;AAW/D,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,UAAU,CAC7D,UAAU,EACV,OAAO,CA4CC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type TSESLint } from '@typescript-eslint/utils';
1
+ import type { TSESLint } from '@typescript-eslint/utils';
2
2
  type Options = readonly [
3
3
  Readonly<{
4
4
  importStyle?: 'global' | 'named';
@@ -1 +1 @@
1
- {"version":3,"file":"prefer-strict-or-relaxed-utility-type.d.mts","sourceRoot":"","sources":["../../src/rules/prefer-strict-or-relaxed-utility-type.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAUzD,KAAK,OAAO,GAAG,SAAS;IACtB,QAAQ,CAAC;QACP,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;KAClC,CAAC,CAAC;CACJ,CAAC;AAEF,KAAK,UAAU,GAAG,oBAAoB,GAAG,aAAa,CAAC;AAoBvD,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,UAAU,CAChE,UAAU,EACV,OAAO,CAyCC,CAAC"}
1
+ {"version":3,"file":"prefer-strict-or-relaxed-utility-type.d.mts","sourceRoot":"","sources":["../../src/rules/prefer-strict-or-relaxed-utility-type.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAUzD,KAAK,OAAO,GAAG,SAAS;IACtB,QAAQ,CAAC;QACP,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;KAClC,CAAC,CAAC;CACJ,CAAC;AAEF,KAAK,UAAU,GAAG,oBAAoB,GAAG,aAAa,CAAC;AAoBvD,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,UAAU,CAChE,UAAU,EACV,OAAO,CAyCC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type TSESLint, type TSESTree } from '@typescript-eslint/utils';
1
+ import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
2
2
  import { type ImportStyle } from './import-style.mjs';
3
3
  /** One deterministic replacement of a type node by a named ts-type-forge type. */
4
4
  export type TypeRewrite = Readonly<{
@@ -1 +1 @@
1
- {"version":3,"file":"rewrite-rule-utils.d.mts","sourceRoot":"","sources":["../../src/rules/rewrite-rule-utils.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAExE,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKvE,kFAAkF;AAClF,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,SAAS,MAAM,WACjD,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,SAAS,OAAO,EAAE,CAAC,YACnD,SAAS,WAAW,EAAE,aACrB,UAAU,eACR,WAAW,KACvB,IAqCF,CAAC"}
1
+ {"version":3,"file":"rewrite-rule-utils.d.mts","sourceRoot":"","sources":["../../src/rules/rewrite-rule-utils.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKvE,kFAAkF;AAClF,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,SAAS,MAAM,WACjD,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,SAAS,OAAO,EAAE,CAAC,YACnD,SAAS,WAAW,EAAE,aACrB,UAAU,eACR,WAAW,KACvB,IAqCF,CAAC"}
package/dist/types.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { type TSESLint } from '@typescript-eslint/utils';
2
- import { type DeepReadonly } from 'ts-type-forge';
1
+ import type { TSESLint } from '@typescript-eslint/utils';
2
+ import type { DeepReadonly } from 'ts-type-forge';
3
3
  export type ESLintPlugin = DeepReadonly<TSESLint.FlatConfig.Plugin>;
4
4
  export type ESLintFlatConfig = DeepReadonly<TSESLint.FlatConfig.Config>;
5
5
  //# sourceMappingURL=types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-ts-type-forge",
3
- "version": "0.8.5",
3
+ "version": "0.8.6",
4
4
  "private": false,
5
5
  "description": "ESLint rules that steer type declarations toward ts-type-forge idioms.",
6
6
  "keywords": [
@@ -35,17 +35,17 @@
35
35
  "LICENSE"
36
36
  ],
37
37
  "dependencies": {
38
- "@typescript-eslint/utils": "~8.70.1",
38
+ "@typescript-eslint/utils": "~8.71.0",
39
39
  "ts-data-forge": "~14.7.1",
40
40
  "ts-type-forge": "9.2.2"
41
41
  },
42
42
  "devDependencies": {
43
- "@typescript-eslint/parser": "8.70.1",
44
- "@typescript-eslint/rule-tester": "8.70.1",
43
+ "@typescript-eslint/parser": "8.71.0",
44
+ "@typescript-eslint/rule-tester": "8.71.0",
45
45
  "dedent": "1.7.2",
46
- "eslint-config-typed": "5.16.0",
47
- "eslint-plugin-ts-data-forge": "0.8.2",
48
- "eslint-plugin-ts-fortress": "1.2.4",
46
+ "eslint-config-typed": "5.17.1",
47
+ "eslint-plugin-ts-data-forge": "0.8.4",
48
+ "eslint-plugin-ts-fortress": "1.3.1",
49
49
  "prettier": "3.9.9",
50
50
  "prettier-plugin-organize-imports": "4.3.0",
51
51
  "prettier-plugin-packagejson": "3.0.2",
package/src/index.mts CHANGED
@@ -4,4 +4,4 @@ export type {
4
4
  EslintTsTypeForgeRulesOption,
5
5
  } from './rule-types.mjs';
6
6
  export { tsTypeForgeRules } from './rules/index.mjs';
7
- export { type ESLintFlatConfig, type ESLintPlugin } from './types.mjs';
7
+ export type { ESLintFlatConfig, ESLintPlugin } from './types.mjs';
package/src/plugin.mts CHANGED
@@ -1,11 +1,12 @@
1
1
  import { tsTypeForgeRules } from './rules/index.mjs';
2
- import { type ESLintFlatConfig, type ESLintPlugin } from './types.mjs';
2
+ import type { ESLintFlatConfig, ESLintPlugin } from './types.mjs';
3
3
 
4
4
  /**
5
5
  * Every rule this plugin ships, at `error`.
6
6
  *
7
- * The `satisfies` clause below is keyed off {@link tsTypeForgeRules}, so adding
8
- * a rule without listing it here fails to type-check.
7
+ * The `satisfies` clause below is keyed off {@link tsTypeForgeRules}, so leaving a
8
+ * rule out, naming one that does not exist, or setting one to anything
9
+ * but `error` fails to type-check. That is the whole check; no test repeats it.
9
10
  */
10
11
  const recommendedRules = {
11
12
  'ts-type-forge/no-side-effect-import': 'error',
@@ -1,21 +1,8 @@
1
1
  import { eslintPluginTsTypeForge } from './plugin.mjs';
2
- import { tsTypeForgeRules } from './rules/index.mjs';
3
2
 
4
3
  describe('eslintPluginTsTypeForge.configs.recommended', () => {
5
4
  const recommended = eslintPluginTsTypeForge.configs.recommended;
6
5
 
7
- test('enables every rule of the plugin, and nothing else, at "error"', () => {
8
- assert.deepStrictEqual(
9
- recommended.rules,
10
- Object.fromEntries(
11
- Object.keys(tsTypeForgeRules).map((name) => [
12
- `ts-type-forge/${name}`,
13
- 'error',
14
- ]),
15
- ),
16
- );
17
- });
18
-
19
6
  test('registers the exported plugin object itself', () => {
20
7
  // Registering a *copy* would make `Cannot redefine plugin` errors possible
21
8
  // for users who also list the plugin in their own `plugins` record.
@@ -3,10 +3,10 @@
3
3
  // This file is auto-generated by `pnpm run gen:rule-types`
4
4
  // (`scripts/cmd/gen-rule-types.mts`). Do not edit it manually.
5
5
 
6
- import { type TSESLint } from '@typescript-eslint/utils';
7
- import { type Linter } from 'eslint';
8
- import { type TypeEq } from 'ts-type-forge';
9
- import { type tsTypeForgeRules } from './rules/index.mjs';
6
+ import type { TSESLint } from '@typescript-eslint/utils';
7
+ import type { Linter } from 'eslint';
8
+ import type { TypeEq } from 'ts-type-forge';
9
+ import type { tsTypeForgeRules } from './rules/index.mjs';
10
10
 
11
11
  type SpreadOptionsIfIsArray<
12
12
  T extends readonly [Linter.StringSeverity, unknown],
@@ -1,4 +1,4 @@
1
- import { type TSESLint, type TSESTree } from '@typescript-eslint/utils';
1
+ import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
2
2
  import { TS_TYPE_FORGE_MODULE } from './constants.mjs';
3
3
  import {
4
4
  getImportedLocalName,
@@ -1,4 +1,4 @@
1
- import { type TSESLint, type TSESTree } from '@typescript-eslint/utils';
1
+ import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
2
2
  import { Arr } from 'ts-data-forge';
3
3
  import { TS_TYPE_FORGE_MODULE } from './constants.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { type TSESLint } from '@typescript-eslint/utils';
1
+ import type { TSESLint } from '@typescript-eslint/utils';
2
2
  import { analyzeUniformTuple, type UniformTupleShape } from './ast-utils.mjs';
3
3
  import {
4
4
  DEFAULT_MAX_TUPLE_LENGTH,
@@ -1,4 +1,4 @@
1
- import { type TSESLint } from '@typescript-eslint/utils';
1
+ import type { TSESLint } from '@typescript-eslint/utils';
2
2
  import {
3
3
  DEFAULT_IMPORT_STYLE,
4
4
  IMPORT_STYLE_SCHEMA_PROPERTY,
@@ -1,4 +1,4 @@
1
- import { type TSESLint } from '@typescript-eslint/utils';
1
+ import type { TSESLint } from '@typescript-eslint/utils';
2
2
  import {
3
3
  DEFAULT_IMPORT_STYLE,
4
4
  IMPORT_STYLE_SCHEMA_PROPERTY,
@@ -1,4 +1,4 @@
1
- import { type TSESLint, type TSESTree } from '@typescript-eslint/utils';
1
+ import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
2
2
  import { Arr } from 'ts-data-forge';
3
3
  import { resolveTypeName, type ImportStyle } from './import-style.mjs';
4
4
  import { buildTypeImportFix } from './import-utils.mjs';
@@ -1,4 +1,4 @@
1
- import { type ESLintPlugin } from '../types.mjs';
1
+ import type { ESLintPlugin } from '../types.mjs';
2
2
  import { noSideEffectImport } from './no-side-effect-import.mjs';
3
3
  import { preferCanonicalLengthConstrainedTuple } from './prefer-canonical-length-constrained-tuple.mjs';
4
4
  import { preferCanonicalMutableRecord } from './prefer-canonical-mutable-record.mjs';
package/src/types.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { type TSESLint } from '@typescript-eslint/utils';
2
- import { type DeepReadonly } from 'ts-type-forge';
1
+ import type { TSESLint } from '@typescript-eslint/utils';
2
+ import type { DeepReadonly } from 'ts-type-forge';
3
3
 
4
4
  export type ESLintPlugin = DeepReadonly<TSESLint.FlatConfig.Plugin>;
5
5