eslint-plugin-typescript-require-readonly

1.0.2 • Public • Published

eslint-plugin-typescript-require-readonly

npm version

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-dev

Next, install eslint-plugin-typescript-require-readonly:

$ npm install eslint-plugin-typescript-require-readonly --save-dev

Usage

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"
    }
}

Package Sidebar

Install

npm i eslint-plugin-typescript-require-readonly

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

4.4 kB

Total Files

5

Last publish

Collaborators

  • krailler