# Prettier

Prettier Integration with ESLint/TSLint/Typescript

## To install package 
`npm i -g prettier-config-etv` 
<br />
OR
<br />
`npm i prettier-config-etv --save`
### After Installation
`prettier-config-etv --init`
<br />
OR
<br />
`node_module/.bin/prettier-config-etv`
<br />
OR
<br />

via npx:
`npx prettier-config-etv`

### Steps
After installation user will be prompted if they are using TSLINT, ESLINT or VanillaJs.

### ESLint
After selecting ESLINT user will be prompted for typescrpt usage
<br />
`Is Typescript Exist? (y/n)`
<br />
<b>Option 1: </b>
<br />
`'y'`. ESLINT with Typescript. Following dependencies will be added to your package.json.
<br/>

   a) `ESLint`
   <br/>
   b) `ESLint-Config-Prettier`: ESLint Prettier Mixin.
   <br/>
   c) `ESLint-Config-React-Lint`: ESLint Rules Set.
   <br/>
   d) `ESLint-Plugin-Import`: ESLint Plugin for Import/Expor and ES6+ syntax.
   <br/>
   e) `ESLint-Plugin-Prettier`: ESLint Prettier Plugin.
   <br/>

   ### Overide Default Configuration
   Within `.eslintrc.js` add or remove rules like below:
<br />
   `"rules": {`<br/>
      `'@typescript-eslint/indent': [2, 2]`<br/>
   `}`
<br />
<b>Option 2: </b>
<br />
`'n'`. ESLint with JSX. Following dependencies will be added to your package.json.

   a) `ESLint`
   <br/>
   b) `ESLint-Config-Prettier`: ESLint Prettier Mixin.
   <br/>
   c)` ESLint-Config-Angulars-Lint`: ESLint Rules Set.
   <br />
   d) `ESLint-Plugin-Import`: ESLint Plugin for Import/Expor and ES6+ syntax.
   <br/>
   e) `ESLint-Plugin-Prettier`: ESLint Prettier Plugin.
   <br/>

   <!-- ![Screenshot](https://i.imgur.com/TH0IHxe.png) -->

   ### Overide Default Configuration
   Within `.eslintrc.js` add or remove rules like below:

   `"rules": {`<br/>
      `"semi": [0, "never"],`<br/>
      `"quotes":[ 1, "single", "avoid-escape"]`<br/>
   `}`
   
   <!-- ![Screenshot](https://i.imgur.com/EStlwh4.png) -->

### TSLint
After selecting TSLint following dependencies will be added to your package.json.

   a) `TSLint`
   <br />
   b) `TSLint-Plugin-Prettier`: TSLint Prettier Plugin.

   <!-- ![Screenshot](https://i.imgur.com/9rUfU8B.png) -->

### Overide Default Configuration
   Within `tslint.json` add or remove rules like below:

   `"rules": {`<br/>
      `"semi": [0, "never"],`<br/>
      `"quotes":[ 1, "single", "avoid-escape"]`<br/>
   `}`
   
   <!-- ![Screenshot](https://i.imgur.com/n7KCNMT.png) -->


### Vanillajs

### Overide Default Configuration
   Within `.eslintrc.js` add or remove rules like below:

   `"module.exports"= {`<br/>
      `...require('@prettier-config-etv'),`<br/>
      `semi: false`<br/>
   `}`
   
   <!-- ![Screenshot](https://i.imgur.com/uIeoVvT.png) -->


## Uninstall

If installed via npx:
<br />
<br />
`prettier-config-etv remove` 
<br />
<br />
OR 
<br />
<br />
`node_module/.bin/prettier-config-etv remove`
