Skip to content

Commit b1b92e8

Browse files
chore: setup new linting rule
1 parent da9bf72 commit b1b92e8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.eslintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
"rules": {
3131
"@typescript-eslint/no-unnecessary-condition": "off",
3232
"import/no-relative-parent-imports": "error",
33+
"functional/prefer-readonly-type": "off",
34+
"functional/prefer-readonly-type-declaration": "warn",
3335
"node/no-unsupported-features/es-builtins": "off",
3436
"node/no-unsupported-features/es-syntax": "off",
3537
// enable once supported in all our supported node versions.

tests/helpers/util.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,8 @@ export function createDummyRule(
8282
} as unknown as Rule.RuleModule;
8383
}
8484

85-
export type RuleTesterTests = {
86-
// eslint-disable-next-line functional/prefer-readonly-type
85+
export type MutableRuleTesterTests = {
8786
valid?: Array<ESLintRuleTester.ValidTestCase | string>;
88-
// eslint-disable-next-line functional/prefer-readonly-type
8987
invalid?: Array<ESLintRuleTester.InvalidTestCase>;
9088
};
9189

@@ -94,8 +92,8 @@ export type RuleTesterTests = {
9492
*/
9593
export function addFilename(
9694
filename: string,
97-
tests: RuleTesterTests
98-
): RuleTesterTests {
95+
tests: MutableRuleTesterTests
96+
): MutableRuleTesterTests {
9997
const { valid, invalid } = tests;
10098
return {
10199
invalid: invalid?.map((test) => ({ ...test, filename })),

0 commit comments

Comments
 (0)