diff --git a/.eslintrc.yml b/.eslintrc.yml index 52280121c..e20b2b87f 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -6,8 +6,11 @@ extends: - eslint:recommended - plugin:react/recommended - plugin:prettier/recommended +parserOptions: + ecmaVersion: 2017 plugins: - import + - unicorn rules: curly: error import/no-extraneous-dependencies: @@ -32,3 +35,5 @@ rules: - error - never - exceptRange: true + unicorn/new-for-builtins: error + unicorn/prefer-includes: error diff --git a/changelog_unreleased/markdown/pr-6852.md b/changelog_unreleased/markdown/pr-6852.md new file mode 100644 index 000000000..05c1136e9 --- /dev/null +++ b/changelog_unreleased/markdown/pr-6852.md @@ -0,0 +1,19 @@ +#### Handle zero-based lists correctly ([#6852](https://github.com/prettier/prettier/pull/6852) by [@evilebottnawi](https://github.com/evilebottnawi)) + + +```md + +0. List +1. List +2. List + + +0. List +1. List +1. List + + +0. List +1. List +2. List +``` diff --git a/changelog_unreleased/mdx/pr-6949.md b/changelog_unreleased/mdx/pr-6949.md new file mode 100644 index 000000000..bf24baca1 --- /dev/null +++ b/changelog_unreleased/mdx/pr-6949.md @@ -0,0 +1,43 @@ +#### Fix MDX html parsing errors ([#6949](https://github.com/prettier/prettier/pull/6949) by [@Tigge](https://github.com/Tigge) & [@thorn0](https://github.com/thorn0)) + +MDX parsing for JSX failed when encountering JSX elements that where not +parsable as HTML. Such as `test` + + +````md + + +test + + +
+ hi + { hello } + { /* another comment */} +
+
+ + + +``` +SyntaxError: Unexpected closing tag "Tag". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (1:35) +> 1 | test + | ^ + 2 | + 3 | + 4 |
+``` + + + +test + + +
+ hi + {hello} + {/* another comment */} +
+
+ +```` diff --git a/docs/options.md b/docs/options.md index 00f647107..bc5521774 100644 --- a/docs/options.md +++ b/docs/options.md @@ -97,13 +97,13 @@ Print trailing commas wherever possible when multi-line. (A single-line array, f Valid options: -- `"none"` - No trailing commas. - `"es5"` - Trailing commas where valid in ES5 (objects, arrays, etc.) +- `"none"` - No trailing commas. - `"all"` - Trailing commas wherever possible (including function arguments). This requires node 8 or a [transform](https://babeljs.io/docs/plugins/syntax-trailing-function-commas/). -| Default | CLI Override | API Override | -| -------- | ------------------------------------------------------ | ------------------------------------------------------ | -| `"none"` | --trailing-comma | trailingComma: "" | +| Default | CLI Override | API Override | +| ------- | ------------------------------------------------------ | ------------------------------------------------------ | +| `"es5"` | --trailing-comma | trailingComma: "" | ## Bracket Spacing diff --git a/package.json b/package.json index 7536c355f..d7a289602 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "license": "MIT", "main": "./index.js", "engines": { - "node": ">=8" + "node": ">=10" }, "dependencies": { "@angular/compiler": "8.2.13", @@ -89,8 +89,9 @@ "eslint-plugin-import": "2.18.2", "eslint-plugin-prettier": "3.1.1", "eslint-plugin-react": "7.16.0", + "eslint-plugin-unicorn": "13.0.0", "execa": "3.2.0", - "jest": "23.3.0", + "jest": "24.9.0", "jest-junit": "9.0.0", "jest-snapshot-serializer-ansi": "1.0.0", "jest-snapshot-serializer-raw": "1.1.0", @@ -107,7 +108,7 @@ "rollup-plugin-node-resolve": "5.2.0", "rollup-plugin-terser": "5.1.2", "shelljs": "0.8.3", - "snapshot-diff": "0.4.0", + "snapshot-diff": "0.6.1", "strip-ansi": "5.2.0", "synchronous-promise": "2.0.10", "tempy": "0.2.1", diff --git a/scripts/build/babel-plugins/replace-array-includes-with-indexof.js b/scripts/build/babel-plugins/replace-array-includes-with-indexof.js deleted file mode 100644 index 18514344b..000000000 --- a/scripts/build/babel-plugins/replace-array-includes-with-indexof.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -// -// BEFORE: -// [__something__].includes(__something__) -// CONSTANT_CASE.includes(__something__) -// -// AFTER: -// [__something__].indexOf(__something__) !== -1 -// CONSTANT_CASE.indexOf(__something__) !== -1 -// - -module.exports = ({ types: t }) => ({ - visitor: { - CallExpression(path) { - const node = path.node; - const callee = node.callee; - if ( - t.isMemberExpression(callee, { computed: false }) && - (t.isArrayExpression(callee.object) || - (t.isIdentifier(callee.object) && - (/^[A-Z_]+$/.test(callee.object.name) || - // https://github.com/eemeli/yaml/blob/1005d01/src/Anchors.js#L45 - callee.object.name === "names"))) && - t.isIdentifier(callee.property, { name: "includes" }) - ) { - callee.property.name = "indexOf"; - path.replaceWith(t.binaryExpression("!==", node, t.numericLiteral(-1))); - } - } - } -}); diff --git a/scripts/build/build.js b/scripts/build/build.js index ad5c9fca8..e99f2ef9f 100644 --- a/scripts/build/build.js +++ b/scripts/build/build.js @@ -29,7 +29,7 @@ function fitTerminal(input) { const columns = Math.min(process.stdout.columns || 40, 80); const WIDTH = columns - stringWidth(OK) + 1; if (input.length < WIDTH) { - input += Array(WIDTH - input.length).join(chalk.dim(".")); + input += new Array(WIDTH - input.length).join(chalk.dim(".")); } return input; } @@ -77,7 +77,6 @@ async function cacheFiles() { async function preparePackage() { const pkg = await util.readJson("package.json"); pkg.bin = "./bin-prettier.js"; - pkg.engines.node = ">=4"; delete pkg.dependencies; delete pkg.devDependencies; pkg.scripts = { @@ -99,7 +98,7 @@ async function run(params) { await execa("rm", ["-rf", ".cache"]); } - const bundleCache = new Cache(".cache/", "v19"); + const bundleCache = new Cache(".cache/", "v20"); await bundleCache.load(); console.log(chalk.inverse(" Building packages ")); diff --git a/scripts/build/bundler.js b/scripts/build/bundler.js index 7cdc86387..8af0ef60e 100644 --- a/scripts/build/bundler.js +++ b/scripts/build/bundler.js @@ -47,7 +47,7 @@ function getBabelConfig(bundle) { require.resolve("./babel-plugins/transform-custom-require") ); } - const targets = { node: 4 }; + const targets = { node: "10" }; if (bundle.target === "universal") { // From https://jamie.build/last-2-versions targets.browsers = [">0.25%", "not ie 11", "not op_mini all"]; diff --git a/scripts/build/config.js b/scripts/build/config.js index 1a00fd073..acfc0ef22 100644 --- a/scripts/build/config.js +++ b/scripts/build/config.js @@ -2,9 +2,6 @@ const path = require("path"); const PROJECT_ROOT = path.resolve(__dirname, "../.."); -const babelReplaceArrayIncludesWithIndexof = require.resolve( - "./babel-plugins/replace-array-includes-with-indexof" -); /** * @typedef {Object} Bundle @@ -29,8 +26,7 @@ const babelReplaceArrayIncludesWithIndexof = require.resolve( const parsers = [ { input: "src/language-js/parser-babylon.js", - target: "universal", - babelPlugins: [babelReplaceArrayIncludesWithIndexof] + target: "universal" }, { input: "src/language-js/parser-flow.js", @@ -40,7 +36,6 @@ const parsers = [ { input: "src/language-js/parser-typescript.js", target: "universal", - babelPlugins: [babelReplaceArrayIncludesWithIndexof], replace: { 'require("@microsoft/typescript-etw")': "undefined" } @@ -130,8 +125,7 @@ const parsers = [ replacement: require.resolve("lines-and-columns") } ] - }, - babelPlugins: [babelReplaceArrayIncludesWithIndexof] + } } ].map(parser => { const name = getFileOutput(parser) diff --git a/scripts/release/steps/check-git-status.js b/scripts/release/steps/check-git-status.js index 779addb83..94f27da3c 100644 --- a/scripts/release/steps/check-git-status.js +++ b/scripts/release/steps/check-git-status.js @@ -6,7 +6,7 @@ module.exports = async function() { const status = await execa.stdout("git", ["status", "--porcelain"]); if (status) { - throw Error( + throw new Error( "Uncommitted local changes. " + "Please revert or commit all local changes before making a release." ); diff --git a/scripts/release/steps/generate-bundles.js b/scripts/release/steps/generate-bundles.js index 2b96073b7..16051f512 100644 --- a/scripts/release/steps/generate-bundles.js +++ b/scripts/release/steps/generate-bundles.js @@ -8,7 +8,7 @@ module.exports = async function({ version }) { const builtPkg = await readJson("dist/package.json"); if (builtPkg.version !== version) { - throw Error( + throw new Error( `Expected ${version} in dist/package.json but found ${builtPkg.version}` ); } diff --git a/scripts/release/steps/install-dependencies.js b/scripts/release/steps/install-dependencies.js index 07c5be28d..89453c081 100644 --- a/scripts/release/steps/install-dependencies.js +++ b/scripts/release/steps/install-dependencies.js @@ -9,7 +9,7 @@ async function install() { const status = await execa.stdout("git", ["ls-files", "-m"]); if (status) { - throw Error( + throw new Error( "The lockfile needs to be updated, commit it before making the release." ); } diff --git a/scripts/release/steps/update-changelog.js b/scripts/release/steps/update-changelog.js index d45d5b1b1..b0a61210e 100644 --- a/scripts/release/steps/update-changelog.js +++ b/scripts/release/steps/update-changelog.js @@ -10,8 +10,8 @@ const { waitForEnter } = require("../utils"); function getBlogPostInfo(version) { const date = new Date(); const year = date.getFullYear(); - const month = new String(date.getMonth() + 1).padStart(2, "0"); - const day = new String(date.getDate()).padStart(2, "0"); + const month = String(date.getMonth() + 1).padStart(2, "0"); + const day = String(date.getDate()).padStart(2, "0"); return { file: `website/blog/${year}-${month}-${day}-${version}.md`, diff --git a/scripts/release/steps/validate-new-version.js b/scripts/release/steps/validate-new-version.js index 3f529c0be..65b5323bf 100644 --- a/scripts/release/steps/validate-new-version.js +++ b/scripts/release/steps/validate-new-version.js @@ -5,10 +5,12 @@ const semver = require("semver"); module.exports = async function({ version, previousVersion }) { if (!semver.valid(version)) { - throw Error(`Invalid version specified`); + throw new Error(`Invalid version specified`); } if (!semver.gt(version, previousVersion)) { - throw Error(`Version ${chalk.yellow(version)} has already been published`); + throw new Error( + `Version ${chalk.yellow(version)} has already been published` + ); } }; diff --git a/scripts/release/utils.js b/scripts/release/utils.js index 55a7d940d..833c4aa90 100644 --- a/scripts/release/utils.js +++ b/scripts/release/utils.js @@ -14,7 +14,7 @@ function fitTerminal(input) { const columns = Math.min(process.stdout.columns, 80); const WIDTH = columns - stringWidth(OK) + 1; if (input.length < WIDTH) { - input += Array(WIDTH - input.length).join(chalk.dim(".")); + input += new Array(WIDTH - input.length).join(chalk.dim(".")); } return input; } @@ -38,7 +38,7 @@ function runYarn(script) { script = [script]; } return execa("yarn", ["--silent"].concat(script)).catch(error => { - throw Error(`\`yarn ${script}\` failed\n${error.stdout}`); + throw new Error(`\`yarn ${script}\` failed\n${error.stdout}`); }); } @@ -56,7 +56,7 @@ function waitForEnter() { process.stdin.pause(); resolve(); } else if (key.ctrl && key.name === "c") { - reject(Error("Process terminated by the user")); + reject(new Error("Process terminated by the user")); } } }); diff --git a/src/cli/util.js b/src/cli/util.js index e419a11ec..86da87ac0 100644 --- a/src/cli/util.js +++ b/src/cli/util.js @@ -600,8 +600,7 @@ function createUsage(context) { const lastCategories = constant.categoryOrder.slice(-1); const restCategories = Object.keys(groupedOptions).filter( category => - firstCategories.indexOf(category) === -1 && - lastCategories.indexOf(category) === -1 + !firstCategories.includes(category) && !lastCategories.includes(category) ); const allCategories = firstCategories.concat(restCategories, lastCategories); @@ -659,8 +658,7 @@ function createOptionUsageType(option) { return null; case "choice": return `<${option.choices - .filter(choice => choice.since !== null) - .filter(choice => !choice.deprecated) + .filter(choice => !choice.deprecated && choice.since !== null) .map(choice => choice.value) .join("|")}>`; default: @@ -853,14 +851,14 @@ function createMinimistOptions(detailedOptions) { .map(option => [option.name].concat(option.alias || [])) .reduce((a, b) => a.concat(b)), default: detailedOptions - .filter(option => !option.deprecated) .filter( option => - !option.forwardToApi || - option.name === "plugin" || - option.name === "plugin-search-dir" + !option.deprecated && + (!option.forwardToApi || + option.name === "plugin" || + option.name === "plugin-search-dir") && + option.default !== undefined ) - .filter(option => option.default !== undefined) .reduce( (current, option) => Object.assign({ [option.name]: option.default }, current), @@ -990,9 +988,7 @@ function updateContextArgv(context, plugins, pluginSearchDirs) { function normalizeContextArgv(context, keys) { const detailedOptions = !keys ? context.detailedOptions - : context.detailedOptions.filter( - option => keys.indexOf(option.name) !== -1 - ); + : context.detailedOptions.filter(option => keys.includes(option.name)); const argv = !keys ? context.argv : pick(context.argv, keys); context.argv = optionsNormalizer.normalizeCliOptions(argv, detailedOptions, { diff --git a/src/common/create-ignorer.js b/src/common/create-ignorer.js index 705e1c60d..8996b71d9 100644 --- a/src/common/create-ignorer.js +++ b/src/common/create-ignorer.js @@ -8,11 +8,12 @@ const getFileContentOrNull = require("../utils/get-file-content-or-null"); * @param {undefined | string} ignorePath * @param {undefined | boolean} withNodeModules */ -function createIgnorer(ignorePath, withNodeModules) { - return (!ignorePath - ? Promise.resolve(null) - : getFileContentOrNull(path.resolve(ignorePath)) - ).then(ignoreContent => _createIgnorer(ignoreContent, withNodeModules)); +async function createIgnorer(ignorePath, withNodeModules) { + const ignoreContent = ignorePath + ? await getFileContentOrNull(path.resolve(ignorePath)) + : null; + + return _createIgnorer(ignoreContent, withNodeModules); } /** diff --git a/src/common/get-file-info.js b/src/common/get-file-info.js index ca7b9f0cd..688a98252 100644 --- a/src/common/get-file-info.js +++ b/src/common/get-file-info.js @@ -19,24 +19,21 @@ const path = require("path"); * not an object. A transformation from this array to an object is automatically done * internally by the method wrapper. See withPlugins() in index.js. */ -function getFileInfo(filePath, opts) { +async function getFileInfo(filePath, opts) { if (typeof filePath !== "string") { - return Promise.reject( - new TypeError( - `expect \`filePath\` to be a string, got \`${typeof filePath}\`` - ) + throw new TypeError( + `expect \`filePath\` to be a string, got \`${typeof filePath}\`` ); } - return createIgnorer(opts.ignorePath, opts.withNodeModules).then(ignorer => - _getFileInfo({ - ignorer, - filePath: normalizeFilePath(filePath, opts.ignorePath), - plugins: opts.plugins, - resolveConfig: opts.resolveConfig, - sync: false - }) - ); + const ignorer = await createIgnorer(opts.ignorePath, opts.withNodeModules); + return _getFileInfo({ + ignorer, + filePath: normalizeFilePath(filePath, opts.ignorePath), + plugins: opts.plugins, + resolveConfig: opts.resolveConfig, + sync: false + }); } /** diff --git a/src/common/util.js b/src/common/util.js index 9f13f83c6..4a5667bda 100644 --- a/src/common/util.js +++ b/src/common/util.js @@ -64,7 +64,7 @@ function skip(chars) { if (!chars.test(c)) { return cursor; } - } else if (chars.indexOf(c) === -1) { + } else if (!chars.includes(c)) { return cursor; } diff --git a/src/config/resolve-config.js b/src/config/resolve-config.js index 0c27eed05..a1c47eabf 100644 --- a/src/config/resolve-config.js +++ b/src/config/resolve-config.js @@ -117,11 +117,10 @@ function clearCache() { resolveEditorConfig.clearCache(); } -function resolveConfigFile(filePath) { +async function resolveConfigFile(filePath) { const load = getLoadFunction({ sync: false }); - return load(filePath).then(result => { - return result ? result.filepath : null; - }); + const result = await load(filePath); + return result ? result.filepath : null; } resolveConfigFile.sync = filePath => { diff --git a/src/language-css/clean.js b/src/language-css/clean.js index 054428ce7..fcfee341b 100644 --- a/src/language-css/clean.js +++ b/src/language-css/clean.js @@ -63,9 +63,9 @@ function clean(ast, newObj, parent) { if ( (ast.type === "value-word" && ((ast.isColor && ast.isHex) || - ["initial", "inherit", "unset", "revert"].indexOf( + ["initial", "inherit", "unset", "revert"].includes( newObj.value.replace().toLowerCase() - ) !== -1)) || + ))) || ast.type === "media-feature" || ast.type === "selector-root-invalid" || ast.type === "selector-pseudo" @@ -140,7 +140,7 @@ function clean(ast, newObj, parent) { if (ast.type === "selector-tag") { const lowercasedValue = ast.value.toLowerCase(); - if (["from", "to"].indexOf(lowercasedValue) !== -1) { + if (["from", "to"].includes(lowercasedValue)) { newObj.value = lowercasedValue; } } diff --git a/src/language-css/parser-postcss.js b/src/language-css/parser-postcss.js index 447a8593e..d0e2287c4 100644 --- a/src/language-css/parser-postcss.js +++ b/src/language-css/parser-postcss.js @@ -442,7 +442,7 @@ function parseNestedCSS(node, options) { "return", "define-mixin", "add-mixin" - ].indexOf(name) !== -1 + ].includes(name) ) { // Remove unnecessary spaces in SCSS variable arguments params = params.replace(/(\$\S+?)\s+?\.\.\./, "$1..."); @@ -465,7 +465,7 @@ function parseNestedCSS(node, options) { return node; } - if (["media", "custom-media"].indexOf(lowercasedName) !== -1) { + if (["media", "custom-media"].includes(lowercasedName)) { if (params.includes("#{")) { // Workaround for media at rule with scss interpolation return { diff --git a/src/language-css/printer-postcss.js b/src/language-css/printer-postcss.js index b2b57ab00..8b3f7f7c0 100644 --- a/src/language-css/printer-postcss.js +++ b/src/language-css/printer-postcss.js @@ -118,7 +118,7 @@ function genericPrint(path, options, print) { const rawText = node.raws.text || node.text; // Workaround a bug where the location is off. // https://github.com/postcss/postcss-scss/issues/63 - if (text.indexOf(rawText) === -1) { + if (!text.includes(rawText)) { if (node.raws.inline) { return concat(["// ", rawText]); } @@ -512,7 +512,7 @@ function genericPrint(path, options, print) { // Ignore escape `\` if ( iNode.value && - iNode.value.indexOf("\\") !== -1 && + iNode.value.includes("\\") && iNextNode && iNextNode.type !== "value-comment" ) { @@ -907,7 +907,7 @@ const STRING_REGEX = /(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g; const NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g; const STANDARD_UNIT_REGEX = /[a-zA-Z]+/g; const WORD_PART_REGEX = /[$@]?[a-zA-Z_\u0080-\uFFFF][\w\-\u0080-\uFFFF]*/g; -const ADJUST_NUMBERS_REGEX = RegExp( +const ADJUST_NUMBERS_REGEX = new RegExp( STRING_REGEX.source + `|` + `(${WORD_PART_REGEX.source})?` + diff --git a/src/language-css/utils.js b/src/language-css/utils.js index a45e666ca..cb8583448 100644 --- a/src/language-css/utils.js +++ b/src/language-css/utils.js @@ -35,7 +35,7 @@ function getAncestorCounter(path, typeOrTypes) { let ancestorNode; while ((ancestorNode = path.getParentNode(++counter))) { - if (types.indexOf(ancestorNode.type) !== -1) { + if (types.includes(ancestorNode.type)) { return counter; } } @@ -67,9 +67,8 @@ function isSCSS(parser, text) { } function isWideKeywords(value) { - return ( - ["initial", "inherit", "unset", "revert"].indexOf(value.toLowerCase()) !== - -1 + return ["initial", "inherit", "unset", "revert"].includes( + value.toLowerCase() ); } @@ -79,7 +78,7 @@ function isKeyframeAtRuleKeywords(path, value) { atRuleAncestorNode && atRuleAncestorNode.name && atRuleAncestorNode.name.toLowerCase().endsWith("keyframes") && - ["from", "to"].indexOf(value.toLowerCase()) !== -1 + ["from", "to"].includes(value.toLowerCase()) ); } @@ -122,7 +121,7 @@ function insideAtRuleNode(path, atRuleNameOrAtRuleNames) { return ( atRuleAncestorNode && - atRuleNames.indexOf(atRuleAncestorNode.name.toLowerCase()) !== -1 + atRuleNames.includes(atRuleAncestorNode.name.toLowerCase()) ); } @@ -168,14 +167,13 @@ function isDetachedRulesetDeclarationNode(node) { function isForKeywordNode(node) { return ( node.type === "value-word" && - ["from", "through", "end"].indexOf(node.value) !== -1 + ["from", "through", "end"].includes(node.value) ); } function isIfElseKeywordNode(node) { return ( - node.type === "value-word" && - ["and", "or", "not"].indexOf(node.value) !== -1 + node.type === "value-word" && ["and", "or", "not"].includes(node.value) ); } @@ -214,20 +212,19 @@ function isMathOperatorNode(node) { } function isEqualityOperatorNode(node) { - return node.type === "value-word" && ["==", "!="].indexOf(node.value) !== -1; + return node.type === "value-word" && ["==", "!="].includes(node.value); } function isRelationalOperatorNode(node) { return ( - node.type === "value-word" && - ["<", ">", "<=", ">="].indexOf(node.value) !== -1 + node.type === "value-word" && ["<", ">", "<=", ">="].includes(node.value) ); } function isSCSSControlDirectiveNode(node) { return ( node.type === "css-atrule" && - ["if", "else", "for", "each", "while"].indexOf(node.name) !== -1 + ["if", "else", "for", "each", "while"].includes(node.name) ); } @@ -363,7 +360,7 @@ function isRightCurlyBraceNode(node) { } function isWordNode(node) { - return ["value-word", "value-atword"].indexOf(node.type) !== -1; + return ["value-word", "value-atword"].includes(node.type); } function isColonNode(node) { @@ -371,9 +368,7 @@ function isColonNode(node) { } function isMediaAndSupportsKeywords(node) { - return ( - node.value && ["not", "and", "or"].indexOf(node.value.toLowerCase()) !== -1 - ); + return node.value && ["not", "and", "or"].includes(node.value.toLowerCase()); } function isColorAdjusterFuncNode(node) { @@ -381,7 +376,7 @@ function isColorAdjusterFuncNode(node) { return false; } - return colorAdjusterFunctions.indexOf(node.value.toLowerCase()) !== -1; + return colorAdjusterFunctions.includes(node.value.toLowerCase()); } module.exports = { diff --git a/src/language-graphql/printer-graphql.js b/src/language-graphql/printer-graphql.js index 70f0df48a..8b7948804 100644 --- a/src/language-graphql/printer-graphql.js +++ b/src/language-graphql/printer-graphql.js @@ -653,7 +653,7 @@ function canAttachComment(node) { function printComment(commentPath) { const comment = commentPath.getValue(); if (comment.kind === "Comment") { - return "#" + comment.value.trimRight(); + return "#" + comment.value.trimEnd(); } throw new Error("Not a comment: " + JSON.stringify(comment)); diff --git a/src/language-handlebars/printer-glimmer.js b/src/language-handlebars/printer-glimmer.js index 55631ea7b..6fd2a9abf 100644 --- a/src/language-handlebars/printer-glimmer.js +++ b/src/language-handlebars/printer-glimmer.js @@ -68,7 +68,7 @@ function print(path, options, print) { } case "ElementNode": { const tagFirstChar = n.tag[0]; - const isLocal = n.tag.indexOf(".") !== -1; + const isLocal = n.tag.includes("."); const isGlimmerComponent = tagFirstChar.toUpperCase() === tagFirstChar || isLocal; const hasChildren = n.children.length > 0; @@ -79,7 +79,7 @@ function print(path, options, print) { const isVoid = (isGlimmerComponent && (!hasChildren || !hasNonWhitespaceChildren)) || - voidTags.indexOf(n.tag) !== -1; + voidTags.includes(n.tag); const closeTagForNoBreak = isVoid ? concat([" />", softline]) : ">"; const closeTagForBreak = isVoid ? "/>" : ">"; const getParams = (path, print) => @@ -275,7 +275,7 @@ function print(path, options, print) { // preserve a space inside of an attribute node where whitespace present, // when next to mustache statement. - const inAttrNode = path.stack.indexOf("attributes") >= 0; + const inAttrNode = path.stack.includes("attributes"); if (inAttrNode) { const parentNode = path.getParentNode(0); const isConcat = parentNode.type === "ConcatStatement"; @@ -334,7 +334,7 @@ function print(path, options, print) { ); } case "MustacheCommentStatement": { - const dashes = n.value.indexOf("}}") > -1 ? "--" : ""; + const dashes = n.value.includes("}}") ? "--" : ""; return concat(["{{!", dashes, n.value, dashes, "}}"]); } case "PathExpression": { diff --git a/src/language-html/printer-html.js b/src/language-html/printer-html.js index ebf2ce56b..02e45f3a3 100644 --- a/src/language-html/printer-html.js +++ b/src/language-html/printer-html.js @@ -631,7 +631,7 @@ function printOpeningTag(path, options, print) { typeof ignoreAttributeData === "boolean" ? () => ignoreAttributeData : Array.isArray(ignoreAttributeData) - ? attr => ignoreAttributeData.indexOf(attr.rawName) !== -1 + ? attr => ignoreAttributeData.includes(attr.rawName) : () => false; return path.map(attrPath => { const attr = attrPath.getValue(); diff --git a/src/language-html/utils.js b/src/language-html/utils.js index 0b7827312..a923aeb8e 100644 --- a/src/language-html/utils.js +++ b/src/language-html/utils.js @@ -62,13 +62,13 @@ function shouldPreserveContent(node, options) { options.parser === "vue" && node.type === "element" && node.parent.type === "root" && - [ + ![ "template", "style", "script", // vue parser can be used for vue dom template as well, so we should still format top-level "html" - ].indexOf(node.fullName) === -1 + ].includes(node.fullName) ) { return true; } @@ -272,7 +272,7 @@ function forceBreakContent(node) { forceBreakChildren(node) || (node.type === "element" && node.children.length !== 0 && - (["body", "script", "style"].indexOf(node.name) !== -1 || + (["body", "script", "style"].includes(node.name) || node.children.some(child => hasNonTextChild(child)))) || (node.firstChild && node.firstChild === node.lastChild && @@ -287,7 +287,7 @@ function forceBreakChildren(node) { return ( node.type === "element" && node.children.length !== 0 && - (["html", "head", "ul", "ol", "select"].indexOf(node.name) !== -1 || + (["html", "head", "ul", "ol", "select"].includes(node.name) || (node.cssDisplay.startsWith("table") && node.cssDisplay !== "table-cell")) ); } @@ -339,7 +339,7 @@ function preferHardlineAsSurroundingSpaces(node) { case "directive": return true; case "element": - return ["script", "select"].indexOf(node.name) !== -1; + return ["script", "select"].includes(node.name); } return false; } diff --git a/src/language-js/embed.js b/src/language-js/embed.js index 0e5454648..f556ebc4b 100644 --- a/src/language-js/embed.js +++ b/src/language-js/embed.js @@ -615,7 +615,7 @@ function printHtmlTemplateLiteral( return "``"; } - const placeholderRegex = RegExp(composePlaceholder("(\\d+)"), "g"); + const placeholderRegex = new RegExp(composePlaceholder("(\\d+)"), "g"); const contentDoc = mapDoc( stripTrailingHardline(textToDoc(text, { parser })), diff --git a/src/language-js/options.js b/src/language-js/options.js index daf365f98..f8f21ea6a 100644 --- a/src/language-js/options.js +++ b/src/language-js/options.js @@ -76,16 +76,17 @@ module.exports = { type: "choice", default: [ { since: "0.0.0", value: false }, - { since: "0.19.0", value: "none" } + { since: "0.19.0", value: "none" }, + { since: "2.0.0", value: "es5" } ], description: "Print trailing commas wherever possible when multi-line.", choices: [ - { value: "none", description: "No trailing commas." }, { value: "es5", description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" }, + { value: "none", description: "No trailing commas." }, { value: "all", description: diff --git a/src/language-js/pragma.js b/src/language-js/pragma.js index 6bd14660c..ca67d5cc9 100644 --- a/src/language-js/pragma.js +++ b/src/language-js/pragma.js @@ -4,7 +4,7 @@ const docblock = require("jest-docblock"); function hasPragma(text) { const pragmas = Object.keys(docblock.parse(docblock.extract(text))); - return pragmas.indexOf("prettier") !== -1 || pragmas.indexOf("format") !== -1; + return pragmas.includes("prettier") || pragmas.includes("format"); } function insertPragma(text) { diff --git a/src/language-js/preprocess.js b/src/language-js/preprocess.js index 57489c7b7..fc39070b8 100644 --- a/src/language-js/preprocess.js +++ b/src/language-js/preprocess.js @@ -10,7 +10,8 @@ function preprocess(ast, options) { return Object.assign({}, ast, { type: options.parser.startsWith("__") ? "JsExpressionRoot" : "JsonRoot", node: ast, - comments: [] + comments: [], + rootMarker: options.rootMarker }); default: return ast; diff --git a/src/language-js/printer-estree.js b/src/language-js/printer-estree.js index 9c588dfb6..0725c2dae 100644 --- a/src/language-js/printer-estree.js +++ b/src/language-js/printer-estree.js @@ -120,6 +120,16 @@ const { let uid = 0; function shouldPrintComma(options, level) { + // angular does not allow trailing comma + if ( + options.parser === "__ng_interpolation" || + options.parser === "__ng_action" || + options.parser === "__ng_binding" || + options.parser === "__ng_directive" + ) { + return false; + } + level = level || "es5"; switch (options.trailingComma) { @@ -231,7 +241,7 @@ function genericPrint(path, options, printPath, args) { const node = path.getValue(); if (hasFlowShorthandAnnotationComment(node)) { parts.push(" /*"); - parts.push(node.trailingComments[0].value.trimLeft()); + parts.push(node.trailingComments[0].value.trimStart()); parts.push("*/"); node.trailingComments[0].printed = true; } @@ -3550,7 +3560,7 @@ function printPathNoParens(path, options, print, args) { path.call(print, "node"), !n.node.comments || n.node.comments.length === 0 ? [] - : concat([" //", n.node.comments[0].value.trimRight()]) + : concat([" //", n.node.comments[0].value.trimEnd()]) ) ); case "NGChainedExpression": @@ -3899,11 +3909,11 @@ function printJestEachTemplateLiteral(node, expressions, options) { const correspondingExpression = stringifiedExpressions[i - 1]; row.cells.push(correspondingExpression); - if (correspondingExpression.indexOf("\n") !== -1) { + if (correspondingExpression.includes("\n")) { row.hasLineBreak = true; } - if (node.quasis[i].value.raw.indexOf("\n") !== -1) { + if (node.quasis[i].value.raw.includes("\n")) { tableBody.push({ hasLineBreak: false, cells: [] }); } } @@ -5388,8 +5398,12 @@ function printJSXElement(path, options, print) { containsMultipleAttributes || containsMultipleExpressions; + const isMdxBlock = path.getParentNode().rootMarker === "mdx"; + const rawJsxWhitespace = options.singleQuote ? "{' '}" : '{" "}'; - const jsxWhitespace = ifBreak(concat([rawJsxWhitespace, softline]), " "); + const jsxWhitespace = isMdxBlock + ? concat([" "]) + : ifBreak(concat([rawJsxWhitespace, softline]), " "); const isFacebookTranslationTag = n.openingElement && @@ -5404,8 +5418,7 @@ function printJSXElement(path, options, print) { isFacebookTranslationTag ); - const containsText = - n.children.filter(child => isMeaningfulJSXText(child)).length > 0; + const containsText = n.children.some(child => isMeaningfulJSXText(child)); // We can end up we multiple whitespace elements with empty string // content between them. @@ -5509,6 +5522,10 @@ function printJSXElement(path, options, print) { ? fill(multilineChildren) : group(concat(multilineChildren), { shouldBreak: true }); + if (isMdxBlock) { + return content; + } + const multiLineElem = group( concat([ openingLines, @@ -5852,16 +5869,16 @@ function shouldHugType(node) { n.type === "TSNullKeyword" ).length; - const objectCount = node.types.filter( + const hasObject = node.types.some( n => n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral" || // This is a bit aggressive but captures Array<{x}> n.type === "GenericTypeAnnotation" || n.type === "TSTypeReference" - ).length; + ); - if (node.types.length - 1 === voidCount && objectCount > 0) { + if (node.types.length - 1 === voidCount && hasObject) { return true; } } @@ -5987,9 +6004,9 @@ function printComment(commentPath, options) { if ( options.originalText.slice(options.locStart(comment)).startsWith("#!") ) { - return "#!" + comment.value.trimRight(); + return "#!" + comment.value.trimEnd(); } - return "//" + comment.value.trimRight(); + return "//" + comment.value.trimEnd(); default: throw new Error("Not a comment: " + JSON.stringify(comment)); } @@ -6013,8 +6030,8 @@ function printIndentableBlockComment(comment) { hardline, lines.map((line, index) => index === 0 - ? line.trimRight() - : " " + (index < lines.length - 1 ? line.trim() : line.trimLeft()) + ? line.trimEnd() + : " " + (index < lines.length - 1 ? line.trim() : line.trimStart()) ) ), "*/" diff --git a/src/language-js/utils.js b/src/language-js/utils.js index 6fb301d56..fb51d4f2d 100644 --- a/src/language-js/utils.js +++ b/src/language-js/utils.js @@ -298,7 +298,7 @@ function isSimpleFlowType(node) { return ( node && - flowTypeAnnotations.indexOf(node.type) !== -1 && + flowTypeAnnotations.includes(node.type) && !(node.type === "GenericTypeAnnotation" && node.typeParameters) ); } diff --git a/src/language-markdown/embed.js b/src/language-markdown/embed.js index bd5339131..29261f35e 100644 --- a/src/language-markdown/embed.js +++ b/src/language-markdown/embed.js @@ -57,7 +57,10 @@ function embed(path, print, textToDoc, options) { case "importExport": return textToDoc(node.value, { parser: "babel" }); case "jsx": - return textToDoc(node.value, { parser: "__js_expression" }); + return textToDoc(`<$>${node.value}`, { + parser: "__js_expression", + rootMarker: "mdx" + }); } return null; @@ -69,7 +72,7 @@ function embed(path, print, textToDoc, options) { const language = supportInfo.languages.find( language => language.name.toLowerCase() === lang || - (language.aliases && language.aliases.indexOf(lang) !== -1) || + (language.aliases && language.aliases.includes(lang)) || (language.extensions && language.extensions.find(ext => ext.substring(1) === lang)) ); diff --git a/src/language-markdown/parser-markdown.js b/src/language-markdown/parser-markdown.js index 30b0b41b0..2881da96d 100644 --- a/src/language-markdown/parser-markdown.js +++ b/src/language-markdown/parser-markdown.js @@ -7,7 +7,6 @@ const parseFrontMatter = require("../utils/front-matter"); const { mapAst, INLINE_NODE_WRAPPER_TYPES } = require("./utils"); const mdx = require("./mdx"); const remarkMath = require("remark-math"); -const htmlParser = require("../language-html/parser-html").parsers.html; /** * based on [MDAST](https://github.com/syntax-tree/mdast) with following modifications: @@ -55,34 +54,12 @@ function htmlToJsx() { if ( node.type !== "html" || node.value.match(mdx.COMMENT_REGEX) || - INLINE_NODE_WRAPPER_TYPES.indexOf(parent.type) !== -1 + INLINE_NODE_WRAPPER_TYPES.includes(parent.type) ) { return node; } - const nodes = htmlParser.parse(node.value).children; - - // find out if there are adjacent JSX elements which should be allowed in mdx alike in markdown - if (nodes.length <= 1) { - return Object.assign({}, node, { type: "jsx" }); - } - - return nodes.reduce((newNodes, { sourceSpan: position, type }) => { - const value = node.value.slice( - position.start.offset, - position.end.offset - ); - - if (value) { - newNodes.push({ - type: type === "element" ? "jsx" : type, - value, - position - }); - } - - return newNodes; - }, []); + return Object.assign({}, node, { type: "jsx" }); }); } diff --git a/src/language-markdown/pragma.js b/src/language-markdown/pragma.js index 070fb50db..4ca546c0f 100644 --- a/src/language-markdown/pragma.js +++ b/src/language-markdown/pragma.js @@ -19,7 +19,8 @@ function startWithPragma(text) { module.exports = { startWithPragma, - hasPragma: text => startWithPragma(parseFrontMatter(text).content.trimLeft()), + hasPragma: text => + startWithPragma(parseFrontMatter(text).content.trimStart()), insertPragma: text => { const extracted = parseFrontMatter(text); const pragma = ``; diff --git a/src/language-markdown/preprocess.js b/src/language-markdown/preprocess.js index 08caf1e91..edeaa09fd 100644 --- a/src/language-markdown/preprocess.js +++ b/src/language-markdown/preprocess.js @@ -120,10 +120,10 @@ function splitTextIntoSentences(ast, options) { if (parentNode.type === "paragraph") { if (index === 0) { - value = value.trimLeft(); + value = value.trimStart(); } if (index === parentNode.children.length - 1) { - value = value.trimRight(); + value = value.trimEnd(); } } diff --git a/src/language-markdown/printer-markdown.js b/src/language-markdown/printer-markdown.js index 16571274c..6ab4fb4cb 100644 --- a/src/language-markdown/printer-markdown.js +++ b/src/language-markdown/printer-markdown.js @@ -25,7 +25,7 @@ const { } = require("../doc"); const { getFencedCodeBlockValue, - getOrderedListItemInfo, + hasGitDiffFriendlyOrderedList, splitText, punctuationPattern, INLINE_NODE_TYPES, @@ -35,12 +35,7 @@ const { replaceEndOfLineWith } = require("../common/util"); const TRAILING_HARDLINE_NODES = ["importExport"]; const SINGLE_LINE_NODE_TYPES = ["heading", "tableCell", "link"]; -const SIBLING_NODE_TYPES = [ - "listItem", - "definition", - "footnoteDefinition", - "jsx" -]; +const SIBLING_NODE_TYPES = ["listItem", "definition", "footnoteDefinition"]; function genericPrint(path, options, print) { const node = path.getValue(); @@ -70,7 +65,7 @@ function genericPrint(path, options, print) { } return concat([ normalizeDoc(printRoot(path, options, print)), - TRAILING_HARDLINE_NODES.indexOf(getLastDescendantNode(node).type) === -1 + !TRAILING_HARDLINE_NODES.includes(getLastDescendantNode(node).type) ? hardline : "" ]); @@ -235,7 +230,7 @@ function genericPrint(path, options, print) { const value = parentNode.type === "root" && privateUtil.getLast(parentNode.children) === node - ? node.value.trimRight() + ? node.value.trimEnd() : node.value; const isHtmlComment = /^$/.test(value); return concat( @@ -251,11 +246,10 @@ function genericPrint(path, options, print) { path.getParentNode() ); - const isGitDiffFriendlyOrderedList = - node.ordered && - node.children.length > 1 && - +getOrderedListItemInfo(node.children[1], options.originalText) - .numberText === 1; + const isGitDiffFriendlyOrderedList = hasGitDiffFriendlyOrderedList( + node, + options + ); return printChildren(path, options, print, { processor: (childPath, index) => { @@ -488,7 +482,7 @@ function getAncestorCounter(path, typeOrTypes) { let ancestorNode; while ((ancestorNode = path.getParentNode(++counter))) { - if (types.indexOf(ancestorNode.type) !== -1) { + if (types.includes(ancestorNode.type)) { return counter; } } @@ -723,7 +717,7 @@ function printChildren(path, options, print, events) { if ( lastChildNode && - TRAILING_HARDLINE_NODES.indexOf(lastChildNode.type) !== -1 + TRAILING_HARDLINE_NODES.includes(lastChildNode.type) ) { if (shouldPrePrintTripleHardline(childNode, data)) { parts.push(hardline); @@ -770,55 +764,34 @@ function isPrettierIgnore(node) { return match === null ? false : match[1] ? match[1] : "next"; } -function isInlineNode(node) { - return node && INLINE_NODE_TYPES.indexOf(node.type) !== -1; -} - -function isEndsWithHardLine(node) { - return node && /\n+$/.test(node.value); -} - -function last(nodes) { - return nodes && nodes[nodes.length - 1]; -} - -function shouldNotPrePrintHardline(node, { parentNode, parts, prevNode }) { - const isFirstNode = parts.length === 0; +function shouldNotPrePrintHardline(node, data) { + const isFirstNode = data.parts.length === 0; + const isInlineNode = INLINE_NODE_TYPES.includes(node.type); const isInlineHTML = node.type === "html" && - INLINE_NODE_WRAPPER_TYPES.indexOf(parentNode.type) !== -1; + INLINE_NODE_WRAPPER_TYPES.includes(data.parentNode.type); - const isAfterHardlineNode = - prevNode && - (isEndsWithHardLine(prevNode) || - isEndsWithHardLine(last(prevNode.children))); - - return ( - isFirstNode || isInlineNode(node) || isInlineHTML || isAfterHardlineNode - ); + return isFirstNode || isInlineNode || isInlineHTML; } -function shouldPrePrintDoubleHardline(node, { parentNode, prevNode }) { - const prevNodeType = prevNode && prevNode.type; - const nodeType = node.type; +function shouldPrePrintDoubleHardline(node, data) { + const isSequence = (data.prevNode && data.prevNode.type) === node.type; + const isSiblingNode = isSequence && SIBLING_NODE_TYPES.includes(node.type); - const isSequence = prevNodeType === nodeType; - const isSiblingNode = - isSequence && SIBLING_NODE_TYPES.indexOf(nodeType) !== -1; + const isInTightListItem = + data.parentNode.type === "listItem" && !data.parentNode.loose; - const isInTightListItem = parentNode.type === "listItem" && !parentNode.loose; - const isPrevNodeLooseListItem = prevNodeType === "listItem" && prevNode.loose; - const isPrevNodePrettierIgnore = isPrettierIgnore(prevNode) === "next"; + const isPrevNodeLooseListItem = + data.prevNode && data.prevNode.type === "listItem" && data.prevNode.loose; + + const isPrevNodePrettierIgnore = isPrettierIgnore(data.prevNode) === "next"; const isBlockHtmlWithoutBlankLineBetweenPrevHtml = - nodeType === "html" && - prevNodeType === "html" && - prevNode.position.end.line + 1 === node.position.start.line; - - const isJsxInlineSibling = - (prevNodeType === "jsx" && isInlineNode(node)) || - (nodeType === "jsx" && isInlineNode(prevNode)); + node.type === "html" && + data.prevNode && + data.prevNode.type === "html" && + data.prevNode.position.end.line + 1 === node.position.start.line; return ( isPrevNodeLooseListItem || @@ -826,8 +799,7 @@ function shouldPrePrintDoubleHardline(node, { parentNode, prevNode }) { isSiblingNode || isInTightListItem || isPrevNodePrettierIgnore || - isBlockHtmlWithoutBlankLineBetweenPrevHtml || - isJsxInlineSibling + isBlockHtmlWithoutBlankLineBetweenPrevHtml ) ); } diff --git a/src/language-markdown/utils.js b/src/language-markdown/utils.js index 702c7ccb7..dd1f00528 100644 --- a/src/language-markdown/utils.js +++ b/src/language-markdown/utils.js @@ -162,6 +162,34 @@ function getOrderedListItemInfo(orderListItem, originalText) { return { numberText, marker, leadingSpaces }; } +function hasGitDiffFriendlyOrderedList(node, options) { + if (!node.ordered) { + return false; + } + + if (node.children.length < 2) { + return false; + } + + const firstNumber = Number( + getOrderedListItemInfo(node.children[0], options.originalText).numberText + ); + + const secondNumber = Number( + getOrderedListItemInfo(node.children[1], options.originalText).numberText + ); + + if (firstNumber === 0 && node.children.length > 2) { + const thirdNumber = Number( + getOrderedListItemInfo(node.children[2], options.originalText).numberText + ); + + return secondNumber === 1 && thirdNumber === 1; + } + + return secondNumber === 1; +} + // workaround for https://github.com/remarkjs/remark/issues/351 // leading and trailing newlines are stripped by remark function getFencedCodeBlockValue(node, originalText) { @@ -202,21 +230,11 @@ function mapAst(ast, handler) { return (function preorder(node, index, parentStack) { parentStack = parentStack || []; - let newNode = handler(node, index, parentStack); - if (Array.isArray(newNode)) { - return newNode; - } - - newNode = Object.assign({}, newNode); + const newNode = Object.assign({}, handler(node, index, parentStack)); if (newNode.children) { - newNode.children = newNode.children.reduce((nodes, child, index) => { - let newNodes = preorder(child, index, [newNode].concat(parentStack)); - if (!Array.isArray(newNodes)) { - newNodes = [newNodes]; - } - nodes.push.apply(nodes, newNodes); - return nodes; - }, []); + newNode.children = newNode.children.map((child, index) => { + return preorder(child, index, [newNode].concat(parentStack)); + }); } return newNode; @@ -229,6 +247,7 @@ module.exports = { punctuationPattern, getFencedCodeBlockValue, getOrderedListItemInfo, + hasGitDiffFriendlyOrderedList, INLINE_NODE_TYPES, INLINE_NODE_WRAPPER_TYPES }; diff --git a/src/language-yaml/printer-yaml.js b/src/language-yaml/printer-yaml.js index 96d757a2b..8ab01f211 100644 --- a/src/language-yaml/printer-yaml.js +++ b/src/language-yaml/printer-yaml.js @@ -670,7 +670,7 @@ function isAbsolutelyPrintedAsSingleLineNode(node, options) { switch (options.proseWrap) { case "never": - return node.value.indexOf("\n") === -1; + return !node.value.includes("\n"); case "always": return !/[\n ]/.test(node.value); // istanbul ignore next diff --git a/src/language-yaml/utils.js b/src/language-yaml/utils.js index 4a1e8d74c..7a562f0bd 100644 --- a/src/language-yaml/utils.js +++ b/src/language-yaml/utils.js @@ -22,7 +22,7 @@ function isNode(value, types) { return ( value && typeof value.type === "string" && - (!types || types.indexOf(value.type) !== -1) + (!types || types.includes(value.type)) ); } @@ -198,8 +198,8 @@ function getFlowScalarLineContents(nodeType, content, options) { : index !== 0 && index !== lineContents.length - 1 ? lineContent.trim() : index === 0 - ? lineContent.trimRight() - : lineContent.trimLeft() + ? lineContent.trimEnd() + : lineContent.trimStart() ); if (options.proseWrap === "preserve") { diff --git a/src/main/core.js b/src/main/core.js index 0f37afe6a..7c2cc6e63 100644 --- a/src/main/core.js +++ b/src/main/core.js @@ -60,7 +60,7 @@ function attachComments(text, ast, opts) { comments.attach(astComments, ast, text, opts); } ast.tokens = []; - opts.originalText = opts.parser === "yaml" ? text : text.trimRight(); + opts.originalText = opts.parser === "yaml" ? text : text.trimEnd(); return astComments; } @@ -90,7 +90,7 @@ function coreFormat(text, opts, addAlignmentSize) { opts.endOfLine === "lf" ? doc : mapDoc(doc, currentDoc => - typeof currentDoc === "string" && currentDoc.indexOf("\n") !== -1 + typeof currentDoc === "string" && currentDoc.includes("\n") ? currentDoc.replace(/\n/g, eol) : currentDoc ), @@ -167,7 +167,7 @@ function coreFormat(text, opts, addAlignmentSize) { let cursorOffset = newCursorNodeStart; for (const entry of cursorNodeDiff) { if (entry.removed) { - if (entry.value.indexOf(CURSOR) > -1) { + if (entry.value.includes(CURSOR)) { break; } } else { @@ -221,7 +221,7 @@ function formatRange(text, opts) { // Since the range contracts to avoid trailing whitespace, // we need to remove the newline that was inserted by the `format` call. - const rangeTrimmed = rangeResult.formatted.trimRight(); + const rangeTrimmed = rangeResult.formatted.trimEnd(); const rangeLeft = text.slice(0, rangeStart); const rangeRight = text.slice(rangeEnd); @@ -293,7 +293,7 @@ function format(text, opts) { const hasRangeEnd = opts.rangeEnd < text.length; // get rid of CR/CRLF parsing - if (text.indexOf("\r") !== -1) { + if (text.includes("\r")) { const offsetKeys = [ hasCursor && "cursorOffset", hasRangeStart && "rangeStart", @@ -372,7 +372,7 @@ module.exports = { parse(text, opts, massage) { opts = normalizeOptions(opts); - if (text.indexOf("\r") !== -1) { + if (text.includes("\r")) { text = text.replace(/\r\n?/g, "\n"); } const parsed = parser.parse(text, opts); diff --git a/src/main/massage-ast.js b/src/main/massage-ast.js index 4d06c81aa..3bfeb2828 100644 --- a/src/main/massage-ast.js +++ b/src/main/massage-ast.js @@ -2,7 +2,7 @@ function massageAST(ast, options, parent) { if (Array.isArray(ast)) { - return ast.map(e => massageAST(e, options, parent)).filter(e => e); + return ast.map(e => massageAST(e, options, parent)).filter(Boolean); } if (!ast || typeof ast !== "object") { diff --git a/src/main/options-normalizer.js b/src/main/options-normalizer.js index a46a579df..73c8eb695 100644 --- a/src/main/options-normalizer.js +++ b/src/main/options-normalizer.js @@ -26,7 +26,7 @@ class FlagSchema extends vnopts.ChoiceSchema { if ( typeof value === "string" && value.length !== 0 && - this._flags.indexOf(value) === -1 + !this._flags.includes(value) ) { const suggestion = this._flags.find(flag => leven(flag, value) < 3); if (suggestion) { @@ -57,7 +57,7 @@ function normalizeOptions( ? vnopts.levenUnknownHandler : Array.isArray(passThrough) ? (key, value) => - passThrough.indexOf(key) === -1 ? undefined : { [key]: value } + !passThrough.includes(key) ? undefined : { [key]: value } : (key, value) => ({ [key]: value }); const descriptor = isCLI ? cliDescriptor : vnopts.apiDescriptor; diff --git a/src/main/options.js b/src/main/options.js index 0e01509c0..ebddeaa14 100644 --- a/src/main/options.js +++ b/src/main/options.js @@ -176,9 +176,9 @@ function inferParser(filepath, plugins) { language.extensions.some(extension => filename.endsWith(extension))) || (language.filenames && language.filenames.find(name => name.toLowerCase() === filename)) || - (filename.indexOf(".") === -1 && + (!filename.includes(".") && language.interpreters && - language.interpreters.indexOf(getInterpreter(filepath)) !== -1)) + language.interpreters.includes(getInterpreter(filepath)))) ); return language && language.parsers[0]; diff --git a/src/main/range-util.js b/src/main/range-util.js index ac80f89bd..657a52f97 100644 --- a/src/main/range-util.js +++ b/src/main/range-util.js @@ -138,11 +138,11 @@ function isSourceElement(opts, node) { case "flow": case "babel": case "typescript": - return jsSourceElements.indexOf(node.type) > -1; + return jsSourceElements.includes(node.type); case "json": - return jsonSourceElements.indexOf(node.type) > -1; + return jsonSourceElements.includes(node.type); case "graphql": - return graphqlSourceElements.indexOf(node.kind) > -1; + return graphqlSourceElements.includes(node.kind); case "vue": return node.tag !== "root"; } diff --git a/src/main/support.js b/src/main/support.js index 15c428064..a8cfaf3f4 100644 --- a/src/main/support.js +++ b/src/main/support.js @@ -36,8 +36,7 @@ function getSupportInfo(version, opts) { "name" ) .sort((a, b) => (a.name === b.name ? 0 : a.name < b.name ? -1 : 1)) - .filter(filterSince) - .filter(filterDeprecated) + .filter(option => filterSince(option) && filterDeprecated(option)) .map(mapDeprecated) .map(mapInternal) .map(option => { @@ -56,8 +55,7 @@ function getSupportInfo(version, opts) { if (Array.isArray(newOption.choices)) { newOption.choices = newOption.choices - .filter(filterSince) - .filter(filterDeprecated) + .filter(option => filterSince(option) && filterDeprecated(option)) .map(mapDeprecated); } @@ -96,7 +94,7 @@ function getSupportInfo(version, opts) { } // "babylon" was renamed to "babel" in 1.16.0 - if (useBabylonParser && language.parsers.indexOf("babel") !== -1) { + if (useBabylonParser && language.parsers.includes("babel")) { return Object.assign({}, language, { parsers: language.parsers.map(parser => parser === "babel" ? "babylon" : parser diff --git a/tests/angular_component_examples/__snapshots__/jsfmt.spec.js.snap b/tests/angular_component_examples/__snapshots__/jsfmt.spec.js.snap index 6fcbdffec..21ae6bd3d 100644 --- a/tests/angular_component_examples/__snapshots__/jsfmt.spec.js.snap +++ b/tests/angular_component_examples/__snapshots__/jsfmt.spec.js.snap @@ -4,6 +4,7 @@ exports[`test.component.ts 1`] = ` ====================================options===================================== parsers: ["typescript"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input====================================== @Component({ @@ -52,7 +53,6 @@ exports[`test.component.ts 2`] = ` ====================================options===================================== parsers: ["typescript"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input====================================== @Component({ diff --git a/tests/angular_component_examples/jsfmt.spec.js b/tests/angular_component_examples/jsfmt.spec.js index ecbf77cc1..69598203b 100644 --- a/tests/angular_component_examples/jsfmt.spec.js +++ b/tests/angular_component_examples/jsfmt.spec.js @@ -1,2 +1,2 @@ +run_spec(__dirname, ["typescript"], { trailingComma: "none" }); run_spec(__dirname, ["typescript"]); -run_spec(__dirname, ["typescript"], { trailingComma: "es5" }); diff --git a/tests/angular_interpolation/__snapshots__/jsfmt.spec.js.snap b/tests/angular_interpolation/__snapshots__/jsfmt.spec.js.snap index 6a5d630a4..5bc48f0b1 100644 --- a/tests/angular_interpolation/__snapshots__/jsfmt.spec.js.snap +++ b/tests/angular_interpolation/__snapshots__/jsfmt.spec.js.snap @@ -3,6 +3,27 @@ exports[`logical-expression.ng 1`] = ` ====================================options===================================== parsers: ["__ng_interpolation"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +[ + advancedSearchService.patientInformationFieldsRow2 && advancedSearchService.patientInformationFieldsRow2.indexOf(advancedSearchService.formElementData.customFieldList[i].customFieldType) !== -1 +] + +=====================================output===================================== +[ + advancedSearchService.patientInformationFieldsRow2 && + advancedSearchService.patientInformationFieldsRow2.indexOf( + advancedSearchService.formElementData.customFieldList[i].customFieldType + ) !== -1 +] +================================================================================ +`; + +exports[`logical-expression.ng 2`] = ` +====================================options===================================== +parsers: ["__ng_interpolation"] printWidth: 80 | printWidth =====================================input====================================== @@ -20,9 +41,97 @@ printWidth: 80 ================================================================================ `; +exports[`logical-expression.ng 3`] = ` +====================================options===================================== +parsers: ["__ng_interpolation"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +[ + advancedSearchService.patientInformationFieldsRow2 && advancedSearchService.patientInformationFieldsRow2.indexOf(advancedSearchService.formElementData.customFieldList[i].customFieldType) !== -1 +] + +=====================================output===================================== +[ + advancedSearchService.patientInformationFieldsRow2 && + advancedSearchService.patientInformationFieldsRow2.indexOf( + advancedSearchService.formElementData.customFieldList[i].customFieldType + ) !== -1 +] +================================================================================ +`; + exports[`pipe-expression.ng 1`] = ` ====================================options===================================== parsers: ["__ng_interpolation"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +[ + a ? (b | c : d) : (e | f : g), + a | b | c | d, + ((a | b) | c) | d, + a | b:(c | d), + { a: b | c }, + (a + b) | c, + (a | b) + c, + fn(a | b), + a?.b(c | d), + a[b | c], + ($students | async).items, + ($students | async)(), + myData | myPipe:'arg1':'arg2':'arg3', + value + | pipeA: { + keyA: reallySuperLongValue, + keyB: shortValue | pipeB | pipeC: valueToPipeC + } : { + keyA: reallySuperLongValue, + keyB: shortValue | pipeB | pipeC: valueToPipeC + } + | aaa, + (hideLinqPanel ? "ReportSelection.HideShowLabel_Show.String" : "ReportSelection.HideShowLabel_Hide.String") | localize:(localizationSection) +] + +=====================================output===================================== +[ + a ? (b | c: d) : (e | f: g), + a | b | c | d, + a | b | c | d, + a | b: (c | d), + { a: b | c }, + a + b | c, + (a | b) + c, + fn(a | b), + a?.b(c | d), + a[b | c], + ($students | async).items, + ($students | async)(), + myData | myPipe: "arg1":"arg2":"arg3", + value + | pipeA + : { + keyA: reallySuperLongValue, + keyB: shortValue | pipeB | pipeC: valueToPipeC + } + : { + keyA: reallySuperLongValue, + keyB: shortValue | pipeB | pipeC: valueToPipeC + } + | aaa, + (hideLinqPanel + ? "ReportSelection.HideShowLabel_Show.String" + : "ReportSelection.HideShowLabel_Hide.String" + ) | localize: localizationSection +] +================================================================================ +`; + +exports[`pipe-expression.ng 2`] = ` +====================================options===================================== +parsers: ["__ng_interpolation"] printWidth: 80 | printWidth =====================================input====================================== @@ -85,3 +194,70 @@ printWidth: 80 ] ================================================================================ `; + +exports[`pipe-expression.ng 3`] = ` +====================================options===================================== +parsers: ["__ng_interpolation"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +[ + a ? (b | c : d) : (e | f : g), + a | b | c | d, + ((a | b) | c) | d, + a | b:(c | d), + { a: b | c }, + (a + b) | c, + (a | b) + c, + fn(a | b), + a?.b(c | d), + a[b | c], + ($students | async).items, + ($students | async)(), + myData | myPipe:'arg1':'arg2':'arg3', + value + | pipeA: { + keyA: reallySuperLongValue, + keyB: shortValue | pipeB | pipeC: valueToPipeC + } : { + keyA: reallySuperLongValue, + keyB: shortValue | pipeB | pipeC: valueToPipeC + } + | aaa, + (hideLinqPanel ? "ReportSelection.HideShowLabel_Show.String" : "ReportSelection.HideShowLabel_Hide.String") | localize:(localizationSection) +] + +=====================================output===================================== +[ + a ? (b | c: d) : (e | f: g), + a | b | c | d, + a | b | c | d, + a | b: (c | d), + { a: b | c }, + a + b | c, + (a | b) + c, + fn(a | b), + a?.b(c | d), + a[b | c], + ($students | async).items, + ($students | async)(), + myData | myPipe: "arg1":"arg2":"arg3", + value + | pipeA + : { + keyA: reallySuperLongValue, + keyB: shortValue | pipeB | pipeC: valueToPipeC + } + : { + keyA: reallySuperLongValue, + keyB: shortValue | pipeB | pipeC: valueToPipeC + } + | aaa, + (hideLinqPanel + ? "ReportSelection.HideShowLabel_Show.String" + : "ReportSelection.HideShowLabel_Hide.String" + ) | localize: localizationSection +] +================================================================================ +`; diff --git a/tests/angular_interpolation/jsfmt.spec.js b/tests/angular_interpolation/jsfmt.spec.js index 09a639b7b..62daf3216 100644 --- a/tests/angular_interpolation/jsfmt.spec.js +++ b/tests/angular_interpolation/jsfmt.spec.js @@ -1 +1,3 @@ +run_spec(__dirname, ["__ng_interpolation"], { trailingComma: "none" }); run_spec(__dirname, ["__ng_interpolation"]); +run_spec(__dirname, ["__ng_interpolation"], { trailingComma: "all" }); diff --git a/tests/arrays/__snapshots__/jsfmt.spec.js.snap b/tests/arrays/__snapshots__/jsfmt.spec.js.snap index 235a17c3d..dbef45d26 100644 --- a/tests/arrays/__snapshots__/jsfmt.spec.js.snap +++ b/tests/arrays/__snapshots__/jsfmt.spec.js.snap @@ -110,17 +110,17 @@ printWidth: 80 [ [0, 1], [0, 1], - [0, 1] + [0, 1], ]; [[], [1, 2, 3]]; [[1], [1]]; [ [1, 2], - [1, 2, 3] + [1, 2, 3], ]; [ [1, 0], - [1, 0] + [1, 0], ]; [{}]; [{}, {}]; @@ -138,11 +138,11 @@ printWidth: 80 [{ a, b }, { a }, { a }]; [ { a, b }, - { a, b } + { a, b }, ]; [ { a, b }, - { a, b, c } + { a, b, c }, ]; ================================================================================ diff --git a/tests/arrows/__snapshots__/jsfmt.spec.js.snap b/tests/arrows/__snapshots__/jsfmt.spec.js.snap index 6ee696948..c8de85468 100644 --- a/tests/arrows/__snapshots__/jsfmt.spec.js.snap +++ b/tests/arrows/__snapshots__/jsfmt.spec.js.snap @@ -609,7 +609,7 @@ Seq(typeDef.interface.groups).forEach(group => Seq(group.members).forEach((member, memberName) => markdownDoc(member.doc, { typePath: typePath.concat(memberName.slice(1)), - signatures: member.signatures + signatures: member.signatures, }) ) ); @@ -640,7 +640,7 @@ function render() { this.setState({ progress: Math.round( (100 * e.nativeEvent.loaded) / e.nativeEvent.total - ) + ), }) } /> @@ -656,7 +656,7 @@ function render() { this.setState({ progress: Math.round( (100 * e.nativeEvent.loaded) / e.nativeEvent.total - ) + ), }) } /> @@ -672,7 +672,7 @@ function render() { this.setState({ progress: Math.round( (100 * e.nativeEvent.loaded) / e.nativeEvent.total - ) + ), }) } /> @@ -698,7 +698,7 @@ foo( ({ a, - b + b, }) => {} ); @@ -711,7 +711,7 @@ foo( ({ a, - b + b, }) => {} ); @@ -719,7 +719,7 @@ foo( ({ a, - b + b, }) => a ); @@ -732,8 +732,8 @@ foo( a: { a, - b - } + b, + }, }) => {} ); @@ -743,9 +743,9 @@ foo( b: { c, - d - } - } + d, + }, + }, }) => {} ); @@ -756,10 +756,10 @@ foo( c: { d, - e - } - } - } + e, + }, + }, + }, }) => {} ); @@ -768,8 +768,8 @@ foo( a: { a, - b - } + b, + }, }) => a ); @@ -779,9 +779,9 @@ foo( b: { c, - d - } - } + d, + }, + }, }) => a ); @@ -792,10 +792,10 @@ foo( c: { d, - e - } - } - } + e, + }, + }, + }, }) => a ); @@ -807,11 +807,11 @@ foo( c: { d, - e - } - } - } - } + e, + }, + }, + }, + }, ]) => {} ); @@ -823,10 +823,10 @@ foo( c: { d, - e - } - } - } + e, + }, + }, + }, } ]) => {} ); @@ -839,10 +839,10 @@ foo( c: { d, - e - } - } - } + e, + }, + }, + }, } ) => {} ); @@ -853,9 +853,9 @@ foo( { a, - b - } - ] + b, + }, + ], }) => {} ); @@ -865,8 +865,8 @@ foo( { a, - b - } + b, + }, ] ) => a ); @@ -877,9 +877,9 @@ foo( { a, - b - } - ] + b, + }, + ], ]) => {} ); @@ -895,13 +895,13 @@ foo( d: { e, - f - } - } - } - ] - ] - ] + f, + }, + }, + }, + ], + ], + ], ]) => {} ); @@ -910,7 +910,7 @@ foo( ...{ a, - b + b, } ) => {} ); @@ -921,8 +921,8 @@ foo( { a, - b - } + b, + }, ] ) => {} ); @@ -933,8 +933,8 @@ foo( { a, - b - } + b, + }, ] ]) => {} ); @@ -945,8 +945,8 @@ foo( { a, - b - } + b, + }, ] ) => {} ); @@ -956,7 +956,7 @@ foo( a = (({ a, - b + b, }) => {})() ) => {} ); @@ -966,7 +966,7 @@ foo( a = f({ a, - b + b, }) ) => {} ); @@ -976,7 +976,7 @@ foo( a = ({ a, - b + b, }) => {} ) => {} ); @@ -987,7 +987,7 @@ foo( f({ a, - b + b, }) ) => {} ); @@ -1406,7 +1406,7 @@ Seq(typeDef.interface.groups).forEach((group) => Seq(group.members).forEach((member, memberName) => markdownDoc(member.doc, { typePath: typePath.concat(memberName.slice(1)), - signatures: member.signatures + signatures: member.signatures, }) ) ); @@ -1437,7 +1437,7 @@ function render() { this.setState({ progress: Math.round( (100 * e.nativeEvent.loaded) / e.nativeEvent.total - ) + ), }) } /> @@ -1453,7 +1453,7 @@ function render() { this.setState({ progress: Math.round( (100 * e.nativeEvent.loaded) / e.nativeEvent.total - ) + ), }) } /> @@ -1469,7 +1469,7 @@ function render() { this.setState({ progress: Math.round( (100 * e.nativeEvent.loaded) / e.nativeEvent.total - ) + ), }) } /> @@ -1495,7 +1495,7 @@ foo( ({ a, - b + b, }) => {} ); @@ -1508,7 +1508,7 @@ foo( ({ a, - b + b, }) => {} ); @@ -1516,7 +1516,7 @@ foo( ({ a, - b + b, }) => a ); @@ -1529,8 +1529,8 @@ foo( a: { a, - b - } + b, + }, }) => {} ); @@ -1540,9 +1540,9 @@ foo( b: { c, - d - } - } + d, + }, + }, }) => {} ); @@ -1553,10 +1553,10 @@ foo( c: { d, - e - } - } - } + e, + }, + }, + }, }) => {} ); @@ -1565,8 +1565,8 @@ foo( a: { a, - b - } + b, + }, }) => a ); @@ -1576,9 +1576,9 @@ foo( b: { c, - d - } - } + d, + }, + }, }) => a ); @@ -1589,10 +1589,10 @@ foo( c: { d, - e - } - } - } + e, + }, + }, + }, }) => a ); @@ -1604,11 +1604,11 @@ foo( c: { d, - e - } - } - } - } + e, + }, + }, + }, + }, ]) => {} ); @@ -1620,10 +1620,10 @@ foo( c: { d, - e - } - } - } + e, + }, + }, + }, } ]) => {} ); @@ -1636,10 +1636,10 @@ foo( c: { d, - e - } - } - } + e, + }, + }, + }, } ) => {} ); @@ -1650,9 +1650,9 @@ foo( { a, - b - } - ] + b, + }, + ], }) => {} ); @@ -1662,8 +1662,8 @@ foo( { a, - b - } + b, + }, ] ) => a ); @@ -1674,9 +1674,9 @@ foo( { a, - b - } - ] + b, + }, + ], ]) => {} ); @@ -1692,13 +1692,13 @@ foo( d: { e, - f - } - } - } - ] - ] - ] + f, + }, + }, + }, + ], + ], + ], ]) => {} ); @@ -1707,7 +1707,7 @@ foo( ...{ a, - b + b, } ) => {} ); @@ -1718,8 +1718,8 @@ foo( { a, - b - } + b, + }, ] ) => {} ); @@ -1730,8 +1730,8 @@ foo( { a, - b - } + b, + }, ] ]) => {} ); @@ -1742,8 +1742,8 @@ foo( { a, - b - } + b, + }, ] ) => {} ); @@ -1753,7 +1753,7 @@ foo( a = (({ a, - b + b, }) => {})() ) => {} ); @@ -1763,7 +1763,7 @@ foo( a = f({ a, - b + b, }) ) => {} ); @@ -1773,7 +1773,7 @@ foo( a = ({ a, - b + b, }) => {} ) => {} ); @@ -1784,7 +1784,7 @@ foo( f({ a, - b + b, }) ) => {} ); @@ -1852,7 +1852,7 @@ export const bem = block => ".", css(block), element ? \`__\${css(element)}\` : "", - modifier ? \`--\${css(modifier)}\` : "" + modifier ? \`--\${css(modifier)}\` : "", ].join(""); ".", css(block), element ? \`__\${css(element)}\` : "", - modifier ? \`--\${css(modifier)}\` : "" + modifier ? \`--\${css(modifier)}\` : "", ].join(""); { message: "test", messageType: "SMS", status: "Unknown", - created: "11/01/2017 13:36" + created: "11/01/2017 13:36", }); }; @@ -2109,7 +2109,7 @@ const foo = () => { message: "test", messageType: "SMS", status: "Unknown", - created: "11/01/2017 13:36" + created: "11/01/2017 13:36", }); }; diff --git a/tests/assignment/__snapshots__/jsfmt.spec.js.snap b/tests/assignment/__snapshots__/jsfmt.spec.js.snap index 7ad60db40..7f17be2c1 100644 --- a/tests/assignment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/assignment/__snapshots__/jsfmt.spec.js.snap @@ -51,14 +51,14 @@ let { bottom: offsetBottom, left: offsetLeft, right: offsetRight, - top: offsetTop + top: offsetTop, } = getPressRectOffset == null ? DEFAULT_PRESS_RECT : getPressRectOffset(); const { accessibilityModule: FooAccessibilityModule, accessibilityModule: FooAccessibilityModule2, accessibilityModule: FooAccessibilityModule3, - accessibilityModule: FooAccessibilityModule4 + accessibilityModule: FooAccessibilityModule4, } = foo || {}; ({ prop: toAssign = "default" } = { prop: "propval" }); diff --git a/tests/binary-expressions/__snapshots__/jsfmt.spec.js.snap b/tests/binary-expressions/__snapshots__/jsfmt.spec.js.snap index f6b34ef95..7f120df44 100644 --- a/tests/binary-expressions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/binary-expressions/__snapshots__/jsfmt.spec.js.snap @@ -38,7 +38,7 @@ function f() { entity.isInstallAvailable() && !entity.isQueue() && entity.isDisabled() && { - id: entity.id + id: entity.id, } ); } @@ -459,7 +459,7 @@ prevState = prevState || { loadState: LOADED, opened: false, searchQuery: "", - selectedCatalog: null + selectedCatalog: null, }; prevState = prevState || @@ -468,7 +468,7 @@ prevState = prevState || loadState: LOADED, opened: false, searchQuery: "", - selectedCatalog: null + selectedCatalog: null, }; prevState = @@ -478,7 +478,7 @@ prevState = loadState: LOADED, opened: false, searchQuery: "", - selectedCatalog: null + selectedCatalog: null, }); prevState = prevState || @@ -487,14 +487,14 @@ prevState = prevState || loadState: LOADED, opened: false, searchQuery: "", - selectedCatalog: null + selectedCatalog: null, }; this.steps = steps || [ { name: "mock-module", - path: "/nux/mock-module" - } + path: "/nux/mock-module", + }, ]; this.steps = @@ -502,15 +502,15 @@ this.steps = (checkStep && [ { name: "mock-module", - path: "/nux/mock-module" - } + path: "/nux/mock-module", + }, ]); this.steps = (steps && checkStep) || [ { name: "mock-module", - path: "/nux/mock-module" - } + path: "/nux/mock-module", + }, ]; const create = () => { @@ -520,7 +520,7 @@ const create = () => { result.ok && { status: "ok", createdAt: result.createdAt, - updatedAt: result.updatedAt + updatedAt: result.updatedAt, } ); }; @@ -531,7 +531,7 @@ const create = () => { (shouldReturn && result.ok && result) || { status: "ok", createdAt: result.createdAt, - updatedAt: result.updatedAt + updatedAt: result.updatedAt, } ); }; @@ -540,12 +540,12 @@ const obj = { state: shouldHaveState && stateIsOK && { loadState: LOADED, - opened: false + opened: false, }, loadNext: (stateIsOK && hasNext) || { - skipNext: true + skipNext: true, }, - loaded: true + loaded: true, }; ================================================================================ @@ -611,7 +611,7 @@ printWidth: 80 !isJellyfishEnabled && diffUpdateMessageInput && { fontSize: 14, - color: "#fff" + color: "#fff", } } />; diff --git a/tests/break-calls/__snapshots__/jsfmt.spec.js.snap b/tests/break-calls/__snapshots__/jsfmt.spec.js.snap index 033f231d7..c3c7d27b9 100644 --- a/tests/break-calls/__snapshots__/jsfmt.spec.js.snap +++ b/tests/break-calls/__snapshots__/jsfmt.spec.js.snap @@ -189,7 +189,7 @@ function helloWorld() { props.value, props.value, props.value, - props.value + props.value, ]); } @@ -210,7 +210,7 @@ function helloWorldWithReact() { props.value, props.value, props.value, - props.value + props.value, ]); } diff --git a/tests/classes/__snapshots__/jsfmt.spec.js.snap b/tests/classes/__snapshots__/jsfmt.spec.js.snap index 2ed9a8969..24bc14877 100644 --- a/tests/classes/__snapshots__/jsfmt.spec.js.snap +++ b/tests/classes/__snapshots__/jsfmt.spec.js.snap @@ -88,7 +88,7 @@ class InMemoryAppender extends log4javascript.Appender implements ICachedLogMessageProvider {} class Foo extends Immutable.Record({ - ipaddress: "" + ipaddress: "", }) { ipaddress: string; } @@ -197,7 +197,7 @@ class C { } ({ - name /*comment*/() {} + name /*comment*/() {}, }); ================================================================================ @@ -258,7 +258,7 @@ class B { this.props.foofoofoofoofoofoo && this.props.barbarbarbar; someInstanceProperty2 = { - foo: this.props.foofoofoofoofoofoo && this.props.barbarbarbar + foo: this.props.foofoofoofoofoofoo && this.props.barbarbarbar, }; someInstanceProperty3 = "foo"; diff --git a/tests/comments/__snapshots__/jsfmt.spec.js.snap b/tests/comments/__snapshots__/jsfmt.spec.js.snap index 099b640e1..b9f83a6fd 100644 --- a/tests/comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/comments/__snapshots__/jsfmt.spec.js.snap @@ -37,7 +37,7 @@ const { a /* comment */ = 1 } = b; const { c = 1 /* comment */ } = d; let { - d = b //comment + d = b, //comment } = c; ================================================================================ @@ -61,7 +61,7 @@ const foo = { a: "a" /* comment for this line */, /* Section B */ - b: "b" + b: "b", }; ================================================================================ @@ -527,20 +527,20 @@ export /* comment */{}; const foo = ""; export { - foo // comment + foo, // comment }; const bar = ""; export { // comment - bar + bar, }; const fooo = ""; const barr = ""; export { fooo, // comment - barr // comment + barr, // comment }; ================================================================================ @@ -702,7 +702,7 @@ const obj = { f1 /* f */() {}, f2(/* args */) {}, f3() /* returns */ {}, - f4 /* f */(/* args */) /* returns */ {} + f4 /* f */(/* args */) /* returns */ {}, }; (function f /* f */() {})(); @@ -1022,7 +1022,7 @@ function f( // not one before and one after. throw new ProcessSystemError({ code: acc.error.code, // Alias of errno - originalError: acc.error // Just in case. + originalError: acc.error, // Just in case. }); // Adding a comment stops the pretty printing process and everything is @@ -1030,30 +1030,30 @@ throw new ProcessSystemError({ export type BuckWebSocketMessage = | { // Not actually from Buck - this is to let the receiver know that the socket is connected. - type: "SocketConnected" + type: "SocketConnected", } | { type: "BuildProgressUpdated", - progressValue: number + progressValue: number, } | { type: "BuildFinished", - exitCode: number + exitCode: number, } | { - type: "BuildStarted" + type: "BuildStarted", } | { - type: "ParseStarted" + type: "ParseStarted", } | { - type: "ParseFinished" + type: "ParseFinished", } | { - type: "RunStarted" + type: "RunStarted", } | { - type: "RunComplete" + type: "RunComplete", }; // Missing one level of indentation because of the comment @@ -1069,7 +1069,7 @@ const rootEpic = (actions, store) => export type AsyncExecuteOptions = child_process$execFileOpts & { // The contents to write to stdin. stdin?: ?string, - dontLogInNuclide?: ?boolean + dontLogInNuclide?: ?boolean, }; // optional trailing comma gets moved all the way to the beginning @@ -1571,7 +1571,7 @@ var x = { sectionMetaData: SectionMetaData /* $FlowFixMe This error was exposed while converting keyMirror * to keyMirrorRecursive */ - ): $Enum {} + ): $Enum {}, }; class X2 { @@ -2231,7 +2231,7 @@ const CONNECTION_STATUS = (exports.CONNECTION_STATUS = { CLOSED: Object.freeze({ kind: "CLOSED" }), CONNECTED: Object.freeze({ kind: "CONNECTED" }), CONNECTING: Object.freeze({ kind: "CONNECTING" }), - NOT_CONNECTED: Object.freeze({ kind: "NOT_CONNECTED" }) + NOT_CONNECTED: Object.freeze({ kind: "NOT_CONNECTED" }), }); /* A comment */ @@ -2374,23 +2374,23 @@ const foo3 = 123 let obj1 = // Comment { - key: "val" + key: "val", }; let obj2 = // Comment { - key: "val" + key: "val", }; let obj3 = { // Comment - key: "val" + key: "val", }; let obj4 = { // Comment - key: "val" + key: "val", }; let obj5 = @@ -2403,12 +2403,12 @@ let obj6 = let obj7 = [ // Comment - "val" + "val", ]; let obj8 = [ // Comment - "val" + "val", ]; let obj9 = diff --git a/tests/comments_closure_typecast/__snapshots__/jsfmt.spec.js.snap b/tests/comments_closure_typecast/__snapshots__/jsfmt.spec.js.snap index 109e446fe..d4df30ce9 100644 --- a/tests/comments_closure_typecast/__snapshots__/jsfmt.spec.js.snap +++ b/tests/comments_closure_typecast/__snapshots__/jsfmt.spec.js.snap @@ -86,7 +86,7 @@ let inlineComment = /* some comment */ someReallyLongFunctionCall( ); let object = { - key: /* some comment */ someReallyLongFunctionCall(withLots, ofArguments) + key: /* some comment */ someReallyLongFunctionCall(withLots, ofArguments), }; // preserve parens only for type casts @@ -138,7 +138,7 @@ const style = /** @type {{ }} */ ({ width, height, - ...margins + ...margins, }); const style2 = /** @@ -146,7 +146,7 @@ const style2 = /** * width: number, * }} */ ({ - width + width, }); // Spaces aren't necessary diff --git a/tests/css_atrule/__snapshots__/jsfmt.spec.js.snap b/tests/css_atrule/__snapshots__/jsfmt.spec.js.snap index 62029906e..242282b7e 100644 --- a/tests/css_atrule/__snapshots__/jsfmt.spec.js.snap +++ b/tests/css_atrule/__snapshots__/jsfmt.spec.js.snap @@ -2584,29 +2584,20 @@ a { @include section-type-1( $header: ( margin: 0 0 $margin-base, - text-align: left + text-align: left, ), $decoration: ( type: base, margin: 0 auto -1px 0, primary-color: $brand-primary, - secondary-color: $gray-light + secondary-color: $gray-light, ), $title: ( margin: 0 0 $margin-small, color: false, font-size: $font-size-h3, font-weight: false, - line-height: $line-height-h3 - ) - ); -} - -a { - @include item-spotlight-properties-transition( - "-title", - ( - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15) + line-height: $line-height-h3, ) ); } @@ -2616,7 +2607,16 @@ a { "-title", ( box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), - border-color: $brand-primary + ) + ); +} + +a { + @include item-spotlight-properties-transition( + "-title", + ( + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), + border-color: $brand-primary, ) ); } @@ -2627,7 +2627,7 @@ a { ( box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), border-color: - $very-very-very-very-very-very-very-very-very-very-very-very-very-long-value + $very-very-very-very-very-very-very-very-very-very-very-very-very-long-value, ) ); } diff --git a/tests/css_scss/__snapshots__/jsfmt.spec.js.snap b/tests/css_scss/__snapshots__/jsfmt.spec.js.snap index fc75d517c..e4d1b17e3 100644 --- a/tests/css_scss/__snapshots__/jsfmt.spec.js.snap +++ b/tests/css_scss/__snapshots__/jsfmt.spec.js.snap @@ -4,6 +4,7 @@ exports[`import_comma.scss 1`] = ` ====================================options===================================== parsers: ["scss"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input====================================== @import "rounded-corners", "text-shadow"; @@ -18,7 +19,6 @@ exports[`import_comma.scss 2`] = ` ====================================options===================================== parsers: ["scss"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input====================================== @import "rounded-corners", "text-shadow"; @@ -33,6 +33,7 @@ exports[`scss.scss 1`] = ` ====================================options===================================== parsers: ["scss"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input====================================== @media #{$g-breakpoint-tiny} {} @@ -2055,7 +2056,6 @@ exports[`scss.scss 2`] = ` ====================================options===================================== parsers: ["scss"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input====================================== @media #{$g-breakpoint-tiny} {} diff --git a/tests/css_scss/jsfmt.spec.js b/tests/css_scss/jsfmt.spec.js index 548d429d8..f2558a4a9 100644 --- a/tests/css_scss/jsfmt.spec.js +++ b/tests/css_scss/jsfmt.spec.js @@ -1,2 +1,2 @@ +run_spec(__dirname, ["scss"], { trailingComma: "none" }); run_spec(__dirname, ["scss"]); -run_spec(__dirname, ["scss"], { trailingComma: "es5" }); diff --git a/tests/css_trailing_comma/__snapshots__/jsfmt.spec.js.snap b/tests/css_trailing_comma/__snapshots__/jsfmt.spec.js.snap index 95cde73f2..387b0efa0 100644 --- a/tests/css_trailing_comma/__snapshots__/jsfmt.spec.js.snap +++ b/tests/css_trailing_comma/__snapshots__/jsfmt.spec.js.snap @@ -4,6 +4,7 @@ exports[`at-rules.css 1`] = ` ====================================options===================================== parsers: ["css"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input====================================== a { @@ -79,7 +80,6 @@ exports[`at-rules.css 2`] = ` ====================================options===================================== parsers: ["scss"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input====================================== a { @@ -155,6 +155,7 @@ exports[`declaration.css 1`] = ` ====================================options===================================== parsers: ["css"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input====================================== a { @@ -173,7 +174,6 @@ exports[`declaration.css 2`] = ` ====================================options===================================== parsers: ["scss"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input====================================== a { @@ -192,6 +192,7 @@ exports[`list.css 1`] = ` ====================================options===================================== parsers: ["css"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input====================================== $colors: hotpink deepskyblue firebrick,; @@ -297,7 +298,6 @@ exports[`list.css 2`] = ` ====================================options===================================== parsers: ["scss"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input====================================== $colors: hotpink deepskyblue firebrick,; @@ -403,6 +403,7 @@ exports[`map.css 1`] = ` ====================================options===================================== parsers: ["css"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input====================================== $map: ( @@ -447,7 +448,6 @@ exports[`map.css 2`] = ` ====================================options===================================== parsers: ["scss"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input====================================== $map: ( @@ -492,6 +492,7 @@ exports[`selector_list.css 1`] = ` ====================================options===================================== parsers: ["css"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input====================================== asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, @@ -523,7 +524,6 @@ exports[`selector_list.css 2`] = ` ====================================options===================================== parsers: ["scss"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input====================================== asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, @@ -555,6 +555,7 @@ exports[`variable.css 1`] = ` ====================================options===================================== parsers: ["css"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input====================================== $test: 1,; @@ -572,7 +573,6 @@ exports[`variable.css 2`] = ` ====================================options===================================== parsers: ["scss"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input====================================== $test: 1,; diff --git a/tests/css_trailing_comma/jsfmt.spec.js b/tests/css_trailing_comma/jsfmt.spec.js index ddf82c2c8..c9fbdf77d 100644 --- a/tests/css_trailing_comma/jsfmt.spec.js +++ b/tests/css_trailing_comma/jsfmt.spec.js @@ -1,2 +1,2 @@ -run_spec(__dirname, ["css"]); -run_spec(__dirname, ["scss"], { trailingComma: "es5" }); +run_spec(__dirname, ["css"], { trailingComma: "none" }); +run_spec(__dirname, ["scss"]); diff --git a/tests/decorators-ts/__snapshots__/jsfmt.spec.js.snap b/tests/decorators-ts/__snapshots__/jsfmt.spec.js.snap index 898ab7e2f..a71428437 100644 --- a/tests/decorators-ts/__snapshots__/jsfmt.spec.js.snap +++ b/tests/decorators-ts/__snapshots__/jsfmt.spec.js.snap @@ -68,7 +68,7 @@ export class HeroButtonComponent { selector: "toh-hero-button", template: \` - \` + \`, }) export class HeroButtonComponent { @Output() change = new EventEmitter(); diff --git a/tests/decorators/__snapshots__/jsfmt.spec.js.snap b/tests/decorators/__snapshots__/jsfmt.spec.js.snap index c62a7faa8..0043aa91f 100644 --- a/tests/decorators/__snapshots__/jsfmt.spec.js.snap +++ b/tests/decorators/__snapshots__/jsfmt.spec.js.snap @@ -91,7 +91,7 @@ var x = 100; @Hello({ a: "a", // Comment is in the wrong place // test - b: "2" + b: "2", }) class X {} @@ -103,8 +103,8 @@ class X {} // App modules. CoreModule, - SharedModule - ] + SharedModule, + ], }) export class AppModule {} @@ -324,14 +324,14 @@ const dog = { @readonly @nonenumerable @doubledValue - eyes: 2 + eyes: 2, }; const foo = { @multipleDecorators @inline @theyWontAllFitInOneline - aVeryLongPropName: "A very long string as value" + aVeryLongPropName: "A very long string as value", }; ================================================================================ diff --git a/tests/destructuring/__snapshots__/jsfmt.spec.js.snap b/tests/destructuring/__snapshots__/jsfmt.spec.js.snap index ba16e29d9..36f112ae8 100644 --- a/tests/destructuring/__snapshots__/jsfmt.spec.js.snap +++ b/tests/destructuring/__snapshots__/jsfmt.spec.js.snap @@ -58,14 +58,14 @@ a = ([s = 1]) => 1; const { children, ...props } = this.props; const { - user: { firstName, lastName } + user: { firstName, lastName }, } = this.props; const { name: { first, last }, organisation: { - address: { street: orgStreetAddress, postcode: orgPostcode } - } + address: { street: orgStreetAddress, postcode: orgPostcode }, + }, } = user; function f({ data: { name } }) {} @@ -73,8 +73,8 @@ function f({ data: { name } }) {} const UserComponent = function({ name: { first, last }, organisation: { - address: { street: orgStreetAddress, postcode: orgPostcode } - } + address: { street: orgStreetAddress, postcode: orgPostcode }, + }, }) { return; }; @@ -83,7 +83,7 @@ const { a, b, c, - d: { e } + d: { e }, } = someObject; try { @@ -96,8 +96,8 @@ try { // code } catch ({ data: { - message: { errors } - } + message: { errors }, + }, }) { // code } @@ -105,7 +105,7 @@ try { const obj = { func(id, { blog: { title } }) { return id + title; - } + }, }; class A { diff --git a/tests/do/__snapshots__/jsfmt.spec.js.snap b/tests/do/__snapshots__/jsfmt.spec.js.snap index 74b5471dd..1794a10c0 100644 --- a/tests/do/__snapshots__/jsfmt.spec.js.snap +++ b/tests/do/__snapshots__/jsfmt.spec.js.snap @@ -66,7 +66,7 @@ const envSpecific = { domain: do { if (env === "production") "https://abc.mno.com/"; else if (env === "development") "http://localhost:4000"; - } + }, }; let x = do { diff --git a/tests/empty_paren_comment/__snapshots__/jsfmt.spec.js.snap b/tests/empty_paren_comment/__snapshots__/jsfmt.spec.js.snap index f18e3604a..9196d71be 100644 --- a/tests/empty_paren_comment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/empty_paren_comment/__snapshots__/jsfmt.spec.js.snap @@ -69,7 +69,7 @@ const obj = { f(/* ... */) {}, f: (/* ... */) => {}, f: function(/* ... */) {}, - f: function f(/* ... */) {} + f: function f(/* ... */) {}, }; class Foo { diff --git a/tests/export/__snapshots__/jsfmt.spec.js.snap b/tests/export/__snapshots__/jsfmt.spec.js.snap index fc1d82ed2..43bc02edb 100644 --- a/tests/export/__snapshots__/jsfmt.spec.js.snap +++ b/tests/export/__snapshots__/jsfmt.spec.js.snap @@ -27,7 +27,7 @@ export { itGo, multiLine, andMore, - soWeCanGetItTo80Columns + soWeCanGetItTo80Columns, }; export { fitsIn, oneLine }; @@ -62,7 +62,7 @@ export { itGo, multiLine, andMore, - soWeCanGetItTo80Columns + soWeCanGetItTo80Columns, }; export {fitsIn, oneLine}; diff --git a/tests/export_extension/__snapshots__/jsfmt.spec.js.snap b/tests/export_extension/__snapshots__/jsfmt.spec.js.snap index 3f4f650ce..1cf43ab4d 100644 --- a/tests/export_extension/__snapshots__/jsfmt.spec.js.snap +++ b/tests/export_extension/__snapshots__/jsfmt.spec.js.snap @@ -23,11 +23,11 @@ export c, { foo } from "mod"; export * as d, { bar } from "mod"; export { fooooooooooooooooooooooooooooooooooooooooooooooooo } from "fooooooooooooooooooooooooooooo"; export Bar, { - barrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr + barrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr, } from "barrrrrrrrrrrrrrrrrrrrrrrrrrrr"; export { foooooooooooooooooooooooooooooooooooooooooooooo, - fooooooooooooooooooooooooooooooooooooooooooooooo + fooooooooooooooooooooooooooooooooooooooooooooooo, } from "fooooooooooooooooooooooooooooo"; ================================================================================ diff --git a/tests/exports/__snapshots__/jsfmt.spec.js.snap b/tests/exports/__snapshots__/jsfmt.spec.js.snap index 8f1bf6388..29c751c00 100644 --- a/tests/exports/__snapshots__/jsfmt.spec.js.snap +++ b/tests/exports/__snapshots__/jsfmt.spec.js.snap @@ -22,7 +22,7 @@ export { value2 as value2_renamed, value3, value4 as value4_renamed, - value5 + value5, } from "exports"; export a, { b } from "./baz"; diff --git a/tests/flow/annot/__snapshots__/jsfmt.spec.js.snap b/tests/flow/annot/__snapshots__/jsfmt.spec.js.snap index 2e12dbe04..f98241fbd 100644 --- a/tests/flow/annot/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/annot/__snapshots__/jsfmt.spec.js.snap @@ -80,7 +80,7 @@ var qux = function(str: string, i: number): number { var obj: { str: string, i: number, j: boolean } = { str: "...", i: "...", - k: false + k: false, }; var arr: Array = [1, 2, "..."]; @@ -90,7 +90,7 @@ var array: number[] = [1, 2, "..."]; var matrix: number[][] = [ [1, 2], - [3, 4] + [3, 4], ]; var matrix_parens: number[][] = matrix; @@ -101,7 +101,7 @@ var array_of_nullable: (?number)[] = [null, 3]; var array_of_tuple: [number, string][] = [ [0, "foo"], - [1, "bar"] + [1, "bar"], ]; var array_of_tuple_parens: [number, string][] = array_of_tuple; @@ -127,7 +127,7 @@ function param_anno2( return { method: request.method, params: request.params, - relative_url: request.path + relative_url: request.path, }; }); // ... diff --git a/tests/flow/arith/__snapshots__/jsfmt.spec.js.snap b/tests/flow/arith/__snapshots__/jsfmt.spec.js.snap index 013e7b4ca..2210d6018 100644 --- a/tests/flow/arith/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/arith/__snapshots__/jsfmt.spec.js.snap @@ -187,7 +187,7 @@ let tests = [ (x + z: empty); // error, string ~> empty (z + x: empty); // error, string ~> empty - } + }, ]; ================================================================================ @@ -365,7 +365,7 @@ let tests = [ function(x: any, y: number, z: string) { x > y; x > z; - } + }, ]; ================================================================================ diff --git a/tests/flow/arraylib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/arraylib/__snapshots__/jsfmt.spec.js.snap index 616a5cba2..130d92dfc 100644 --- a/tests/flow/arraylib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/arraylib/__snapshots__/jsfmt.spec.js.snap @@ -111,7 +111,7 @@ function reduce_test() { var flattened = [ [0, 1], [2, 3], - [4, 5] + [4, 5], ].reduce(function(a, b) { return a.concat(b); }); diff --git a/tests/flow/arrays/__snapshots__/jsfmt.spec.js.snap b/tests/flow/arrays/__snapshots__/jsfmt.spec.js.snap index d2f576877..bb93e6a16 100644 --- a/tests/flow/arrays/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/arrays/__snapshots__/jsfmt.spec.js.snap @@ -81,7 +81,7 @@ var abig2: Array<{ x: number, y: number }> = [ { x: 0, y: 0, a: true }, { x: 0, y: 0, b: "hey" }, { x: 0, y: 0, c: 1 }, - { x: 0, y: 0, c: "hey" } + { x: 0, y: 0, c: "hey" }, ]; module.exports = "arrays"; diff --git a/tests/flow/async/__snapshots__/jsfmt.spec.js.snap b/tests/flow/async/__snapshots__/jsfmt.spec.js.snap index e0781b82d..f5a4550f4 100644 --- a/tests/flow/async/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/async/__snapshots__/jsfmt.spec.js.snap @@ -559,17 +559,17 @@ var n = new (async function() { var o = { async m() { await 1; - } + }, }; var ot = { async m(a: T) { await 1; - } + }, }; var oz = { async async(async) { await async; - } + }, }; var x = { await: 5 }; diff --git a/tests/flow/binary/__snapshots__/jsfmt.spec.js.snap b/tests/flow/binary/__snapshots__/jsfmt.spec.js.snap index 3a372e3d3..9e32fdb03 100644 --- a/tests/flow/binary/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/binary/__snapshots__/jsfmt.spec.js.snap @@ -117,7 +117,7 @@ let tests = [ function(x: Object, y: mixed) { "foo" in x; // ok "foo" in y; // error - } + }, ]; ================================================================================ diff --git a/tests/flow/callable/__snapshots__/jsfmt.spec.js.snap b/tests/flow/callable/__snapshots__/jsfmt.spec.js.snap index b3a6b3ca0..8b73f94a2 100644 --- a/tests/flow/callable/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/callable/__snapshots__/jsfmt.spec.js.snap @@ -20,7 +20,7 @@ function f(x) { =====================================output===================================== type F = { (x: string): number, - p?: string + p?: string, }; function f(x) { @@ -76,7 +76,7 @@ icall(0); // error, number ~> string icall.call(null, 0); // error, number ~> string type Callable = { - (x: string): void + (x: string): void, }; declare var callable: Callable; diff --git a/tests/flow/class_statics/__snapshots__/jsfmt.spec.js.snap b/tests/flow/class_statics/__snapshots__/jsfmt.spec.js.snap index 75fe34463..39990a863 100644 --- a/tests/flow/class_statics/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/class_statics/__snapshots__/jsfmt.spec.js.snap @@ -132,7 +132,7 @@ module.exports = { B: B, C: C, D: D, - E: E + E: E, }; ================================================================================ diff --git a/tests/flow/classes/__snapshots__/jsfmt.spec.js.snap b/tests/flow/classes/__snapshots__/jsfmt.spec.js.snap index bd7ccea15..4bc3bc97e 100644 --- a/tests/flow/classes/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/classes/__snapshots__/jsfmt.spec.js.snap @@ -149,7 +149,7 @@ type Foo = { a: string, // exists in TestClass b: string, // doesn't exist c?: ?string, // exists in TestClass, optional - d?: number // doesn't exist + d?: number, // doesn't exist }; class TestClass { diff --git a/tests/flow/closure/__snapshots__/jsfmt.spec.js.snap b/tests/flow/closure/__snapshots__/jsfmt.spec.js.snap index 076901bc0..8ad754b9b 100644 --- a/tests/flow/closure/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/closure/__snapshots__/jsfmt.spec.js.snap @@ -142,7 +142,7 @@ var global_o = { f: function() {}, g: function() { global_y = 42; - } + }, }; global_o.f(); @@ -163,7 +163,7 @@ function local_meth() { f: function() {}, g: function() { local_y = 42; - } + }, }; local_o.f(); diff --git a/tests/flow/computed_props/__snapshots__/jsfmt.spec.js.snap b/tests/flow/computed_props/__snapshots__/jsfmt.spec.js.snap index bbbf897cd..40e89cfdb 100644 --- a/tests/flow/computed_props/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/computed_props/__snapshots__/jsfmt.spec.js.snap @@ -34,19 +34,19 @@ module.exports = { ColorId, ColorNumber }; var ColorId = { RED: "R", GREEN: "G", - BLUE: "B" + BLUE: "B", }; var ColorNumber = { RED: "ff0000", GREEN: "00ff00", - BLUE: "0000ff" + BLUE: "0000ff", }; var ColorIdToNumber = { [ColorId.RED]: ColorNumber.RED, [ColorId.GREEN]: ColorNumber.GREEN, - [ColorId.BLUE]: ColorNumber.BLUE + [ColorId.BLUE]: ColorNumber.BLUE, }; (ColorIdToNumber[ColorId.RED]: "ffffff"); // oops @@ -80,7 +80,7 @@ var { ColorId, ColorNumber } = require("./test"); var ColorIdToNumber = { [ColorId.RED]: ColorNumber.RED, [ColorId.GREEN]: ColorNumber.GREEN, - [ColorId.BLUE]: ColorNumber.BLUE + [ColorId.BLUE]: ColorNumber.BLUE, }; (ColorIdToNumber[ColorId.GREEN]: "ffffff"); // oops @@ -144,7 +144,7 @@ var dummy = require("./test"); module.exports = { ...dummy, [hello]: "world", - ...dummy + ...dummy, }; ================================================================================ @@ -183,14 +183,14 @@ var obj = { x: 0, m() { return this.x; - } + }, }; var x: string = obj["m"](); // error, number ~> string var arr = [ function() { return this.length; - } + }, ]; var y: string = arr[0](); // error: number ~> string diff --git a/tests/flow/config_module_name_rewrite_haste/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_module_name_rewrite_haste/__snapshots__/jsfmt.spec.js.snap index 1c5bca2a0..904cb4c77 100644 --- a/tests/flow/config_module_name_rewrite_haste/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_module_name_rewrite_haste/__snapshots__/jsfmt.spec.js.snap @@ -60,7 +60,7 @@ module.exports = { */ module.exports = { - numVal: 42 + numVal: 42, }; ================================================================================ diff --git a/tests/flow/config_module_name_rewrite_node/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_module_name_rewrite_node/__snapshots__/jsfmt.spec.js.snap index d2ebbabe2..186f69711 100644 --- a/tests/flow/config_module_name_rewrite_node/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_module_name_rewrite_node/__snapshots__/jsfmt.spec.js.snap @@ -78,7 +78,7 @@ module.exports = { /* @flow */ module.exports = { - numVal: 42 + numVal: 42, }; ================================================================================ diff --git a/tests/flow/constructor_annots/__snapshots__/jsfmt.spec.js.snap b/tests/flow/constructor_annots/__snapshots__/jsfmt.spec.js.snap index 3011a2702..2c80a42e2 100644 --- a/tests/flow/constructor_annots/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/constructor_annots/__snapshots__/jsfmt.spec.js.snap @@ -37,7 +37,7 @@ Foo.y = 0; // has static property y Foo.prototype = { m() { return 0; - } + }, }; // exporting Foo directly doesn't work diff --git a/tests/flow/core_tests/__snapshots__/jsfmt.spec.js.snap b/tests/flow/core_tests/__snapshots__/jsfmt.spec.js.snap index fd4ea9ff1..2c1a9bb53 100644 --- a/tests/flow/core_tests/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/core_tests/__snapshots__/jsfmt.spec.js.snap @@ -90,7 +90,7 @@ let tests = [ Boolean(NaN); Boolean(undefined); Boolean(""); - } + }, ]; ================================================================================ @@ -166,7 +166,7 @@ let tests = [ function(x: Map) { (x.get("foo"): boolean); // error, string | void x.get(123); // error, wrong key type - } + }, ]; ================================================================================ @@ -236,7 +236,7 @@ let tests = [ function() { RegExp("foo", "z"); // error new RegExp("foo", "z"); // error - } + }, ]; ================================================================================ diff --git a/tests/flow/declare_class/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declare_class/lib/__snapshots__/jsfmt.spec.js.snap index 7ca26589c..cfbe46114 100644 --- a/tests/flow/declare_class/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declare_class/lib/__snapshots__/jsfmt.spec.js.snap @@ -21,7 +21,7 @@ declare class _C { foo(): number; } declare var _module: { - C: Class<_C> + C: Class<_C>, }; declare class D extends _module.C { foo(): string; diff --git a/tests/flow/declare_export/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declare_export/__snapshots__/jsfmt.spec.js.snap index 30e9e385d..c2255276b 100644 --- a/tests/flow/declare_export/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declare_export/__snapshots__/jsfmt.spec.js.snap @@ -126,7 +126,7 @@ module.exports = { numberValue2: 2, numberValue3: 3, numberValue4: 4, - numberValue5: 5 + numberValue5: 5, }; ================================================================================ @@ -484,7 +484,7 @@ declare export { declare export { numberValue1, - numberValue2 as numberValue2_renamed + numberValue2 as numberValue2_renamed, } from "ES6_ExportFrom_Source1"; ================================================================================ @@ -514,7 +514,7 @@ declare export { declare export { numberValue1, - numberValue2 as numberValue2_renamed2 + numberValue2 as numberValue2_renamed2, } from "ES6_ExportFrom_Source2"; ================================================================================ @@ -734,7 +734,7 @@ module.exports = { */ module.exports = { - numberValue: 42 + numberValue: 42, }; ================================================================================ @@ -1365,7 +1365,7 @@ import { specifierNumber } from "ES6_Named1"; // Error: Did you mean \`specifier /////////////////////////////////////////////////// import { numberValue1 as numberValue8, - numberValue2 as numberValue9 + numberValue2 as numberValue9, } from "./ES6_ExportAllFromMulti"; var at1: number = numberValue8; diff --git a/tests/flow/declare_type/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declare_type/lib/__snapshots__/jsfmt.spec.js.snap index 61fc535d7..87bf8bb91 100644 --- a/tests/flow/declare_type/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declare_type/lib/__snapshots__/jsfmt.spec.js.snap @@ -69,7 +69,7 @@ declare module "foo" { declare type Id = T; declare var exports: { - (a: number, b: number): number + (a: number, b: number): number, }; } diff --git a/tests/flow/destructuring/__snapshots__/jsfmt.spec.js.snap b/tests/flow/destructuring/__snapshots__/jsfmt.spec.js.snap index 3d31ace49..37f21cab2 100644 --- a/tests/flow/destructuring/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/destructuring/__snapshots__/jsfmt.spec.js.snap @@ -201,22 +201,22 @@ obj_rest({ p: { q: 0, r: null } }); function obj_prop_annot( { - p = true // error: boolean ~> string + p = true, // error: boolean ~> string }: { - p: string + p: string, } = { - p: 0 // error: number ~> string + p: 0, // error: number ~> string } ) { (p: void); // error: string ~> void } var { - p = true // error: boolean ~> string + p = true, // error: boolean ~> string }: { - p: string + p: string, } = { - p: 0 // error: number ~> string + p: 0, // error: number ~> string }; (p: void); // error: string ~> void @@ -620,7 +620,7 @@ function bar() { // @flow var { x } = { - x: { foo: "foo" } + x: { foo: "foo" }, }; function bar() { diff --git a/tests/flow/dictionary/__snapshots__/jsfmt.spec.js.snap b/tests/flow/dictionary/__snapshots__/jsfmt.spec.js.snap index bb54b9a0c..98d328ee5 100644 --- a/tests/flow/dictionary/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/dictionary/__snapshots__/jsfmt.spec.js.snap @@ -57,7 +57,7 @@ function foo0( } function foo2(x: { - [key: string]: number + [key: string]: number, }): { [key: string]: number, +toString: () => string } { // x's prototype has a toString method return x; @@ -469,7 +469,7 @@ function mix_with_declared_props(o: { [k: number]: X, p: Y }, x: X, y: Y) { // Indeed, dict types are still Objects and have Object.prototype stuff function object_prototype(o: { - [k: string]: number + [k: string]: number, }): { [k: string]: number, +toString: () => string } { (o.toString(): boolean); // error: string ~> boolean return o; // ok @@ -480,7 +480,7 @@ function object_prototype(o: { // write into a declared prop unsoundly. function unsound_string_conversion_alias_declared_prop(o: { [k: number]: any, - "0": X + "0": X, }) { o[0] = "not-x"; // a["0"] no longer X } @@ -509,19 +509,19 @@ function subtype_dict_values_fresh_exception() { let a: { [k: string]: A } = { a: new A(), // ok, A == A b: new B(), // ok, B <: A - c: new C() // ok, C <: A + c: new C(), // ok, C <: A }; let b: { [k: string]: B } = { a: new A(), // error, A not <: B b: new B(), // ok, B == B - c: new C() // ok, C <: A + c: new C(), // ok, C <: A }; let c: { [k: string]: C } = { a: new A(), // error, A not <: C b: new B(), // error, A not <: C - c: new C() // ok, C == C + c: new C(), // ok, C == C }; } @@ -777,7 +777,7 @@ function foo3(x: { [key: string]: number }): { foo: number } { // error: foo can't exist in x function foo4(x: { - [key: string]: number + [key: string]: number, }): { [key: string]: number, foo: string } { return x; } @@ -890,7 +890,7 @@ type QueryFunction = (params: Params) => string; var o: { foo: QueryFunction } = { foo(params) { return params.count; // error, number ~/~ string - } + }, }; module.exports = o; diff --git a/tests/flow/disjoint-union-perf/__snapshots__/jsfmt.spec.js.snap b/tests/flow/disjoint-union-perf/__snapshots__/jsfmt.spec.js.snap index 734f26e47..17ad46002 100644 --- a/tests/flow/disjoint-union-perf/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/disjoint-union-perf/__snapshots__/jsfmt.spec.js.snap @@ -105,7 +105,7 @@ export type Pos = { firstLine: number, firstColumn: number, lastLine: number, - lastColumn: number + lastColumn: number, }; export type TypedBinaryOpNode = { @@ -115,7 +115,7 @@ export type TypedBinaryOpNode = { rhs: TypedNode, pos: Pos, exprType: InferredType, - typed: true + typed: true, }; export type TypedUnaryMinusNode = { @@ -123,7 +123,7 @@ export type TypedUnaryMinusNode = { op: TypedNode, pos: Pos, exprType: InferredType, - typed: true + typed: true, }; export type TypedNumberNode = { @@ -131,7 +131,7 @@ export type TypedNumberNode = { value: number, pos: Pos, exprType: "number", - typed: true + typed: true, }; export type TypedStringLiteralNode = { @@ -139,7 +139,7 @@ export type TypedStringLiteralNode = { value: string, pos: Pos, exprType: "string", - typed: true + typed: true, }; export type TypedVariableNode = { @@ -147,7 +147,7 @@ export type TypedVariableNode = { name: string, pos: Pos, exprType: InferredType, - typed: true + typed: true, }; export type TypedFunctionInvocationNode = { @@ -156,7 +156,7 @@ export type TypedFunctionInvocationNode = { parameters: TypedNode[], pos: Pos, exprType: "error" | "string", - typed: true + typed: true, }; export type TypedNode = @@ -961,18 +961,18 @@ export type Comment = { loc: ?SourceLocation, value: string, leading: boolean, - trailing: boolean + trailing: boolean, }; export type SourceLocation = { start: SourcePosition, end: SourcePosition, - source: ?string + source: ?string, }; export type SourcePosition = { line: number, - column: number + column: number, }; export type File = { @@ -981,7 +981,7 @@ export type File = { end: SourcePosition, comments: ?Array, type: "File", - program: Program + program: Program, }; export type Program = { @@ -990,7 +990,7 @@ export type Program = { end: SourcePosition, comments: ?Array, type: "Program", - body: Statement[] + body: Statement[], }; export type BinaryOperator = @@ -1098,7 +1098,7 @@ export type EmptyStatement = { start: SourcePosition, end: SourcePosition, comments: ?Array, - type: "EmptyStatement" + type: "EmptyStatement", }; export type BlockStatement = { @@ -1107,7 +1107,7 @@ export type BlockStatement = { end: SourcePosition, comments: ?Array, type: "BlockStatement", - body: Statement[] + body: Statement[], }; export type ExpressionStatement = { @@ -1116,7 +1116,7 @@ export type ExpressionStatement = { end: SourcePosition, comments: ?Array, type: "ExpressionStatement", - expression: Expression + expression: Expression, }; export type IfStatement = { @@ -1127,7 +1127,7 @@ export type IfStatement = { type: "IfStatement", test: Expression, consequent: Statement, - alternate: ?Statement + alternate: ?Statement, }; export type BreakStatement = { @@ -1136,7 +1136,7 @@ export type BreakStatement = { end: SourcePosition, comments: ?Array, type: "BreakStatement", - label: ?Identifier + label: ?Identifier, }; export type ContinueStatement = { @@ -1145,7 +1145,7 @@ export type ContinueStatement = { end: SourcePosition, comments: ?Array, type: "ContinueStatement", - label: ?Identifier + label: ?Identifier, }; export type ReturnStatement = { @@ -1154,7 +1154,7 @@ export type ReturnStatement = { end: SourcePosition, comments: ?Array, type: "ReturnStatement", - argument: ?Expression + argument: ?Expression, }; export type ThrowStatement = { @@ -1163,7 +1163,7 @@ export type ThrowStatement = { end: SourcePosition, comments: ?Array, type: "ThrowStatement", - argument: ?Expression + argument: ?Expression, }; export type WhileStatement = { @@ -1173,7 +1173,7 @@ export type WhileStatement = { comments: ?Array, type: "WhileStatement", test: Expression, - body: Statement + body: Statement, }; export type ForStatement = { @@ -1185,7 +1185,7 @@ export type ForStatement = { init: ?(VariableDeclaration | Expression), test: ?Expression, update: ?Expression, - body: Statement + body: Statement, }; export type ForInStatement = { @@ -1196,7 +1196,7 @@ export type ForInStatement = { type: "ForInStatement", left: VariableDeclaration | Expression, right: Expression, - body: Statement + body: Statement, }; export type TryStatement = { @@ -1208,7 +1208,7 @@ export type TryStatement = { block: BlockStatement, handler: ?CatchClause, handlers: CatchClause[], - finalizer: ?BlockStatement + finalizer: ?BlockStatement, }; export type CatchClause = { @@ -1219,7 +1219,7 @@ export type CatchClause = { type: "CatchClause", param: Pattern, guard: ?Expression, - body: BlockStatement + body: BlockStatement, }; export type Expression = @@ -1245,7 +1245,7 @@ export type Identifier = { end: SourcePosition, comments: ?Array, type: "Identifier", - name: string + name: string, }; export type Literal = { @@ -1255,7 +1255,7 @@ export type Literal = { comments: ?Array, type: "Literal", value: ?(string | boolean | number | RegExp), - regex: ?{ pattern: string, flags: string } + regex: ?{ pattern: string, flags: string }, }; export type ThisExpression = { @@ -1263,7 +1263,7 @@ export type ThisExpression = { start: SourcePosition, end: SourcePosition, comments: ?Array, - type: "ThisExpression" + type: "ThisExpression", }; export type ArrayExpression = { @@ -1272,7 +1272,7 @@ export type ArrayExpression = { end: SourcePosition, comments: ?Array, type: "ArrayExpression", - elements: Expression[] + elements: Expression[], }; export type ObjectExpreession = { @@ -1281,7 +1281,7 @@ export type ObjectExpreession = { end: SourcePosition, comments: ?Array, type: "ObjectExpression", - properties: Property[] + properties: Property[], }; export type Property = { @@ -1292,7 +1292,7 @@ export type Property = { type: "Property", kind: "init" | "get" | "set", key: Literal | Identifier, - value: Expression + value: Expression, }; export type FunctionExpression = { @@ -1303,7 +1303,7 @@ export type FunctionExpression = { type: "FunctionExpression", id: ?Identifier, params: Pattern[], - body: BlockStatement + body: BlockStatement, }; export type BinaryExpression = { @@ -1314,7 +1314,7 @@ export type BinaryExpression = { type: "BinaryExpression", operator: BinaryOperator, left: Expression, - right: Expression + right: Expression, }; export type UnaryExpression = { @@ -1325,7 +1325,7 @@ export type UnaryExpression = { type: "UnaryExpression", operator: UnaryOperator, argument: Expression, - prefix: boolean + prefix: boolean, }; export type AssignmentExpression = { @@ -1336,7 +1336,7 @@ export type AssignmentExpression = { type: "AssignmentExpression", operator: AssignmentOperator, left: Pattern, - right: Expression + right: Expression, }; export type UpdateExpression = { @@ -1347,7 +1347,7 @@ export type UpdateExpression = { type: "UpdateExpression", operator: UpdateOperator, argument: Expression, - prefix: boolean + prefix: boolean, }; export type LogicalExpression = { @@ -1358,7 +1358,7 @@ export type LogicalExpression = { type: "LogicalExpression", operator: LogicalOperator, left: Expression, - right: Expression + right: Expression, }; export type ConditionalExpression = { @@ -1369,7 +1369,7 @@ export type ConditionalExpression = { type: "ConditionalExpression", test: Expression, consequent: Expression, - alternate: Expression + alternate: Expression, }; export type NewExpression = { @@ -1379,7 +1379,7 @@ export type NewExpression = { comments: ?Array, type: "NewExpression", callee: Expression, - arguments: Expression[] + arguments: Expression[], }; export type CallExpression = { @@ -1389,7 +1389,7 @@ export type CallExpression = { comments: ?Array, type: "CallExpression", callee: Expression, - arguments: Expression[] + arguments: Expression[], }; export type MemberExpression = { @@ -1400,7 +1400,7 @@ export type MemberExpression = { type: "MemberExpression", object: Expression, property: Identifier | Expression, - computed: boolean + computed: boolean, }; // ast-types exports all expressions as patterns. // That seems not like it was intended. @@ -1415,7 +1415,7 @@ export type VariableDeclaration = { comments: ?Array, type: "VariableDeclaration", kind: "var" | "let" | "const", - declarations: VariableDeclarator[] + declarations: VariableDeclarator[], }; export type FunctionDeclaration = { @@ -1426,7 +1426,7 @@ export type FunctionDeclaration = { type: "FunctionDeclaration", id: Identifier, body: BlockStatement, - params: Pattern[] + params: Pattern[], }; export type VariableDeclarator = { @@ -1436,7 +1436,7 @@ export type VariableDeclarator = { comments: ?Array, type: "VariableDeclarator", id: Pattern, - init: ?Expression + init: ?Expression, }; const a: any = null; @@ -1541,7 +1541,7 @@ export const builders: { body: BlockStatement, params: Pattern[] ): FunctionDeclaration, - variableDeclarator(id: Pattern, init?: Expression): VariableDeclarator + variableDeclarator(id: Pattern, init?: Expression): VariableDeclarator, } = a; ================================================================================ diff --git a/tests/flow/dom/__snapshots__/jsfmt.spec.js.snap b/tests/flow/dom/__snapshots__/jsfmt.spec.js.snap index 75a42a91f..58624762c 100644 --- a/tests/flow/dom/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/dom/__snapshots__/jsfmt.spec.js.snap @@ -32,7 +32,7 @@ let tests = [ // moveTo function(ctx: CanvasRenderingContext2D) { ctx.moveTo("0", "1"); // error: should be numbers - } + }, ]; ================================================================================ @@ -62,7 +62,7 @@ let tests = [ function(document: Document) { const event = document.createEvent("CustomEvent"); event.initCustomEvent("butts", true, false, { nice: 42 }); - } + }, ]; ================================================================================ @@ -100,7 +100,7 @@ let tests = [ (document.createElement("select"): HTMLSelectElement); (document.querySelector("select"): HTMLSelectElement | null); (document.createElement("hr"): HTMLElement); // GH #3752 - } + }, ]; ================================================================================ @@ -148,7 +148,7 @@ let tests = [ element.scrollIntoView({ behavior: "invalid" }); element.scrollIntoView({ block: "invalid" }); element.scrollIntoView(1); - } + }, ]; ================================================================================ @@ -176,7 +176,7 @@ let tests = [ // getContext function(el: HTMLCanvasElement) { (el.getContext("2d"): ?CanvasRenderingContext2D); - } + }, ]; ================================================================================ @@ -224,7 +224,7 @@ let tests = [ element.scrollIntoView({ behavior: "invalid" }); element.scrollIntoView({ block: "invalid" }); element.scrollIntoView(1); - } + }, ]; ================================================================================ @@ -260,7 +260,7 @@ let tests = [ el.setRangeText("foo", 123, 234); el.setRangeText("foo", 123, 234, "select"); el.setRangeText("foo", 123, 234, "bogus"); // invalid value - } + }, ]; ================================================================================ @@ -374,7 +374,7 @@ let tests = [ window.onmessage = (event: MessageEvent) => { (event.target: window); }; - } + }, ]; ================================================================================ @@ -408,7 +408,7 @@ let tests = [ (path.arcTo(0, 0, 0, 0, 10): void); // valid (path.arcTo(0, 0, 0, 0, 10, 20, 5): void); // valid (path.arcTo(0, 0, 0, 0, 10, "20", 5): void); // invalid - } + }, ]; ================================================================================ @@ -496,9 +496,9 @@ let tests = [ oldAttributeValue, newAttributeValue, attributeNamespace - ) {} - } - }) + ) {}, + }, + }), }); }, // or with Object.assign() @@ -513,8 +513,8 @@ let tests = [ oldAttributeValue, newAttributeValue, attributeNamespace - ) {} - }) + ) {}, + }), }); }, // should complain about invalid callback parameters @@ -526,10 +526,10 @@ let tests = [ oldVal: string, // Error: This might be null newVal: string, // Error: This might be null namespace: string - ) {} - } + ) {}, + }, }); - } + }, ]; ================================================================================ @@ -930,10 +930,10 @@ let tests = [ ); // valid document.createNodeIterator(document.body, -1, node => "accept"); // invalid document.createNodeIterator(document.body, -1, { - acceptNode: node => NodeFilter.FILTER_ACCEPT + acceptNode: node => NodeFilter.FILTER_ACCEPT, }); // valid document.createNodeIterator(document.body, -1, { - acceptNode: node => "accept" + acceptNode: node => "accept", }); // invalid document.createNodeIterator(document.body, -1, {}); // invalid }, @@ -945,13 +945,13 @@ let tests = [ ); // valid document.createTreeWalker(document.body, -1, node => "accept"); // invalid document.createTreeWalker(document.body, -1, { - acceptNode: node => NodeFilter.FILTER_ACCEPT + acceptNode: node => NodeFilter.FILTER_ACCEPT, }); // valid document.createTreeWalker(document.body, -1, { - acceptNode: node => "accept" + acceptNode: node => "accept", }); // invalid document.createTreeWalker(document.body, -1, {}); // invalid - } + }, ]; ================================================================================ diff --git a/tests/flow/enumerror/__snapshots__/jsfmt.spec.js.snap b/tests/flow/enumerror/__snapshots__/jsfmt.spec.js.snap index 0d54df5e3..8b359a7cd 100644 --- a/tests/flow/enumerror/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/enumerror/__snapshots__/jsfmt.spec.js.snap @@ -40,8 +40,8 @@ function isActive(ad: { state: $Keys<{ PAUSED: string, ACTIVE: string, - DELETED: string - }> + DELETED: string, + }>, }): boolean { return ad.state === "ACTIVE"; } @@ -50,7 +50,7 @@ isActive({ state: "PAUSE" }); var MyStates = { PAUSED: "PAUSED", ACTIVE: "ACTIVE", - DELETED: "DELETED" + DELETED: "DELETED", }; function isActive2(ad: { state: $Keys }): boolean { return ad.state === MyStates.ACTIVE; diff --git a/tests/flow/es6modules/__snapshots__/jsfmt.spec.js.snap b/tests/flow/es6modules/__snapshots__/jsfmt.spec.js.snap index 08fc212e6..be1a4a441 100644 --- a/tests/flow/es6modules/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/es6modules/__snapshots__/jsfmt.spec.js.snap @@ -118,7 +118,7 @@ module.exports = Object.freeze({ */ module.exports = Object.freeze({ - numberValue1: 1 + numberValue1: 1, }); ================================================================================ @@ -154,7 +154,7 @@ module.exports = { numberValue2: 2, numberValue3: 3, numberValue4: 4, - numberValue5: 5 + numberValue5: 5, }; ================================================================================ @@ -578,7 +578,7 @@ export { export { numberValue1, - numberValue2 as numberValue2_renamed + numberValue2 as numberValue2_renamed, } from "ES6_ExportFrom_Source1"; ================================================================================ @@ -608,7 +608,7 @@ export { export { numberValue1, - numberValue2 as numberValue2_renamed2 + numberValue2 as numberValue2_renamed2, } from "ES6_ExportFrom_Source2"; ================================================================================ @@ -858,7 +858,7 @@ module.exports = { */ module.exports = { - numberValue: 42 + numberValue: 42, }; ================================================================================ @@ -1518,7 +1518,7 @@ import { specifierNumber } from "ES6_Named1"; // Error: Did you mean \`specifier /////////////////////////////////////////////////// import { numberValue1 as numberValue8, - numberValue2 as numberValue9 + numberValue2 as numberValue9, } from "./ES6_ExportAllFromMulti"; var at1: number = numberValue8; diff --git a/tests/flow/es_declare_module/flow-typed/__snapshots__/jsfmt.spec.js.snap b/tests/flow/es_declare_module/flow-typed/__snapshots__/jsfmt.spec.js.snap index df15de788..75c37f9f0 100644 --- a/tests/flow/es_declare_module/flow-typed/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/es_declare_module/flow-typed/__snapshots__/jsfmt.spec.js.snap @@ -38,7 +38,7 @@ declare module "CJS_Clobbered" { declare var num2: number; declare type numType = number; declare var exports: { - numExport: number + numExport: number, }; } diff --git a/tests/flow/export_type/__snapshots__/jsfmt.spec.js.snap b/tests/flow/export_type/__snapshots__/jsfmt.spec.js.snap index fa89e7a1a..e7818d1e3 100644 --- a/tests/flow/export_type/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/export_type/__snapshots__/jsfmt.spec.js.snap @@ -72,7 +72,7 @@ import type { inlinedType1, standaloneType1, talias1, - talias3 + talias3, } from "./types_only"; var a: inlinedType1 = 42; diff --git a/tests/flow/facebookisms/__snapshots__/jsfmt.spec.js.snap b/tests/flow/facebookisms/__snapshots__/jsfmt.spec.js.snap index a0f8da778..d0204a912 100644 --- a/tests/flow/facebookisms/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/facebookisms/__snapshots__/jsfmt.spec.js.snap @@ -78,7 +78,7 @@ let tests = [ (copyProperties(result, { foo: "a" }, { bar: 123 }): { foo: string, bar: number, - baz: boolean + baz: boolean, }); }, @@ -100,7 +100,7 @@ let tests = [ function(copyProperties: Object$Assign) { function x(cb: Function) {} x(copyProperties); - } + }, ]; ================================================================================ @@ -140,7 +140,7 @@ let tests = [ let x: ?string = null; invariant(x); (x: string); - } + }, ]; ================================================================================ @@ -254,7 +254,7 @@ let tests = [ function(mergeInto: $Facebookism$MergeInto) { function x(cb: Function) {} x(mergeInto); - } + }, ]; ================================================================================ diff --git a/tests/flow/fetch/__snapshots__/jsfmt.spec.js.snap b/tests/flow/fetch/__snapshots__/jsfmt.spec.js.snap index 99749677d..3c41d6ab0 100644 --- a/tests/flow/fetch/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/fetch/__snapshots__/jsfmt.spec.js.snap @@ -47,10 +47,10 @@ const b: Promise = fetch(myRequest); // incorrect var myInit = { method: "GET", headers: { - "Content-Type": "image/jpeg" + "Content-Type": "image/jpeg", }, mode: "cors", - cache: "default" + cache: "default", }; const c: Promise = fetch("image.png").then(response => response.blob()); // correct @@ -221,10 +221,10 @@ new Request(new URL("http://example.org")); // correct const h: Request = new Request("http://example.org", { method: "GET", headers: { - "Content-Type": "image/jpeg" + "Content-Type": "image/jpeg", }, mode: "cors", - cache: "default" + cache: "default", }); // correct var bodyUsed: boolean = h.bodyUsed; @@ -237,34 +237,34 @@ h.arrayBuffer().then((ab: Buffer) => ab); // incorrect const i: Request = new Request("http://example.org", { method: "POST", headers: { - "Content-Type": "application/octet-stream" + "Content-Type": "application/octet-stream", }, - body: new ArrayBuffer(10) + body: new ArrayBuffer(10), }); // correct const j: Request = new Request("http://example.org", { method: "POST", headers: { - "Content-Type": "application/octet-stream" + "Content-Type": "application/octet-stream", }, - body: new Uint8Array(10) + body: new Uint8Array(10), }); // correct const k: Request = new Request("http://example.org", { method: "POST", headers: { - "Content-Type": "image/jpeg" + "Content-Type": "image/jpeg", }, body: new URLSearchParams("key=value"), mode: "cors", - cache: "default" + cache: "default", }); // correct const l: Request = new Request("http://example.org", { method: "GET", headers: "Content-Type: image/jpeg", mode: "cors", - cache: "default" + cache: "default", }); // incorrect - headers is string new Request("/", { method: "post" }); // correct @@ -338,28 +338,28 @@ new Response("", { status: null }); // incorrect const f: Response = new Response("responsebody", { status: 404, - headers: "'Content-Type': 'image/jpeg'" + headers: "'Content-Type': 'image/jpeg'", }); // incorrect const g: Response = new Response("responsebody", { status: 404, headers: { - "Content-Type": "image/jpeg" - } + "Content-Type": "image/jpeg", + }, }); // correct const h: Response = new Response("responsebody", { status: 404, headers: new Headers({ - "Content-Type": "image/jpeg" - }) + "Content-Type": "image/jpeg", + }), }); // correct, if verbose const i: Response = new Response({ status: 404, headers: new Headers({ - "Content-Type": "image/jpeg" - }) + "Content-Type": "image/jpeg", + }), }); // incorrect const ok: boolean = h.ok; diff --git a/tests/flow/function/__snapshots__/jsfmt.spec.js.snap b/tests/flow/function/__snapshots__/jsfmt.spec.js.snap index cdac9b498..f0eaa5ca4 100644 --- a/tests/flow/function/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/function/__snapshots__/jsfmt.spec.js.snap @@ -173,7 +173,7 @@ let tests = [ function(x: { (a: string, b: string): void, bind(a: string): void }) { (x.bind("foo"): void); // ok (x.bind(123): void); // error, number !~> string - } + }, ]; ================================================================================ @@ -411,7 +411,7 @@ let tests = [ // Non-(Function.prototype) properties on a \`Function\` type should be \`any\` (z.foo: number); (z.foo: string); - } + }, ]; // \`Function\` types can be bound (resulting in a \`Function\` type) diff --git a/tests/flow/get-def/__snapshots__/jsfmt.spec.js.snap b/tests/flow/get-def/__snapshots__/jsfmt.spec.js.snap index 671677e1b..497a4d3a5 100644 --- a/tests/flow/get-def/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/get-def/__snapshots__/jsfmt.spec.js.snap @@ -106,7 +106,7 @@ module.exports = { bar: function(): number { return 42; - } + }, }; ================================================================================ diff --git a/tests/flow/get-def2/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/get-def2/lib/__snapshots__/jsfmt.spec.js.snap index 53dbbd415..6bab10bb3 100644 --- a/tests/flow/get-def2/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/get-def2/lib/__snapshots__/jsfmt.spec.js.snap @@ -20,7 +20,7 @@ type $JSXIntrinsic = Class<$React.Component>; type $JSXIntrinsics = { div: $JSXIntrinsic<{ id: string }>, - span: $JSXIntrinsic<{ id: string, class: string }> + span: $JSXIntrinsic<{ id: string, class: string }>, }; ================================================================================ diff --git a/tests/flow/getters_and_setters_disabled/__snapshots__/jsfmt.spec.js.snap b/tests/flow/getters_and_setters_disabled/__snapshots__/jsfmt.spec.js.snap index 4974d7ad2..1769f05db 100644 --- a/tests/flow/getters_and_setters_disabled/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/getters_and_setters_disabled/__snapshots__/jsfmt.spec.js.snap @@ -54,13 +54,13 @@ var f = { get ["d"]() { return "foo"; }, - set ["d"](x: number) {} + set ["d"](x: number) {}, }; type T = { get a(): number, set b(x: number): void, - c: 10 + c: 10, }; declare class Foo { diff --git a/tests/flow/getters_and_setters_enabled/__snapshots__/jsfmt.spec.js.snap b/tests/flow/getters_and_setters_enabled/__snapshots__/jsfmt.spec.js.snap index 9d117c1a5..b1723bb70 100644 --- a/tests/flow/getters_and_setters_enabled/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/getters_and_setters_enabled/__snapshots__/jsfmt.spec.js.snap @@ -379,7 +379,7 @@ var obj = { set [z](x: string) {}, get [z](): string { return string; - } + }, }; // Test getting properties with getters @@ -499,7 +499,7 @@ type T = { set exampleOfOrderOfGetterAndSetter(x: B): void, set exampleOfOrderOfGetterAndSetterReordered(x: B): void, - get exampleOfOrderOfGetterAndSetterReordered(): A + get exampleOfOrderOfGetterAndSetterReordered(): A, }; function test(obj: T) { @@ -569,8 +569,8 @@ const Example = React.createClass({ set b(x: number) { this.c = x; }, - c: React.PropTypes.string - } + c: React.PropTypes.string, + }, }); ; // error: property \`a\` not found diff --git a/tests/flow/import_type/__snapshots__/jsfmt.spec.js.snap b/tests/flow/import_type/__snapshots__/jsfmt.spec.js.snap index ae07c78b8..e09bf87a9 100644 --- a/tests/flow/import_type/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/import_type/__snapshots__/jsfmt.spec.js.snap @@ -155,13 +155,13 @@ export function givesAFoo3Obj(): AliasFoo3 { */ export type AliasFoo3 = { - givesANum(): number + givesANum(): number, }; export function givesAFoo3Obj(): AliasFoo3 { return { givesANum(): number { return 42; - } + }, }; } diff --git a/tests/flow/import_typeof/__snapshots__/jsfmt.spec.js.snap b/tests/flow/import_typeof/__snapshots__/jsfmt.spec.js.snap index b715c63fc..b8c34820c 100644 --- a/tests/flow/import_typeof/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/import_typeof/__snapshots__/jsfmt.spec.js.snap @@ -175,13 +175,13 @@ export function givesAFoo3Obj(): AliasFoo3 { */ export type AliasFoo3 = { - givesANum(): number + givesANum(): number, }; export function givesAFoo3Obj(): AliasFoo3 { return { givesANum(): number { return 42; - } + }, }; } diff --git a/tests/flow/indexer/__snapshots__/jsfmt.spec.js.snap b/tests/flow/indexer/__snapshots__/jsfmt.spec.js.snap index ba3e11edd..d1fafacad 100644 --- a/tests/flow/indexer/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/indexer/__snapshots__/jsfmt.spec.js.snap @@ -114,9 +114,9 @@ let tests = [ function() { ({}: { [k1: string]: string, - [k2: number]: number // error: not supported (yet) + [k2: number]: number, // error: not supported (yet) }); - } + }, ]; ================================================================================ diff --git a/tests/flow/intersection/__snapshots__/jsfmt.spec.js.snap b/tests/flow/intersection/__snapshots__/jsfmt.spec.js.snap index 10b6db13c..01c0d886a 100644 --- a/tests/flow/intersection/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/intersection/__snapshots__/jsfmt.spec.js.snap @@ -103,7 +103,7 @@ type DuplexStreamOptions = ReadableStreamOptions & WritableStreamOptions & { allowHalfOpen?: boolean, readableObjectMode?: boolean, - writableObjectMode?: boolean + writableObjectMode?: boolean, }; function hasObjectMode_bad(options: DuplexStreamOptions): boolean { diff --git a/tests/flow/intersection/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/intersection/lib/__snapshots__/jsfmt.spec.js.snap index f459e752e..fe67ca38e 100644 --- a/tests/flow/intersection/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/intersection/lib/__snapshots__/jsfmt.spec.js.snap @@ -55,13 +55,13 @@ type ObjAssignT = { foo: string } & { bar: string }; type ReadableStreamOptions = { highWaterMark?: number, encoding?: ?string, - objectMode?: boolean + objectMode?: boolean, }; type WritableStreamOptions = { highWaterMark?: number, decodeString?: boolean, - objectMode?: boolean + objectMode?: boolean, }; // used in test_fun.js diff --git a/tests/flow/iterable/__snapshots__/jsfmt.spec.js.snap b/tests/flow/iterable/__snapshots__/jsfmt.spec.js.snap index fa37d4bac..286e45fef 100644 --- a/tests/flow/iterable/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/iterable/__snapshots__/jsfmt.spec.js.snap @@ -171,7 +171,7 @@ function makeIterator(coin_flip: () => boolean): Iterator { } else { return { done }; } - } + }, }; } @@ -188,7 +188,7 @@ function makeIterator(coin_flip: () => boolean): Iterator { } else { return { done }; // Error void ~> string } - } + }, }; } diff --git a/tests/flow/jsx_intrinsics.builtin/__snapshots__/jsfmt.spec.js.snap b/tests/flow/jsx_intrinsics.builtin/__snapshots__/jsfmt.spec.js.snap index de9eaa75c..3e7696b36 100644 --- a/tests/flow/jsx_intrinsics.builtin/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/jsx_intrinsics.builtin/__snapshots__/jsfmt.spec.js.snap @@ -35,7 +35,7 @@ var React = require("react"); class CustomComponent extends React.Component { props: { - prop: string + prop: string, }; } diff --git a/tests/flow/jsx_intrinsics.custom/__snapshots__/jsfmt.spec.js.snap b/tests/flow/jsx_intrinsics.custom/__snapshots__/jsfmt.spec.js.snap index 3d34522b5..64474b137 100644 --- a/tests/flow/jsx_intrinsics.custom/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/jsx_intrinsics.custom/__snapshots__/jsfmt.spec.js.snap @@ -31,7 +31,7 @@ var React = require("react"); class CustomComponent extends React.Component { props: { - prop: string + prop: string, }; } diff --git a/tests/flow/jsx_intrinsics.custom/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/jsx_intrinsics.custom/lib/__snapshots__/jsfmt.spec.js.snap index 53dbbd415..6bab10bb3 100644 --- a/tests/flow/jsx_intrinsics.custom/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/jsx_intrinsics.custom/lib/__snapshots__/jsfmt.spec.js.snap @@ -20,7 +20,7 @@ type $JSXIntrinsic = Class<$React.Component>; type $JSXIntrinsics = { div: $JSXIntrinsic<{ id: string }>, - span: $JSXIntrinsic<{ id: string, class: string }> + span: $JSXIntrinsic<{ id: string, class: string }>, }; ================================================================================ diff --git a/tests/flow/keyvalue/__snapshots__/jsfmt.spec.js.snap b/tests/flow/keyvalue/__snapshots__/jsfmt.spec.js.snap index 7a1e8cef1..390076d5f 100644 --- a/tests/flow/keyvalue/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/keyvalue/__snapshots__/jsfmt.spec.js.snap @@ -20,7 +20,7 @@ let tests = [ let tests = [ function(x: { [key: number]: string }) { (x[""]: number); - } + }, ]; ================================================================================ diff --git a/tests/flow/last_duplicate_property_wins/__snapshots__/jsfmt.spec.js.snap b/tests/flow/last_duplicate_property_wins/__snapshots__/jsfmt.spec.js.snap index 3aeea8c65..0307f81c1 100644 --- a/tests/flow/last_duplicate_property_wins/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/last_duplicate_property_wins/__snapshots__/jsfmt.spec.js.snap @@ -97,7 +97,7 @@ const o = { qux: 42, qux(): string { return "hello"; - } // last wins + }, // last wins }; // check diff --git a/tests/flow/literal/__snapshots__/jsfmt.spec.js.snap b/tests/flow/literal/__snapshots__/jsfmt.spec.js.snap index 0e6875d23..6d49e6ddf 100644 --- a/tests/flow/literal/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/literal/__snapshots__/jsfmt.spec.js.snap @@ -16,7 +16,7 @@ module.exports = APIKeys; =====================================output===================================== var APIKeys = { AGE: "age", - NAME: "name" + NAME: "name", }; module.exports = APIKeys; diff --git a/tests/flow/logical/__snapshots__/jsfmt.spec.js.snap b/tests/flow/logical/__snapshots__/jsfmt.spec.js.snap index cdc9bb14a..66939ae06 100644 --- a/tests/flow/logical/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/logical/__snapshots__/jsfmt.spec.js.snap @@ -916,7 +916,7 @@ function logical13(x: number): Array<{ x: string }> { { x: 1 && "bar" }, { x: "foo" && "bar" }, { x: "foo" && "bar" }, - { x: "foo" && "bar" } + { x: "foo" && "bar" }, ]; } @@ -932,7 +932,7 @@ function logical14(x: number): Array<{ x: string }> { { x: 0 || "bar" }, { x: "foo" || "bar" }, { x: "foo" || "bar" }, - { x: "foo" || "bar" } + { x: "foo" || "bar" }, ]; } diff --git a/tests/flow/missing_annotation/__snapshots__/jsfmt.spec.js.snap b/tests/flow/missing_annotation/__snapshots__/jsfmt.spec.js.snap index e5a140386..74ec57481 100644 --- a/tests/flow/missing_annotation/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/missing_annotation/__snapshots__/jsfmt.spec.js.snap @@ -121,24 +121,24 @@ var Foo = { b: function(arg) { // missing arg annotation return { - bar: arg + bar: arg, }; }, c: function(arg: string) { // no return annotation required return { - bar: arg + bar: arg, }; }, d: function( arg: string ): { - bar: string + bar: string, } { return { - bar: arg + bar: arg, }; }, @@ -158,7 +158,7 @@ var Foo = { // no error return x; }; - } + }, }; var Bar = { @@ -170,7 +170,7 @@ var Bar = { c: Foo.c("bar"), // no annotation required - d: Foo.d("bar") // no annotation required + d: Foo.d("bar"), // no annotation required }; (module.exports = Foo), Bar; diff --git a/tests/flow/more_react/__snapshots__/jsfmt.spec.js.snap b/tests/flow/more_react/__snapshots__/jsfmt.spec.js.snap index 1f9b6d610..c32b96549 100644 --- a/tests/flow/more_react/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/more_react/__snapshots__/jsfmt.spec.js.snap @@ -116,7 +116,7 @@ var App = React.createClass({ {foo(z, x)} // error, since z: number
); - } + }, }); module.exports = App; @@ -156,7 +156,7 @@ var React = require("react"); * react classes as initialized, when the class was created with createClass(). * This would manifest as complaining that metric requires an annotation */ var App = React.createClass({ - metrics: [1, 2, 3] + metrics: [1, 2, 3], }); module.exports = App; @@ -296,14 +296,14 @@ var React = require("React"); var C = React.createClass({ propTypes: { - title: React.PropTypes.string.isRequired - } + title: React.PropTypes.string.isRequired, + }, }); var D = React.createClass({ propTypes: { name: React.PropTypes.string.isRequired, - ...C.propTypes - } + ...C.propTypes, + }, }); ; // errors: properties \`name\` and \`title\` not found diff --git a/tests/flow/new_react/__snapshots__/jsfmt.spec.js.snap b/tests/flow/new_react/__snapshots__/jsfmt.spec.js.snap index ba0820e7d..457ea98f7 100644 --- a/tests/flow/new_react/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/new_react/__snapshots__/jsfmt.spec.js.snap @@ -68,7 +68,7 @@ var FeedUFI = React.createClass({ className: "", key: "", feedback: { feedback }, - permalink: "" + permalink: "", }; var ignored = ; return ( @@ -78,7 +78,7 @@ var FeedUFI = React.createClass({ render: function(): ?React.Element { return
; - } + }, }); module.exports = FeedUFI; @@ -100,7 +100,7 @@ module.exports = { =====================================output===================================== /* @providesModule Mixin */ module.exports = { - success: function() {} + success: function() {}, }; ================================================================================ @@ -151,12 +151,12 @@ var React = require("react"); var UFILikeCount = React.createClass({ propTypes: { permalink: React.PropTypes.string, - feedback: React.PropTypes.object.isRequired + feedback: React.PropTypes.object.isRequired, }, render: function(): ?React.Element { return
; - } + }, }); module.exports = UFILikeCount; @@ -377,7 +377,7 @@ var FooLegacy = React.createClass({ is_mounted: (undefined: ?boolean), propTypes: { - x: React.PropTypes.number.isRequired + x: React.PropTypes.number.isRequired, }, getDefaultProps(): DefaultProps { @@ -385,7 +385,7 @@ var FooLegacy = React.createClass({ }, statics: { - bar(): void {} + bar(): void {}, }, qux(): void { @@ -404,7 +404,7 @@ var FooLegacy = React.createClass({ componentWillReceiveProps(nextProps: Object, nextContext: any): void { this.qux(); - } + }, }); FooLegacy.defaultProps = 0; @@ -512,7 +512,7 @@ var C = React.createClass({ propTypes: { x: React.PropTypes.string.isRequired, y: React.PropTypes.array, - z: React.PropTypes.number + z: React.PropTypes.number, }, replaceProps(props: {}) {}, @@ -531,7 +531,7 @@ var C = React.createClass({ var len: number = this.props.x.length; this.success(); return
; - } + }, }); var element = ; @@ -579,17 +579,17 @@ var C = React.createClass({ statistics: PropTypes.arrayOf( PropTypes.shape({ label: PropTypes.string.isRequired, - value: PropTypes.number + value: PropTypes.number, }) - ).isRequired - } + ).isRequired, + }, }); ; // error (label is required, value not required) var props: Array<{ label: string, value?: number }> = [ {}, - { label: "", value: undefined } + { label: "", value: undefined }, ]; // error (same as ^) ================================================================================ @@ -634,7 +634,7 @@ var React = require("react"); var TestProps = React.createClass({ propTypes: { x: React.PropTypes.string, - z: React.PropTypes.number + z: React.PropTypes.number, }, getDefaultProps: function() { @@ -645,7 +645,7 @@ var TestProps = React.createClass({ var a: number = this.props.x; // error var b: string = this.props.y; // error var c: string = this.props.z; // error - } + }, }); var element = ; // 3 errors @@ -653,7 +653,7 @@ var element = ; // 3 errors (element: $jsx<*>); (element: $jsx); var FooProps = React.createClass({ - propTypes: { w: React.PropTypes.string.isRequired } + propTypes: { w: React.PropTypes.string.isRequired }, }); (element: $jsx); @@ -689,8 +689,8 @@ var React = require("react"); var C = React.createClass({ propTypes: { foo: React.PropTypes.string.isRequired, - bar: React.PropTypes.string.isRequired - } + bar: React.PropTypes.string.isRequired, + }, }); var D = React.createClass({ getInitialState: function(): { bar: number } { @@ -700,7 +700,7 @@ var D = React.createClass({ var obj = { bar: 0 }; var s: string = this.state.bar; return ; - } + }, }); ================================================================================ @@ -800,25 +800,25 @@ var TestProps = React.createClass({ oneOf_rec: React.PropTypes.oneOf(["yes", "no"]).isRequired, oneOfType: React.PropTypes.oneOfType([ React.PropTypes.string, - React.PropTypes.number + React.PropTypes.number, ]), oneOfType_rec: React.PropTypes.oneOfType([ React.PropTypes.string, - React.PropTypes.number + React.PropTypes.number, ]).isRequired, shape: React.PropTypes.shape({ foo: React.PropTypes.string, - bar: React.PropTypes.number + bar: React.PropTypes.number, }), shape_rec: React.PropTypes.shape({ foo: React.PropTypes.string, - bar: React.PropTypes.number + bar: React.PropTypes.number, }).isRequired, // And do something bad here bad_one: React.PropTypes.imaginaryType, - bad_two: React.PropTypes.string.inRequired - } + bad_two: React.PropTypes.string.inRequired, + }, }); ================================================================================ @@ -865,7 +865,7 @@ import React from "React"; class JDiv extends React.Component { // static defaultProps: { }; props: { - id: string + id: string, }; } @@ -907,7 +907,7 @@ var React = require("React"); var C = React.createClass({ getDefaultProps: function() { return { x: 0 }; - } + }, }); module.exports = C; @@ -951,7 +951,7 @@ var ReactClass = React.createClass({ var React = require("react"); type State = { - bar: ?{ qux: string } + bar: ?{ qux: string }, }; var ReactClass = React.createClass({ @@ -963,7 +963,7 @@ var ReactClass = React.createClass({ // Any state access here seems to make state any this.state; return
{this.state.bar.qux}
; - } + }, }); ================================================================================ @@ -999,15 +999,15 @@ module.exports = Comp; var React = require("react"); type FooState = { - key: ?Object + key: ?Object, }; var Comp = React.createClass({ getInitialState: function(): FooState { return { - key: null // this used to cause a missing annotation error + key: null, // this used to cause a missing annotation error }; - } + }, }); module.exports = Comp; @@ -1045,7 +1045,7 @@ var React = require("react"); var TestState = React.createClass({ getInitialState: function(): { x: string } { return { - x: "" + x: "", }; }, @@ -1053,9 +1053,9 @@ var TestState = React.createClass({ var a: number = this.state.x; // error this.setState({ - x: false // error + x: false, // error }); - } + }, }); ================================================================================ @@ -1092,7 +1092,7 @@ var C = React.createClass({ render() { this.setState({ y: 0 }); return
{this.state.z}
; - } + }, }); ================================================================================ diff --git a/tests/flow/node_tests/crypto/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/crypto/__snapshots__/jsfmt.spec.js.snap index 6b4d5b21e..ad81f6583 100644 --- a/tests/flow/node_tests/crypto/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/crypto/__snapshots__/jsfmt.spec.js.snap @@ -85,7 +85,7 @@ let tests = [ (hmac.digest(): Buffer); (hmac.digest("hex"): void); // 1 error (hmac.digest(): void); // 1 error - } + }, ]; ================================================================================ diff --git a/tests/flow/node_tests/json_file/package2/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/json_file/package2/__snapshots__/jsfmt.spec.js.snap index f0b18c8e4..35a8e2325 100644 --- a/tests/flow/node_tests/json_file/package2/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/json_file/package2/__snapshots__/jsfmt.spec.js.snap @@ -16,7 +16,7 @@ module.exports = { // @flow module.exports = { - foo: 123 + foo: 123, }; ================================================================================ diff --git a/tests/flow/object-method/__snapshots__/jsfmt.spec.js.snap b/tests/flow/object-method/__snapshots__/jsfmt.spec.js.snap index b5980b1d6..cf6b45ab8 100644 --- a/tests/flow/object-method/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/object-method/__snapshots__/jsfmt.spec.js.snap @@ -68,7 +68,7 @@ module.exports = id( const id = require("./id"); export type ObjectType = { - +m: () => void + +m: () => void, }; function methodCaller(x: ObjectType) { @@ -113,11 +113,11 @@ function f() { var a = { p: 0, - f + f, }; var b = { - f + f, }; a.f(); // okey-dokie diff --git a/tests/flow/object_api/__snapshots__/jsfmt.spec.js.snap b/tests/flow/object_api/__snapshots__/jsfmt.spec.js.snap index 6e2a47df3..c8345052e 100644 --- a/tests/flow/object_api/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/object_api/__snapshots__/jsfmt.spec.js.snap @@ -89,7 +89,7 @@ var export_ = Object.assign( { foo: function(param) { return param; - } + }, } ); @@ -179,7 +179,7 @@ let tests = [ function() { const x = new Bar(); (Object.getPrototypeOf(x): Foo); - } + }, ]; ================================================================================ @@ -281,7 +281,7 @@ let tests = [ let tests = [ function() { Object.doesNotExist(); - } + }, ]; ================================================================================ @@ -474,7 +474,7 @@ var c = { foo: "bar", toString: function(): number { return 123; - } + }, }; var d: { [key: string]: string } = { foo: "bar" }; var x = new Date(); diff --git a/tests/flow/object_assign/__snapshots__/jsfmt.spec.js.snap b/tests/flow/object_assign/__snapshots__/jsfmt.spec.js.snap index 1503d83a5..746d81dcc 100644 --- a/tests/flow/object_assign/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/object_assign/__snapshots__/jsfmt.spec.js.snap @@ -44,7 +44,7 @@ var EventEmitter = require("events").EventEmitter; var Bad = Object.assign({}, EventEmitter.prototype, { foo: function(): string { return "hi"; - } + }, }); // Calling Bad.foo() in the same file doesn't error @@ -55,14 +55,14 @@ class MyEventEmitter extends events$EventEmitter {} var Good = Object.assign({}, MyEventEmitter.prototype, { foo: function(): string { return "hi"; - } + }, }); // Calling Good.foo() in the same file doesn't error var good: number = Good.foo(); module.exports = { Bad: Bad, - Good: Good + Good: Good, }; ================================================================================ @@ -129,7 +129,7 @@ printWidth: 80 (Object.assign.apply(null, [{}, { a: 1 }, { b: "foo" }]): { a: number, - b: string + b: string, }); ================================================================================ @@ -193,7 +193,7 @@ declare var tup: [{ foo: string }, { bar: number }]; (Object.assign({}, ...[{ a: 1 }, { b: "foo" }], ...[{ c: true }]): { a: number, b: true, - c: boolean + c: boolean, }); // Error: 'foo' => true ================================================================================ @@ -232,11 +232,11 @@ class MyReactThing extends React.Component { var React = require("react"); type DefaultProps = { - foo: number + foo: number, }; type Props = { - foo: number + foo: number, }; class MyReactThing extends React.Component { diff --git a/tests/flow/objects/__snapshots__/jsfmt.spec.js.snap b/tests/flow/objects/__snapshots__/jsfmt.spec.js.snap index 5c1237e66..936a1e57f 100644 --- a/tests/flow/objects/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/objects/__snapshots__/jsfmt.spec.js.snap @@ -64,7 +64,7 @@ let tests = [ function(x: { x: { -foo: string } }, y: { x: { -foo: number } }) { x = y; // 2 errors: string !~> number; number !~> string - } + }, ]; ================================================================================ diff --git a/tests/flow/objmap/__snapshots__/jsfmt.spec.js.snap b/tests/flow/objmap/__snapshots__/jsfmt.spec.js.snap index fb5f4563b..12f4b705c 100644 --- a/tests/flow/objmap/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/objmap/__snapshots__/jsfmt.spec.js.snap @@ -31,7 +31,7 @@ declare function keyMirror(o: O): $ObjMapi(k: K) => K>; var o = keyMirror({ FOO: null, - BAR: null + BAR: null, }); (o.FOO: "FOO"); // ok @@ -39,7 +39,7 @@ var o = keyMirror({ promiseAllByKey({ foo: Promise.resolve(0), - bar: "bar" + bar: "bar", }).then(o => { (o.foo: string); // error, number ~> string (o.bar: "bar"); // ok diff --git a/tests/flow/parse/__snapshots__/jsfmt.spec.js.snap b/tests/flow/parse/__snapshots__/jsfmt.spec.js.snap index 7159b0402..72d04100f 100644 --- a/tests/flow/parse/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/parse/__snapshots__/jsfmt.spec.js.snap @@ -28,7 +28,7 @@ var y = 5 / x; var z: { type: number, - y: string + y: string, } = { type: 1, y: "hey" }; ================================================================================ diff --git a/tests/flow/poly/__snapshots__/jsfmt.spec.js.snap b/tests/flow/poly/__snapshots__/jsfmt.spec.js.snap index 02734f737..4d62341d9 100644 --- a/tests/flow/poly/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/poly/__snapshots__/jsfmt.spec.js.snap @@ -124,7 +124,7 @@ declare type Box = { map2(f: (x: T) => U): Box, map3(f: (x: T) => U): Box, map4(f: (x: T) => U): Box, - map5(f: (x: T) => U): Box + map5(f: (x: T) => U): Box, }; declare var bool: Box; @@ -174,11 +174,11 @@ function bar(foo: Foo, y: S): Foo { } var P = { - bar: bar + bar: bar, }; declare var Q: { - bar(foo: Foo, y: S): Foo + bar(foo: Foo, y: S): Foo, }; var foo = new Foo(0); diff --git a/tests/flow/predicates-declared/__snapshots__/jsfmt.spec.js.snap b/tests/flow/predicates-declared/__snapshots__/jsfmt.spec.js.snap index 6b91439cf..bcb59b1e3 100644 --- a/tests/flow/predicates-declared/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/predicates-declared/__snapshots__/jsfmt.spec.js.snap @@ -285,11 +285,11 @@ function f(_this: { m: ?Meeting }): string { type Meeting = { organizer: ?Invitee, - es: Array + es: Array, }; type Invitee = { - fbid: number + fbid: number, }; function f(_this: { m: ?Meeting }): string { diff --git a/tests/flow/promises/__snapshots__/jsfmt.spec.js.snap b/tests/flow/promises/__snapshots__/jsfmt.spec.js.snap index 9303f26e1..a6a28ac46 100644 --- a/tests/flow/promises/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/promises/__snapshots__/jsfmt.spec.js.snap @@ -55,7 +55,7 @@ declare var pnum: Promise; Promise.all([ pstr, pnum, - true // non-Promise values passed through + true, // non-Promise values passed through ]).then(xs => { // tuple information is preserved let [a, b, c] = xs; diff --git a/tests/flow/react/__snapshots__/jsfmt.spec.js.snap b/tests/flow/react/__snapshots__/jsfmt.spec.js.snap index 40c19af85..b8328838f 100644 --- a/tests/flow/react/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/react/__snapshots__/jsfmt.spec.js.snap @@ -26,7 +26,7 @@ var React = require("react"); var AudienceInsightsContainer = React.createClass({ renderComponent(AudienceInsights: ReactClass<*>) { return ; - } + }, }); module.exports = AudienceInsightsContainer; @@ -224,7 +224,7 @@ const A = React.createClass({ m() { (this.props.foo: empty); // error: string ~> empty (this.props.bar: empty); // error: number ~> empty - } + }, }); const B = React.createClass({ @@ -234,7 +234,7 @@ const B = React.createClass({ }, mm() { this.m.apply(null); // OK: this.m is autobound, so \`this.p\` will always be found - } + }, }); const C = React.createClass({ @@ -243,7 +243,7 @@ const C = React.createClass({ }, m() { this.state.foo; // OK: state is unknown - } + }, }); const D = React.createClass({ @@ -251,15 +251,15 @@ const D = React.createClass({ { getInitialState(): Object { return { foo: 0 }; - } - } + }, + }, ], getInitialState() { return { bar: 0 }; }, m() { this.state.foo; // OK: state is unknown (due to unknown mixin) - } + }, }); const E = React.createClass({ @@ -270,7 +270,7 @@ const E = React.createClass({ mm() { var props: { m(): void } = { m: this.m }; props.m(); // OK: this.m is autobound, so \`this.foo\` will always be found - } + }, }); const F = React.createClass({ @@ -280,7 +280,7 @@ const F = React.createClass({ m() { this.state.foo; this.state.bar; - } + }, }); const G = React.createClass({ @@ -291,7 +291,7 @@ const G = React.createClass({ (this.mixins: mixed); // error: property \`mixins\` not found (this.autobind: mixed); // error: property \`autobind\` not found (this.statics: mixed); // error: property \`statics\` not found - } + }, }); const H = React.createClass({ @@ -299,14 +299,14 @@ const H = React.createClass({ getDefaultProps() { (this.q: empty); // error: number ~> empty return {}; - } + }, }); const I = React.createClass({ propTypes: ({}: { [string]: any }), m() { (this.props.foo: empty); // OK - } + }, }); const J = React.createClass({ @@ -314,22 +314,22 @@ const J = React.createClass({ { getInitialState() { return this.constructor.calculateState(); - } - } + }, + }, ], statics: { calculateState() { return { foo: 0 }; - } + }, }, m() { (this.state.foo: empty); // number ~> empty - } + }, }); const K = React.createClass({ propTypes: { - foo: React.PropTypes.string.isRequired + foo: React.PropTypes.string.isRequired, }, getInitialState() { this.mm(); // cause error in mm below @@ -341,12 +341,12 @@ const K = React.createClass({ }, mm() { this.state.foo; // error: property fo not found (called by getInitialState) - } + }, }); const L = React.createClass({ propTypes: { - foo: React.PropTypes.string.isRequired + foo: React.PropTypes.string.isRequired, }, getInitialState() { return { bar: 0 }; @@ -389,7 +389,7 @@ const L = React.createClass({ (this.props.foo: empty); // string ~> empty (this.state.bar: empty); // number ~> empty return 0; // number ~> void - } + }, }); React.createClass({}); // error: spec must be [x] exact and [ ] sealed @@ -501,7 +501,7 @@ React.createClass({ }, g() { (this.state.q: empty); // number ~> empty - } + }, }); // initial state = Some (exact & sealed) [lit] @@ -514,7 +514,7 @@ React.createClass({ }, g() { (this.state.q: empty); // number ~> empty - } + }, }); // initial state = Some (exact & sealed) [annot] @@ -527,7 +527,7 @@ React.createClass({ }, g() { (this.state.q: empty); // number ~> empty - } + }, }); // initial state = Some (inexact & sealed) [annot] @@ -540,7 +540,7 @@ React.createClass({ }, g() { (this.state.q: empty); // property \`q\` not found - } + }, }); // mixins = (exact & sealed) + (exact & sealed) @@ -549,8 +549,8 @@ React.createClass({ { getInitialState() { return { foo: 0 }; - } - } + }, + }, ], getInitialState() { return { bar: 0 }; @@ -560,7 +560,7 @@ React.createClass({ }, g() { (this.state.baz: empty); // number ~> empty - } + }, }); // mixins = (exact & sealed) + (inexact & sealed) @@ -569,8 +569,8 @@ React.createClass({ { getInitialState(): { foo: number } { return { foo: 0 }; - } - } + }, + }, ], getInitialState() { return { bar: 0 }; @@ -580,7 +580,7 @@ React.createClass({ }, g() { (this.state.baz: empty); // property \`baz\` not found - } + }, }); ================================================================================ @@ -657,7 +657,7 @@ A.bar = 0; // statics = Some (exact & sealed) [lit] const B = React.createClass({ - statics: { foo: 0 } + statics: { foo: 0 }, }); (B.foo: empty); // number ~> empty (B.bar: empty); // number ~> empty (inflow below) @@ -665,7 +665,7 @@ B.bar = 0; // statics = Some (exact & sealed) [annot] const C = React.createClass({ - statics: ({ foo: 0 }: {| foo: number |}) + statics: ({ foo: 0 }: {| foo: number |}), }); (C.foo: empty); // number ~> empty (C.bar: empty); // number ~> empty (inflow below) @@ -673,7 +673,7 @@ C.bar = 0; // statics = Some (inexact & sealed) [annot] const D = React.createClass({ - statics: ({ foo: 0 }: { foo: number }) + statics: ({ foo: 0 }: { foo: number }), }); (D.foo: empty); // number ~> empty (D.bar: empty); // property \`bar\` not found @@ -683,10 +683,10 @@ D.bar = 0; // property \`bar\` not found const E = React.createClass({ mixins: [ { - statics: { foo: 0 } - } + statics: { foo: 0 }, + }, ], - statics: { bar: 0 } + statics: { bar: 0 }, }); (E.foo: empty); // number ~> empty (E.bar: empty); // number ~> empty @@ -697,10 +697,10 @@ E.baz = 0; const F = React.createClass({ mixins: [ { - statics: ({ foo: 0 }: { foo: number }) - } + statics: ({ foo: 0 }: { foo: number }), + }, ], - statics: { bar: 0 } + statics: { bar: 0 }, }); (F.foo: empty); // number ~> empty (F.bar: empty); // number ~> empty @@ -779,7 +779,7 @@ import React from "react"; class Bar extends React.Component { props: { - test: number + test: number, }; render() { return
{this.props.test}
; @@ -846,8 +846,8 @@ var blah = ; // error bar, number given string expected var React = require("react"); var Foo = React.createClass({ propTypes: { - bar: React.PropTypes.string.isRequired - } + bar: React.PropTypes.string.isRequired, + }, }); var props = { bar: 42 }; @@ -887,8 +887,8 @@ const React = require("react"); var AnyExample = React.createClass({ propTypes: { - foo: (0: any) // OK - } + foo: (0: any), // OK + }, }); ; // OK @@ -896,8 +896,8 @@ var AnyExample = React.createClass({ var AnyFunExample = React.createClass({ propTypes: { - foo: (() => {}: Function) // OK - } + foo: (() => {}: Function), // OK + }, }); ; // OK @@ -964,8 +964,8 @@ var InvalidExample = React.createClass({ var React = require("react"); var Example = React.createClass({ propTypes: { - arr: React.PropTypes.arrayOf(React.PropTypes.number).isRequired - } + arr: React.PropTypes.arrayOf(React.PropTypes.number).isRequired, + }, }); var ok_empty = ; @@ -982,8 +982,8 @@ var todo_required = ; var OptionalExample = React.createClass({ propTypes: { - arr: React.PropTypes.arrayOf(React.PropTypes.number) - } + arr: React.PropTypes.arrayOf(React.PropTypes.number), + }, }); ; // OK @@ -992,8 +992,8 @@ var OptionalExample = React.createClass({ var AnyExample = React.createClass({ propTypes: { - arr: React.PropTypes.arrayOf((0: any)) // OK - } + arr: React.PropTypes.arrayOf((0: any)), // OK + }, }); ; // error: still needs to be an array @@ -1001,8 +1001,8 @@ var AnyExample = React.createClass({ var InvalidExample = React.createClass({ propTypes: { - arr: React.PropTypes.arrayOf(0) // error: number not a prop type - } + arr: React.PropTypes.arrayOf(0), // error: number not a prop type + }, }); ================================================================================ @@ -1045,8 +1045,8 @@ var Example = React.createClass({ (componentName: empty); // error: componentName is a string (href: empty); // error: href is an optional string return (0: mixed); // error: should return ?Error - } - } + }, + }, }); // Inferred prop type is optional \`any\` @@ -1083,8 +1083,8 @@ var fail_mistyped = var React = require("react"); var Example = React.createClass({ propTypes: { - func: React.PropTypes.func.isRequired - } + func: React.PropTypes.func.isRequired, + }, }); var ok_void = {}} />; @@ -1118,8 +1118,8 @@ const React = require("react"); var Example = React.createClass({ propTypes: { - foo: 0 // error: \`0\` is not a prop type - } + foo: 0, // error: \`0\` is not a prop type + }, }); ; // OK: don't cascade errors @@ -1186,8 +1186,8 @@ class C extends B {} var React = require("react"); var Example = React.createClass({ propTypes: { - x: React.PropTypes.instanceOf(B) - } + x: React.PropTypes.instanceOf(B), + }, }); ; // error: A ~> B @@ -1200,11 +1200,11 @@ class Poly { } var PolyExample = React.createClass({ propTypes: { - x: React.PropTypes.instanceOf(Poly).isRequired + x: React.PropTypes.instanceOf(Poly).isRequired, }, m() { (this.props.x.x: empty); // OK, T instantiated to \`any\` - } + }, }); // Different instantiations don't interact @@ -1216,11 +1216,11 @@ class PolyDefault { } var PolyDefaultExample = React.createClass({ propTypes: { - x: React.PropTypes.instanceOf(PolyDefault).isRequired + x: React.PropTypes.instanceOf(PolyDefault).isRequired, }, m() { (this.props.x.x: empty); // OK, T instantiated to \`any\` - } + }, }); ================================================================================ @@ -1296,7 +1296,7 @@ var Foo = React.createClass({ render() { // But this never errored return
; - } + }, }); ================================================================================ @@ -1328,8 +1328,8 @@ var fail_mistyped = var React = require("react"); var Example = React.createClass({ propTypes: { - object: React.PropTypes.object.isRequired - } + object: React.PropTypes.object.isRequired, + }, }); var ok_empty = ; @@ -1398,8 +1398,8 @@ var InvalidExample = React.createClass({ var React = require("react"); var Example = React.createClass({ propTypes: { - obj: React.PropTypes.objectOf(React.PropTypes.number).isRequired - } + obj: React.PropTypes.objectOf(React.PropTypes.number).isRequired, + }, }); var ok_empty = ; @@ -1416,8 +1416,8 @@ var todo_required = ; var OptionalExample = React.createClass({ propTypes: { - obj: React.PropTypes.objectOf(React.PropTypes.number) - } + obj: React.PropTypes.objectOf(React.PropTypes.number), + }, }); ; // OK @@ -1426,8 +1426,8 @@ var OptionalExample = React.createClass({ var AnyExample = React.createClass({ propTypes: { - obj: React.PropTypes.objectOf((0: any)) // OK - } + obj: React.PropTypes.objectOf((0: any)), // OK + }, }); ; // error: still needs to be an object @@ -1435,8 +1435,8 @@ var AnyExample = React.createClass({ var InvalidExample = React.createClass({ propTypes: { - obj: React.PropTypes.objectOf(0) // error: number not a prop type - } + obj: React.PropTypes.objectOf(0), // error: number not a prop type + }, }); ================================================================================ @@ -1545,8 +1545,8 @@ var Example = React.createClass({ str: React.PropTypes.oneOf(["foo", "bar"]), num: React.PropTypes.oneOf([0, 1, 2]), bool: React.PropTypes.oneOf([true]), - mixed: React.PropTypes.oneOf(["foo", 0, true]) - } + mixed: React.PropTypes.oneOf(["foo", 0, true]), + }, }); ; // OK @@ -1564,64 +1564,64 @@ var Example = React.createClass({ var RequiredExample = React.createClass({ propTypes: { - p: React.PropTypes.oneOf([]).isRequired - } + p: React.PropTypes.oneOf([]).isRequired, + }, }); ; // error: \`p\` not found var EmptyExample = React.createClass({ propTypes: { - nil: React.PropTypes.oneOf([]) // i.e., \`empty\` - } + nil: React.PropTypes.oneOf([]), // i.e., \`empty\` + }, }); ; // number ~> empty var AnyArrayExample = React.createClass({ propTypes: { - any: React.PropTypes.oneOf((0: any)) - } + any: React.PropTypes.oneOf((0: any)), + }, }); ; // OK var AnyElemExample = React.createClass({ propTypes: { - any: React.PropTypes.oneOf(["foo", (0: any)]) - } + any: React.PropTypes.oneOf(["foo", (0: any)]), + }, }); ; // OK var DynamicArrayExample = React.createClass({ propTypes: { - dyn: React.PropTypes.oneOf(([]: Array)) - } + dyn: React.PropTypes.oneOf(([]: Array)), + }, }); ; // OK var DynamicElemExample = React.createClass({ propTypes: { - dyn: React.PropTypes.oneOf(["foo", ("": string)]) - } + dyn: React.PropTypes.oneOf(["foo", ("": string)]), + }, }); ; // OK var InvalidArrayExample = React.createClass({ propTypes: { - p: React.PropTypes.oneOf(0) // error: expected array, got 0 - } + p: React.PropTypes.oneOf(0), // error: expected array, got 0 + }, }); ; // OK, don't cascade errors var NonLiteralElemExample = React.createClass({ propTypes: { - p: React.PropTypes.oneOf([{}]) // OK: allow non-literals - } + p: React.PropTypes.oneOf([{}]), // OK: allow non-literals + }, }); ; // OK, result is unknown/any @@ -1746,8 +1746,8 @@ var Example = React.createClass({ propTypes: { prop: React.PropTypes.oneOfType([ React.PropTypes.string, - React.PropTypes.number - ]).isRequired + React.PropTypes.number, + ]).isRequired, }, render() { if (typeof this.props.prop === "string") { @@ -1755,7 +1755,7 @@ var Example = React.createClass({ } else { return
{this.props.prop.toFixed(2)}
; } - } + }, }); var ok_number = ; @@ -1771,8 +1771,8 @@ var todo_required = ; var OptionalExample = React.createClass({ propTypes: { - p: React.PropTypes.oneOfType([React.PropTypes.string]) - } + p: React.PropTypes.oneOfType([React.PropTypes.string]), + }, }); ; // OK @@ -1781,32 +1781,32 @@ var OptionalExample = React.createClass({ var EmptyExample = React.createClass({ propTypes: { - nil: React.PropTypes.oneOfType([]) // i.e., \`empty\` - } + nil: React.PropTypes.oneOfType([]), // i.e., \`empty\` + }, }); ; // number ~> empty var AnyArrayExample = React.createClass({ propTypes: { - any: React.PropTypes.oneOfType((0: any)) - } + any: React.PropTypes.oneOfType((0: any)), + }, }); ; // OK var AnyElemExample = React.createClass({ propTypes: { - any: React.PropTypes.oneOfType([React.PropTypes.string, (0: any)]) - } + any: React.PropTypes.oneOfType([React.PropTypes.string, (0: any)]), + }, }); ; // OK var DynamicArrayExample = React.createClass({ propTypes: { - dyn: React.PropTypes.oneOfType(([]: Array)) - } + dyn: React.PropTypes.oneOfType(([]: Array)), + }, }); ; // OK @@ -1815,25 +1815,25 @@ var DynamicElemExample = React.createClass({ propTypes: { dyn: React.PropTypes.oneOfType([ React.PropTypes.string, - (() => {}: Function) - ]) - } + (() => {}: Function), + ]), + }, }); ; // OK var InvalidArrayExample = React.createClass({ propTypes: { - p: React.PropTypes.oneOfType(0) // error: expected array, got 0 - } + p: React.PropTypes.oneOfType(0), // error: expected array, got 0 + }, }); ; // OK, don't cascade errors var InvalidElemExample = React.createClass({ propTypes: { - p: React.PropTypes.oneOfType([{}]) // error: expected prop type, got {} - } + p: React.PropTypes.oneOfType([{}]), // error: expected prop type, got {} + }, }); ; // OK, don't cascade errors @@ -1898,8 +1898,8 @@ import React from "react"; React.createClass({ propTypes: { foo: React.PropTypes.shape({ - bar: React.PropTypes.string.isRequired - }).isRequired + bar: React.PropTypes.string.isRequired, + }).isRequired, }, f() { @@ -1908,16 +1908,16 @@ React.createClass({ g() { this.props.foo.baz = 0; - } + }, }); React.createClass({ propTypes: { - foo: React.PropTypes.shape(({}: { [string]: any })).isRequired + foo: React.PropTypes.shape(({}: { [string]: any })).isRequired, }, f() { (this.props.foo.bar: empty); // OK - } + }, }); ================================================================================ @@ -2034,7 +2034,7 @@ import React from "react"; React.createClass({ propTypes: { - foo: React.PropTypes.string.isRequired + foo: React.PropTypes.string.isRequired, }, f() { @@ -2043,7 +2043,7 @@ React.createClass({ g() { this.props.baz = 0; - } + }, }); ================================================================================ diff --git a/tests/flow/react_modules/__snapshots__/jsfmt.spec.js.snap b/tests/flow/react_modules/__snapshots__/jsfmt.spec.js.snap index 9b2b6d282..f051ade9e 100644 --- a/tests/flow/react_modules/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/react_modules/__snapshots__/jsfmt.spec.js.snap @@ -40,12 +40,12 @@ var Hello = require("./createclass-module"); var HelloLocal = React.createClass({ propTypes: { - name: React.PropTypes.string.isRequired + name: React.PropTypes.string.isRequired, }, render: function(): React.Element<*> { return
{this.props.name}
; - } + }, }); var Callsite = React.createClass({ @@ -56,7 +56,7 @@ var Callsite = React.createClass({
); - } + }, }); module.exports = Callsite; @@ -91,12 +91,12 @@ var React = require("react"); var Hello = React.createClass({ propTypes: { - name: React.PropTypes.string.isRequired + name: React.PropTypes.string.isRequired, }, render: function(): React.Element<*> { return
{this.props.name}
; - } + }, }); module.exports = Hello; @@ -145,7 +145,7 @@ import Hello from "./es6class-proptypes-module"; class HelloLocal extends React.Component { defaultProps = {}; propTypes = { - name: React.PropTypes.string.isRequired + name: React.PropTypes.string.isRequired, }; render(): React.Element<*> { return
{this.props.name}
; @@ -197,7 +197,7 @@ import React from "react"; class Hello extends React.Component { defaultProps = {}; propTypes = { - name: React.PropTypes.string.isRequired + name: React.PropTypes.string.isRequired, }; render(): React.Element<*> { diff --git a/tests/flow/rec/__snapshots__/jsfmt.spec.js.snap b/tests/flow/rec/__snapshots__/jsfmt.spec.js.snap index b870aa46c..37978ed6e 100644 --- a/tests/flow/rec/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/rec/__snapshots__/jsfmt.spec.js.snap @@ -44,14 +44,14 @@ function bar2(y: F): F { } type Functor = { - map(f: (val: A) => B): Functor + map(f: (val: A) => B): Functor, }; function identity(val: A): Functor { return { map(f: (_: typeof val) => B): Functor { return identity(f(val)); - } + }, }; } @@ -79,7 +79,7 @@ function id(x: Task): Task { return x; } type Task = { chain( next: (input: value) => Task - ): Task + ): Task, }; function id(x: Task): Task { diff --git a/tests/flow/recheck/tmplibk/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmplibk/__snapshots__/jsfmt.spec.js.snap index a3cac724b..edc5b7e41 100644 --- a/tests/flow/recheck/tmplibk/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmplibk/__snapshots__/jsfmt.spec.js.snap @@ -26,7 +26,7 @@ type LibK = { =====================================output===================================== type LibK = { - p: string + p: string, }; ================================================================================ diff --git a/tests/flow/record/__snapshots__/jsfmt.spec.js.snap b/tests/flow/record/__snapshots__/jsfmt.spec.js.snap index 877bc5156..4b0c88072 100644 --- a/tests/flow/record/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/record/__snapshots__/jsfmt.spec.js.snap @@ -35,7 +35,7 @@ var o3: {[key: AnyKey]: number} = { foo: 0 }; type Key1 = "foo" | "bar"; // make an enum type with known key set var o1: { [key: Key1]: number } = { foo: 0, - bar: "" // error: string ~/~ number + bar: "", // error: string ~/~ number }; o1.foo; // OK o1.qux; // error: qux not found diff --git a/tests/flow/refi/__snapshots__/jsfmt.spec.js.snap b/tests/flow/refi/__snapshots__/jsfmt.spec.js.snap index ac23dce3b..27f4db557 100644 --- a/tests/flow/refi/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/refi/__snapshots__/jsfmt.spec.js.snap @@ -135,7 +135,7 @@ var tests = [ function() { var y: string = x || ""; // ok - } + }, ]; ================================================================================ @@ -625,7 +625,7 @@ var tests = [ var { p } = x; // TODO: annot checked against type of x (p: string); // ok } - } + }, ]; ================================================================================ @@ -890,7 +890,7 @@ var paths = [ x = "xxx"; } var y: string = x; - } + }, ]; ================================================================================ @@ -1158,7 +1158,7 @@ var null_tests = [ } else { var y: string | void = x.p.q; // ok } - } + }, ]; // this.p op null @@ -1586,7 +1586,7 @@ var null_tests = [ } else { var y: string = x.p.q; // ok } - } + }, ]; // typeof this.p op typename @@ -1754,7 +1754,7 @@ var undef_tests = [ } else { var y: string = x.p.q; // ok } - } + }, ]; // this.p op undefined @@ -1912,7 +1912,7 @@ var void_tests = [ } else { var y: string = x.p.q; // ok } - } + }, ]; // this.p op void(...) diff --git a/tests/flow/refinements/__snapshots__/jsfmt.spec.js.snap b/tests/flow/refinements/__snapshots__/jsfmt.spec.js.snap index b6cd798bb..06caccde0 100644 --- a/tests/flow/refinements/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/refinements/__snapshots__/jsfmt.spec.js.snap @@ -51,7 +51,7 @@ function foo(x: ?number) { type Bar = { parent: ?Bar, - doStuff: () => void + doStuff: () => void, }; function bar0(x: Bar) { @@ -99,12 +99,12 @@ export type ASTNode = Node1 | Node2; =====================================output===================================== type Node1 = { kind: "Node1", - prop1?: string + prop1?: string, }; type Node2 = { kind: "Node2", - prop2?: string + prop2?: string, }; export type ASTNode = Node1 | Node2; @@ -210,7 +210,7 @@ let tests = [ return x.result; } return x.result; // error - } + }, ]; ================================================================================ @@ -246,7 +246,7 @@ function testLiteralProperty(a: A) { // @flow type A = { - b_c: ?string + b_c: ?string, }; function stuff(str: string) {} @@ -374,7 +374,7 @@ let tests = [ (t.quux: string); // error, consider { foo: {}, bar: "" } } } - } + }, ]; ================================================================================ @@ -457,7 +457,7 @@ let tests = [ } // error if (x.y === 123) { } // ok - } + }, ]; ================================================================================ @@ -535,7 +535,7 @@ let tests = [ // incorrectly. x.y.indexOf(z()); // no error } - } + }, ]; ================================================================================ @@ -927,7 +927,7 @@ function foo8(o: { p: mixed }) { } type Foo9Expected = { - foo: string + foo: string, }; function foo9() { @@ -1319,7 +1319,7 @@ let tests = [ }, function(x: TestClass) { (!x: false); // ok, classes are always truthy - } + }, ]; ================================================================================ @@ -1605,7 +1605,7 @@ let tests = [ } else { return x; // no error, inferred to be 0 } - } + }, ]; ================================================================================ @@ -2234,7 +2234,7 @@ let tests = [ return x; } return "foo"; - } + }, ]; ================================================================================ @@ -2998,7 +2998,7 @@ let tests = [ (x.y: string); x.z; // error } - } + }, ]; ================================================================================ @@ -3041,12 +3041,12 @@ import { SUCCESS, ERROR } from "./constants"; type Success = { type: typeof SUCCESS, - message: string + message: string, }; type Error = { type: typeof ERROR, - error: string + error: string, }; function handleStatus(status: Success | Error) { diff --git a/tests/flow/require/__snapshots__/jsfmt.spec.js.snap b/tests/flow/require/__snapshots__/jsfmt.spec.js.snap index 3be6802e9..b98f8a5ae 100644 --- a/tests/flow/require/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/require/__snapshots__/jsfmt.spec.js.snap @@ -56,7 +56,7 @@ exports = {stringValue: ''}; // value will affect the exports object but re-binding it makes it useless and // does not affect the exports value. module.exports = { - numberValue: 42 + numberValue: 42, }; exports = { stringValue: "" }; diff --git a/tests/flow/requireLazy/__snapshots__/jsfmt.spec.js.snap b/tests/flow/requireLazy/__snapshots__/jsfmt.spec.js.snap index 96705e4fa..2230e7732 100644 --- a/tests/flow/requireLazy/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/requireLazy/__snapshots__/jsfmt.spec.js.snap @@ -24,7 +24,7 @@ module.exports = { module.exports = { numberValueA: 1, - stringValueA: "someString" + stringValueA: "someString", }; ================================================================================ @@ -54,7 +54,7 @@ module.exports = { module.exports = { numberValueB: 1, - stringValueB: "someString" + stringValueB: "someString", }; ================================================================================ diff --git a/tests/flow/sealed/__snapshots__/jsfmt.spec.js.snap b/tests/flow/sealed/__snapshots__/jsfmt.spec.js.snap index f4242ed8b..9648a309b 100644 --- a/tests/flow/sealed/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/sealed/__snapshots__/jsfmt.spec.js.snap @@ -70,7 +70,7 @@ o.x = "..."; Foo.prototype = { m: function() { return false; - } + }, }; var export_o: { x: any } = o; // awkward type cast diff --git a/tests/flow/sealed_objects/__snapshots__/jsfmt.spec.js.snap b/tests/flow/sealed_objects/__snapshots__/jsfmt.spec.js.snap index d07d080be..c13aa3d5a 100644 --- a/tests/flow/sealed_objects/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/sealed_objects/__snapshots__/jsfmt.spec.js.snap @@ -47,7 +47,7 @@ var s6: string = o6.y; // ok (indexers make object types extensible) var o7: { x: number, y?: string } = ({ x: 0, y: 0 }: { x: number, - [_: any]: number + [_: any]: number, }); // error ================================================================================ diff --git a/tests/flow/shape/__snapshots__/jsfmt.spec.js.snap b/tests/flow/shape/__snapshots__/jsfmt.spec.js.snap index 9d1450f42..42ea56de3 100644 --- a/tests/flow/shape/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/shape/__snapshots__/jsfmt.spec.js.snap @@ -34,7 +34,7 @@ var y: $Shape = x; =====================================output===================================== type Foo = { - field: number + field: number, }; var x: { field?: number } = {}; diff --git a/tests/flow/spread/__snapshots__/jsfmt.spec.js.snap b/tests/flow/spread/__snapshots__/jsfmt.spec.js.snap index c15c0ee3c..fc9fff176 100644 --- a/tests/flow/spread/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/spread/__snapshots__/jsfmt.spec.js.snap @@ -52,14 +52,14 @@ function parseGroup( counter: number, begin: number, end: number, - text: string + text: string, } { var counter = parseCounter(lines[0]); var timeframe = parseTimeframe(lines[1]); return { counter, ...timeframe, - text: lines[2] + text: lines[2], }; } @@ -67,7 +67,7 @@ function parseTimeframe(line: string): { begin: number, end: number } { var timestamps = line.split("-->"); return { begin: parseTimestamp(timestamps[0].trim()), - end: parseTimestamp(timestamps[1].trim()) + end: parseTimestamp(timestamps[1].trim()), }; } @@ -134,7 +134,7 @@ var q = { z: "" }; var o = { x: 5, ...p, - ...q + ...q, }; var y: number = o.y; var z: number = o.z; @@ -143,7 +143,7 @@ var z: number = o.z; var r = { y: 123 }; var s = { ...p, - ...r + ...r, }; var t: boolean = s.y; // error, string or number @@ -224,7 +224,7 @@ function test( (value: string); // OK return { ...x, - kind: value + kind: value, }; }); } @@ -261,20 +261,20 @@ for (var i = 0; i < 10; i++) { =====================================output===================================== var o = { - foo: "bar" + foo: "bar", }; o = { ...o }; (o: { foo: string }); var p = { - foo: "bar" + foo: "bar", }; (p: { foo: string, abc: string }); // error, p doesn't have \`abc\` yet p = { ...p, abc: "def" }; (p: { foo: string, abc: string }); var q = { - foo: "bar" + foo: "bar", }; for (var i = 0; i < 10; i++) { q = { ...q }; @@ -306,7 +306,7 @@ let tests = [ function(x: Object) { ({ ...x }: Object); ({ ...x }: void); // error, Object - } + }, ]; ================================================================================ diff --git a/tests/flow/strict_requires/__snapshots__/jsfmt.spec.js.snap b/tests/flow/strict_requires/__snapshots__/jsfmt.spec.js.snap index a0b474021..1d2fe9855 100644 --- a/tests/flow/strict_requires/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/strict_requires/__snapshots__/jsfmt.spec.js.snap @@ -49,7 +49,7 @@ module.exports = o; /* @flow */ var o = { A: require("./A"), - ...require("./B") + ...require("./B"), }; module.exports = o; diff --git a/tests/flow/suppress/__snapshots__/jsfmt.spec.js.snap b/tests/flow/suppress/__snapshots__/jsfmt.spec.js.snap index 69b5b7591..7950dc95b 100644 --- a/tests/flow/suppress/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/suppress/__snapshots__/jsfmt.spec.js.snap @@ -121,11 +121,11 @@ x = y; =====================================output===================================== declare var x: { - x: { foo: string } + x: { foo: string }, }; declare var y: { // $FlowFixMe - this location is only mentioned in the extra section - x: { bar: number } + x: { bar: number }, }; x = y; diff --git a/tests/flow/tagged-unions/__snapshots__/jsfmt.spec.js.snap b/tests/flow/tagged-unions/__snapshots__/jsfmt.spec.js.snap index d9303b1ee..95701fa43 100644 --- a/tests/flow/tagged-unions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/tagged-unions/__snapshots__/jsfmt.spec.js.snap @@ -128,7 +128,7 @@ declare type IData = IUserData | ISystemData; const data: IData = { id: "", name: "", - kind: "system" + kind: "system", }; if (data.kind === "user") { @@ -192,7 +192,7 @@ declare type IData = IUserData | ISystemData; const data: IData = { id: "", name: "", - kind: "system" + kind: "system", }; if (data.kind === "system") { @@ -244,19 +244,19 @@ if (data.kind === "user") { type DataBase = { id: string, - name: string + name: string, }; type UserData = { id: string, name: string, - kind: "user" + kind: "user", }; type SystemData = { id: string, name: string, - kind: "system" + kind: "system", }; declare type Data = UserData | SystemData; @@ -264,7 +264,7 @@ declare type Data = UserData | SystemData; const data: Data = { id: "", name: "", - kind: "system" + kind: "system", }; if (data.kind === "user") { @@ -316,19 +316,19 @@ if (data.kind === "system") { type DataBase = { id: string, - name: string + name: string, }; type UserData = { id: string, name: string, - kind: "user" + kind: "user", }; type SystemData = { id: string, name: string, - kind: "system" + kind: "system", }; declare type Data = UserData | SystemData; @@ -336,7 +336,7 @@ declare type Data = UserData | SystemData; const data: Data = { id: "", name: "", - kind: "system" + kind: "system", }; if (data.kind === "system") { diff --git a/tests/flow/taint/__snapshots__/jsfmt.spec.js.snap b/tests/flow/taint/__snapshots__/jsfmt.spec.js.snap index 9bd03ee7e..ee69f4763 100644 --- a/tests/flow/taint/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/taint/__snapshots__/jsfmt.spec.js.snap @@ -130,7 +130,7 @@ let tests = [ let foo = obj.foo; foo(x); // error, taint ~> any - } + }, ]; ================================================================================ @@ -280,7 +280,7 @@ let tests = [ function(x: any, y: $Tainted) { let z = x(); z(y); - } + }, ]; ================================================================================ diff --git a/tests/flow/template/__snapshots__/jsfmt.spec.js.snap b/tests/flow/template/__snapshots__/jsfmt.spec.js.snap index ee2d1e39f..79942ad98 100644 --- a/tests/flow/template/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/template/__snapshots__/jsfmt.spec.js.snap @@ -68,7 +68,7 @@ let tests = [ \`foo \${x}\`; // error \`\${x} bar\`; // error \`foo \${"bar"} \${x}\`; // error - } + }, ]; ================================================================================ diff --git a/tests/flow/traces/__snapshots__/jsfmt.spec.js.snap b/tests/flow/traces/__snapshots__/jsfmt.spec.js.snap index 61c4616c0..476d6973f 100644 --- a/tests/flow/traces/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/traces/__snapshots__/jsfmt.spec.js.snap @@ -96,11 +96,11 @@ function f(b): React.Element<*> { var React = require("react"); var A = React.createClass({ - propTypes: { foo: React.PropTypes.string.isRequired } + propTypes: { foo: React.PropTypes.string.isRequired }, }); var B = React.createClass({ - propTypes: { bar: React.PropTypes.string.isRequired } + propTypes: { bar: React.PropTypes.string.isRequired }, }); function f(b): React.Element<*> { diff --git a/tests/flow/type-at-pos/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type-at-pos/__snapshots__/jsfmt.spec.js.snap index 2928112dd..4b0b820ec 100644 --- a/tests/flow/type-at-pos/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type-at-pos/__snapshots__/jsfmt.spec.js.snap @@ -44,7 +44,7 @@ export const X = { test: function() { let [a, b] = this.returnsATuple(); - } + }, }; ================================================================================ @@ -88,23 +88,23 @@ const d = { // } const a = { - bar(): void {} + bar(): void {}, }; const b = { - bar: function(): void {} + bar: function(): void {}, }; const c = { m(x: T): T { return x; - } + }, }; const d = { m: function(x: T): T { return x; - } + }, }; ================================================================================ @@ -220,7 +220,7 @@ let tests = [ function() { let x = {}; Object.defineProperty(x, "foo", { value: "" }); - } + }, ]; ================================================================================ diff --git a/tests/flow/type-printer/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type-printer/__snapshots__/jsfmt.spec.js.snap index c58eb6ff0..1f80fa12a 100644 --- a/tests/flow/type-printer/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type-printer/__snapshots__/jsfmt.spec.js.snap @@ -5123,9 +5123,9 @@ export type Comment = end: number, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, - start: number + start: number, } | { type: "CommentBlock", @@ -5134,9 +5134,9 @@ export type Comment = end: number, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, - start: number + start: number, }; export type Declaration = @@ -5149,10 +5149,10 @@ export type Declaration = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ClassDeclaration", @@ -5168,10 +5168,10 @@ export type Declaration = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "FunctionDeclaration", @@ -5183,7 +5183,7 @@ export type Declaration = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, trailingComments: ?Array, @@ -5194,7 +5194,7 @@ export type Declaration = params: Array, rest: ?Identifier, returnType: ?TypeAnnotation, - typeParameters: ?TypeParameterDeclaration + typeParameters: ?TypeParameterDeclaration, } | { type: "MethodDefinition", @@ -5210,10 +5210,10 @@ export type Declaration = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "VariableDeclaration", @@ -5225,10 +5225,10 @@ export type Declaration = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ClassProperty", @@ -5244,10 +5244,10 @@ export type Declaration = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type Expression = @@ -5260,10 +5260,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "AssignmentExpression", @@ -5276,10 +5276,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "AwaitExpression", @@ -5291,10 +5291,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "BinaryExpression", @@ -5307,10 +5307,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "BindExpression", @@ -5322,10 +5322,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "CallExpression", @@ -5337,10 +5337,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ClassExpression", @@ -5356,10 +5356,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ComprehensionExpression", @@ -5372,10 +5372,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ConditionalExpression", @@ -5388,10 +5388,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "DoExpression", @@ -5402,10 +5402,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "FunctionExpression", @@ -5417,7 +5417,7 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, trailingComments: ?Array, @@ -5428,7 +5428,7 @@ export type Expression = params: Array, rest: ?Identifier, returnType: ?TypeAnnotation, - typeParameters: ?TypeParameterDeclaration + typeParameters: ?TypeParameterDeclaration, } | { type: "Identifier", @@ -5440,10 +5440,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "Literal", @@ -5456,10 +5456,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "LogicalExpression", @@ -5472,10 +5472,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "MemberExpression", @@ -5488,10 +5488,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "NewExpression", @@ -5503,10 +5503,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ObjectExpression", @@ -5517,10 +5517,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "SequenceExpression", @@ -5531,10 +5531,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TaggedTemplateExpression", @@ -5546,10 +5546,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TemplateLiteral", @@ -5561,10 +5561,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ThisExpression", @@ -5574,10 +5574,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "UnaryExpression", @@ -5590,10 +5590,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "UpdateExpression", @@ -5606,10 +5606,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "YieldExpression", @@ -5621,10 +5621,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TypeCastExpression", @@ -5636,10 +5636,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXElement", @@ -5652,10 +5652,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXEmptyExpression", @@ -5665,10 +5665,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXExpressionContainer", @@ -5679,10 +5679,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXMemberExpression", @@ -5695,10 +5695,10 @@ export type Expression = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type Function = @@ -5712,7 +5712,7 @@ export type Function = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, trailingComments: ?Array, @@ -5723,7 +5723,7 @@ export type Function = params: Array, rest: ?Identifier, returnType: ?TypeAnnotation, - typeParameters: ?TypeParameterDeclaration + typeParameters: ?TypeParameterDeclaration, } | { type: "FunctionDeclaration", @@ -5735,7 +5735,7 @@ export type Function = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, trailingComments: ?Array, @@ -5746,7 +5746,7 @@ export type Function = params: Array, rest: ?Identifier, returnType: ?TypeAnnotation, - typeParameters: ?TypeParameterDeclaration + typeParameters: ?TypeParameterDeclaration, } | { type: "FunctionExpression", @@ -5758,7 +5758,7 @@ export type Function = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, trailingComments: ?Array, @@ -5769,7 +5769,7 @@ export type Function = params: Array, rest: ?Identifier, returnType: ?TypeAnnotation, - typeParameters: ?TypeParameterDeclaration + typeParameters: ?TypeParameterDeclaration, }; export type Node = @@ -5782,10 +5782,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ArrayPattern", @@ -5797,10 +5797,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ArrowFunctionExpression", @@ -5812,7 +5812,7 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, trailingComments: ?Array, @@ -5823,7 +5823,7 @@ export type Node = params: Array, rest: ?Identifier, returnType: ?TypeAnnotation, - typeParameters: ?TypeParameterDeclaration + typeParameters: ?TypeParameterDeclaration, } | { type: "AssignmentExpression", @@ -5836,10 +5836,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "AssignmentPattern", @@ -5851,10 +5851,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "AwaitExpression", @@ -5866,10 +5866,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "BinaryExpression", @@ -5882,10 +5882,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "BindExpression", @@ -5897,10 +5897,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "BlockStatement", @@ -5911,10 +5911,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "BreakStatement", @@ -5925,10 +5925,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "CallExpression", @@ -5940,10 +5940,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "CatchClause", @@ -5955,10 +5955,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ClassBody", @@ -5969,10 +5969,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ClassDeclaration", @@ -5988,10 +5988,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ClassExpression", @@ -6007,10 +6007,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ComprehensionBlock", @@ -6023,10 +6023,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ComprehensionExpression", @@ -6039,10 +6039,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ConditionalExpression", @@ -6055,10 +6055,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ContinueStatement", @@ -6069,10 +6069,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "Decorator", @@ -6083,10 +6083,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "DebuggerStatement", @@ -6096,10 +6096,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "DoWhileStatement", @@ -6111,10 +6111,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "DoExpression", @@ -6125,10 +6125,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "EmptyStatement", @@ -6138,10 +6138,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ExpressionStatement", @@ -6152,10 +6152,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "File", @@ -6166,10 +6166,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ForInStatement", @@ -6182,10 +6182,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ForOfStatement", @@ -6198,10 +6198,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ForStatement", @@ -6215,10 +6215,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "FunctionDeclaration", @@ -6230,7 +6230,7 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, trailingComments: ?Array, @@ -6241,7 +6241,7 @@ export type Node = params: Array, rest: ?Identifier, returnType: ?TypeAnnotation, - typeParameters: ?TypeParameterDeclaration + typeParameters: ?TypeParameterDeclaration, } | { type: "FunctionExpression", @@ -6253,7 +6253,7 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, trailingComments: ?Array, @@ -6264,7 +6264,7 @@ export type Node = params: Array, rest: ?Identifier, returnType: ?TypeAnnotation, - typeParameters: ?TypeParameterDeclaration + typeParameters: ?TypeParameterDeclaration, } | { type: "Identifier", @@ -6276,10 +6276,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "IfStatement", @@ -6292,10 +6292,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ImportDefaultSpecifier", @@ -6306,10 +6306,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ImportNamespaceSpecifier", @@ -6320,10 +6320,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ImportDeclaration", @@ -6335,10 +6335,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ImportSpecifier", @@ -6350,10 +6350,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "LabeledStatement", @@ -6365,10 +6365,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "Literal", @@ -6381,10 +6381,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "LogicalExpression", @@ -6397,10 +6397,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "MemberExpression", @@ -6413,10 +6413,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "MetaProperty", @@ -6428,10 +6428,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "MethodDefinition", @@ -6447,10 +6447,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "NewExpression", @@ -6462,10 +6462,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "Noop", @@ -6475,10 +6475,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ObjectExpression", @@ -6489,10 +6489,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ObjectPattern", @@ -6504,10 +6504,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "Program", @@ -6518,10 +6518,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "Property", @@ -6538,10 +6538,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "RestElement", @@ -6553,10 +6553,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ReturnStatement", @@ -6567,10 +6567,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "SequenceExpression", @@ -6581,10 +6581,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "SpreadElement", @@ -6595,10 +6595,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "SpreadProperty", @@ -6609,10 +6609,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "Super", @@ -6622,10 +6622,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "SwitchCase", @@ -6637,10 +6637,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "SwitchStatement", @@ -6653,10 +6653,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TaggedTemplateExpression", @@ -6668,10 +6668,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TemplateElement", @@ -6683,10 +6683,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TemplateLiteral", @@ -6698,10 +6698,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ThisExpression", @@ -6711,10 +6711,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ThrowStatement", @@ -6725,10 +6725,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TryStatement", @@ -6743,10 +6743,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "UnaryExpression", @@ -6759,10 +6759,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "UpdateExpression", @@ -6775,10 +6775,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "VariableDeclaration", @@ -6790,10 +6790,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "VariableDeclarator", @@ -6805,10 +6805,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "WhileStatement", @@ -6820,10 +6820,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "WithStatement", @@ -6835,10 +6835,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "YieldExpression", @@ -6850,10 +6850,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ExportAllDeclaration", @@ -6865,10 +6865,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ExportDefaultDeclaration", @@ -6879,10 +6879,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ExportNamedDeclaration", @@ -6895,10 +6895,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ExportDefaultSpecifier", @@ -6909,10 +6909,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ExportNamespaceSpecifier", @@ -6923,10 +6923,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ExportSpecifier", @@ -6938,10 +6938,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "AnyTypeAnnotation", @@ -6951,10 +6951,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ArrayTypeAnnotation", @@ -6965,10 +6965,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "BooleanLiteralTypeAnnotation", @@ -6980,10 +6980,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "BooleanTypeAnnotation", @@ -6993,10 +6993,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ClassImplements", @@ -7009,10 +7009,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ClassProperty", @@ -7028,10 +7028,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "DeclareClass", @@ -7045,10 +7045,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "DeclareFunction", @@ -7059,10 +7059,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "DeclareModule", @@ -7074,10 +7074,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "DeclareVariable", @@ -7088,10 +7088,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "FunctionTypeAnnotation", @@ -7105,10 +7105,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "FunctionTypeParam", @@ -7121,10 +7121,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "GenericTypeAnnotation", @@ -7136,10 +7136,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "InterfaceExtends", @@ -7151,10 +7151,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "InterfaceDeclaration", @@ -7168,10 +7168,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "IntersectionTypeAnnotation", @@ -7182,10 +7182,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "MixedTypeAnnotation", @@ -7195,10 +7195,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "NullableTypeAnnotation", @@ -7209,10 +7209,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "NumberLiteralTypeAnnotation", @@ -7224,10 +7224,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "NumberTypeAnnotation", @@ -7237,10 +7237,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "StringLiteralTypeAnnotation", @@ -7252,10 +7252,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "StringTypeAnnotation", @@ -7265,10 +7265,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TupleTypeAnnotation", @@ -7279,10 +7279,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TypeofTypeAnnotation", @@ -7293,10 +7293,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TypeAlias", @@ -7309,10 +7309,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TypeAnnotation", @@ -7323,10 +7323,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TypeCastExpression", @@ -7338,10 +7338,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TypeParameterDeclaration", @@ -7352,10 +7352,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TypeParameterInstantiation", @@ -7366,10 +7366,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ObjectTypeAnnotation", @@ -7382,10 +7382,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ObjectTypeCallProperty", @@ -7397,10 +7397,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ObjectTypeIndexer", @@ -7413,10 +7413,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ObjectTypeProperty", @@ -7429,10 +7429,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "QualifiedTypeIdentifier", @@ -7444,10 +7444,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "UnionTypeAnnotation", @@ -7458,10 +7458,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "VoidTypeAnnotation", @@ -7471,10 +7471,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXAttribute", @@ -7486,10 +7486,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXClosingElement", @@ -7500,10 +7500,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXElement", @@ -7516,10 +7516,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXEmptyExpression", @@ -7529,10 +7529,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXExpressionContainer", @@ -7543,10 +7543,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXIdentifier", @@ -7557,10 +7557,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXMemberExpression", @@ -7573,10 +7573,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXNamespacedName", @@ -7588,10 +7588,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXOpeningElement", @@ -7604,10 +7604,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "JSXSpreadAttribute", @@ -7618,10 +7618,10 @@ export type Node = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type Pattern = @@ -7635,10 +7635,10 @@ export type Pattern = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "AssignmentPattern", @@ -7650,10 +7650,10 @@ export type Pattern = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "Identifier", @@ -7665,10 +7665,10 @@ export type Pattern = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ObjectPattern", @@ -7680,10 +7680,10 @@ export type Pattern = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "RestElement", @@ -7695,10 +7695,10 @@ export type Pattern = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type Statement = @@ -7711,10 +7711,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "BreakStatement", @@ -7725,10 +7725,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ContinueStatement", @@ -7739,10 +7739,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "DoWhileStatement", @@ -7754,10 +7754,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "EmptyStatement", @@ -7767,10 +7767,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ExpressionStatement", @@ -7781,10 +7781,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ForInStatement", @@ -7797,10 +7797,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ForOfStatement", @@ -7813,10 +7813,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ForStatement", @@ -7830,10 +7830,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "IfStatement", @@ -7846,10 +7846,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "LabeledStatement", @@ -7861,10 +7861,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ReturnStatement", @@ -7875,10 +7875,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "SwitchStatement", @@ -7891,10 +7891,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ThrowStatement", @@ -7905,10 +7905,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TryStatement", @@ -7923,10 +7923,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "WhileStatement", @@ -7938,10 +7938,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "WithStatement", @@ -7953,10 +7953,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "DeclareClass", @@ -7970,10 +7970,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "DeclareFunction", @@ -7984,10 +7984,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "DeclareModule", @@ -7999,10 +7999,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "DeclareVariable", @@ -8013,10 +8013,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "InterfaceDeclaration", @@ -8030,10 +8030,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TypeAlias", @@ -8046,10 +8046,10 @@ export type Statement = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type Type = @@ -8061,10 +8061,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ArrayTypeAnnotation", @@ -8075,10 +8075,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "BooleanLiteralTypeAnnotation", @@ -8090,10 +8090,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "BooleanTypeAnnotation", @@ -8103,10 +8103,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "FunctionTypeAnnotation", @@ -8120,10 +8120,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "GenericTypeAnnotation", @@ -8135,10 +8135,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "IntersectionTypeAnnotation", @@ -8149,10 +8149,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "MixedTypeAnnotation", @@ -8162,10 +8162,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "NullableTypeAnnotation", @@ -8176,10 +8176,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "NumberLiteralTypeAnnotation", @@ -8191,10 +8191,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "NumberTypeAnnotation", @@ -8204,10 +8204,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "StringLiteralTypeAnnotation", @@ -8219,10 +8219,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "StringTypeAnnotation", @@ -8232,10 +8232,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "TupleTypeAnnotation", @@ -8246,10 +8246,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "ObjectTypeAnnotation", @@ -8262,10 +8262,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "UnionTypeAnnotation", @@ -8276,10 +8276,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, } | { type: "VoidTypeAnnotation", @@ -8289,10 +8289,10 @@ export type Type = leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // Concrete Types. Nothing can extend these. @@ -8304,9 +8304,9 @@ export type CommentLine = { end: number, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, - start: number + start: number, }; export type CommentBlock = { @@ -8316,9 +8316,9 @@ export type CommentBlock = { end: number, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, - start: number + start: number, }; // Babel concrete types. @@ -8332,10 +8332,10 @@ export type ArrayExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ArrayPattern = { @@ -8348,10 +8348,10 @@ export type ArrayPattern = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ArrowFunctionExpression = { @@ -8364,7 +8364,7 @@ export type ArrowFunctionExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, trailingComments: ?Array, @@ -8375,7 +8375,7 @@ export type ArrowFunctionExpression = { params: Array, rest: ?Identifier, returnType: ?TypeAnnotation, - typeParameters: ?TypeParameterDeclaration + typeParameters: ?TypeParameterDeclaration, }; type AssignmentOperator = @@ -8403,10 +8403,10 @@ export type AssignmentExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type AssignmentPattern = { @@ -8419,10 +8419,10 @@ export type AssignmentPattern = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type AwaitExpression = { @@ -8435,10 +8435,10 @@ export type AwaitExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; type BinaryOperator = @@ -8476,10 +8476,10 @@ export type BinaryExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: What is this? @@ -8493,10 +8493,10 @@ export type BindExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type BlockStatement = { @@ -8508,10 +8508,10 @@ export type BlockStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type BreakStatement = { @@ -8523,10 +8523,10 @@ export type BreakStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type CallExpression = { @@ -8539,10 +8539,10 @@ export type CallExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type CatchClause = { @@ -8555,10 +8555,10 @@ export type CatchClause = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ClassBody = { @@ -8570,10 +8570,10 @@ export type ClassBody = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ClassDeclaration = { @@ -8590,10 +8590,10 @@ export type ClassDeclaration = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ClassExpression = { @@ -8610,10 +8610,10 @@ export type ClassExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ComprehensionBlock = { @@ -8627,10 +8627,10 @@ export type ComprehensionBlock = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ComprehensionExpression = { @@ -8644,10 +8644,10 @@ export type ComprehensionExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ConditionalExpression = { @@ -8661,10 +8661,10 @@ export type ConditionalExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ContinueStatement = { @@ -8676,10 +8676,10 @@ export type ContinueStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -8692,10 +8692,10 @@ export type Decorator = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type DebuggerStatement = { @@ -8706,10 +8706,10 @@ export type DebuggerStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type DoWhileStatement = { @@ -8722,10 +8722,10 @@ export type DoWhileStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -8738,10 +8738,10 @@ export type DoExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type EmptyStatement = { @@ -8752,10 +8752,10 @@ export type EmptyStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ExpressionStatement = { @@ -8767,10 +8767,10 @@ export type ExpressionStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type File = { @@ -8782,10 +8782,10 @@ export type File = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ForInStatement = { @@ -8799,10 +8799,10 @@ export type ForInStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -8817,10 +8817,10 @@ export type ForOfStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ForStatement = { @@ -8835,10 +8835,10 @@ export type ForStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type FunctionDeclaration = { @@ -8851,7 +8851,7 @@ export type FunctionDeclaration = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, trailingComments: ?Array, @@ -8862,7 +8862,7 @@ export type FunctionDeclaration = { params: Array, rest: ?Identifier, returnType: ?TypeAnnotation, - typeParameters: ?TypeParameterDeclaration + typeParameters: ?TypeParameterDeclaration, }; export type FunctionExpression = { @@ -8875,7 +8875,7 @@ export type FunctionExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, trailingComments: ?Array, @@ -8886,7 +8886,7 @@ export type FunctionExpression = { params: Array, rest: ?Identifier, returnType: ?TypeAnnotation, - typeParameters: ?TypeParameterDeclaration + typeParameters: ?TypeParameterDeclaration, }; export type Identifier = { @@ -8899,10 +8899,10 @@ export type Identifier = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type IfStatement = { @@ -8916,10 +8916,10 @@ export type IfStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -8932,10 +8932,10 @@ export type ImportDefaultSpecifier = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -8948,10 +8948,10 @@ export type ImportNamespaceSpecifier = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -8965,10 +8965,10 @@ export type ImportDeclaration = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -8982,10 +8982,10 @@ export type ImportSpecifier = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type LabeledStatement = { @@ -8998,10 +8998,10 @@ export type LabeledStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type Literal = { @@ -9015,10 +9015,10 @@ export type Literal = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; type LogicalOperator = "||" | "&&"; @@ -9034,10 +9034,10 @@ export type LogicalExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type MemberExpression = { @@ -9051,10 +9051,10 @@ export type MemberExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -9068,10 +9068,10 @@ export type MetaProperty = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type MethodDefinition = { @@ -9088,10 +9088,10 @@ export type MethodDefinition = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type NewExpression = { @@ -9104,10 +9104,10 @@ export type NewExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type Noop = { @@ -9118,10 +9118,10 @@ export type Noop = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ObjectExpression = { @@ -9133,10 +9133,10 @@ export type ObjectExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ObjectPattern = { @@ -9149,10 +9149,10 @@ export type ObjectPattern = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type Program = { @@ -9164,10 +9164,10 @@ export type Program = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type Property = { @@ -9185,10 +9185,10 @@ export type Property = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type RestElement = { @@ -9201,10 +9201,10 @@ export type RestElement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ReturnStatement = { @@ -9216,10 +9216,10 @@ export type ReturnStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type SequenceExpression = { @@ -9231,10 +9231,10 @@ export type SequenceExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type SpreadElement = { @@ -9246,10 +9246,10 @@ export type SpreadElement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type SpreadProperty = { @@ -9261,10 +9261,10 @@ export type SpreadProperty = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type Super = { @@ -9275,10 +9275,10 @@ export type Super = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type SwitchCase = { @@ -9291,10 +9291,10 @@ export type SwitchCase = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type SwitchStatement = { @@ -9308,10 +9308,10 @@ export type SwitchStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type TaggedTemplateExpression = { @@ -9324,10 +9324,10 @@ export type TaggedTemplateExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type TemplateElement = { @@ -9340,10 +9340,10 @@ export type TemplateElement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type TemplateLiteral = { @@ -9356,10 +9356,10 @@ export type TemplateLiteral = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ThisExpression = { @@ -9370,10 +9370,10 @@ export type ThisExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ThrowStatement = { @@ -9385,10 +9385,10 @@ export type ThrowStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type TryStatement = { @@ -9404,10 +9404,10 @@ export type TryStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; @@ -9423,10 +9423,10 @@ export type UnaryExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; type UpdateOperator = "++" | "--"; @@ -9442,10 +9442,10 @@ export type UpdateExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type VariableDeclaration = { @@ -9458,10 +9458,10 @@ export type VariableDeclaration = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type VariableDeclarator = { @@ -9474,10 +9474,10 @@ export type VariableDeclarator = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type WhileStatement = { @@ -9490,10 +9490,10 @@ export type WhileStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type WithStatement = { @@ -9506,10 +9506,10 @@ export type WithStatement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type YieldExpression = { @@ -9522,10 +9522,10 @@ export type YieldExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -9539,10 +9539,10 @@ export type ExportAllDeclaration = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -9555,10 +9555,10 @@ export type ExportDefaultDeclaration = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -9573,10 +9573,10 @@ export type ExportNamedDeclaration = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -9589,10 +9589,10 @@ export type ExportDefaultSpecifier = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -9605,10 +9605,10 @@ export type ExportNamespaceSpecifier = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -9622,10 +9622,10 @@ export type ExportSpecifier = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type AnyTypeAnnotation = { @@ -9636,10 +9636,10 @@ export type AnyTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ArrayTypeAnnotation = { @@ -9651,10 +9651,10 @@ export type ArrayTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type BooleanLiteralTypeAnnotation = { @@ -9667,10 +9667,10 @@ export type BooleanLiteralTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type BooleanTypeAnnotation = { @@ -9681,10 +9681,10 @@ export type BooleanTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ClassImplements = { @@ -9698,10 +9698,10 @@ export type ClassImplements = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ClassProperty = { @@ -9718,10 +9718,10 @@ export type ClassProperty = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type DeclareClass = { @@ -9736,10 +9736,10 @@ export type DeclareClass = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -9752,10 +9752,10 @@ export type DeclareFunction = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type DeclareModule = { @@ -9768,10 +9768,10 @@ export type DeclareModule = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; // TODO: Make this correct. @@ -9784,10 +9784,10 @@ export type DeclareVariable = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type FunctionTypeAnnotation = { @@ -9802,10 +9802,10 @@ export type FunctionTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type FunctionTypeParam = { @@ -9819,10 +9819,10 @@ export type FunctionTypeParam = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type GenericTypeAnnotation = { @@ -9835,10 +9835,10 @@ export type GenericTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type InterfaceExtends = { @@ -9851,10 +9851,10 @@ export type InterfaceExtends = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type InterfaceDeclaration = { @@ -9869,10 +9869,10 @@ export type InterfaceDeclaration = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type IntersectionTypeAnnotation = { @@ -9884,10 +9884,10 @@ export type IntersectionTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type MixedTypeAnnotation = { @@ -9898,10 +9898,10 @@ export type MixedTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type NullableTypeAnnotation = { @@ -9913,10 +9913,10 @@ export type NullableTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type NumberLiteralTypeAnnotation = { @@ -9929,10 +9929,10 @@ export type NumberLiteralTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type NumberTypeAnnotation = { @@ -9943,10 +9943,10 @@ export type NumberTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type StringLiteralTypeAnnotation = { @@ -9959,10 +9959,10 @@ export type StringLiteralTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type StringTypeAnnotation = { @@ -9973,10 +9973,10 @@ export type StringTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type TupleTypeAnnotation = { @@ -9988,10 +9988,10 @@ export type TupleTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type TypeofTypeAnnotation = { @@ -10003,10 +10003,10 @@ export type TypeofTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type TypeAlias = { @@ -10020,10 +10020,10 @@ export type TypeAlias = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type TypeAnnotation = { @@ -10035,10 +10035,10 @@ export type TypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type TypeCastExpression = { @@ -10051,10 +10051,10 @@ export type TypeCastExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type TypeParameterDeclaration = { @@ -10066,10 +10066,10 @@ export type TypeParameterDeclaration = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type TypeParameterInstantiation = { @@ -10081,10 +10081,10 @@ export type TypeParameterInstantiation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ObjectTypeAnnotation = { @@ -10098,10 +10098,10 @@ export type ObjectTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ObjectTypeCallProperty = { @@ -10114,10 +10114,10 @@ export type ObjectTypeCallProperty = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ObjectTypeIndexer = { @@ -10131,10 +10131,10 @@ export type ObjectTypeIndexer = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type ObjectTypeProperty = { @@ -10148,10 +10148,10 @@ export type ObjectTypeProperty = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type QualifiedTypeIdentifier = { @@ -10164,10 +10164,10 @@ export type QualifiedTypeIdentifier = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type UnionTypeAnnotation = { @@ -10179,10 +10179,10 @@ export type UnionTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type VoidTypeAnnotation = { @@ -10193,10 +10193,10 @@ export type VoidTypeAnnotation = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type JSXAttribute = { @@ -10209,10 +10209,10 @@ export type JSXAttribute = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type JSXClosingElement = { @@ -10224,10 +10224,10 @@ export type JSXClosingElement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type JSXElement = { @@ -10241,10 +10241,10 @@ export type JSXElement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type JSXEmptyExpression = { @@ -10255,10 +10255,10 @@ export type JSXEmptyExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type JSXExpressionContainer = { @@ -10270,10 +10270,10 @@ export type JSXExpressionContainer = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type JSXIdentifier = { @@ -10285,10 +10285,10 @@ export type JSXIdentifier = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type JSXMemberExpression = { @@ -10302,10 +10302,10 @@ export type JSXMemberExpression = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type JSXNamespacedName = { @@ -10318,10 +10318,10 @@ export type JSXNamespacedName = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type JSXOpeningElement = { @@ -10335,10 +10335,10 @@ export type JSXOpeningElement = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; export type JSXSpreadAttribute = { @@ -10350,10 +10350,10 @@ export type JSXSpreadAttribute = { leadingComments: ?Array, loc: { end: { column: number, line: number }, - start: { column: number, line: number } + start: { column: number, line: number }, }, start: number, - trailingComments: ?Array + trailingComments: ?Array, }; ================================================================================ diff --git a/tests/flow/type_args_nonstrict/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type_args_nonstrict/__snapshots__/jsfmt.spec.js.snap index 436af02cb..9d9e4d228 100644 --- a/tests/flow/type_args_nonstrict/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type_args_nonstrict/__snapshots__/jsfmt.spec.js.snap @@ -119,7 +119,7 @@ var c2: MyClass2 = new MyClass2(0, ""); // no error // no arity error in type annotation using polymorphic type alias type MyObject = { - x: T + x: T, }; var o: MyObject = { x: 0 }; // no error diff --git a/tests/flow/type_args_strict/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type_args_strict/__snapshots__/jsfmt.spec.js.snap index 0664b4d70..4b48c5b80 100644 --- a/tests/flow/type_args_strict/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type_args_strict/__snapshots__/jsfmt.spec.js.snap @@ -117,7 +117,7 @@ var c2: MyClass2 = new MyClass2(0, ""); // error, missing argument list (1-2) // arity error in type annotation using polymorphic type alias type MyObject = { - x: T + x: T, }; var o: MyObject = { x: 0 }; // error, missing argument list diff --git a/tests/flow/type_only_vars/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type_only_vars/__snapshots__/jsfmt.spec.js.snap index adc88e86a..0910516c7 100644 --- a/tests/flow/type_only_vars/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type_only_vars/__snapshots__/jsfmt.spec.js.snap @@ -32,7 +32,7 @@ class Bar {} module.exports = { Foo: Foo, - Bar: Bar + Bar: Bar, }; ================================================================================ @@ -72,7 +72,7 @@ import typeof A from "./A.js"; import type { Foo, Bar as Baz } from "./A.js"; type duck = { - quack: () => string + quack: () => string, }; // These string types should confict with the imported types diff --git a/tests/flow/typeapp_perf/__snapshots__/jsfmt.spec.js.snap b/tests/flow/typeapp_perf/__snapshots__/jsfmt.spec.js.snap index c5914ef19..117d44a14 100644 --- a/tests/flow/typeapp_perf/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/typeapp_perf/__snapshots__/jsfmt.spec.js.snap @@ -42,7 +42,7 @@ type B = A & { +f: () => B, +g: () => B, +h: () => B, - +i: () => B + +i: () => B, }; declare var b: B; @@ -94,7 +94,7 @@ type B = A & { +f: (x: B) => void, +g: (x: B) => void, +h: (x: B) => void, - +i: (x: B) => void + +i: (x: B) => void, }; declare var b: B; diff --git a/tests/flow/typecast/__snapshots__/jsfmt.spec.js.snap b/tests/flow/typecast/__snapshots__/jsfmt.spec.js.snap index 5e0102969..a704b94c9 100644 --- a/tests/flow/typecast/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/typecast/__snapshots__/jsfmt.spec.js.snap @@ -58,7 +58,7 @@ var tests = [ // var a : Array = [0, 1, 2, 3, 4, 5, 6, 7, null]; // typecast case: // var b = [(0 : ?number), 1, 2, 3, 4, 5, 6, 7, null]; - } + }, ]; ================================================================================ diff --git a/tests/flow/unary/__snapshots__/jsfmt.spec.js.snap b/tests/flow/unary/__snapshots__/jsfmt.spec.js.snap index fb56ee149..5e5cfd809 100644 --- a/tests/flow/unary/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/unary/__snapshots__/jsfmt.spec.js.snap @@ -132,7 +132,7 @@ let tests = [ function(y: any) { y++; // ok - } + }, ]; ================================================================================ diff --git a/tests/flow/undefined/__snapshots__/jsfmt.spec.js.snap b/tests/flow/undefined/__snapshots__/jsfmt.spec.js.snap index 9ddc59226..5f4a0e0a2 100644 --- a/tests/flow/undefined/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/undefined/__snapshots__/jsfmt.spec.js.snap @@ -132,7 +132,7 @@ let tests = [ const bar = [undefined, "bar"]; (bar[x]: boolean); // error, string only - } + }, ]; ================================================================================ diff --git a/tests/flow/union-intersection/__snapshots__/jsfmt.spec.js.snap b/tests/flow/union-intersection/__snapshots__/jsfmt.spec.js.snap index afdc329d9..dc16ce22a 100644 --- a/tests/flow/union-intersection/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/union-intersection/__snapshots__/jsfmt.spec.js.snap @@ -4015,4003 +4015,4003 @@ function foo(x: TAction): TAction { return x; } type TAction = | { type: "a1", - a1: number + a1: number, } | { type: "a2", - a1: number + a1: number, } | { type: "a3", - a1: number + a1: number, } | { type: "a4", - a1: number + a1: number, } | { type: "a5", - a1: number + a1: number, } | { type: "a6", - a1: number + a1: number, } | { type: "a7", - a1: number + a1: number, } | { type: "a8", - a1: number + a1: number, } | { type: "a9", - a1: number + a1: number, } | { type: "a10", - a1: number + a1: number, } | { type: "a11", - a2: number + a2: number, } | { type: "a12", - a2: number + a2: number, } | { type: "a13", - a2: number + a2: number, } | { type: "a14", - a2: number + a2: number, } | { type: "a15", - a2: number + a2: number, } | { type: "a16", - a2: number + a2: number, } | { type: "a17", - a2: number + a2: number, } | { type: "a18", - a2: number + a2: number, } | { type: "a19", - a2: number + a2: number, } | { type: "a20", - a2: number + a2: number, } | { type: "a21", - a3: number + a3: number, } | { type: "a22", - a3: number + a3: number, } | { type: "a23", - a3: number + a3: number, } | { type: "a24", - a3: number + a3: number, } | { type: "a25", - a3: number + a3: number, } | { type: "a26", - a3: number + a3: number, } | { type: "a27", - a3: number + a3: number, } | { type: "a28", - a3: number + a3: number, } | { type: "a29", - a3: number + a3: number, } | { type: "a30", - a3: number + a3: number, } | { type: "a31", - a4: number + a4: number, } | { type: "a32", - a4: number + a4: number, } | { type: "a33", - a4: number + a4: number, } | { type: "a34", - a4: number + a4: number, } | { type: "a35", - a4: number + a4: number, } | { type: "a36", - a4: number + a4: number, } | { type: "a37", - a4: number + a4: number, } | { type: "a38", - a4: number + a4: number, } | { type: "a39", - a4: number + a4: number, } | { type: "a40", - a4: number + a4: number, } | { type: "a41", - a5: number + a5: number, } | { type: "a42", - a5: number + a5: number, } | { type: "a43", - a5: number + a5: number, } | { type: "a44", - a5: number + a5: number, } | { type: "a45", - a5: number + a5: number, } | { type: "a46", - a5: number + a5: number, } | { type: "a47", - a5: number + a5: number, } | { type: "a48", - a5: number + a5: number, } | { type: "a49", - a5: number + a5: number, } | { type: "a50", - a5: number + a5: number, } | { type: "a51", - a6: number + a6: number, } | { type: "a52", - a6: number + a6: number, } | { type: "a53", - a6: number + a6: number, } | { type: "a54", - a6: number + a6: number, } | { type: "a55", - a6: number + a6: number, } | { type: "a56", - a6: number + a6: number, } | { type: "a57", - a6: number + a6: number, } | { type: "a58", - a6: number + a6: number, } | { type: "a59", - a6: number + a6: number, } | { type: "a60", - a6: number + a6: number, } | { type: "a61", - a7: number + a7: number, } | { type: "a62", - a7: number + a7: number, } | { type: "a63", - a7: number + a7: number, } | { type: "a64", - a7: number + a7: number, } | { type: "a65", - a7: number + a7: number, } | { type: "a66", - a7: number + a7: number, } | { type: "a67", - a7: number + a7: number, } | { type: "a68", - a7: number + a7: number, } | { type: "a69", - a7: number + a7: number, } | { type: "a70", - a7: number + a7: number, } | { type: "a71", - a8: number + a8: number, } | { type: "a72", - a8: number + a8: number, } | { type: "a73", - a8: number + a8: number, } | { type: "a74", - a8: number + a8: number, } | { type: "a75", - a8: number + a8: number, } | { type: "a76", - a8: number + a8: number, } | { type: "a77", - a8: number + a8: number, } | { type: "a78", - a8: number + a8: number, } | { type: "a79", - a8: number + a8: number, } | { type: "a80", - a8: number + a8: number, } | { type: "a81", - a9: number + a9: number, } | { type: "a82", - a9: number + a9: number, } | { type: "a83", - a9: number + a9: number, } | { type: "a84", - a9: number + a9: number, } | { type: "a85", - a9: number + a9: number, } | { type: "a86", - a9: number + a9: number, } | { type: "a87", - a9: number + a9: number, } | { type: "a88", - a9: number + a9: number, } | { type: "a89", - a9: number + a9: number, } | { type: "a90", - a9: number + a9: number, } | { type: "a91", - a10: number + a10: number, } | { type: "a92", - a10: number + a10: number, } | { type: "a93", - a10: number + a10: number, } | { type: "a94", - a10: number + a10: number, } | { type: "a95", - a10: number + a10: number, } | { type: "a96", - a10: number + a10: number, } | { type: "a97", - a10: number + a10: number, } | { type: "a98", - a10: number + a10: number, } | { type: "a99", - a10: number + a10: number, } | { type: "a100", - a10: number + a10: number, } | { type: "a101", - a11: number + a11: number, } | { type: "a102", - a11: number + a11: number, } | { type: "a103", - a11: number + a11: number, } | { type: "a104", - a11: number + a11: number, } | { type: "a105", - a11: number + a11: number, } | { type: "a106", - a11: number + a11: number, } | { type: "a107", - a11: number + a11: number, } | { type: "a108", - a11: number + a11: number, } | { type: "a109", - a11: number + a11: number, } | { type: "a110", - a11: number + a11: number, } | { type: "a111", - a12: number + a12: number, } | { type: "a112", - a12: number + a12: number, } | { type: "a113", - a12: number + a12: number, } | { type: "a114", - a12: number + a12: number, } | { type: "a115", - a12: number + a12: number, } | { type: "a116", - a12: number + a12: number, } | { type: "a117", - a12: number + a12: number, } | { type: "a118", - a12: number + a12: number, } | { type: "a119", - a12: number + a12: number, } | { type: "a120", - a12: number + a12: number, } | { type: "a121", - a13: number + a13: number, } | { type: "a122", - a13: number + a13: number, } | { type: "a123", - a13: number + a13: number, } | { type: "a124", - a13: number + a13: number, } | { type: "a125", - a13: number + a13: number, } | { type: "a126", - a13: number + a13: number, } | { type: "a127", - a13: number + a13: number, } | { type: "a128", - a13: number + a13: number, } | { type: "a129", - a13: number + a13: number, } | { type: "a130", - a13: number + a13: number, } | { type: "a131", - a14: number + a14: number, } | { type: "a132", - a14: number + a14: number, } | { type: "a133", - a14: number + a14: number, } | { type: "a134", - a14: number + a14: number, } | { type: "a135", - a14: number + a14: number, } | { type: "a136", - a14: number + a14: number, } | { type: "a137", - a14: number + a14: number, } | { type: "a138", - a14: number + a14: number, } | { type: "a139", - a14: number + a14: number, } | { type: "a140", - a14: number + a14: number, } | { type: "a141", - a15: number + a15: number, } | { type: "a142", - a15: number + a15: number, } | { type: "a143", - a15: number + a15: number, } | { type: "a144", - a15: number + a15: number, } | { type: "a145", - a15: number + a15: number, } | { type: "a146", - a15: number + a15: number, } | { type: "a147", - a15: number + a15: number, } | { type: "a148", - a15: number + a15: number, } | { type: "a149", - a15: number + a15: number, } | { type: "a150", - a15: number + a15: number, } | { type: "a151", - a16: number + a16: number, } | { type: "a152", - a16: number + a16: number, } | { type: "a153", - a16: number + a16: number, } | { type: "a154", - a16: number + a16: number, } | { type: "a155", - a16: number + a16: number, } | { type: "a156", - a16: number + a16: number, } | { type: "a157", - a16: number + a16: number, } | { type: "a158", - a16: number + a16: number, } | { type: "a159", - a16: number + a16: number, } | { type: "a160", - a16: number + a16: number, } | { type: "a161", - a17: number + a17: number, } | { type: "a162", - a17: number + a17: number, } | { type: "a163", - a17: number + a17: number, } | { type: "a164", - a17: number + a17: number, } | { type: "a165", - a17: number + a17: number, } | { type: "a166", - a17: number + a17: number, } | { type: "a167", - a17: number + a17: number, } | { type: "a168", - a17: number + a17: number, } | { type: "a169", - a17: number + a17: number, } | { type: "a170", - a17: number + a17: number, } | { type: "a171", - a18: number + a18: number, } | { type: "a172", - a18: number + a18: number, } | { type: "a173", - a18: number + a18: number, } | { type: "a174", - a18: number + a18: number, } | { type: "a175", - a18: number + a18: number, } | { type: "a176", - a18: number + a18: number, } | { type: "a177", - a18: number + a18: number, } | { type: "a178", - a18: number + a18: number, } | { type: "a179", - a18: number + a18: number, } | { type: "a180", - a18: number + a18: number, } | { type: "a181", - a19: number + a19: number, } | { type: "a182", - a19: number + a19: number, } | { type: "a183", - a19: number + a19: number, } | { type: "a184", - a19: number + a19: number, } | { type: "a185", - a19: number + a19: number, } | { type: "a186", - a19: number + a19: number, } | { type: "a187", - a19: number + a19: number, } | { type: "a188", - a19: number + a19: number, } | { type: "a189", - a19: number + a19: number, } | { type: "a190", - a19: number + a19: number, } | { type: "a191", - a20: number + a20: number, } | { type: "a192", - a20: number + a20: number, } | { type: "a193", - a20: number + a20: number, } | { type: "a194", - a20: number + a20: number, } | { type: "a195", - a20: number + a20: number, } | { type: "a196", - a20: number + a20: number, } | { type: "a197", - a20: number + a20: number, } | { type: "a198", - a20: number + a20: number, } | { type: "a199", - a20: number + a20: number, } | { type: "a200", - a20: number + a20: number, } | { type: "a201", - a21: number + a21: number, } | { type: "a202", - a21: number + a21: number, } | { type: "a203", - a21: number + a21: number, } | { type: "a204", - a21: number + a21: number, } | { type: "a205", - a21: number + a21: number, } | { type: "a206", - a21: number + a21: number, } | { type: "a207", - a21: number + a21: number, } | { type: "a208", - a21: number + a21: number, } | { type: "a209", - a21: number + a21: number, } | { type: "a210", - a21: number + a21: number, } | { type: "a211", - a22: number + a22: number, } | { type: "a212", - a22: number + a22: number, } | { type: "a213", - a22: number + a22: number, } | { type: "a214", - a22: number + a22: number, } | { type: "a215", - a22: number + a22: number, } | { type: "a216", - a22: number + a22: number, } | { type: "a217", - a22: number + a22: number, } | { type: "a218", - a22: number + a22: number, } | { type: "a219", - a22: number + a22: number, } | { type: "a220", - a22: number + a22: number, } | { type: "a221", - a23: number + a23: number, } | { type: "a222", - a23: number + a23: number, } | { type: "a223", - a23: number + a23: number, } | { type: "a224", - a23: number + a23: number, } | { type: "a225", - a23: number + a23: number, } | { type: "a226", - a23: number + a23: number, } | { type: "a227", - a23: number + a23: number, } | { type: "a228", - a23: number + a23: number, } | { type: "a229", - a23: number + a23: number, } | { type: "a230", - a23: number + a23: number, } | { type: "a231", - a24: number + a24: number, } | { type: "a232", - a24: number + a24: number, } | { type: "a233", - a24: number + a24: number, } | { type: "a234", - a24: number + a24: number, } | { type: "a235", - a24: number + a24: number, } | { type: "a236", - a24: number + a24: number, } | { type: "a237", - a24: number + a24: number, } | { type: "a238", - a24: number + a24: number, } | { type: "a239", - a24: number + a24: number, } | { type: "a240", - a24: number + a24: number, } | { type: "a241", - a25: number + a25: number, } | { type: "a242", - a25: number + a25: number, } | { type: "a243", - a25: number + a25: number, } | { type: "a244", - a25: number + a25: number, } | { type: "a245", - a25: number + a25: number, } | { type: "a246", - a25: number + a25: number, } | { type: "a247", - a25: number + a25: number, } | { type: "a248", - a25: number + a25: number, } | { type: "a249", - a25: number + a25: number, } | { type: "a250", - a25: number + a25: number, } | { type: "a251", - a26: number + a26: number, } | { type: "a252", - a26: number + a26: number, } | { type: "a253", - a26: number + a26: number, } | { type: "a254", - a26: number + a26: number, } | { type: "a255", - a26: number + a26: number, } | { type: "a256", - a26: number + a26: number, } | { type: "a257", - a26: number + a26: number, } | { type: "a258", - a26: number + a26: number, } | { type: "a259", - a26: number + a26: number, } | { type: "a260", - a26: number + a26: number, } | { type: "a261", - a27: number + a27: number, } | { type: "a262", - a27: number + a27: number, } | { type: "a263", - a27: number + a27: number, } | { type: "a264", - a27: number + a27: number, } | { type: "a265", - a27: number + a27: number, } | { type: "a266", - a27: number + a27: number, } | { type: "a267", - a27: number + a27: number, } | { type: "a268", - a27: number + a27: number, } | { type: "a269", - a27: number + a27: number, } | { type: "a270", - a27: number + a27: number, } | { type: "a271", - a28: number + a28: number, } | { type: "a272", - a28: number + a28: number, } | { type: "a273", - a28: number + a28: number, } | { type: "a274", - a28: number + a28: number, } | { type: "a275", - a28: number + a28: number, } | { type: "a276", - a28: number + a28: number, } | { type: "a277", - a28: number + a28: number, } | { type: "a278", - a28: number + a28: number, } | { type: "a279", - a28: number + a28: number, } | { type: "a280", - a28: number + a28: number, } | { type: "a281", - a29: number + a29: number, } | { type: "a282", - a29: number + a29: number, } | { type: "a283", - a29: number + a29: number, } | { type: "a284", - a29: number + a29: number, } | { type: "a285", - a29: number + a29: number, } | { type: "a286", - a29: number + a29: number, } | { type: "a287", - a29: number + a29: number, } | { type: "a288", - a29: number + a29: number, } | { type: "a289", - a29: number + a29: number, } | { type: "a290", - a29: number + a29: number, } | { type: "a291", - a30: number + a30: number, } | { type: "a292", - a30: number + a30: number, } | { type: "a293", - a30: number + a30: number, } | { type: "a294", - a30: number + a30: number, } | { type: "a295", - a30: number + a30: number, } | { type: "a296", - a30: number + a30: number, } | { type: "a297", - a30: number + a30: number, } | { type: "a298", - a30: number + a30: number, } | { type: "a299", - a30: number + a30: number, } | { type: "a300", - a30: number + a30: number, } | { type: "a301", - a31: number + a31: number, } | { type: "a302", - a31: number + a31: number, } | { type: "a303", - a31: number + a31: number, } | { type: "a304", - a31: number + a31: number, } | { type: "a305", - a31: number + a31: number, } | { type: "a306", - a31: number + a31: number, } | { type: "a307", - a31: number + a31: number, } | { type: "a308", - a31: number + a31: number, } | { type: "a309", - a31: number + a31: number, } | { type: "a310", - a31: number + a31: number, } | { type: "a311", - a32: number + a32: number, } | { type: "a312", - a32: number + a32: number, } | { type: "a313", - a32: number + a32: number, } | { type: "a314", - a32: number + a32: number, } | { type: "a315", - a32: number + a32: number, } | { type: "a316", - a32: number + a32: number, } | { type: "a317", - a32: number + a32: number, } | { type: "a318", - a32: number + a32: number, } | { type: "a319", - a32: number + a32: number, } | { type: "a320", - a32: number + a32: number, } | { type: "a321", - a33: number + a33: number, } | { type: "a322", - a33: number + a33: number, } | { type: "a323", - a33: number + a33: number, } | { type: "a324", - a33: number + a33: number, } | { type: "a325", - a33: number + a33: number, } | { type: "a326", - a33: number + a33: number, } | { type: "a327", - a33: number + a33: number, } | { type: "a328", - a33: number + a33: number, } | { type: "a329", - a33: number + a33: number, } | { type: "a330", - a33: number + a33: number, } | { type: "a331", - a34: number + a34: number, } | { type: "a332", - a34: number + a34: number, } | { type: "a333", - a34: number + a34: number, } | { type: "a334", - a34: number + a34: number, } | { type: "a335", - a34: number + a34: number, } | { type: "a336", - a34: number + a34: number, } | { type: "a337", - a34: number + a34: number, } | { type: "a338", - a34: number + a34: number, } | { type: "a339", - a34: number + a34: number, } | { type: "a340", - a34: number + a34: number, } | { type: "a341", - a35: number + a35: number, } | { type: "a342", - a35: number + a35: number, } | { type: "a343", - a35: number + a35: number, } | { type: "a344", - a35: number + a35: number, } | { type: "a345", - a35: number + a35: number, } | { type: "a346", - a35: number + a35: number, } | { type: "a347", - a35: number + a35: number, } | { type: "a348", - a35: number + a35: number, } | { type: "a349", - a35: number + a35: number, } | { type: "a350", - a35: number + a35: number, } | { type: "a351", - a36: number + a36: number, } | { type: "a352", - a36: number + a36: number, } | { type: "a353", - a36: number + a36: number, } | { type: "a354", - a36: number + a36: number, } | { type: "a355", - a36: number + a36: number, } | { type: "a356", - a36: number + a36: number, } | { type: "a357", - a36: number + a36: number, } | { type: "a358", - a36: number + a36: number, } | { type: "a359", - a36: number + a36: number, } | { type: "a360", - a36: number + a36: number, } | { type: "a361", - a37: number + a37: number, } | { type: "a362", - a37: number + a37: number, } | { type: "a363", - a37: number + a37: number, } | { type: "a364", - a37: number + a37: number, } | { type: "a365", - a37: number + a37: number, } | { type: "a366", - a37: number + a37: number, } | { type: "a367", - a37: number + a37: number, } | { type: "a368", - a37: number + a37: number, } | { type: "a369", - a37: number + a37: number, } | { type: "a370", - a37: number + a37: number, } | { type: "a371", - a38: number + a38: number, } | { type: "a372", - a38: number + a38: number, } | { type: "a373", - a38: number + a38: number, } | { type: "a374", - a38: number + a38: number, } | { type: "a375", - a38: number + a38: number, } | { type: "a376", - a38: number + a38: number, } | { type: "a377", - a38: number + a38: number, } | { type: "a378", - a38: number + a38: number, } | { type: "a379", - a38: number + a38: number, } | { type: "a380", - a38: number + a38: number, } | { type: "a381", - a39: number + a39: number, } | { type: "a382", - a39: number + a39: number, } | { type: "a383", - a39: number + a39: number, } | { type: "a384", - a39: number + a39: number, } | { type: "a385", - a39: number + a39: number, } | { type: "a386", - a39: number + a39: number, } | { type: "a387", - a39: number + a39: number, } | { type: "a388", - a39: number + a39: number, } | { type: "a389", - a39: number + a39: number, } | { type: "a390", - a39: number + a39: number, } | { type: "a391", - a40: number + a40: number, } | { type: "a392", - a40: number + a40: number, } | { type: "a393", - a40: number + a40: number, } | { type: "a394", - a40: number + a40: number, } | { type: "a395", - a40: number + a40: number, } | { type: "a396", - a40: number + a40: number, } | { type: "a397", - a40: number + a40: number, } | { type: "a398", - a40: number + a40: number, } | { type: "a399", - a40: number + a40: number, } | { type: "a400", - a40: number + a40: number, } | { type: "a401", - a41: number + a41: number, } | { type: "a402", - a41: number + a41: number, } | { type: "a403", - a41: number + a41: number, } | { type: "a404", - a41: number + a41: number, } | { type: "a405", - a41: number + a41: number, } | { type: "a406", - a41: number + a41: number, } | { type: "a407", - a41: number + a41: number, } | { type: "a408", - a41: number + a41: number, } | { type: "a409", - a41: number + a41: number, } | { type: "a410", - a41: number + a41: number, } | { type: "a411", - a42: number + a42: number, } | { type: "a412", - a42: number + a42: number, } | { type: "a413", - a42: number + a42: number, } | { type: "a414", - a42: number + a42: number, } | { type: "a415", - a42: number + a42: number, } | { type: "a416", - a42: number + a42: number, } | { type: "a417", - a42: number + a42: number, } | { type: "a418", - a42: number + a42: number, } | { type: "a419", - a42: number + a42: number, } | { type: "a420", - a42: number + a42: number, } | { type: "a421", - a43: number + a43: number, } | { type: "a422", - a43: number + a43: number, } | { type: "a423", - a43: number + a43: number, } | { type: "a424", - a43: number + a43: number, } | { type: "a425", - a43: number + a43: number, } | { type: "a426", - a43: number + a43: number, } | { type: "a427", - a43: number + a43: number, } | { type: "a428", - a43: number + a43: number, } | { type: "a429", - a43: number + a43: number, } | { type: "a430", - a43: number + a43: number, } | { type: "a431", - a44: number + a44: number, } | { type: "a432", - a44: number + a44: number, } | { type: "a433", - a44: number + a44: number, } | { type: "a434", - a44: number + a44: number, } | { type: "a435", - a44: number + a44: number, } | { type: "a436", - a44: number + a44: number, } | { type: "a437", - a44: number + a44: number, } | { type: "a438", - a44: number + a44: number, } | { type: "a439", - a44: number + a44: number, } | { type: "a440", - a44: number + a44: number, } | { type: "a441", - a45: number + a45: number, } | { type: "a442", - a45: number + a45: number, } | { type: "a443", - a45: number + a45: number, } | { type: "a444", - a45: number + a45: number, } | { type: "a445", - a45: number + a45: number, } | { type: "a446", - a45: number + a45: number, } | { type: "a447", - a45: number + a45: number, } | { type: "a448", - a45: number + a45: number, } | { type: "a449", - a45: number + a45: number, } | { type: "a450", - a45: number + a45: number, } | { type: "a451", - a46: number + a46: number, } | { type: "a452", - a46: number + a46: number, } | { type: "a453", - a46: number + a46: number, } | { type: "a454", - a46: number + a46: number, } | { type: "a455", - a46: number + a46: number, } | { type: "a456", - a46: number + a46: number, } | { type: "a457", - a46: number + a46: number, } | { type: "a458", - a46: number + a46: number, } | { type: "a459", - a46: number + a46: number, } | { type: "a460", - a46: number + a46: number, } | { type: "a461", - a47: number + a47: number, } | { type: "a462", - a47: number + a47: number, } | { type: "a463", - a47: number + a47: number, } | { type: "a464", - a47: number + a47: number, } | { type: "a465", - a47: number + a47: number, } | { type: "a466", - a47: number + a47: number, } | { type: "a467", - a47: number + a47: number, } | { type: "a468", - a47: number + a47: number, } | { type: "a469", - a47: number + a47: number, } | { type: "a470", - a47: number + a47: number, } | { type: "a471", - a48: number + a48: number, } | { type: "a472", - a48: number + a48: number, } | { type: "a473", - a48: number + a48: number, } | { type: "a474", - a48: number + a48: number, } | { type: "a475", - a48: number + a48: number, } | { type: "a476", - a48: number + a48: number, } | { type: "a477", - a48: number + a48: number, } | { type: "a478", - a48: number + a48: number, } | { type: "a479", - a48: number + a48: number, } | { type: "a480", - a48: number + a48: number, } | { type: "a481", - a49: number + a49: number, } | { type: "a482", - a49: number + a49: number, } | { type: "a483", - a49: number + a49: number, } | { type: "a484", - a49: number + a49: number, } | { type: "a485", - a49: number + a49: number, } | { type: "a486", - a49: number + a49: number, } | { type: "a487", - a49: number + a49: number, } | { type: "a488", - a49: number + a49: number, } | { type: "a489", - a49: number + a49: number, } | { type: "a490", - a49: number + a49: number, } | { type: "a491", - a50: number + a50: number, } | { type: "a492", - a50: number + a50: number, } | { type: "a493", - a50: number + a50: number, } | { type: "a494", - a50: number + a50: number, } | { type: "a495", - a50: number + a50: number, } | { type: "a496", - a50: number + a50: number, } | { type: "a497", - a50: number + a50: number, } | { type: "a498", - a50: number + a50: number, } | { type: "a499", - a50: number + a50: number, } | { type: "a500", - a50: number + a50: number, } | { type: "a501", - a51: number + a51: number, } | { type: "a502", - a51: number + a51: number, } | { type: "a503", - a51: number + a51: number, } | { type: "a504", - a51: number + a51: number, } | { type: "a505", - a51: number + a51: number, } | { type: "a506", - a51: number + a51: number, } | { type: "a507", - a51: number + a51: number, } | { type: "a508", - a51: number + a51: number, } | { type: "a509", - a51: number + a51: number, } | { type: "a510", - a51: number + a51: number, } | { type: "a511", - a52: number + a52: number, } | { type: "a512", - a52: number + a52: number, } | { type: "a513", - a52: number + a52: number, } | { type: "a514", - a52: number + a52: number, } | { type: "a515", - a52: number + a52: number, } | { type: "a516", - a52: number + a52: number, } | { type: "a517", - a52: number + a52: number, } | { type: "a518", - a52: number + a52: number, } | { type: "a519", - a52: number + a52: number, } | { type: "a520", - a52: number + a52: number, } | { type: "a521", - a53: number + a53: number, } | { type: "a522", - a53: number + a53: number, } | { type: "a523", - a53: number + a53: number, } | { type: "a524", - a53: number + a53: number, } | { type: "a525", - a53: number + a53: number, } | { type: "a526", - a53: number + a53: number, } | { type: "a527", - a53: number + a53: number, } | { type: "a528", - a53: number + a53: number, } | { type: "a529", - a53: number + a53: number, } | { type: "a530", - a53: number + a53: number, } | { type: "a531", - a54: number + a54: number, } | { type: "a532", - a54: number + a54: number, } | { type: "a533", - a54: number + a54: number, } | { type: "a534", - a54: number + a54: number, } | { type: "a535", - a54: number + a54: number, } | { type: "a536", - a54: number + a54: number, } | { type: "a537", - a54: number + a54: number, } | { type: "a538", - a54: number + a54: number, } | { type: "a539", - a54: number + a54: number, } | { type: "a540", - a54: number + a54: number, } | { type: "a541", - a55: number + a55: number, } | { type: "a542", - a55: number + a55: number, } | { type: "a543", - a55: number + a55: number, } | { type: "a544", - a55: number + a55: number, } | { type: "a545", - a55: number + a55: number, } | { type: "a546", - a55: number + a55: number, } | { type: "a547", - a55: number + a55: number, } | { type: "a548", - a55: number + a55: number, } | { type: "a549", - a55: number + a55: number, } | { type: "a550", - a55: number + a55: number, } | { type: "a551", - a56: number + a56: number, } | { type: "a552", - a56: number + a56: number, } | { type: "a553", - a56: number + a56: number, } | { type: "a554", - a56: number + a56: number, } | { type: "a555", - a56: number + a56: number, } | { type: "a556", - a56: number + a56: number, } | { type: "a557", - a56: number + a56: number, } | { type: "a558", - a56: number + a56: number, } | { type: "a559", - a56: number + a56: number, } | { type: "a560", - a56: number + a56: number, } | { type: "a561", - a57: number + a57: number, } | { type: "a562", - a57: number + a57: number, } | { type: "a563", - a57: number + a57: number, } | { type: "a564", - a57: number + a57: number, } | { type: "a565", - a57: number + a57: number, } | { type: "a566", - a57: number + a57: number, } | { type: "a567", - a57: number + a57: number, } | { type: "a568", - a57: number + a57: number, } | { type: "a569", - a57: number + a57: number, } | { type: "a570", - a57: number + a57: number, } | { type: "a571", - a58: number + a58: number, } | { type: "a572", - a58: number + a58: number, } | { type: "a573", - a58: number + a58: number, } | { type: "a574", - a58: number + a58: number, } | { type: "a575", - a58: number + a58: number, } | { type: "a576", - a58: number + a58: number, } | { type: "a577", - a58: number + a58: number, } | { type: "a578", - a58: number + a58: number, } | { type: "a579", - a58: number + a58: number, } | { type: "a580", - a58: number + a58: number, } | { type: "a581", - a59: number + a59: number, } | { type: "a582", - a59: number + a59: number, } | { type: "a583", - a59: number + a59: number, } | { type: "a584", - a59: number + a59: number, } | { type: "a585", - a59: number + a59: number, } | { type: "a586", - a59: number + a59: number, } | { type: "a587", - a59: number + a59: number, } | { type: "a588", - a59: number + a59: number, } | { type: "a589", - a59: number + a59: number, } | { type: "a590", - a59: number + a59: number, } | { type: "a591", - a60: number + a60: number, } | { type: "a592", - a60: number + a60: number, } | { type: "a593", - a60: number + a60: number, } | { type: "a594", - a60: number + a60: number, } | { type: "a595", - a60: number + a60: number, } | { type: "a596", - a60: number + a60: number, } | { type: "a597", - a60: number + a60: number, } | { type: "a598", - a60: number + a60: number, } | { type: "a599", - a60: number + a60: number, } | { type: "a600", - a60: number + a60: number, } | { type: "a601", - a61: number + a61: number, } | { type: "a602", - a61: number + a61: number, } | { type: "a603", - a61: number + a61: number, } | { type: "a604", - a61: number + a61: number, } | { type: "a605", - a61: number + a61: number, } | { type: "a606", - a61: number + a61: number, } | { type: "a607", - a61: number + a61: number, } | { type: "a608", - a61: number + a61: number, } | { type: "a609", - a61: number + a61: number, } | { type: "a610", - a61: number + a61: number, } | { type: "a611", - a62: number + a62: number, } | { type: "a612", - a62: number + a62: number, } | { type: "a613", - a62: number + a62: number, } | { type: "a614", - a62: number + a62: number, } | { type: "a615", - a62: number + a62: number, } | { type: "a616", - a62: number + a62: number, } | { type: "a617", - a62: number + a62: number, } | { type: "a618", - a62: number + a62: number, } | { type: "a619", - a62: number + a62: number, } | { type: "a620", - a62: number + a62: number, } | { type: "a621", - a63: number + a63: number, } | { type: "a622", - a63: number + a63: number, } | { type: "a623", - a63: number + a63: number, } | { type: "a624", - a63: number + a63: number, } | { type: "a625", - a63: number + a63: number, } | { type: "a626", - a63: number + a63: number, } | { type: "a627", - a63: number + a63: number, } | { type: "a628", - a63: number + a63: number, } | { type: "a629", - a63: number + a63: number, } | { type: "a630", - a63: number + a63: number, } | { type: "a631", - a64: number + a64: number, } | { type: "a632", - a64: number + a64: number, } | { type: "a633", - a64: number + a64: number, } | { type: "a634", - a64: number + a64: number, } | { type: "a635", - a64: number + a64: number, } | { type: "a636", - a64: number + a64: number, } | { type: "a637", - a64: number + a64: number, } | { type: "a638", - a64: number + a64: number, } | { type: "a639", - a64: number + a64: number, } | { type: "a640", - a64: number + a64: number, } | { type: "a641", - a65: number + a65: number, } | { type: "a642", - a65: number + a65: number, } | { type: "a643", - a65: number + a65: number, } | { type: "a644", - a65: number + a65: number, } | { type: "a645", - a65: number + a65: number, } | { type: "a646", - a65: number + a65: number, } | { type: "a647", - a65: number + a65: number, } | { type: "a648", - a65: number + a65: number, } | { type: "a649", - a65: number + a65: number, } | { type: "a650", - a65: number + a65: number, } | { type: "a651", - a66: number + a66: number, } | { type: "a652", - a66: number + a66: number, } | { type: "a653", - a66: number + a66: number, } | { type: "a654", - a66: number + a66: number, } | { type: "a655", - a66: number + a66: number, } | { type: "a656", - a66: number + a66: number, } | { type: "a657", - a66: number + a66: number, } | { type: "a658", - a66: number + a66: number, } | { type: "a659", - a66: number + a66: number, } | { type: "a660", - a66: number + a66: number, } | { type: "a661", - a67: number + a67: number, } | { type: "a662", - a67: number + a67: number, } | { type: "a663", - a67: number + a67: number, } | { type: "a664", - a67: number + a67: number, } | { type: "a665", - a67: number + a67: number, } | { type: "a666", - a67: number + a67: number, } | { type: "a667", - a67: number + a67: number, } | { type: "a668", - a67: number + a67: number, } | { type: "a669", - a67: number + a67: number, } | { type: "a670", - a67: number + a67: number, } | { type: "a671", - a68: number + a68: number, } | { type: "a672", - a68: number + a68: number, } | { type: "a673", - a68: number + a68: number, } | { type: "a674", - a68: number + a68: number, } | { type: "a675", - a68: number + a68: number, } | { type: "a676", - a68: number + a68: number, } | { type: "a677", - a68: number + a68: number, } | { type: "a678", - a68: number + a68: number, } | { type: "a679", - a68: number + a68: number, } | { type: "a680", - a68: number + a68: number, } | { type: "a681", - a69: number + a69: number, } | { type: "a682", - a69: number + a69: number, } | { type: "a683", - a69: number + a69: number, } | { type: "a684", - a69: number + a69: number, } | { type: "a685", - a69: number + a69: number, } | { type: "a686", - a69: number + a69: number, } | { type: "a687", - a69: number + a69: number, } | { type: "a688", - a69: number + a69: number, } | { type: "a689", - a69: number + a69: number, } | { type: "a690", - a69: number + a69: number, } | { type: "a691", - a70: number + a70: number, } | { type: "a692", - a70: number + a70: number, } | { type: "a693", - a70: number + a70: number, } | { type: "a694", - a70: number + a70: number, } | { type: "a695", - a70: number + a70: number, } | { type: "a696", - a70: number + a70: number, } | { type: "a697", - a70: number + a70: number, } | { type: "a698", - a70: number + a70: number, } | { type: "a699", - a70: number + a70: number, } | { type: "a700", - a70: number + a70: number, } | { type: "a701", - a71: number + a71: number, } | { type: "a702", - a71: number + a71: number, } | { type: "a703", - a71: number + a71: number, } | { type: "a704", - a71: number + a71: number, } | { type: "a705", - a71: number + a71: number, } | { type: "a706", - a71: number + a71: number, } | { type: "a707", - a71: number + a71: number, } | { type: "a708", - a71: number + a71: number, } | { type: "a709", - a71: number + a71: number, } | { type: "a710", - a71: number + a71: number, } | { type: "a711", - a72: number + a72: number, } | { type: "a712", - a72: number + a72: number, } | { type: "a713", - a72: number + a72: number, } | { type: "a714", - a72: number + a72: number, } | { type: "a715", - a72: number + a72: number, } | { type: "a716", - a72: number + a72: number, } | { type: "a717", - a72: number + a72: number, } | { type: "a718", - a72: number + a72: number, } | { type: "a719", - a72: number + a72: number, } | { type: "a720", - a72: number + a72: number, } | { type: "a721", - a73: number + a73: number, } | { type: "a722", - a73: number + a73: number, } | { type: "a723", - a73: number + a73: number, } | { type: "a724", - a73: number + a73: number, } | { type: "a725", - a73: number + a73: number, } | { type: "a726", - a73: number + a73: number, } | { type: "a727", - a73: number + a73: number, } | { type: "a728", - a73: number + a73: number, } | { type: "a729", - a73: number + a73: number, } | { type: "a730", - a73: number + a73: number, } | { type: "a731", - a74: number + a74: number, } | { type: "a732", - a74: number + a74: number, } | { type: "a733", - a74: number + a74: number, } | { type: "a734", - a74: number + a74: number, } | { type: "a735", - a74: number + a74: number, } | { type: "a736", - a74: number + a74: number, } | { type: "a737", - a74: number + a74: number, } | { type: "a738", - a74: number + a74: number, } | { type: "a739", - a74: number + a74: number, } | { type: "a740", - a74: number + a74: number, } | { type: "a741", - a75: number + a75: number, } | { type: "a742", - a75: number + a75: number, } | { type: "a743", - a75: number + a75: number, } | { type: "a744", - a75: number + a75: number, } | { type: "a745", - a75: number + a75: number, } | { type: "a746", - a75: number + a75: number, } | { type: "a747", - a75: number + a75: number, } | { type: "a748", - a75: number + a75: number, } | { type: "a749", - a75: number + a75: number, } | { type: "a750", - a75: number + a75: number, } | { type: "a751", - a76: number + a76: number, } | { type: "a752", - a76: number + a76: number, } | { type: "a753", - a76: number + a76: number, } | { type: "a754", - a76: number + a76: number, } | { type: "a755", - a76: number + a76: number, } | { type: "a756", - a76: number + a76: number, } | { type: "a757", - a76: number + a76: number, } | { type: "a758", - a76: number + a76: number, } | { type: "a759", - a76: number + a76: number, } | { type: "a760", - a76: number + a76: number, } | { type: "a761", - a77: number + a77: number, } | { type: "a762", - a77: number + a77: number, } | { type: "a763", - a77: number + a77: number, } | { type: "a764", - a77: number + a77: number, } | { type: "a765", - a77: number + a77: number, } | { type: "a766", - a77: number + a77: number, } | { type: "a767", - a77: number + a77: number, } | { type: "a768", - a77: number + a77: number, } | { type: "a769", - a77: number + a77: number, } | { type: "a770", - a77: number + a77: number, } | { type: "a771", - a78: number + a78: number, } | { type: "a772", - a78: number + a78: number, } | { type: "a773", - a78: number + a78: number, } | { type: "a774", - a78: number + a78: number, } | { type: "a775", - a78: number + a78: number, } | { type: "a776", - a78: number + a78: number, } | { type: "a777", - a78: number + a78: number, } | { type: "a778", - a78: number + a78: number, } | { type: "a779", - a78: number + a78: number, } | { type: "a780", - a78: number + a78: number, } | { type: "a781", - a79: number + a79: number, } | { type: "a782", - a79: number + a79: number, } | { type: "a783", - a79: number + a79: number, } | { type: "a784", - a79: number + a79: number, } | { type: "a785", - a79: number + a79: number, } | { type: "a786", - a79: number + a79: number, } | { type: "a787", - a79: number + a79: number, } | { type: "a788", - a79: number + a79: number, } | { type: "a789", - a79: number + a79: number, } | { type: "a790", - a79: number + a79: number, } | { type: "a791", - a80: number + a80: number, } | { type: "a792", - a80: number + a80: number, } | { type: "a793", - a80: number + a80: number, } | { type: "a794", - a80: number + a80: number, } | { type: "a795", - a80: number + a80: number, } | { type: "a796", - a80: number + a80: number, } | { type: "a797", - a80: number + a80: number, } | { type: "a798", - a80: number + a80: number, } | { type: "a799", - a80: number + a80: number, } | { type: "a800", - a80: number + a80: number, } | { type: "a801", - a81: number + a81: number, } | { type: "a802", - a81: number + a81: number, } | { type: "a803", - a81: number + a81: number, } | { type: "a804", - a81: number + a81: number, } | { type: "a805", - a81: number + a81: number, } | { type: "a806", - a81: number + a81: number, } | { type: "a807", - a81: number + a81: number, } | { type: "a808", - a81: number + a81: number, } | { type: "a809", - a81: number + a81: number, } | { type: "a810", - a81: number + a81: number, } | { type: "a811", - a82: number + a82: number, } | { type: "a812", - a82: number + a82: number, } | { type: "a813", - a82: number + a82: number, } | { type: "a814", - a82: number + a82: number, } | { type: "a815", - a82: number + a82: number, } | { type: "a816", - a82: number + a82: number, } | { type: "a817", - a82: number + a82: number, } | { type: "a818", - a82: number + a82: number, } | { type: "a819", - a82: number + a82: number, } | { type: "a820", - a82: number + a82: number, } | { type: "a821", - a83: number + a83: number, } | { type: "a822", - a83: number + a83: number, } | { type: "a823", - a83: number + a83: number, } | { type: "a824", - a83: number + a83: number, } | { type: "a825", - a83: number + a83: number, } | { type: "a826", - a83: number + a83: number, } | { type: "a827", - a83: number + a83: number, } | { type: "a828", - a83: number + a83: number, } | { type: "a829", - a83: number + a83: number, } | { type: "a830", - a83: number + a83: number, } | { type: "a831", - a84: number + a84: number, } | { type: "a832", - a84: number + a84: number, } | { type: "a833", - a84: number + a84: number, } | { type: "a834", - a84: number + a84: number, } | { type: "a835", - a84: number + a84: number, } | { type: "a836", - a84: number + a84: number, } | { type: "a837", - a84: number + a84: number, } | { type: "a838", - a84: number + a84: number, } | { type: "a839", - a84: number + a84: number, } | { type: "a840", - a84: number + a84: number, } | { type: "a841", - a85: number + a85: number, } | { type: "a842", - a85: number + a85: number, } | { type: "a843", - a85: number + a85: number, } | { type: "a844", - a85: number + a85: number, } | { type: "a845", - a85: number + a85: number, } | { type: "a846", - a85: number + a85: number, } | { type: "a847", - a85: number + a85: number, } | { type: "a848", - a85: number + a85: number, } | { type: "a849", - a85: number + a85: number, } | { type: "a850", - a85: number + a85: number, } | { type: "a851", - a86: number + a86: number, } | { type: "a852", - a86: number + a86: number, } | { type: "a853", - a86: number + a86: number, } | { type: "a854", - a86: number + a86: number, } | { type: "a855", - a86: number + a86: number, } | { type: "a856", - a86: number + a86: number, } | { type: "a857", - a86: number + a86: number, } | { type: "a858", - a86: number + a86: number, } | { type: "a859", - a86: number + a86: number, } | { type: "a860", - a86: number + a86: number, } | { type: "a861", - a87: number + a87: number, } | { type: "a862", - a87: number + a87: number, } | { type: "a863", - a87: number + a87: number, } | { type: "a864", - a87: number + a87: number, } | { type: "a865", - a87: number + a87: number, } | { type: "a866", - a87: number + a87: number, } | { type: "a867", - a87: number + a87: number, } | { type: "a868", - a87: number + a87: number, } | { type: "a869", - a87: number + a87: number, } | { type: "a870", - a87: number + a87: number, } | { type: "a871", - a88: number + a88: number, } | { type: "a872", - a88: number + a88: number, } | { type: "a873", - a88: number + a88: number, } | { type: "a874", - a88: number + a88: number, } | { type: "a875", - a88: number + a88: number, } | { type: "a876", - a88: number + a88: number, } | { type: "a877", - a88: number + a88: number, } | { type: "a878", - a88: number + a88: number, } | { type: "a879", - a88: number + a88: number, } | { type: "a880", - a88: number + a88: number, } | { type: "a881", - a89: number + a89: number, } | { type: "a882", - a89: number + a89: number, } | { type: "a883", - a89: number + a89: number, } | { type: "a884", - a89: number + a89: number, } | { type: "a885", - a89: number + a89: number, } | { type: "a886", - a89: number + a89: number, } | { type: "a887", - a89: number + a89: number, } | { type: "a888", - a89: number + a89: number, } | { type: "a889", - a89: number + a89: number, } | { type: "a890", - a89: number + a89: number, } | { type: "a891", - a90: number + a90: number, } | { type: "a892", - a90: number + a90: number, } | { type: "a893", - a90: number + a90: number, } | { type: "a894", - a90: number + a90: number, } | { type: "a895", - a90: number + a90: number, } | { type: "a896", - a90: number + a90: number, } | { type: "a897", - a90: number + a90: number, } | { type: "a898", - a90: number + a90: number, } | { type: "a899", - a90: number + a90: number, } | { type: "a900", - a90: number + a90: number, } | { type: "a901", - a91: number + a91: number, } | { type: "a902", - a91: number + a91: number, } | { type: "a903", - a91: number + a91: number, } | { type: "a904", - a91: number + a91: number, } | { type: "a905", - a91: number + a91: number, } | { type: "a906", - a91: number + a91: number, } | { type: "a907", - a91: number + a91: number, } | { type: "a908", - a91: number + a91: number, } | { type: "a909", - a91: number + a91: number, } | { type: "a910", - a91: number + a91: number, } | { type: "a911", - a92: number + a92: number, } | { type: "a912", - a92: number + a92: number, } | { type: "a913", - a92: number + a92: number, } | { type: "a914", - a92: number + a92: number, } | { type: "a915", - a92: number + a92: number, } | { type: "a916", - a92: number + a92: number, } | { type: "a917", - a92: number + a92: number, } | { type: "a918", - a92: number + a92: number, } | { type: "a919", - a92: number + a92: number, } | { type: "a920", - a92: number + a92: number, } | { type: "a921", - a93: number + a93: number, } | { type: "a922", - a93: number + a93: number, } | { type: "a923", - a93: number + a93: number, } | { type: "a924", - a93: number + a93: number, } | { type: "a925", - a93: number + a93: number, } | { type: "a926", - a93: number + a93: number, } | { type: "a927", - a93: number + a93: number, } | { type: "a928", - a93: number + a93: number, } | { type: "a929", - a93: number + a93: number, } | { type: "a930", - a93: number + a93: number, } | { type: "a931", - a94: number + a94: number, } | { type: "a932", - a94: number + a94: number, } | { type: "a933", - a94: number + a94: number, } | { type: "a934", - a94: number + a94: number, } | { type: "a935", - a94: number + a94: number, } | { type: "a936", - a94: number + a94: number, } | { type: "a937", - a94: number + a94: number, } | { type: "a938", - a94: number + a94: number, } | { type: "a939", - a94: number + a94: number, } | { type: "a940", - a94: number + a94: number, } | { type: "a941", - a95: number + a95: number, } | { type: "a942", - a95: number + a95: number, } | { type: "a943", - a95: number + a95: number, } | { type: "a944", - a95: number + a95: number, } | { type: "a945", - a95: number + a95: number, } | { type: "a946", - a95: number + a95: number, } | { type: "a947", - a95: number + a95: number, } | { type: "a948", - a95: number + a95: number, } | { type: "a949", - a95: number + a95: number, } | { type: "a950", - a95: number + a95: number, } | { type: "a951", - a96: number + a96: number, } | { type: "a952", - a96: number + a96: number, } | { type: "a953", - a96: number + a96: number, } | { type: "a954", - a96: number + a96: number, } | { type: "a955", - a96: number + a96: number, } | { type: "a956", - a96: number + a96: number, } | { type: "a957", - a96: number + a96: number, } | { type: "a958", - a96: number + a96: number, } | { type: "a959", - a96: number + a96: number, } | { type: "a960", - a96: number + a96: number, } | { type: "a961", - a97: number + a97: number, } | { type: "a962", - a97: number + a97: number, } | { type: "a963", - a97: number + a97: number, } | { type: "a964", - a97: number + a97: number, } | { type: "a965", - a97: number + a97: number, } | { type: "a966", - a97: number + a97: number, } | { type: "a967", - a97: number + a97: number, } | { type: "a968", - a97: number + a97: number, } | { type: "a969", - a97: number + a97: number, } | { type: "a970", - a97: number + a97: number, } | { type: "a971", - a98: number + a98: number, } | { type: "a972", - a98: number + a98: number, } | { type: "a973", - a98: number + a98: number, } | { type: "a974", - a98: number + a98: number, } | { type: "a975", - a98: number + a98: number, } | { type: "a976", - a98: number + a98: number, } | { type: "a977", - a98: number + a98: number, } | { type: "a978", - a98: number + a98: number, } | { type: "a979", - a98: number + a98: number, } | { type: "a980", - a98: number + a98: number, } | { type: "a981", - a99: number + a99: number, } | { type: "a982", - a99: number + a99: number, } | { type: "a983", - a99: number + a99: number, } | { type: "a984", - a99: number + a99: number, } | { type: "a985", - a99: number + a99: number, } | { type: "a986", - a99: number + a99: number, } | { type: "a987", - a99: number + a99: number, } | { type: "a988", - a99: number + a99: number, } | { type: "a989", - a99: number + a99: number, } | { type: "a990", - a99: number + a99: number, } | { type: "a991", - a100: number + a100: number, } | { type: "a992", - a100: number + a100: number, } | { type: "a993", - a100: number + a100: number, } | { type: "a994", - a100: number + a100: number, } | { type: "a995", - a100: number + a100: number, } | { type: "a996", - a100: number + a100: number, } | { type: "a997", - a100: number + a100: number, } | { type: "a998", - a100: number + a100: number, } | { type: "a999", - a100: number + a100: number, } | { type: "a1000", - a100: number + a100: number, }; function foo(x: TAction): TAction { return x; diff --git a/tests/flow/union/__snapshots__/jsfmt.spec.js.snap b/tests/flow/union/__snapshots__/jsfmt.spec.js.snap index 90195813d..3880c4a40 100644 --- a/tests/flow/union/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/union/__snapshots__/jsfmt.spec.js.snap @@ -55,7 +55,7 @@ export class ModOp extends BinaryExpression = [ { type: "b", b: "monkey" }, { type: "b", b: "gorilla" }, { type: "b", b: "giraffe" }, - { type: "b", b: "penguin" } + { type: "b", b: "penguin" }, ]; ================================================================================ @@ -479,15 +479,15 @@ const u3 : union2 = { */ type t1 = { - p1: number + p1: number, }; type t2 = { - p2: number + p2: number, }; type t3 = { - p3: number + p3: number, }; type intersected = t1 & t2; @@ -495,17 +495,17 @@ type union = intersected | t3; type union2 = t3 | intersected; const u1: union = { - p3: 3 + p3: 3, }; const u2: union = { p1: 1, - p2: 2 + p2: 2, }; const u3: union2 = { p1: 1, - p2: 2 + p2: 2, }; ================================================================================ @@ -10743,7 +10743,7 @@ type ErrorCode = | 4999; type Data = { - error?: ErrorCode + error?: ErrorCode, }; ================================================================================ diff --git a/tests/flow/union_new/__snapshots__/jsfmt.spec.js.snap b/tests/flow/union_new/__snapshots__/jsfmt.spec.js.snap index 493bc3491..cbcf9459a 100644 --- a/tests/flow/union_new/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/union_new/__snapshots__/jsfmt.spec.js.snap @@ -81,7 +81,7 @@ import { B, C } from "./issue-824-helper"; type K = B | C; type I = { - which(): number + which(): number, }; export default class A { @@ -150,7 +150,7 @@ var bar: Array<{b: ?boolean, c: number} | {b: boolean}> = [ var bar: Array<{ b: ?boolean, c: number } | { b: boolean }> = [ { b: true, c: 123 }, - { b: true } + { b: true }, ]; ================================================================================ @@ -176,7 +176,7 @@ function create( ): { type: "B", data: number } | { type: "A", data: string } { return { type: "A", - data: a + data: a, }; } @@ -264,12 +264,12 @@ type Common = {}; type A = Common & { type: "A", - foo: number + foo: number, }; type B = Common & { type: "B", - foo: Array + foo: Array, }; type MyType = A | B; @@ -324,12 +324,12 @@ type Common = {}; type A = { type: "A", - foo: number + foo: number, } & Common; type B = { type: "B", - foo: Array + foo: Array, } & Common; type MyType = A | B; @@ -387,15 +387,15 @@ if (data.kind === "system") { type DataBase = { id: string, - name: string + name: string, }; type UserData = DataBase & { - kind: "user" + kind: "user", }; type SystemData = DataBase & { - kind: "system" + kind: "system", }; type Data = UserData | SystemData; @@ -403,7 +403,7 @@ type Data = UserData | SystemData; const data: Data = { id: "", name: "", - kind: "system" + kind: "system", }; if (data.kind === "system") { @@ -478,18 +478,18 @@ function test(f: Foo| EmptyFoo) { declare type Entity = { id: T, - name: string + name: string, }; declare type StringEntity = Entity; declare type Foo = StringEntity & { bars: Object, - kind: 1 + kind: 1, }; declare type EmptyFoo = StringEntity & { bars: null, - kind: 2 + kind: 2, }; function test(f: Foo | EmptyFoo) { @@ -1530,11 +1530,11 @@ printWidth: 80 ({ type: "B", id: "hi" }: | { type: "A", - id: ?string + id: ?string, } | { type: "B", - id: string + id: string, }); ================================================================================ @@ -1914,11 +1914,11 @@ type Empty = {}; type Success = { type: "SUCCESS", - result: string + result: string, }; type Error = { - type: "ERROR" + type: "ERROR", } & Empty; export type T = Success | Error; @@ -2307,7 +2307,7 @@ module.exports = { module.exports = { FOO: "foo", - BAR: "bar" + BAR: "bar", }; ================================================================================ diff --git a/tests/flow_comments/__snapshots__/jsfmt.spec.js.snap b/tests/flow_comments/__snapshots__/jsfmt.spec.js.snap index 9dff2c626..a40fb309b 100644 --- a/tests/flow_comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_comments/__snapshots__/jsfmt.spec.js.snap @@ -139,17 +139,17 @@ type Props3 = { =====================================output===================================== // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! type Props1 = { - isPlaying: boolean + isPlaying: boolean, }; type Props2 = { // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! - isPlaying: boolean + isPlaying: boolean, }; type Props3 = { // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! - isPlaying: boolean + isPlaying: boolean, }; ================================================================================ diff --git a/tests/flow_function_parentheses/__snapshots__/jsfmt.spec.js.snap b/tests/flow_function_parentheses/__snapshots__/jsfmt.spec.js.snap index 98ca0a37b..d8b535f27 100644 --- a/tests/flow_function_parentheses/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_function_parentheses/__snapshots__/jsfmt.spec.js.snap @@ -143,7 +143,7 @@ type T8 = ?(?() => A) | B; =====================================output===================================== type Banana = { - eat: string => boolean + eat: string => boolean, }; type Hex = { n: 0x01 }; @@ -417,7 +417,7 @@ type T8 = ?(?() => A) | B; =====================================output===================================== type Banana = { - eat: (string) => boolean + eat: (string) => boolean, }; type Hex = { n: 0x01 }; diff --git a/tests/flow_generic/__snapshots__/jsfmt.spec.js.snap b/tests/flow_generic/__snapshots__/jsfmt.spec.js.snap index d228e0d12..3905e66af 100644 --- a/tests/flow_generic/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_generic/__snapshots__/jsfmt.spec.js.snap @@ -28,7 +28,7 @@ var X = { F, G, T: (a: A, b: B, c: C, d: D, e: E, f: F) => G // eslint-disable-line space-before-function-paren - >(method: T, scope: any, a: A, b: B, c: C, d: D, e: E, f: F): G {} + >(method: T, scope: any, a: A, b: B, c: C, d: D, e: E, f: F): G {}, }; ================================================================================ @@ -165,7 +165,7 @@ function formatEntireFile( range: atom$Range ): Promise {} function foo(): Promise {} @@ -253,7 +253,7 @@ type State = { Ahohohhohohohohohohohohohohooh, Fbt | Immutable.Map >, - shouldValidate: boolean + shouldValidate: boolean, }; ================================================================================ diff --git a/tests/flow_import_type_specifier/__snapshots__/jsfmt.spec.js.snap b/tests/flow_import_type_specifier/__snapshots__/jsfmt.spec.js.snap index b41aa4658..1b71aff75 100644 --- a/tests/flow_import_type_specifier/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_import_type_specifier/__snapshots__/jsfmt.spec.js.snap @@ -29,11 +29,11 @@ import type {} from "foo"; import type { somethingSuperLongsomethingSuperLong } from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; import type { a, - somethingSuperLongsomethingSuperLong + somethingSuperLongsomethingSuperLong, } from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; import transformRouterContext, { - type TransformedContextRouter + type TransformedContextRouter, } from "../../helpers/transformRouterContext"; ================================================================================ diff --git a/tests/flow_intersection/__snapshots__/jsfmt.spec.js.snap b/tests/flow_intersection/__snapshots__/jsfmt.spec.js.snap index 64450ffac..d5c0525b8 100644 --- a/tests/flow_intersection/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_intersection/__snapshots__/jsfmt.spec.js.snap @@ -16,7 +16,7 @@ type State = { =====================================output===================================== type State = { - sharedProperty: any + sharedProperty: any, } & ( | { discriminant: "FOO", foo: any } | { discriminant: "BAR", bar: any } diff --git a/tests/flow_method/__snapshots__/jsfmt.spec.js.snap b/tests/flow_method/__snapshots__/jsfmt.spec.js.snap index 9b771a977..cc954b0b3 100644 --- a/tests/flow_method/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_method/__snapshots__/jsfmt.spec.js.snap @@ -18,7 +18,7 @@ type Foo = { method( arg: number, // I belong with baz qux: string - ): void + ): void, }; ================================================================================ diff --git a/tests/flow_object_comment/__snapshots__/jsfmt.spec.js.snap b/tests/flow_object_comment/__snapshots__/jsfmt.spec.js.snap index f217df00f..95f34d8f5 100644 --- a/tests/flow_object_comment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_object_comment/__snapshots__/jsfmt.spec.js.snap @@ -21,12 +21,12 @@ export default ( =====================================output===================================== export default ({ foo, - bar + bar, }: { // comment foo?: Object, // comment 2 - bar?: Object + bar?: Object, }) => {}; ================================================================================ diff --git a/tests/flow_object_inexact/__snapshots__/jsfmt.spec.js.snap b/tests/flow_object_inexact/__snapshots__/jsfmt.spec.js.snap index 78a9ad704..a5b6abe8a 100644 --- a/tests/flow_object_inexact/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_object_inexact/__snapshots__/jsfmt.spec.js.snap @@ -4,7 +4,7 @@ exports[`test.js 1`] = ` ====================================options===================================== parsers: ["flow", "babel"] printWidth: 80 -trailingComma: "es5" +trailingComma: "none" | printWidth =====================================input====================================== //@flow diff --git a/tests/flow_object_inexact/jsfmt.spec.js b/tests/flow_object_inexact/jsfmt.spec.js index 797cbe54b..c242cec59 100644 --- a/tests/flow_object_inexact/jsfmt.spec.js +++ b/tests/flow_object_inexact/jsfmt.spec.js @@ -1 +1 @@ -run_spec(__dirname, ["flow", "babel"], { trailingComma: "es5" }); +run_spec(__dirname, ["flow", "babel"], { trailingComma: "none" }); diff --git a/tests/flow_object_order/__snapshots__/jsfmt.spec.js.snap b/tests/flow_object_order/__snapshots__/jsfmt.spec.js.snap index 2a370163f..34c458b8d 100644 --- a/tests/flow_object_order/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_object_order/__snapshots__/jsfmt.spec.js.snap @@ -28,7 +28,7 @@ type Foo = { [key: string]: void, // c - beta: 10 + beta: 10, // d }; diff --git a/tests/flow_union/__snapshots__/jsfmt.spec.js.snap b/tests/flow_union/__snapshots__/jsfmt.spec.js.snap index 6c042cae6..892377bbb 100644 --- a/tests/flow_union/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_union/__snapshots__/jsfmt.spec.js.snap @@ -59,7 +59,7 @@ export function aPrettyLongFunctionE(aRatherLongParameterName: Array<{ interface RelayProps { articles: | Array<{ - __id: string + __id: string, } | null> | null | void @@ -68,7 +68,7 @@ interface RelayProps { interface RelayProps2 { articles: Array<{ - __id: string + __id: string, } | null> | null | void; } @@ -95,7 +95,7 @@ export function aShortFn(aShortParmName: MyType | null): string[] {} export function aPrettyLongFunctionE( aRatherLongParameterName: Array<{ - __id: string + __id: string, } | null> | null | void ): string[] {} diff --git a/tests/function/__snapshots__/jsfmt.spec.js.snap b/tests/function/__snapshots__/jsfmt.spec.js.snap index 2ddbba07a..595b3312a 100644 --- a/tests/function/__snapshots__/jsfmt.spec.js.snap +++ b/tests/function/__snapshots__/jsfmt.spec.js.snap @@ -58,14 +58,14 @@ class X { function onDidInsertSuggestion({ editor, triggerPosition, - re + re, }): Promise {} class X { async onDidInsertSuggestion({ editor, triggerPosition, - suggestion + suggestion, }): Promise {} } diff --git a/tests/function_first_param/__snapshots__/jsfmt.spec.js.snap b/tests/function_first_param/__snapshots__/jsfmt.spec.js.snap index 11cb59dc0..c59c66002 100644 --- a/tests/function_first_param/__snapshots__/jsfmt.spec.js.snap +++ b/tests/function_first_param/__snapshots__/jsfmt.spec.js.snap @@ -38,9 +38,9 @@ beep.boop().baz( { some: { thing: { - nested: true - } - } + nested: true, + }, + }, }, { another: { thing: true } }, () => {} @@ -52,7 +52,7 @@ db.collection("indexOptionDefault").createIndex( { indexOptionDefaults: true, w: 2, - wtimeout: 1000 + wtimeout: 1000, }, function(err) { test.equal(null, err); diff --git a/tests/function_single_destructuring/__snapshots__/jsfmt.spec.js.snap b/tests/function_single_destructuring/__snapshots__/jsfmt.spec.js.snap index 21138b250..3dbd8fb4a 100644 --- a/tests/function_single_destructuring/__snapshots__/jsfmt.spec.js.snap +++ b/tests/function_single_destructuring/__snapshots__/jsfmt.spec.js.snap @@ -247,7 +247,7 @@ function StatelessFunctionalComponent({ onCancel, searchFilters, title, - items + items, }) { return
; } @@ -260,7 +260,7 @@ function StatelessFunctionalComponent({ onCancel = () => null, searchFilters = null, title = "", - items = [] + items = [], } = {}) { return
; } @@ -274,9 +274,9 @@ function StatelessFunctionalComponent( onCancel = () => null, searchFilters = null, title = "", - items = [] + items = [], } = { - isActive: true + isActive: true, } ) { return
; @@ -290,7 +290,7 @@ function StatelessFunctionalComponent({ onCancel, searchFilters, title, - items + items, }: MyType | null | void) { return
; } @@ -303,7 +303,7 @@ const StatelessFunctionalComponent = ({ onCancel, searchFilters, title, - items + items, }: { isActive: number, onFiltersUpdated: number, @@ -312,7 +312,7 @@ const StatelessFunctionalComponent = ({ onCancel: number, searchFilters: number, title: number, - items: number + items: number, }) => { return
; }; @@ -326,7 +326,7 @@ class C { onCancel, searchFilters, title, - items + items, }) { return
; } @@ -340,7 +340,7 @@ type T = ({ onCancel: number, searchFilters: number, title: number, - items: number + items: number, }) => void; const X = (props: { a: boolean }) => ; diff --git a/tests/functional_composition/__snapshots__/jsfmt.spec.js.snap b/tests/functional_composition/__snapshots__/jsfmt.spec.js.snap index 0f11bef6b..edfab2371 100644 --- a/tests/functional_composition/__snapshots__/jsfmt.spec.js.snap +++ b/tests/functional_composition/__snapshots__/jsfmt.spec.js.snap @@ -333,9 +333,9 @@ var db = { users: { JOE: { name: "Joe", - followers: ["STEVE", "SUZY"] - } - } + followers: ["STEVE", "SUZY"], + }, + }, }; // We'll pretend to do a db lookup which returns a promise @@ -352,7 +352,7 @@ const mapStateToProps = state => ({ users: R.compose( R.filter(R.propEq("status", "active")), R.values - )(state.users) + )(state.users), }); ================================================================================ diff --git a/tests/graphql_trailing_comma/__snapshots__/jsfmt.spec.js.snap b/tests/graphql_trailing_comma/__snapshots__/jsfmt.spec.js.snap index 52f42f773..0d8acdb99 100644 --- a/tests/graphql_trailing_comma/__snapshots__/jsfmt.spec.js.snap +++ b/tests/graphql_trailing_comma/__snapshots__/jsfmt.spec.js.snap @@ -4,6 +4,7 @@ exports[`trailing.graphql 1`] = ` ====================================options===================================== parsers: ["graphql"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input====================================== query Query( @@ -123,7 +124,6 @@ exports[`trailing.graphql 3`] = ` ====================================options===================================== parsers: ["graphql"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input====================================== query Query( diff --git a/tests/graphql_trailing_comma/jsfmt.spec.js b/tests/graphql_trailing_comma/jsfmt.spec.js index 97b45fe5c..636cbdf00 100644 --- a/tests/graphql_trailing_comma/jsfmt.spec.js +++ b/tests/graphql_trailing_comma/jsfmt.spec.js @@ -1,3 +1,3 @@ -run_spec(__dirname, ["graphql"]); +run_spec(__dirname, ["graphql"], { trailingComma: "none" }); run_spec(__dirname, ["graphql"], { trailingComma: "all" }); -run_spec(__dirname, ["graphql"], { trailingComma: "es5" }); +run_spec(__dirname, ["graphql"]); diff --git a/tests/html_angular/__snapshots__/jsfmt.spec.js.snap b/tests/html_angular/__snapshots__/jsfmt.spec.js.snap index c305f1f76..5a94004a3 100644 --- a/tests/html_angular/__snapshots__/jsfmt.spec.js.snap +++ b/tests/html_angular/__snapshots__/jsfmt.spec.js.snap @@ -4,6 +4,7 @@ exports[`attr-name.component.html 1`] = ` ====================================options===================================== parsers: ["angular"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input======================================
@@ -18,7 +19,6 @@ exports[`attr-name.component.html 2`] = ` ====================================options===================================== parsers: ["angular"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input======================================
@@ -80,6 +80,7 @@ exports[`attributes.component.html 1`] = ` ====================================options===================================== parsers: ["angular"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input======================================
{{ generatedDiscountCodes }} @@ -1862,7 +1863,6 @@ exports[`first-lf.component.html 2`] = ` ====================================options===================================== parsers: ["angular"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input====================================== @@ -2313,6 +2313,7 @@ exports[`ignore-attribute.component.html 1`] = ` ====================================options===================================== parsers: ["angular"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input======================================
{{ a | b : c }}
@@ -2796,7 +2797,6 @@ exports[`interpolation.component.html 2`] = ` ====================================options===================================== parsers: ["angular"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input======================================
{{ a | b : c }}
@@ -3674,6 +3674,7 @@ exports[`real-world.component.html 1`] = ` ====================================options===================================== parsers: ["angular"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input====================================== @@ -5202,7 +5203,6 @@ exports[`real-world.component.html 2`] = ` ====================================options===================================== parsers: ["angular"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input====================================== @@ -13330,6 +13330,7 @@ exports[`tag-name.component.html 1`] = ` ====================================options===================================== parsers: ["angular"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input======================================
@@ -13344,7 +13345,6 @@ exports[`tag-name.component.html 2`] = ` ====================================options===================================== parsers: ["angular"] printWidth: 80 -trailingComma: "es5" | printWidth =====================================input======================================
diff --git a/tests/html_angular/jsfmt.spec.js b/tests/html_angular/jsfmt.spec.js index a9de42141..1c52f201d 100644 --- a/tests/html_angular/jsfmt.spec.js +++ b/tests/html_angular/jsfmt.spec.js @@ -1,5 +1,5 @@ +run_spec(__dirname, ["angular"], { trailingComma: "none" }); run_spec(__dirname, ["angular"]); -run_spec(__dirname, ["angular"], { trailingComma: "es5" }); run_spec(__dirname, ["angular"], { printWidth: 1 }); run_spec(__dirname, ["angular"], { htmlWhitespaceSensitivity: "ignore" }); run_spec(__dirname, ["angular"], { bracketSpacing: false }); diff --git a/tests/html_js/__snapshots__/jsfmt.spec.js.snap b/tests/html_js/__snapshots__/jsfmt.spec.js.snap index 66ca2ccdf..db82a1fca 100644 --- a/tests/html_js/__snapshots__/jsfmt.spec.js.snap +++ b/tests/html_js/__snapshots__/jsfmt.spec.js.snap @@ -356,7 +356,7 @@ printWidth: 80 dataType: "json", cache: false, success: data => this.setState({ data: data }), - error: (xhr, status, err) => console.error(status, err) + error: (xhr, status, err) => console.error(status, err), }); } componentDidMount() { diff --git a/tests/html_lwc/__snapshots__/jsfmt.spec.js.snap b/tests/html_lwc/__snapshots__/jsfmt.spec.js.snap index 63197acfb..61cbb372b 100644 --- a/tests/html_lwc/__snapshots__/jsfmt.spec.js.snap +++ b/tests/html_lwc/__snapshots__/jsfmt.spec.js.snap @@ -5,6 +5,7 @@ exports[`attributes.html 1`] = ` parser: "lwc" parsers: ["lwc"] printWidth: 80 +trailingComma: "none" | printWidth =====================================input======================================