Skip to content

Commit

Permalink
chore(package): update prettier to version 1.9.0 (#343)
Browse files Browse the repository at this point in the history
* chore(package): update prettier to version 1.9.0

* chore(package): update lockfile

https://npm.im/greenkeeper-lockfile

* refactor: fix linting
  • Loading branch information
greenkeeper[bot] authored and ikatyang committed Dec 5, 2017
1 parent f901b2d commit d749583
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 28 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"gulp-rename": "1.2.2",
"gulp-util": "3.0.8",
"jest": "21.2.1",
"prettier": "1.8.2",
"prettier": "1.9.0",
"prettier-config-ikatyang": "1.1.1",
"ramda": "0.25.0",
"run-sequence": "2.2.0",
Expand Down
4 changes: 1 addition & 3 deletions scripts/migrate-jsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ if (!fs.existsSync(output_dir)) {

const temp_dir = `${__dirname}/temp`;
child_process.execSync(
`git clone https://github.com/ramda/ramda.git ${temp_dir} --branch ${
ramda_tag
} --depth=1`,
`git clone https://github.com/ramda/ramda.git ${temp_dir} --branch ${ramda_tag} --depth=1`,
);

const src_dir = `${temp_dir}/source`;
Expand Down
4 changes: 1 addition & 3 deletions tasks/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@ export { selectable, placeholder };

export const output_sub_dirname = 'src';
export const output_relative_dirname = `./ramda/dist${output_dirname_postfix}`;
export const output_relative_sub_dirname = `${output_relative_dirname}/${
output_sub_dirname
}`;
export const output_relative_sub_dirname = `${output_relative_dirname}/${output_sub_dirname}`;
export const output_extname = '.d.ts';
18 changes: 6 additions & 12 deletions tasks/utils/generate-file-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ function get_top_level_members(filename: string): dts.ITopLevelMember[] {
) === -1
) {
throw new Error(
`Exported multi-overload functions in ${
filename
} should end with ${valid_last_overload_names.join(' / ')}}`,
`Exported multi-overload functions in ${filename} should end with ${valid_last_overload_names.join(
' / ',
)}}`,
);
}
}
Expand All @@ -177,9 +177,7 @@ function get_top_level_members(filename: string): dts.ITopLevelMember[] {
);
if (!is_exist_simultaneously) {
throw new Error(
`Exported multi-overload functions in ${
filename
} should have ${overload_names_should_exist_simultaneously.join(
`Exported multi-overload functions in ${filename} should have ${overload_names_should_exist_simultaneously.join(
' / ',
)} simultaneously`,
);
Expand All @@ -190,9 +188,7 @@ function get_top_level_members(filename: string): dts.ITopLevelMember[] {
!placeholder || functions[0].type!.parameters!.length <= 1
? []
: dts.parse(`
import {${placeholder_name} as ${
placeholder_name_abbr
}} from './$placeholder';
import {${placeholder_name} as ${placeholder_name_abbr}} from './$placeholder';
`).members;

const curried_declarations = dts_fp.create_curried_declarations(
Expand Down Expand Up @@ -221,9 +217,7 @@ function get_top_level_members(filename: string): dts.ITopLevelMember[] {

if (!special_case && !is_valid_export_default(declarations)) {
throw new Error(
`Template.ts should default-export an array of declarations: ${
filename
}`,
`Template.ts should default-export an array of declarations: ${filename}`,
);
}

Expand Down
4 changes: 1 addition & 3 deletions templates/$curriedFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ export default (selectable: boolean, placeholder: boolean) => [
...dts.parse(`
${
placeholder
? `import {${placeholder_name} as ${
placeholder_name_abbr
}} from './$placeholder';`
? `import {${placeholder_name} as ${placeholder_name_abbr}} from './$placeholder';`
: ''
}
export type CurriedFunction0<R> = () => R;
Expand Down
6 changes: 3 additions & 3 deletions templates/utils/create-composition-declarations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ export const create_composition_declarations = (
const function_name = current_sorted_function_names[index];
const return_generic = current_sorted_return_generics[index];
return index === entry_index
? `${function_name}: (${
entry_parameters
}) => ${generate_function_return_type(return_generic)}`
? `${function_name}: (${entry_parameters}) => ${generate_function_return_type(
return_generic,
)}`
: `${function_name}: (v: ${generate_function_parameter_type(
current_sorted_return_generics[
index + (kind === 'compose' ? 1 : -1)
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2690,9 +2690,9 @@ [email protected]:
version "1.1.1"
resolved "https://registry.yarnpkg.com/prettier-config-ikatyang/-/prettier-config-ikatyang-1.1.1.tgz#9ccab4bc2d441e4c68b58dbe8f1a4e18213c3f2d"

prettier@1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8"
prettier@1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.0.tgz#1a7205bdb6126b30cf8c0a7b2b86997162e1ee3e"

pretty-format@^21.0.0:
version "21.0.0"
Expand Down

0 comments on commit d749583

Please sign in to comment.