-
-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only Run npm-package-json-lint When
package.json
is Present (#2280)
* Link to a PR rather than an issue in changelog * Prefer list.append(x) to list += [x] The former is slightly faster as it generally doesn't create a new list. * Don't warn that REPOSITORY linters are missing Some REPOSITORY linters are intentionally omitted from flavors to keep their size small and performance fast. Hence, their absence from a flavor isn't considered an error when FAIL_IF_MISSING_LINTER_IN_FLAVOR is true. Therefore, omit them from the list of missing linters displayed to the user to avoid confusion. * Simplify check_active_linters_match_flavor Reduce indentation by inverting test, and prefer the more Pythonic test not list to len(list) == 0 for simplicity. Remove some comments rendered unnecessary via this more direct expression of our intent. * Correct capitalization of Docker in a warning * Only lint package.json when present (#2279) npm-package-json-lint only lints Node.js package.json files, so only run it when package.json is present. npm-package-json-lint is correctly omitted from most flavors. Many non-Node.js projects contain other JSON files, so this change prevents false positives when FAIL_IF_MISSING_LINTER_IN_FLAVOR is true.
- Loading branch information
1 parent
33fe169
commit 40631ba
Showing
3 changed files
with
29 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters