0.0.1 • Published 9 months ago

eslint-plugin-optional-chain v0.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

eslint-plugin-optional-chain

This is an ESLint plugin that provides a custom rule to automatically convert dot operators (.) to optional chain operators (?.) in your code.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-optional-chain:

npm install eslint-plugin-optional-chain --save-dev

Usage

Add optional-chain to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
	"plugins": ["optional-chain"]
}

Then configure the rules you want to use under the rules section.

{
	"rules": {
		"optional-chain/auto-optional-chain": 2
	}
}

Rules

🔧 Automatically fixable by the --fix CLI option.

Name               Description🔧
auto-optional-chainAutomatically convert dot operators (.) to optional chain operators (?.) in your code.🔧
0.0.1

9 months ago

0.0.0

9 months ago