Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New rule: prefer-readonly-type-alias #255

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/configs/all.ts
Expand Up @@ -22,6 +22,7 @@ const config: Linter.Config = {
"functional/no-method-signature": "error",
"functional/no-mixed-type": "error",
"functional/prefer-readonly-type": "error",
"functional/prefer-readonly-type-alias": "error",
"functional/prefer-tacit": ["error", { assumeTypes: false }],
"functional/no-return-void": "error",
},
Expand Down
1 change: 1 addition & 0 deletions src/configs/no-mutations.ts
Expand Up @@ -11,6 +11,7 @@ const config: Linter.Config = {
rules: {
"functional/no-method-signature": "warn",
"functional/prefer-readonly-type": "error",
"functional/prefer-readonly-type-alias": "error",
},
},
],
Expand Down
2 changes: 2 additions & 0 deletions src/rules/index.ts
Expand Up @@ -13,6 +13,7 @@ import * as noThisExpression from "./no-this-expression";
import * as noThrowStatement from "./no-throw-statement";
import * as noTryStatement from "./no-try-statement";
import * as preferReadonlyTypes from "./prefer-readonly-type";
import * as preferReadonlyTypeAlias from "./prefer-readonly-type-alias";
import * as preferTacit from "./prefer-tacit";

/**
Expand All @@ -34,5 +35,6 @@ export const rules = {
[noThrowStatement.name]: noThrowStatement.rule,
[noTryStatement.name]: noTryStatement.rule,
[preferReadonlyTypes.name]: preferReadonlyTypes.rule,
[preferReadonlyTypeAlias.name]: preferReadonlyTypeAlias.rule,
[preferTacit.name]: preferTacit.rule,
};