From ec9ef71d0acb758435ef6e16e2c536cef38a0cac Mon Sep 17 00:00:00 2001 From: Yannick Huard Date: Wed, 27 Feb 2019 13:32:14 +0100 Subject: [PATCH] chore: ensure all files have been prettier-ified (#39) The goal is to make sure that every files (supported by prettier) are correctly formatted. --- .drone.yml | 2 +- package.json | 1 + .../ec-component-site-header/README.md | 2 +- .../docs/site-header.md | 45 ++++++++++--------- src/ec/packages/ec-component-tag/README.md | 2 +- .../packages/eu-component-link/docs/link.md | 1 + 6 files changed, 28 insertions(+), 25 deletions(-) diff --git a/.drone.yml b/.drone.yml index c8fa2effb..eaebe649d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -24,7 +24,7 @@ pipeline: image: node:dubnium commands: - yarn install --frozen-lockfile - - yarn lint + - yarn lint && yarn pretty-check when: matrix: TEST: lint diff --git a/package.json b/package.json index a02cb2742..5e7a454ed 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "lint:js": "eslint .", "lint": "npm run lint:js", "postinstall": "lerna run postinstall && lerna run prepublish", + "pretty-check": "prettier --check \"src/**/*.{md,mdx,html,json,yml,js}\"", "publish": "lerna publish", "publish-canary": "lerna publish --canary --yes", "publish-next": "lerna publish --npm-tag=next --bump=prerelease", diff --git a/src/ec/packages/ec-component-site-header/README.md b/src/ec/packages/ec-component-site-header/README.md index de9a87754..4ca2ee141 100644 --- a/src/ec/packages/ec-component-site-header/README.md +++ b/src/ec/packages/ec-component-site-header/README.md @@ -1 +1 @@ -# ECL Twig - EC SIte Header component +# ECL Twig - EC Site Header component diff --git a/src/ec/packages/ec-component-site-header/docs/site-header.md b/src/ec/packages/ec-component-site-header/docs/site-header.md index c5aa97059..4a918a604 100644 --- a/src/ec/packages/ec-component-site-header/docs/site-header.md +++ b/src/ec/packages/ec-component-site-header/docs/site-header.md @@ -30,27 +30,28 @@ npm install --save @ecl-twig/ec-component-site-header ### Example : + ```twig -{% include 'path/to/site-header.html.twig' with { - icon_file_path: '/path-to-the-icons-file', - language: { - url: '/example', - code: 'en', - label: 'English', - }, - header_link: { - url: '/example-1', - aria_label: 'European Commission', - }, - header_image: { - src: '', - alt: 'European Commission logo', - title: 'European Commission', - }, - search_form: { - button: { - label: 'Search', - }, - }, -} %} +{% include 'path/to/site-header.html.twig' with { + icon_file_path: '/path-to-the-icons-file', + language: { + url: '/example', + code: 'en', + label: 'English', + }, + header_link: { + url: '/example-1', + aria_label: 'European Commission', + }, + header_image: { + src: '', + alt: 'European Commission logo', + title: 'European Commission', + }, + search_form: { + button: { + label: 'Search', + }, + }, +} %} ``` diff --git a/src/ec/packages/ec-component-tag/README.md b/src/ec/packages/ec-component-tag/README.md index a69db8b31..ad459b85b 100644 --- a/src/ec/packages/ec-component-tag/README.md +++ b/src/ec/packages/ec-component-tag/README.md @@ -1 +1 @@ -# ECL Twig - EC Tag component \ No newline at end of file +# ECL Twig - EC Tag component diff --git a/src/eu/packages/eu-component-link/docs/link.md b/src/eu/packages/eu-component-link/docs/link.md index 18c690e03..ee6ff6798 100644 --- a/src/eu/packages/eu-component-link/docs/link.md +++ b/src/eu/packages/eu-component-link/docs/link.md @@ -22,6 +22,7 @@ npm install --save @ecl-twig/eu-component-link - "value" (string) Attribute value, eg: 'data-test-1' ### Example: + ```twig {% include 'path/to/icon.html.twig' with {