Skip to content

Commit 508c8a7

Browse files
committed
build: disable lint rule as indeterminable in declaration files
1 parent 6b183bc commit 508c8a7

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

etc/eslint/rules/typescript.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -829,32 +829,24 @@ rules[ '@typescript-eslint/prefer-function-type' ] = 'error';
829829
rules[ '@typescript-eslint/prefer-namespace-keyword' ] = 'error';
830830

831831
/**
832-
* Requires that private members are marked as `readonly` if they're never modified outside of the constructor.
832+
* Disables the rule that private members are marked as `readonly` if they're never modified outside of the constructor.
833833
*
834834
* @name prefer-readonly
835835
* @memberof rules
836836
* @type {string}
837-
* @default 'error'
837+
* @default 'off'
838838
* @see [prefer-readonly]{@link https://typescript-eslint.io/rules/prefer-readonly}
839839
*
840840
* @example
841-
* // Bad...
841+
* // Okay...
842842
* class MyClass {
843843
* private name: string;
844844
* constructor( name: string ) {
845845
* this.name = name;
846846
* }
847847
* }
848-
*
849-
* // Good...
850-
* class MyClass {
851-
* private readonly name: string;
852-
* constructor( name: string ) {
853-
* this.name = name;
854-
* }
855-
* }
856848
*/
857-
rules[ '@typescript-eslint/prefer-readonly' ] = 'error';
849+
rules[ '@typescript-eslint/prefer-readonly' ] = 'off';
858850

859851
/**
860852
* Disables the rule that functions which return promises must be async.

0 commit comments

Comments
 (0)