1.0.0 • Published 4 years ago

prettier-config-etv v1.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

Prettier

Prettier Integration with ESLint/TSLint/Typescript

To install package

npm i -g prettier-config-etv OR npm i prettier-config-etv --save

After Installation

prettier-config-etv --init OR node_module/.bin/prettier-config-etv OR

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 Is Typescript Exist? (y/n) Option 1: 'y'. ESLINT with Typescript. Following dependencies will be added to your package.json.

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

Overide Default Configuration

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

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

Overide Default Configuration

Within .eslintrc.js add or remove rules like below:

"rules": { "semi": [0, "never"], "quotes":[ 1, "single", "avoid-escape"] }

TSLint

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

a) TSLint b) TSLint-Plugin-Prettier: TSLint Prettier Plugin.

Overide Default Configuration

Within tslint.json add or remove rules like below:

"rules": { "semi": [0, "never"], "quotes":[ 1, "single", "avoid-escape"] }

Vanillajs

Overide Default Configuration

Within .eslintrc.js add or remove rules like below:

"module.exports"= { ...require('@prettier-config-etv'), semi: false }

Uninstall

If installed via npx: prettier-config-etv remove OR node_module/.bin/prettier-config-etv remove