From fdfbfc80c0930be84b128ad509eed0b1f7ba7548 Mon Sep 17 00:00:00 2001 From: Vladimir Iakovlev Date: Sat, 13 Aug 2016 18:28:45 +0300 Subject: [PATCH] #N/A: Add `npm_missing_script` rule --- README.md | 1 + tests/rules/test_npm_missing_script.py | 69 ++++++++++++++++++++++++++ tests/rules/test_npm_run_script.py | 2 +- tests/specific/test_npm.py | 26 ++++++++++ thefuck/rules/npm_missing_script.py | 17 +++++++ thefuck/rules/npm_run_script.py | 20 ++------ thefuck/rules/npm_wrong_command.py | 3 ++ thefuck/specific/npm.py | 21 ++++++++ 8 files changed, 141 insertions(+), 18 deletions(-) create mode 100644 tests/rules/test_npm_missing_script.py create mode 100644 tests/specific/test_npm.py create mode 100644 thefuck/rules/npm_missing_script.py create mode 100644 thefuck/specific/npm.py diff --git a/README.md b/README.md index 58be467a..75bf43fc 100644 --- a/README.md +++ b/README.md @@ -200,6 +200,7 @@ using the matched rule and runs it. Rules enabled by default are as follows: * `mkdir_p` – adds `-p` when you trying to create directory without parent; * `mvn_no_command` – adds `clean package` to `mvn`; * `mvn_unknown_lifecycle_phase` – fixes misspelled lifecycle phases with `mvn`; +* `npm_missing_script` – fixes `npm` custom script name in `npm run-script