prettier-plugin-delete-eslint-disable
v1.0.6
Published
Plugin for prettier. Which removes the eslint-disable rules when editing a file and many other useful things
Downloads
215
Readme
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-disable
or
npm
npmm install --save-dev prettier-plugin-delete-eslint-disable
Deleting 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 link
other project
npm link prettier-plugin-delete-eslint-disable
when ending development other project
npm unlink prettier-plugin-delete-eslint-disable
or use yalc
install
npm install -g yalc
or
yarn global add yalc
in package use command
after the package is ready for verification, run...
npm run local:push
or
yarn local:push
in 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-disable
or 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-disable
Updating 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.lock
Removing 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-disable
or 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