Socket
Socket
Sign inDemoInstall

pretty-quick

Package Overview
Dependencies
41
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.10.0 to 1.11.0

dist/processFiles.js

11

bin/pretty-quick.js

@@ -39,2 +39,8 @@ #!/usr/bin/env node

onCheckFile: (file, isFormatted) => {
if (!isFormatted) {
console.log(`⛔️ Check failed: ${chalk.bold(file)}`);
}
},
onExamineFile: file => {

@@ -60,3 +66,8 @@ console.log(`🔍 Examining ${chalk.bold(file)}.`);

}
if (prettyQuickResult.errors.indexOf('CHECK_FAILED') !== -1) {
console.log(
'✗ Code style issues found in the above file(s). Forgot to run Prettier?'
);
}
process.exit(1); // ensure git hooks abort
}

19

dist/index.js

@@ -11,5 +11,5 @@ 'use strict';

var _formatFiles = require('./formatFiles');
var _processFiles = require('./processFiles');
var _formatFiles2 = _interopRequireDefault(_formatFiles);
var _processFiles2 = _interopRequireDefault(_processFiles);

@@ -38,2 +38,3 @@ var _createIgnorer = require('./createIgnorer');

bail,
check,
verbose,

@@ -43,4 +44,5 @@ onFoundSinceRevision,

onPartiallyStagedFile,
onWriteFile,
onExamineFile
onExamineFile,
onCheckFile,
onWriteFile
} = {}) => {

@@ -70,3 +72,4 @@ const scm = (0, _scms2.default)(currentDirectory);

(0, _formatFiles2.default)(directory, changedFiles, {
(0, _processFiles2.default)(directory, changedFiles, {
check,
config,

@@ -87,2 +90,8 @@ onWriteFile: file => {

},
onCheckFile: (file, isFormatted) => {
onCheckFile && onCheckFile(file, isFormatted);
if (!isFormatted) {
failReasons.add('CHECK_FAILED');
}
},
onExamineFile: verbose && onExamineFile

@@ -89,0 +98,0 @@ });

{
"name": "pretty-quick",
"version": "1.10.0",
"version": "1.11.0",
"description": "Get Pretty Quick",

@@ -5,0 +5,0 @@ "repository": "azz/pretty-quick",

@@ -100,6 +100,10 @@ # `pretty-quick`

## `--bail`
### `--bail`
Prevent `git commit` if any files are fixed.
### `--check`
Check that files are correctly formatted, but don't format them. This is useful on CI to verify that all changed files in the current branch were correctly formatted.
<!-- Undocumented = Unsupported :D

@@ -106,0 +110,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc