Skip to content

Latest commit

 

History

History

plugin-remove-useless-escape

@putout/plugin-remove-useless-escape NPM version

🐊Putout plugin adds ability to find and remove useless escape.

Install

npm i @putout/plugin-remove-useless-escape

Rule

{
    "rules": {
        "remove-useless-escape": "on"
    }
}

❌ Example of incorrect code

const t = 'hello \"world\"';
const s1 = `hello \"world\"`;
const s = `hello \'world\'`;
const reg = /\w\:/g;

✅ Example of correct code

const t = 'hello "world"';
const s1 = `hello "world"`;
const s = `hello 'world'`;
const reg = /\w:/g;

Comparison

Linter Rule Fix
🐊 Putout remove-useless-escape
ESLint no-useless-escape

License

MIT