From ba0df23365f48cea8d0484c08decd1aca2b0b743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C5=9Awi=C4=99cicki?= Date: Tue, 31 Jan 2017 21:03:51 +0100 Subject: [PATCH] [7.0] Remove quotes option (#5154) * remove mention of 'quotes' option from README.md * always infer quotes option's value --- packages/babel-generator/README.md | 1 - packages/babel-generator/src/index.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/babel-generator/README.md b/packages/babel-generator/README.md index e3882c9af2..b71ee3c14f 100644 --- a/packages/babel-generator/README.md +++ b/packages/babel-generator/README.md @@ -35,7 +35,6 @@ comments | boolean | `true` | Should comments be include compact | boolean or `'auto'` | `opts.minified` | Set to `true` to avoid adding whitespace for formatting minified | boolean | `false` | Should the output be minified concise | boolean | `false` | Set to `true` to reduce whitespace (but not as much as `opts.compact`) -quotes | `'single'` or `'double'` | autodetect based on `ast.tokens` | The type of quote to use in the output filename | string | | Used in warning messages jsonCompatibleStrings | boolean | `false` | Set to true to run `jsesc` with "json": true to print "\u00A9" vs. "©"; Options for source maps: diff --git a/packages/babel-generator/src/index.js b/packages/babel-generator/src/index.js index fce0c97a03..f48e7e83d3 100644 --- a/packages/babel-generator/src/index.js +++ b/packages/babel-generator/src/index.js @@ -58,7 +58,7 @@ function normalizeOptions(code, opts, tokens): Format { compact: opts.compact, minified: opts.minified, concise: opts.concise, - quotes: opts.quotes || findCommonStringDelimiter(code, tokens), + quotes: findCommonStringDelimiter(code, tokens), jsonCompatibleStrings: opts.jsonCompatibleStrings, indent: { adjustMultilineComment: true,