Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: eslint-functional/eslint-plugin-functional
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b27c8e8ae327a027e902b4caad2af00a2188de65
Choose a base ref
..
head repository: eslint-functional/eslint-plugin-functional
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dfb21a47652bfb34faab1d7450bfe5761c9e1327
Choose a head ref
Showing with 373 additions and 443 deletions.
  1. +1 −1 cz-adapter/engine.ts
  2. +1 −1 rollup.config.ts
  3. +47 −0 src/classic.ts
  4. +2 −2 src/configs/all.ts
  5. +2 −2 src/configs/currying.ts
  6. +2 −2 src/configs/disable-type-checked.ts
  7. +1 −1 src/configs/external-typescript-recommended.ts
  8. +5 −5 src/configs/lite.ts
  9. +2 −2 src/configs/no-exceptions.ts
  10. +2 −2 src/configs/no-mutations.ts
  11. +2 −2 src/configs/no-other-paradigms.ts
  12. +2 −2 src/configs/no-statements.ts
  13. +2 −2 src/configs/off.ts
  14. +11 −11 src/configs/recommended.ts
  15. +2 −2 src/configs/strict.ts
  16. +2 −2 src/configs/stylistic.ts
  17. +16 −16 src/index.ts
  18. +4 −10 src/options/ignore.ts
  19. +6 −6 src/rules/functional-parameters.ts
  20. +5 −5 src/rules/immutable-data.ts
  21. +3 −3 src/rules/no-classes.ts
  22. +4 −4 src/rules/no-conditional-statements.ts
  23. +6 −6 src/rules/no-expression-statements.ts
  24. +4 −4 src/rules/no-let.ts
  25. +3 −3 src/rules/no-loop-statements.ts
  26. +3 −3 src/rules/no-mixed-types.ts
  27. +3 −3 src/rules/no-promise-reject.ts
  28. +5 −5 src/rules/no-return-void.ts
  29. +2 −2 src/rules/no-this-expressions.ts
  30. +3 −3 src/rules/no-throw-statements.ts
  31. +2 −2 src/rules/no-try-statements.ts
  32. +5 −5 src/rules/prefer-immutable-types.ts
  33. +3 −3 src/rules/prefer-property-signatures.ts
  34. +6 −6 src/rules/prefer-readonly-type.ts
  35. +5 −5 src/rules/prefer-tacit.ts
  36. +4 −4 src/rules/readonly-type.ts
  37. +5 −5 src/rules/type-declaration-immutability.ts
  38. +1 −1 src/utils/conditional-imports/cjs/ts-api-utils.ts
  39. +1 −1 src/utils/conditional-imports/esm/ts-api-utils.ts
  40. +3 −3 src/utils/misc.ts
  41. +4 −4 src/utils/rule.ts
  42. +1 −1 src/utils/tree.ts
  43. +1 −1 src/utils/type-guards.ts
  44. +4 −4 tests/common/ignore-options.test.ts
  45. +12 −12 tests/configs.test.ts
  46. +1 −1 tests/helpers/testers.ts
  47. +1 −1 tests/helpers/util.ts
  48. +1 −1 tests/index.test.ts
  49. +2 −5 tests/rules/functional-parameters/es2015/index.test.ts
  50. +2 −2 tests/rules/functional-parameters/es2015/invalid.ts
  51. +2 −2 tests/rules/functional-parameters/es2015/valid.ts
  52. +2 −5 tests/rules/functional-parameters/es3/index.test.ts
  53. +2 −2 tests/rules/functional-parameters/es3/invalid.ts
  54. +2 −5 tests/rules/functional-parameters/es3/valid.ts
  55. +2 −2 tests/rules/immutable-data/ts/array/index.test.ts
  56. +2 −2 tests/rules/immutable-data/ts/array/invalid.ts
  57. +2 −5 tests/rules/immutable-data/ts/array/valid.ts
  58. +2 −2 tests/rules/immutable-data/ts/object/index.test.ts
  59. +2 −2 tests/rules/immutable-data/ts/object/invalid.ts
  60. +2 −5 tests/rules/immutable-data/ts/object/valid.ts
  61. +1 −1 tests/rules/index.test.ts
  62. +2 −2 tests/rules/no-class/es2015/index.test.ts
  63. +2 −2 tests/rules/no-class/es2015/invalid.ts
  64. +2 −5 tests/rules/no-class/es2015/valid.ts
  65. +2 −5 tests/rules/no-conditional-statement/ts/index.test.ts
  66. +2 −2 tests/rules/no-conditional-statement/ts/invalid.ts
  67. +2 −5 tests/rules/no-conditional-statement/ts/valid.ts
  68. +2 −5 tests/rules/no-expression-statement/ts/index.test.ts
  69. +2 −2 tests/rules/no-expression-statement/ts/invalid.ts
  70. +2 −5 tests/rules/no-expression-statement/ts/valid.ts
  71. +2 −2 tests/rules/no-let/es2015/index.test.ts
  72. +2 −2 tests/rules/no-let/es2015/invalid.ts
  73. +2 −5 tests/rules/no-let/es2015/valid.ts
  74. +2 −2 tests/rules/no-loop-statement/es2015/index.test.ts
  75. +2 −2 tests/rules/no-loop-statement/es2015/invalid.ts
  76. +2 −5 tests/rules/no-loop-statement/es2015/valid.ts
  77. +2 −2 tests/rules/no-loop-statement/es3/index.test.ts
  78. +2 −2 tests/rules/no-loop-statement/es3/invalid.ts
  79. +2 −5 tests/rules/no-loop-statement/es3/valid.ts
  80. +2 −2 tests/rules/no-mixed-type/ts/index.test.ts
  81. +2 −2 tests/rules/no-mixed-type/ts/invalid.ts
  82. +2 −5 tests/rules/no-mixed-type/ts/valid.ts
  83. +2 −2 tests/rules/no-promise-reject/es2015/index.test.ts
  84. +2 −2 tests/rules/no-promise-reject/es2015/invalid.ts
  85. +2 −5 tests/rules/no-promise-reject/es2015/valid.ts
  86. +2 −2 tests/rules/no-return-void/ts/index.test.ts
  87. +2 −2 tests/rules/no-return-void/ts/invalid.ts
  88. +2 −5 tests/rules/no-return-void/ts/valid.ts
  89. +2 −5 tests/rules/no-this-expression/es3/index.test.ts
  90. +2 −2 tests/rules/no-this-expression/es3/invalid.ts
  91. +2 −5 tests/rules/no-this-expression/es3/valid.ts
  92. +2 −5 tests/rules/no-throw-statement/es2016/index.test.ts
  93. +2 −2 tests/rules/no-throw-statement/es2016/invalid.ts
  94. +2 −5 tests/rules/no-throw-statement/es2016/valid.ts
  95. +2 −5 tests/rules/no-throw-statement/es3/index.test.ts
  96. +2 −2 tests/rules/no-throw-statement/es3/invalid.ts
  97. +2 −5 tests/rules/no-throw-statement/es3/valid.ts
  98. +2 −2 tests/rules/no-try-statement/es3/index.test.ts
  99. +2 −2 tests/rules/no-try-statement/es3/invalid.ts
  100. +2 −5 tests/rules/no-try-statement/es3/valid.ts
  101. +2 −5 tests/rules/prefer-immutable-types/ts/parameters/index.test.ts
  102. +2 −2 tests/rules/prefer-immutable-types/ts/parameters/invalid.ts
  103. +2 −5 tests/rules/prefer-immutable-types/ts/parameters/valid.ts
  104. +2 −5 tests/rules/prefer-immutable-types/ts/return-types/index.test.ts
  105. +2 −2 tests/rules/prefer-immutable-types/ts/return-types/invalid.ts
  106. +2 −5 tests/rules/prefer-immutable-types/ts/return-types/valid.ts
  107. +2 −5 tests/rules/prefer-immutable-types/ts/variables/index.test.ts
  108. +2 −2 tests/rules/prefer-immutable-types/ts/variables/invalid.ts
  109. +2 −5 tests/rules/prefer-immutable-types/ts/variables/valid.ts
  110. +2 −5 tests/rules/prefer-property-signatures/ts/index.test.ts
  111. +2 −2 tests/rules/prefer-property-signatures/ts/invalid.ts
  112. +2 −5 tests/rules/prefer-property-signatures/ts/valid.ts
  113. +2 −5 tests/rules/prefer-readonly-type/ts/index.test.ts
  114. +2 −2 tests/rules/prefer-readonly-type/ts/invalid.ts
  115. +2 −5 tests/rules/prefer-readonly-type/ts/valid.ts
  116. +2 −2 tests/rules/prefer-tacit/ts/index.test.ts
  117. +2 −2 tests/rules/prefer-tacit/ts/invalid.ts
  118. +2 −5 tests/rules/prefer-tacit/ts/valid.ts
  119. +2 −2 tests/rules/readonly-type/ts/index.test.ts
  120. +2 −2 tests/rules/readonly-type/ts/invalid.ts
  121. +2 −5 tests/rules/readonly-type/ts/valid.ts
  122. +2 −5 tests/rules/type-declaration-immutability/ts/index.test.ts
  123. +2 −2 tests/rules/type-declaration-immutability/ts/invalid.ts
  124. +2 −5 tests/rules/type-declaration-immutability/ts/valid.ts
  125. +9 −9 tsconfig.base.json
2 changes: 1 addition & 1 deletion cz-adapter/engine.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chalk from "chalk";
import wrap from "word-wrap";

import { rules } from "#eslint-plugin-functional/rules";
import { rules } from "#/rules";

import { type Options } from "./options";

2 changes: 1 addition & 1 deletion rollup.config.ts
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ function getPlugins(format: "esm" | "cjs"): RollupOptions["plugins"] {
...resolvedConfig,
paths: {
...resolvedConfig.paths,
"#eslint-plugin-functional/conditional-imports/*": [
"#/conditional-imports/*": [
`src/utils/conditional-imports/${format}/*`,
],
},
47 changes: 47 additions & 0 deletions src/classic.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { type Linter } from "@typescript-eslint/utils/ts-eslint";

import all from "#/configs/all";
import currying from "#/configs/currying";
import disableTypeChecked from "#/configs/disable-type-checked";
import externalTypeScriptRecommended from "#/configs/external-typescript-recommended";
import externalVanillaRecommended from "#/configs/external-vanilla-recommended";
import lite from "#/configs/lite";
import noExceptions from "#/configs/no-exceptions";
import noMutations from "#/configs/no-mutations";
import noOtherParadigms from "#/configs/no-other-paradigms";
import noStatements from "#/configs/no-statements";
import off from "#/configs/off";
import recommended from "#/configs/recommended";
import strict from "#/configs/strict";
import stylistic from "#/configs/stylistic";
import { rules } from "#/rules";
import { ruleNameScope } from "#/utils/misc";

export default {
rules,
configs: {
all: { plugins: [ruleNameScope], rules: all },
lite: { plugins: [ruleNameScope], rules: lite },
recommended: { plugins: [ruleNameScope], rules: recommended },
strict: { plugins: [ruleNameScope], rules: strict },
off: { plugins: [ruleNameScope], rules: off },
"disable-type-checked": {
plugins: [ruleNameScope],
rules: disableTypeChecked,
},
"external-vanilla-recommended": {
plugins: [ruleNameScope],
rules: externalVanillaRecommended,
},
"external-typescript-recommended": {
plugins: [ruleNameScope],
rules: externalTypeScriptRecommended,
},
currying: { plugins: [ruleNameScope], rules: currying },
"no-exceptions": { plugins: [ruleNameScope], rules: noExceptions },
"no-mutations": { plugins: [ruleNameScope], rules: noMutations },
"no-other-paradigms": { plugins: [ruleNameScope], rules: noOtherParadigms },
"no-statements": { plugins: [ruleNameScope], rules: noStatements },
stylistic: { plugins: [ruleNameScope], rules: stylistic },
},
} as Linter.Plugin;
4 changes: 2 additions & 2 deletions src/configs/all.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";

import { rules } from "#eslint-plugin-functional/rules";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { rules } from "#/rules";
import { ruleNameScope } from "#/utils/misc";

export default {
...Object.fromEntries(
4 changes: 2 additions & 2 deletions src/configs/currying.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";

import { rules } from "#eslint-plugin-functional/rules";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { rules } from "#/rules";
import { ruleNameScope } from "#/utils/misc";

export default Object.fromEntries(
Object.entries(rules)
4 changes: 2 additions & 2 deletions src/configs/disable-type-checked.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";

import { rules } from "#eslint-plugin-functional/rules";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { rules } from "#/rules";
import { ruleNameScope } from "#/utils/misc";

export default Object.fromEntries(
Object.entries(rules)
2 changes: 1 addition & 1 deletion src/configs/external-typescript-recommended.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";

import externalVanillaRecommended from "#eslint-plugin-functional/configs/external-vanilla-recommended";
import externalVanillaRecommended from "#/configs/external-vanilla-recommended";

const tsConfig = {
"@typescript-eslint/prefer-readonly": "error",
10 changes: 5 additions & 5 deletions src/configs/lite.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";

import * as functionalParameters from "#eslint-plugin-functional/rules/functional-parameters";
import * as immutableData from "#eslint-plugin-functional/rules/immutable-data";
import * as noConditionalStatements from "#eslint-plugin-functional/rules/no-conditional-statements";
import * as noExpressionStatements from "#eslint-plugin-functional/rules/no-expression-statements";
import * as preferImmutableTypes from "#eslint-plugin-functional/rules/prefer-immutable-types";
import * as functionalParameters from "#/rules/functional-parameters";
import * as immutableData from "#/rules/immutable-data";
import * as noConditionalStatements from "#/rules/no-conditional-statements";
import * as noExpressionStatements from "#/rules/no-expression-statements";
import * as preferImmutableTypes from "#/rules/prefer-immutable-types";

import recommended from "./recommended";

4 changes: 2 additions & 2 deletions src/configs/no-exceptions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";

import { rules } from "#eslint-plugin-functional/rules";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { rules } from "#/rules";
import { ruleNameScope } from "#/utils/misc";

export default Object.fromEntries(
Object.entries(rules)
4 changes: 2 additions & 2 deletions src/configs/no-mutations.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";

import { rules } from "#eslint-plugin-functional/rules";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { rules } from "#/rules";
import { ruleNameScope } from "#/utils/misc";

export default Object.fromEntries(
Object.entries(rules)
4 changes: 2 additions & 2 deletions src/configs/no-other-paradigms.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";

import { rules } from "#eslint-plugin-functional/rules";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { rules } from "#/rules";
import { ruleNameScope } from "#/utils/misc";

export default Object.fromEntries(
Object.entries(rules)
4 changes: 2 additions & 2 deletions src/configs/no-statements.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";

import { rules } from "#eslint-plugin-functional/rules";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { rules } from "#/rules";
import { ruleNameScope } from "#/utils/misc";

export default Object.fromEntries(
Object.entries(rules)
4 changes: 2 additions & 2 deletions src/configs/off.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";

import { rules } from "#eslint-plugin-functional/rules";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { rules } from "#/rules";
import { ruleNameScope } from "#/utils/misc";

export default Object.fromEntries(
Object.entries(rules).map(([name]) => [`${ruleNameScope}/${name}`, "off"]),
22 changes: 11 additions & 11 deletions src/configs/recommended.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";
import { Immutability } from "is-immutable-type";

import { rules } from "#eslint-plugin-functional/rules";
import * as functionalParameters from "#eslint-plugin-functional/rules/functional-parameters";
import * as noConditionalStatements from "#eslint-plugin-functional/rules/no-conditional-statements";
import * as noLet from "#eslint-plugin-functional/rules/no-let";
import * as noThisExpressions from "#eslint-plugin-functional/rules/no-this-expressions";
import * as noThrowStatements from "#eslint-plugin-functional/rules/no-throw-statements";
import * as noTryStatements from "#eslint-plugin-functional/rules/no-try-statements";
import * as preferImmutableTypes from "#eslint-plugin-functional/rules/prefer-immutable-types";
import * as typeDeclarationImmutability from "#eslint-plugin-functional/rules/type-declaration-immutability";
import { RuleEnforcementComparator } from "#eslint-plugin-functional/rules/type-declaration-immutability";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { rules } from "#/rules";
import * as functionalParameters from "#/rules/functional-parameters";
import * as noConditionalStatements from "#/rules/no-conditional-statements";
import * as noLet from "#/rules/no-let";
import * as noThisExpressions from "#/rules/no-this-expressions";
import * as noThrowStatements from "#/rules/no-throw-statements";
import * as noTryStatements from "#/rules/no-try-statements";
import * as preferImmutableTypes from "#/rules/prefer-immutable-types";
import * as typeDeclarationImmutability from "#/rules/type-declaration-immutability";
import { RuleEnforcementComparator } from "#/rules/type-declaration-immutability";
import { ruleNameScope } from "#/utils/misc";

const recommended = Object.fromEntries(
Object.entries(rules)
4 changes: 2 additions & 2 deletions src/configs/strict.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";

import { rules } from "#eslint-plugin-functional/rules";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { rules } from "#/rules";
import { ruleNameScope } from "#/utils/misc";

export default Object.fromEntries(
Object.entries(rules)
4 changes: 2 additions & 2 deletions src/configs/stylistic.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";

import { rules } from "#eslint-plugin-functional/rules";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { rules } from "#/rules";
import { ruleNameScope } from "#/utils/misc";

export default Object.fromEntries(
Object.entries(rules)
32 changes: 16 additions & 16 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { type FlatConfig } from "@typescript-eslint/utils/ts-eslint";

import all from "#eslint-plugin-functional/configs/all";
import currying from "#eslint-plugin-functional/configs/currying";
import disableTypeChecked from "#eslint-plugin-functional/configs/disable-type-checked";
import externalTypeScriptRecommended from "#eslint-plugin-functional/configs/external-typescript-recommended";
import externalVanillaRecommended from "#eslint-plugin-functional/configs/external-vanilla-recommended";
import lite from "#eslint-plugin-functional/configs/lite";
import noExceptions from "#eslint-plugin-functional/configs/no-exceptions";
import noMutations from "#eslint-plugin-functional/configs/no-mutations";
import noOtherParadigms from "#eslint-plugin-functional/configs/no-other-paradigms";
import noStatements from "#eslint-plugin-functional/configs/no-statements";
import off from "#eslint-plugin-functional/configs/off";
import recommended from "#eslint-plugin-functional/configs/recommended";
import strict from "#eslint-plugin-functional/configs/strict";
import stylistic from "#eslint-plugin-functional/configs/stylistic";
import { rules } from "#eslint-plugin-functional/rules";
import { __VERSION__ } from "#eslint-plugin-functional/utils/constants";
import all from "#/configs/all";
import currying from "#/configs/currying";
import disableTypeChecked from "#/configs/disable-type-checked";
import externalTypeScriptRecommended from "#/configs/external-typescript-recommended";
import externalVanillaRecommended from "#/configs/external-vanilla-recommended";
import lite from "#/configs/lite";
import noExceptions from "#/configs/no-exceptions";
import noMutations from "#/configs/no-mutations";
import noOtherParadigms from "#/configs/no-other-paradigms";
import noStatements from "#/configs/no-statements";
import off from "#/configs/off";
import recommended from "#/configs/recommended";
import strict from "#/configs/strict";
import stylistic from "#/configs/stylistic";
import { rules } from "#/rules";
import { __VERSION__ } from "#/utils/constants";

const meta = {
name: "eslint-plugin-functional",
14 changes: 4 additions & 10 deletions src/options/ignore.ts
Original file line number Diff line number Diff line change
@@ -3,22 +3,16 @@ import { type JSONSchema4ObjectSchema } from "@typescript-eslint/utils/json-sche
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";
import escapeRegExp from "escape-string-regexp";

import {
getNodeCode,
getNodeIdentifierTexts,
} from "#eslint-plugin-functional/utils/misc";
import { type BaseOptions } from "#eslint-plugin-functional/utils/rule";
import {
isInClass,
isInFunctionBody,
} from "#eslint-plugin-functional/utils/tree";
import { getNodeCode, getNodeIdentifierTexts } from "#/utils/misc";
import { type BaseOptions } from "#/utils/rule";
import { isInClass, isInFunctionBody } from "#/utils/tree";
import {
isAssignmentExpression,
isClassLike,
isMemberExpression,
isPropertyDefinition,
isThisExpression,
} from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/type-guards";

/**
* The option to ignore patterns.
12 changes: 6 additions & 6 deletions src/rules/functional-parameters.ts
Original file line number Diff line number Diff line change
@@ -12,23 +12,23 @@ import {
ignoreIdentifierPatternOptionSchema,
ignorePrefixSelectorOptionSchema,
shouldIgnorePattern,
} from "#eslint-plugin-functional/options";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { type ESFunction } from "#eslint-plugin-functional/utils/node-types";
} from "#/options";
import { ruleNameScope } from "#/utils/misc";
import { type ESFunction } from "#/utils/node-types";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRuleUsingFunction,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";
import {
isArgument,
isGetter,
isIIFE,
isPropertyAccess,
isPropertyName,
isSetter,
} from "#eslint-plugin-functional/utils/tree";
import { isRestElement } from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/tree";
import { isRestElement } from "#/utils/type-guards";

/**
* The name of this rule.
10 changes: 5 additions & 5 deletions src/rules/immutable-data.ts
Original file line number Diff line number Diff line change
@@ -15,22 +15,22 @@ import {
ignoreIdentifierPatternOptionSchema,
shouldIgnoreClasses,
shouldIgnorePattern,
} from "#eslint-plugin-functional/options";
} from "#/options";
import {
isExpected,
ruleNameScope,
} from "#eslint-plugin-functional/utils/misc";
} from "#/utils/misc";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
getTypeOfNode,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";
import {
findRootIdentifier,
isDefinedByMutableVariable,
isInConstructor,
} from "#eslint-plugin-functional/utils/tree";
} from "#/utils/tree";
import {
isArrayConstructorType,
isArrayExpression,
@@ -41,7 +41,7 @@ import {
isNewExpression,
isObjectConstructorType,
isTSAsExpression,
} from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/type-guards";

/**
* The name of this rule.
6 changes: 3 additions & 3 deletions src/rules/no-classes.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema";
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";

import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { type ESClass } from "#eslint-plugin-functional/utils/node-types";
import { ruleNameScope } from "#/utils/misc";
import { type ESClass } from "#/utils/node-types";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";

/**
* The name of this rule.
8 changes: 4 additions & 4 deletions src/rules/no-conditional-statements.ts
Original file line number Diff line number Diff line change
@@ -3,14 +3,14 @@ import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema";
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";
import { type Type } from "typescript";

import tsApiUtils from "#eslint-plugin-functional/conditional-imports/ts-api-utils";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import tsApiUtils from "#/conditional-imports/ts-api-utils";
import { ruleNameScope } from "#/utils/misc";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
getTypeOfNode,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";
import {
isBlockStatement,
isBreakStatement,
@@ -20,7 +20,7 @@ import {
isReturnStatement,
isSwitchStatement,
isThrowStatement,
} from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/type-guards";

/**
* The name of this rule.
12 changes: 6 additions & 6 deletions src/rules/no-expression-statements.ts
Original file line number Diff line number Diff line change
@@ -6,27 +6,27 @@ import {
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";
import { deepmerge } from "deepmerge-ts";

import tsApiUtils from "#eslint-plugin-functional/conditional-imports/ts-api-utils";
import typescript from "#eslint-plugin-functional/conditional-imports/typescript";
import tsApiUtils from "#/conditional-imports/ts-api-utils";
import typescript from "#/conditional-imports/typescript";
import {
type IgnoreCodePatternOption,
ignoreCodePatternOptionSchema,
shouldIgnorePattern,
} from "#eslint-plugin-functional/options";
} from "#/options";
import {
isDirectivePrologue,
ruleNameScope,
} from "#eslint-plugin-functional/utils/misc";
} from "#/utils/misc";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
getTypeOfNode,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";
import {
isCallExpression,
isYieldExpression,
} from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/type-guards";

/**
* The name of this rule.
8 changes: 4 additions & 4 deletions src/rules/no-let.ts
Original file line number Diff line number Diff line change
@@ -11,14 +11,14 @@ import {
ignoreIdentifierPatternOptionSchema,
shouldIgnoreInFunction,
shouldIgnorePattern,
} from "#eslint-plugin-functional/options";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
} from "#/options";
import { ruleNameScope } from "#/utils/misc";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
} from "#eslint-plugin-functional/utils/rule";
import { isInForLoopInitializer } from "#eslint-plugin-functional/utils/tree";
} from "#/utils/rule";
import { isInForLoopInitializer } from "#/utils/tree";

/**
* The name of this rule.
6 changes: 3 additions & 3 deletions src/rules/no-loop-statements.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema";
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";

import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { type ESLoop } from "#eslint-plugin-functional/utils/node-types";
import { ruleNameScope } from "#/utils/misc";
import { type ESLoop } from "#/utils/node-types";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";

/**
* The name of this rule.
6 changes: 3 additions & 3 deletions src/rules/no-mixed-types.ts
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@ import { type TSESTree } from "@typescript-eslint/utils";
import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema";
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";

import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { ruleNameScope } from "#/utils/misc";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRuleUsingFunction,
getTypeOfNode,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";
import {
isFunctionLikeType,
isIdentifier,
@@ -20,7 +20,7 @@ import {
isTSPropertySignature,
isTSTypeLiteral,
isTSTypeReference,
} from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/type-guards";

/**
* The name of this rule.
6 changes: 3 additions & 3 deletions src/rules/no-promise-reject.ts
Original file line number Diff line number Diff line change
@@ -2,16 +2,16 @@ import { type TSESTree } from "@typescript-eslint/utils";
import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema";
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";

import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { ruleNameScope } from "#/utils/misc";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";
import {
isIdentifier,
isMemberExpression,
} from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/type-guards";

/**
* The name of this rule.
10 changes: 5 additions & 5 deletions src/rules/no-return-void.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema";
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";

import tsApiUtils from "#eslint-plugin-functional/conditional-imports/ts-api-utils";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { type ESFunctionType } from "#eslint-plugin-functional/utils/node-types";
import tsApiUtils from "#/conditional-imports/ts-api-utils";
import { ruleNameScope } from "#/utils/misc";
import { type ESFunctionType } from "#/utils/node-types";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
getTypeOfNode,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";
import {
isFunctionLike,
isTSNullKeyword,
isTSUndefinedKeyword,
isTSVoidKeyword,
} from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/type-guards";

/**
* The name of this rule.
4 changes: 2 additions & 2 deletions src/rules/no-this-expressions.ts
Original file line number Diff line number Diff line change
@@ -2,12 +2,12 @@ import { type TSESTree } from "@typescript-eslint/utils";
import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema";
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";

import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { ruleNameScope } from "#/utils/misc";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";

/**
* The name of this rule.
6 changes: 3 additions & 3 deletions src/rules/no-throw-statements.ts
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@ import { type TSESTree } from "@typescript-eslint/utils";
import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema";
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";

import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { ruleNameScope } from "#/utils/misc";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
} from "#eslint-plugin-functional/utils/rule";
import { isInFunctionBody } from "#eslint-plugin-functional/utils/tree";
} from "#/utils/rule";
import { isInFunctionBody } from "#/utils/tree";

/**
* The name of this rule.
4 changes: 2 additions & 2 deletions src/rules/no-try-statements.ts
Original file line number Diff line number Diff line change
@@ -2,12 +2,12 @@ import { type TSESTree } from "@typescript-eslint/utils";
import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema";
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";

import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { ruleNameScope } from "#/utils/misc";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";

/**
* The name of this rule.
10 changes: 5 additions & 5 deletions src/rules/prefer-immutable-types.ts
Original file line number Diff line number Diff line change
@@ -16,9 +16,9 @@ import {
shouldIgnoreClasses,
shouldIgnoreInFunction,
shouldIgnorePattern,
} from "#eslint-plugin-functional/options";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { type ESFunctionType } from "#eslint-plugin-functional/utils/node-types";
} from "#/options";
import { ruleNameScope } from "#/utils/misc";
import { type ESFunctionType } from "#/utils/node-types";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
@@ -27,7 +27,7 @@ import {
getTypeImmutabilityOfNode,
getTypeImmutabilityOfType,
isImplementationOfOverload,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";
import {
hasID,
isArrayPattern,
@@ -40,7 +40,7 @@ import {
isPropertyDefinition,
isTSParameterProperty,
isTSTypePredicate,
} from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/type-guards";

/**
* The name of this rule.
6 changes: 3 additions & 3 deletions src/rules/prefer-property-signatures.ts
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@ import { type TSESTree } from "@typescript-eslint/utils";
import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema";
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";

import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { ruleNameScope } from "#/utils/misc";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
} from "#eslint-plugin-functional/utils/rule";
import { isInReadonly } from "#eslint-plugin-functional/utils/tree";
} from "#/utils/rule";
import { isInReadonly } from "#/utils/tree";

/**
* The name of this rule.
12 changes: 6 additions & 6 deletions src/rules/prefer-readonly-type.ts
Original file line number Diff line number Diff line change
@@ -8,20 +8,20 @@ import {
shouldIgnoreClasses,
shouldIgnoreInFunction,
shouldIgnorePattern,
} from "#eslint-plugin-functional/options";
import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { type ESArrayTupleType } from "#eslint-plugin-functional/utils/node-types";
} from "#/options";
import { ruleNameScope } from "#/utils/misc";
import { type ESArrayTupleType } from "#/utils/node-types";
import {
type BaseOptions,
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
getTypeOfNode,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";
import {
isInInterface,
isInReturnType,
} from "#eslint-plugin-functional/utils/tree";
} from "#/utils/tree";
import {
isArrayType,
isAssignmentPattern,
@@ -36,7 +36,7 @@ import {
isTSTypeLiteral,
isTSTypeOperator,
isTSTypeReference,
} from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/type-guards";

/**
* The name of this rule.
10 changes: 5 additions & 5 deletions src/rules/prefer-tacit.ts
Original file line number Diff line number Diff line change
@@ -9,23 +9,23 @@ import {
} from "@typescript-eslint/utils/ts-eslint";
import { type Type } from "typescript";

import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { type ESFunction } from "#eslint-plugin-functional/utils/node-types";
import { ruleNameScope } from "#/utils/misc";
import { type ESFunction } from "#/utils/node-types";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
getTypeOfNode,
getTypeOfTSNode,
} from "#eslint-plugin-functional/utils/rule";
import { isNested } from "#eslint-plugin-functional/utils/tree";
} from "#/utils/rule";
import { isNested } from "#/utils/tree";
import {
isBlockStatement,
isCallExpression,
isIdentifier,
isMemberExpression,
isReturnStatement,
} from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/type-guards";

/**
* The name of this rule.
8 changes: 4 additions & 4 deletions src/rules/readonly-type.ts
Original file line number Diff line number Diff line change
@@ -5,21 +5,21 @@ import {
type RuleContext,
} from "@typescript-eslint/utils/ts-eslint";

import { ruleNameScope } from "#eslint-plugin-functional/utils/misc";
import { ruleNameScope } from "#/utils/misc";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
} from "#eslint-plugin-functional/utils/rule";
import { getReadonly } from "#eslint-plugin-functional/utils/tree";
} from "#/utils/rule";
import { getReadonly } from "#/utils/tree";
import {
isDefined,
isPropertyDefinition,
isTSIndexSignature,
isTSParameterProperty,
isTSPropertySignature,
isTSTypeReference,
} from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/type-guards";

/**
* The name of this rule.
10 changes: 5 additions & 5 deletions src/rules/type-declaration-immutability.ts
Original file line number Diff line number Diff line change
@@ -11,19 +11,19 @@ import {
type IgnoreIdentifierPatternOption,
ignoreIdentifierPatternOptionSchema,
shouldIgnorePattern,
} from "#eslint-plugin-functional/options";
} from "#/options";
import {
getNodeIdentifierTexts,
ruleNameScope,
} from "#eslint-plugin-functional/utils/misc";
import { type ESTypeDeclaration } from "#eslint-plugin-functional/utils/node-types";
} from "#/utils/misc";
import { type ESTypeDeclaration } from "#/utils/node-types";
import {
type NamedCreateRuleCustomMeta,
type RuleResult,
createRule,
getTypeImmutabilityOfNode,
} from "#eslint-plugin-functional/utils/rule";
import { isTSInterfaceDeclaration } from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/rule";
import { isTSInterfaceDeclaration } from "#/utils/type-guards";

/**
* The name of this rule.
2 changes: 1 addition & 1 deletion src/utils/conditional-imports/cjs/ts-api-utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type tsApiUtils from "ts-api-utils";

import ts from "#eslint-plugin-functional/conditional-imports/typescript";
import ts from "#/conditional-imports/typescript";

export default (() => {
if (ts !== undefined) {
2 changes: 1 addition & 1 deletion src/utils/conditional-imports/esm/ts-api-utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type tsApiUtils from "ts-api-utils";

import ts from "#eslint-plugin-functional/conditional-imports/typescript";
import ts from "#/conditional-imports/typescript";

export default await ((): Promise<typeof tsApiUtils | undefined> => {
if (ts !== undefined) {
6 changes: 3 additions & 3 deletions src/utils/misc.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { AST_NODE_TYPES, type TSESTree } from "@typescript-eslint/utils";
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";

import { type BaseOptions } from "#eslint-plugin-functional/utils/rule";
import { getKeyOfValueInObjectExpression } from "#eslint-plugin-functional/utils/tree";
import { type BaseOptions } from "#/utils/rule";
import { getKeyOfValueInObjectExpression } from "#/utils/tree";
import {
hasID,
hasKey,
@@ -16,7 +16,7 @@ import {
isThisExpression,
isUnaryExpression,
isVariableDeclaration,
} from "#eslint-plugin-functional/utils/type-guards";
} from "#/utils/type-guards";

export const ruleNameScope = "functional";

8 changes: 4 additions & 4 deletions src/utils/rule.ts
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@ import {
} from "is-immutable-type";
import { type Node as TSNode, type Type, type TypeNode } from "typescript";

import ts from "#eslint-plugin-functional/conditional-imports/typescript";
import { getImmutabilityOverrides } from "#eslint-plugin-functional/settings";
import { __VERSION__ } from "#eslint-plugin-functional/utils/constants";
import { type ESFunction } from "#eslint-plugin-functional/utils/node-types";
import ts from "#/conditional-imports/typescript";
import { getImmutabilityOverrides } from "#/settings";
import { __VERSION__ } from "#/utils/constants";
import { type ESFunction } from "#/utils/node-types";

/**
* Any custom rule meta properties.
2 changes: 1 addition & 1 deletion src/utils/tree.ts
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import { type TSESTree } from "@typescript-eslint/utils";
import { getParserServices } from "@typescript-eslint/utils/eslint-utils";
import { type RuleContext } from "@typescript-eslint/utils/ts-eslint";

import typescript from "#eslint-plugin-functional/conditional-imports/typescript";
import typescript from "#/conditional-imports/typescript";

import { type BaseOptions } from "./rule";
import {
2 changes: 1 addition & 1 deletion src/utils/type-guards.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
import { AST_NODE_TYPES, type TSESTree } from "@typescript-eslint/utils";
import { type Type, type UnionType } from "typescript";

import ts from "#eslint-plugin-functional/conditional-imports/typescript";
import ts from "#/conditional-imports/typescript";

/*
* TS Types.
8 changes: 4 additions & 4 deletions tests/common/ignore-options.test.ts
Original file line number Diff line number Diff line change
@@ -9,16 +9,16 @@ import {
type IgnoreCodePatternOption,
type IgnoreIdentifierPatternOption,
shouldIgnorePattern,
} from "#eslint-plugin-functional/options";
import { getRuleTester } from "#eslint-plugin-functional/tests/helpers/RuleTester";
} from "#/options";
import { getRuleTester } from "#/tests/helpers/RuleTester";
import {
configs,
filename,
} from "#eslint-plugin-functional/tests/helpers/configs";
} from "#/tests/helpers/configs";
import {
addFilename,
createDummyRule,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

/**
* Create a dummy rule that operates on AssignmentExpression nodes.
24 changes: 12 additions & 12 deletions tests/configs.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { describe, expect, it } from "vitest";

import all from "#eslint-plugin-functional/configs/all";
import currying from "#eslint-plugin-functional/configs/currying";
import lite from "#eslint-plugin-functional/configs/lite";
import noExceptions from "#eslint-plugin-functional/configs/no-exceptions";
import noMutations from "#eslint-plugin-functional/configs/no-mutations";
import noOtherParadigms from "#eslint-plugin-functional/configs/no-other-paradigms";
import noStatements from "#eslint-plugin-functional/configs/no-statements";
import off from "#eslint-plugin-functional/configs/off";
import recommended from "#eslint-plugin-functional/configs/recommended";
import strict from "#eslint-plugin-functional/configs/strict";
import stylistic from "#eslint-plugin-functional/configs/stylistic";
import { rules } from "#eslint-plugin-functional/rules";
import all from "#/configs/all";
import currying from "#/configs/currying";
import lite from "#/configs/lite";
import noExceptions from "#/configs/no-exceptions";
import noMutations from "#/configs/no-mutations";
import noOtherParadigms from "#/configs/no-other-paradigms";
import noStatements from "#/configs/no-statements";
import off from "#/configs/off";
import recommended from "#/configs/recommended";
import strict from "#/configs/strict";
import stylistic from "#/configs/stylistic";
import { rules } from "#/rules";

describe("configs", () => {
const allRules = Object.values(rules);
2 changes: 1 addition & 1 deletion tests/helpers/testers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type RuleDefinition } from "#eslint-plugin-functional/utils/rule";
import { type RuleDefinition } from "#/utils/rule";

import { getRuleTester } from "./RuleTester";
import { configs } from "./configs";
2 changes: 1 addition & 1 deletion tests/helpers/util.ts
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ import {
type RuleDefinition,
type RuleFunctionsMap,
createRuleUsingFunction,
} from "#eslint-plugin-functional/utils/rule";
} from "#/utils/rule";

import { filename as dummyFilename } from "./configs";

2 changes: 1 addition & 1 deletion tests/index.test.ts
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import { readdirSync } from "node:fs";

import { describe, expect, it } from "vitest";

import functional from "#eslint-plugin-functional";
import functional from "#";

describe("index", () => {
it("should have all the rules", () => {
7 changes: 2 additions & 5 deletions tests/rules/functional-parameters/es2015/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
name,
rule,
} from "#eslint-plugin-functional/rules/functional-parameters";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/functional-parameters";
import { testRule } from "#/tests/helpers/testers";

import es3Invalid from "../es3/invalid";
import es3Valid from "../es3/valid";
4 changes: 2 additions & 2 deletions tests/rules/functional-parameters/es2015/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/functional-parameters";
import { type rule } from "#/rules/functional-parameters";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
4 changes: 2 additions & 2 deletions tests/rules/functional-parameters/es2015/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/functional-parameters";
import { type rule } from "#/rules/functional-parameters";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
7 changes: 2 additions & 5 deletions tests/rules/functional-parameters/es3/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
name,
rule,
} from "#eslint-plugin-functional/rules/functional-parameters";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/functional-parameters";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/functional-parameters/es3/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/functional-parameters";
import { type rule } from "#/rules/functional-parameters";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/functional-parameters/es3/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/functional-parameters";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/functional-parameters";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
4 changes: 2 additions & 2 deletions tests/rules/immutable-data/ts/array/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { name, rule } from "#eslint-plugin-functional/rules/immutable-data";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/immutable-data";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/immutable-data/ts/array/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/immutable-data";
import { type rule } from "#/rules/immutable-data";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/immutable-data/ts/array/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/immutable-data";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/immutable-data";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
// Allowed non-array mutation patterns.
4 changes: 2 additions & 2 deletions tests/rules/immutable-data/ts/object/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { name, rule } from "#eslint-plugin-functional/rules/immutable-data";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/immutable-data";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/immutable-data/ts/object/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/immutable-data";
import { type rule } from "#/rules/immutable-data";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/immutable-data/ts/object/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/immutable-data";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/immutable-data";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
// Allowed non-object mutation patterns.
2 changes: 1 addition & 1 deletion tests/rules/index.test.ts
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import * as fs from "node:fs";

import { describe, expect, it } from "vitest";

import { rules } from "#eslint-plugin-functional/rules";
import { rules } from "#/rules";

describe("rules index", () => {
it("to import all rule files", () => {
4 changes: 2 additions & 2 deletions tests/rules/no-class/es2015/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { name, rule } from "#eslint-plugin-functional/rules/no-classes";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/no-classes";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/no-class/es2015/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";

import { type rule } from "#eslint-plugin-functional/rules/no-classes";
import { type rule } from "#/rules/no-classes";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/no-class/es2015/valid.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { type rule } from "#eslint-plugin-functional/rules/no-classes";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/no-classes";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
7 changes: 2 additions & 5 deletions tests/rules/no-conditional-statement/ts/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
name,
rule,
} from "#eslint-plugin-functional/rules/no-conditional-statements";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/no-conditional-statements";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/no-conditional-statement/ts/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-conditional-statements";
import { type rule } from "#/rules/no-conditional-statements";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/no-conditional-statement/ts/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-conditional-statements";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/no-conditional-statements";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
7 changes: 2 additions & 5 deletions tests/rules/no-expression-statement/ts/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
name,
rule,
} from "#eslint-plugin-functional/rules/no-expression-statements";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/no-expression-statements";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/no-expression-statement/ts/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-expression-statements";
import { type rule } from "#/rules/no-expression-statements";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/no-expression-statement/ts/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-expression-statements";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/no-expression-statements";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
// Defining variable should still be allowed.
4 changes: 2 additions & 2 deletions tests/rules/no-let/es2015/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { name, rule } from "#eslint-plugin-functional/rules/no-let";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/no-let";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/no-let/es2015/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-let";
import { type rule } from "#/rules/no-let";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/no-let/es2015/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-let";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/no-let";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
4 changes: 2 additions & 2 deletions tests/rules/no-loop-statement/es2015/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { name, rule } from "#eslint-plugin-functional/rules/no-loop-statements";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/no-loop-statements";
import { testRule } from "#/tests/helpers/testers";

import es3Invalid from "../es3/invalid";
import es3Valid from "../es3/valid";
4 changes: 2 additions & 2 deletions tests/rules/no-loop-statement/es2015/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";

import { type rule } from "#eslint-plugin-functional/rules/no-loop-statements";
import { type rule } from "#/rules/no-loop-statements";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/no-loop-statement/es2015/valid.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { type rule } from "#eslint-plugin-functional/rules/no-loop-statements";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/no-loop-statements";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [];

4 changes: 2 additions & 2 deletions tests/rules/no-loop-statement/es3/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { name, rule } from "#eslint-plugin-functional/rules/no-loop-statements";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/no-loop-statements";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/no-loop-statement/es3/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";

import { type rule } from "#eslint-plugin-functional/rules/no-loop-statements";
import { type rule } from "#/rules/no-loop-statements";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/no-loop-statement/es3/valid.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { type rule } from "#eslint-plugin-functional/rules/no-loop-statements";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/no-loop-statements";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
4 changes: 2 additions & 2 deletions tests/rules/no-mixed-type/ts/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { name, rule } from "#eslint-plugin-functional/rules/no-mixed-types";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/no-mixed-types";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/no-mixed-type/ts/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { type rule } from "#eslint-plugin-functional/rules/no-mixed-types";
import { type rule } from "#/rules/no-mixed-types";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/no-mixed-type/ts/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-mixed-types";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/no-mixed-types";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
// // Only properties should not produce failures.
4 changes: 2 additions & 2 deletions tests/rules/no-promise-reject/es2015/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { name, rule } from "#eslint-plugin-functional/rules/no-promise-reject";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/no-promise-reject";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/no-promise-reject/es2015/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-promise-reject";
import { type rule } from "#/rules/no-promise-reject";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/no-promise-reject/es2015/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-promise-reject";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/no-promise-reject";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
4 changes: 2 additions & 2 deletions tests/rules/no-return-void/ts/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { name, rule } from "#eslint-plugin-functional/rules/no-return-void";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/no-return-void";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/no-return-void/ts/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-return-void";
import { type rule } from "#/rules/no-return-void";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/no-return-void/ts/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-return-void";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/no-return-void";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
7 changes: 2 additions & 5 deletions tests/rules/no-this-expression/es3/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
name,
rule,
} from "#eslint-plugin-functional/rules/no-this-expressions";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/no-this-expressions";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/no-this-expression/es3/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";

import { type rule } from "#eslint-plugin-functional/rules/no-this-expressions";
import { type rule } from "#/rules/no-this-expressions";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/no-this-expression/es3/valid.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { type rule } from "#eslint-plugin-functional/rules/no-this-expressions";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/no-this-expressions";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
7 changes: 2 additions & 5 deletions tests/rules/no-throw-statement/es2016/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
name,
rule,
} from "#eslint-plugin-functional/rules/no-throw-statements";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/no-throw-statements";
import { testRule } from "#/tests/helpers/testers";

import es3Invalid from "../es3/invalid";
import es3Valid from "../es3/valid";
4 changes: 2 additions & 2 deletions tests/rules/no-throw-statement/es2016/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-throw-statements";
import { type rule } from "#/rules/no-throw-statements";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/no-throw-statement/es2016/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-throw-statements";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/no-throw-statements";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
7 changes: 2 additions & 5 deletions tests/rules/no-throw-statement/es3/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
name,
rule,
} from "#eslint-plugin-functional/rules/no-throw-statements";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/no-throw-statements";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/no-throw-statement/es3/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-throw-statements";
import { type rule } from "#/rules/no-throw-statements";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/no-throw-statement/es3/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/no-throw-statements";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/no-throw-statements";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
4 changes: 2 additions & 2 deletions tests/rules/no-try-statement/es3/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { name, rule } from "#eslint-plugin-functional/rules/no-try-statements";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/no-try-statements";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/no-try-statement/es3/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";

import { type rule } from "#eslint-plugin-functional/rules/no-try-statements";
import { type rule } from "#/rules/no-try-statements";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/no-try-statement/es3/valid.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { type rule } from "#eslint-plugin-functional/rules/no-try-statements";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/no-try-statements";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
name,
rule,
} from "#eslint-plugin-functional/rules/prefer-immutable-types";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/prefer-immutable-types";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/prefer-immutable-types/ts/parameters/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/prefer-immutable-types";
import { type rule } from "#/rules/prefer-immutable-types";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/prefer-immutable-types/ts/parameters/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/prefer-immutable-types";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/prefer-immutable-types";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
name,
rule,
} from "#eslint-plugin-functional/rules/prefer-immutable-types";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/prefer-immutable-types";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/prefer-immutable-types/ts/return-types/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/prefer-immutable-types";
import { type rule } from "#/rules/prefer-immutable-types";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/prefer-immutable-types/ts/return-types/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/prefer-immutable-types";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/prefer-immutable-types";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
7 changes: 2 additions & 5 deletions tests/rules/prefer-immutable-types/ts/variables/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
name,
rule,
} from "#eslint-plugin-functional/rules/prefer-immutable-types";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/prefer-immutable-types";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/prefer-immutable-types/ts/variables/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/prefer-immutable-types";
import { type rule } from "#/rules/prefer-immutable-types";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/prefer-immutable-types/ts/variables/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/prefer-immutable-types";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/prefer-immutable-types";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
7 changes: 2 additions & 5 deletions tests/rules/prefer-property-signatures/ts/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
name,
rule,
} from "#eslint-plugin-functional/rules/prefer-property-signatures";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/prefer-property-signatures";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/prefer-property-signatures/ts/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/prefer-property-signatures";
import { type rule } from "#/rules/prefer-property-signatures";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/prefer-property-signatures/ts/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/prefer-property-signatures";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/prefer-property-signatures";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
7 changes: 2 additions & 5 deletions tests/rules/prefer-readonly-type/ts/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
name,
rule,
} from "#eslint-plugin-functional/rules/prefer-readonly-type";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/prefer-readonly-type";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/prefer-readonly-type/ts/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/prefer-readonly-type";
import { type rule } from "#/rules/prefer-readonly-type";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/prefer-readonly-type/ts/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/prefer-readonly-type";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/prefer-readonly-type";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
// Should not fail on explicit ReadonlyArray parameter.
4 changes: 2 additions & 2 deletions tests/rules/prefer-tacit/ts/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { name, rule } from "#eslint-plugin-functional/rules/prefer-tacit";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/prefer-tacit";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/prefer-tacit/ts/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/prefer-tacit";
import { type rule } from "#/rules/prefer-tacit";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/prefer-tacit/ts/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/prefer-tacit";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/prefer-tacit";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
{
4 changes: 2 additions & 2 deletions tests/rules/readonly-type/ts/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { name, rule } from "#eslint-plugin-functional/rules/readonly-type";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/readonly-type";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/readonly-type/ts/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/readonly-type";
import { type rule } from "#/rules/readonly-type";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const tests: Array<
InvalidTestCaseSet<MessagesOf<typeof rule>, OptionsOf<typeof rule>>
7 changes: 2 additions & 5 deletions tests/rules/readonly-type/ts/valid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import dedent from "dedent";

import { type rule } from "#eslint-plugin-functional/rules/readonly-type";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/readonly-type";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
// Not readonly
7 changes: 2 additions & 5 deletions tests/rules/type-declaration-immutability/ts/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
name,
rule,
} from "#eslint-plugin-functional/rules/type-declaration-immutability";
import { testRule } from "#eslint-plugin-functional/tests/helpers/testers";
import { name, rule } from "#/rules/type-declaration-immutability";
import { testRule } from "#/tests/helpers/testers";

import invalid from "./invalid";
import valid from "./valid";
4 changes: 2 additions & 2 deletions tests/rules/type-declaration-immutability/ts/invalid.ts
Original file line number Diff line number Diff line change
@@ -2,12 +2,12 @@ import { AST_NODE_TYPES } from "@typescript-eslint/utils";
import dedent from "dedent";
import { Immutability } from "is-immutable-type";

import { type rule } from "#eslint-plugin-functional/rules/type-declaration-immutability";
import { type rule } from "#/rules/type-declaration-immutability";
import {
type InvalidTestCaseSet,
type MessagesOf,
type OptionsOf,
} from "#eslint-plugin-functional/tests/helpers/util";
} from "#/tests/helpers/util";

const recommended = {
rules: [
7 changes: 2 additions & 5 deletions tests/rules/type-declaration-immutability/ts/valid.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import dedent from "dedent";
import { Immutability } from "is-immutable-type";

import { type rule } from "#eslint-plugin-functional/rules/type-declaration-immutability";
import {
type OptionsOf,
type ValidTestCaseSet,
} from "#eslint-plugin-functional/tests/helpers/util";
import { type rule } from "#/rules/type-declaration-immutability";
import { type OptionsOf, type ValidTestCaseSet } from "#/tests/helpers/util";

const recommended = {
rules: [
18 changes: 9 additions & 9 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -31,17 +31,17 @@
"types": ["vitest/importMeta"],
"baseUrl": ".",
"paths": {
"#eslint-plugin-functional": ["src/index.ts"],
"#eslint-plugin-functional/configs/*": ["src/configs/*"],
"#eslint-plugin-functional/options": ["src/options"],
"#eslint-plugin-functional/rules": ["src/rules"],
"#eslint-plugin-functional/rules/*": ["src/rules/*"],
"#eslint-plugin-functional/settings": ["src/settings"],
"#eslint-plugin-functional/utils/*": ["src/utils/*"],
"#eslint-plugin-functional/conditional-imports/*": [
"#": ["src/index.ts"],
"#/configs/*": ["src/configs/*"],
"#/options": ["src/options"],
"#/rules": ["src/rules"],
"#/rules/*": ["src/rules/*"],
"#/settings": ["src/settings"],
"#/utils/*": ["src/utils/*"],
"#/conditional-imports/*": [
"src/utils/conditional-imports/cjs/*"
],
"#eslint-plugin-functional/tests/*": ["tests/*"]
"#/tests/*": ["tests/*"]
}
},
"include": [".", ".*"],