From 16e8cc79f8d08cd9502fd9ab58f9d137c08709b5 Mon Sep 17 00:00:00 2001 From: Ivan Zusko Date: Wed, 8 Mar 2017 15:33:31 +0200 Subject: [PATCH] Add flow comments annotation to function signatures (#2319) * add flow comments annotation * chore(annotations): removed constants annotations; add more specificity to returning object; * feat(flow): add postcss type; remove redundant annotations; --- decls/postcss.js | 11 +++++++++++ lib/assignDisabledRanges.js | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/decls/postcss.js b/decls/postcss.js index 782847f374..8de2232398 100644 --- a/decls/postcss.js +++ b/decls/postcss.js @@ -32,3 +32,14 @@ export type postcss$rule = { parent: Object, nodes: Array, } + +export type postcss$result = { + css: string, + root: Object, + stylelint: { + disabledRanges: disabledRangeObject, + ruleSeverities?: Object, + customMessages?: Object, + quiet?: boolean, + }, +} diff --git a/lib/assignDisabledRanges.js b/lib/assignDisabledRanges.js index ae34aeb877..e2452c6383 100644 --- a/lib/assignDisabledRanges.js +++ b/lib/assignDisabledRanges.js @@ -20,7 +20,7 @@ const ALL_RULES = "all" module.exports = function ( root/*: Object*/, result/*: Object*/ -) { +)/*: postcss$result*/ { result.stylelint = result.stylelint || {} // Most of the functions below work via side effects mutating