1.0.6 • Published 1 year ago
prettier-plugin-delete-eslint-disable v1.0.6
prettier-plugin-delete-eslint-disable
Plugin for prettier. Which removes the eslint-disable rules when editing a file and many other useful things
main-branch
develop-branch
npm prettier-plugin-delete-eslint-disable
install
yarn
yarn add -D prettier-plugin-delete-eslint-disableor
npm
npmm install --save-dev prettier-plugin-delete-eslint-disableDeleting comments /* eslint-disable */ in ours code
.prettierrc
{
//...,
"deleteEslintDisable": true
}not remove comment /* eslint-disable */ with comment in ours file // eslint-disable-remove-ignore
// eslint-disable-remove-ignore
/* eslint-disable */Local development
in prettier-plugin-delete-eslint-disable project
npm linkother project
npm link prettier-plugin-delete-eslint-disablewhen ending development other project
npm unlink prettier-plugin-delete-eslint-disableor use yalc
install
npm install -g yalcor
yarn global add yalcin package use command
after the package is ready for verification, run...
npm run local:pushor
yarn local:pushin our (target) project
add this script in yours package.json file
if you use npm
"link:prettier-plugin-delete-eslint-disable": "yalc add prettier-plugin-delete-eslint-disable && yalc link prettier-plugin-delete-eslint-disable && npm install"and run
npm run link:prettier-plugin-delete-eslint-disableor if you use yarn
"link:prettier-plugin-delete-eslint-disable": "yalc add prettier-plugin-delete-eslint-disable && yalc link prettier-plugin-delete-eslint-disable && yarn"yarn link:prettier-plugin-delete-eslint-disableUpdating the .gitignore file
Both the .yalc directory and yalc.lock file that Yalc creates in the root of your Git repo are not intended to be committed to Git.
Therefore it’s probably best to add them to the .gitignore file:
# Yalc
/.yalc
yalc.lockRemoving Yalc packages (elegant way)
if you use npm
"unlink:prettier-plugin-delete-eslint-disable": "yalc remove prettier-plugin-delete-eslint-disable && npm install",npm run unlink:prettier-plugin-delete-eslint-disableor if you use yarn
"unlink:prettier-plugin-delete-eslint-disable": "yalc remove prettier-plugin-delete-eslint-disable && yarn"yarn unlink:prettier-plugin-delete-eslint-disable