1.0.2 • Published 5 years ago
eslint-plugin-typescript-require-readonly v1.0.2
eslint-plugin-typescript-require-readonly
Enforce to use readonly on interfaces and objects by default.
Installation
You'll first need to install ESLint and configure @typescript-eslint parser:
$ npm i eslint --save-devNext, install eslint-plugin-typescript-require-readonly:
$ npm install eslint-plugin-typescript-require-readonly --save-devUsage
Add typescript-require-readonly to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
    "plugins": [
        "typescript-require-readonly"
    ]
}Then configure the rules you want to use under the rules section.
{
    "rules": {
        "typescript-require-readonly/typescript-require-readonly": "error"
    }
}