Socket
Socket
Sign inDemoInstall

prettier

Package Overview
Dependencies
Maintainers
2
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier - npm Package Compare versions

Comparing version 0.13.1 to 0.14.0

editors/jetbrains/README.md

18

bin/prettier.js

@@ -194,9 +194,13 @@ #!/usr/bin/env node

if (write) {
fs.writeFile(filename, output, "utf8", err => {
if (err) {
console.error("Unable to write file: " + filename + "\n" + err);
// Don't exit the process if one file failed
process.exitCode = 2;
}
});
// Don't write the file if it won't change in order not to invalidate
// mtime based caches.
if (output !== input) {
fs.writeFile(filename, output, "utf8", err => {
if (err) {
console.error("Unable to write file: " + filename + "\n" + err);
// Don't exit the process if one file failed
process.exitCode = 2;
}
});
}
} else {

@@ -203,0 +207,0 @@ // Don't use `console.log` here since it adds an extra newline at the end.

@@ -0,1 +1,14 @@

# 0.14.0
[link](https://github.com/jlongster/prettier/compare/0.13.0...0.14.0)
* Only write to files if the change (#511)
* Remove extra group when printing object values (#502)
* Add documentation for JetBrains products. (#509)
* Don't print trailing commas for object destructuring and rest (#512)
* Mention eslint-config-prettier (#516)
* [RFC] Keep expanded objects expanded (#495)
* Do not always put an empty lines after directives (#505)
* Print numbers in a uniform way (#498)
# 0.13.0

@@ -2,0 +15,0 @@

{
"name": "prettier",
"version": "0.13.1",
"version": "0.14.0",
"description": "Prettier is an opinionated JavaScript formatter",

@@ -5,0 +5,0 @@ "bin": {

@@ -196,2 +196,8 @@ # Prettier

### JetBrains
JetBrains users can configure `prettier` as an **External Tool** see [this
blog post](https://blog.jetbrains.com/webstorm/2016/08/using-external-tools/) or [this
directory](https://github.com/jlongster/prettier/tree/master/editors/jetbrains) with examples.
More editors are coming soon.

@@ -214,2 +220,3 @@

- [`eslint-plugin-prettier`](https://github.com/not-an-aardvark/eslint-plugin-prettier) plugs `prettier` into your `eslint` workflow
- [`eslint-config-prettier`](https://github.com/lydell/eslint-config-prettier) turns all `eslint` rules that are unnecessary or might conflict with prettier off
- [`prettier-eslint`](https://github.com/kentcdodds/prettier-eslint)

@@ -216,0 +223,0 @@ passes `prettier` output to `eslint --fix`

@@ -162,2 +162,18 @@ "use strict";

function hasNewlineInRange(text, start, end) {
for (var i = start; i <= end; ++i) {
if (text.charAt(i) === "\n") {
return true;
}
}
return false;
}
function isNextLineEmpty(text, node) {
let idx = locEnd(node);
idx = skipToLineEnd(text, idx);
idx = skipNewline(text, idx);
return hasNewline(text, idx);
}
function hasSpaces(text, index, opts) {

@@ -250,5 +266,6 @@ opts = opts || {};

skipSpaces,
skipToLineEnd,
skipNewline,
isNextLineEmpty,
hasNewline,
hasNewlineInRange,
hasSpaces,

@@ -255,0 +272,0 @@ locStart,

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc