Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(lint): add prettier and lint on CI #2946

Merged
merged 13 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 27 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# GitHub Actions docs
# https://help.github.com/en/articles/about-github-actions
# https://help.github.com/en/articles/workflow-syntax-for-github-actions

name: Install Dependencies, Lint

on: [pull_request]

jobs:
test:
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [16]
os: [windows-latest, macOS-latest]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Install Dependencies
run: npm ci --legacy-peer-deps
- name: Lint
run: npm run lint
10 changes: 6 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
src/theme/DocItem
src/theme/DocPage
legacy-stencil-components
node_modules
scripts/bak
src/styles.bak
src/pages

docs/api
docs/native
docs/cli/commands

static/code/stackblitz

.docusaurus
.github
.github
build
node_modules
11 changes: 0 additions & 11 deletions .prettierrc.js

This file was deleted.

20 changes: 8 additions & 12 deletions docs/angular/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ If you would like to use the Core version instead, which does not include additi
To migrate over your CSS, first update your selectors to target the new custom elements instead:

| ion-slides Selector | Swiper Selector |
| ------------------- | ------------------ |
| ------------------- | ------------------ |
| `ion-slides` | `swiper-container` |
| `ion-slide` | `swiper-slide` |

Expand Down Expand Up @@ -155,9 +155,7 @@ export class HomePage {
```html
<!-- home.page.html -->

<swiper-container [modules]="swiperModules">
...
</swiper-container>
<swiper-container [modules]="swiperModules"> ... </swiper-container>
```

:::note
Expand Down Expand Up @@ -190,11 +188,11 @@ To set these options as properties directly on `<swiper-container>` we would do

Below is a full list of property changes when going from `ion-slides` to Swiper Element:

| Name | Notes |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| options | Set each option as a property directly on the `<swiper-container>` component. |
| mode | For different styles based upon the mode, you can target the slides with `.ios swiper-container` or `.md swiper-container` in your CSS. |
| pager | Use the `pagination` property instead. |
| Name | Notes |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| options | Set each option as a property directly on the `<swiper-container>` component. |
| mode | For different styles based upon the mode, you can target the slides with `.ios swiper-container` or `.md swiper-container` in your CSS. |
| pager | Use the `pagination` property instead. |

:::note
All properties available in Swiper Element can be found at <a href="https://swiperjs.com/swiper-api#parameters" target="_blank" rel="noopener noreferrer">https://swiperjs.com/swiper-api#parameters</a>.
Expand Down Expand Up @@ -306,9 +304,7 @@ All methods and properties available on the Swiper instance can be found at <a h
Effects such as Cube or Fade can be used in Swiper Element with no additional imports, as long as you are using the bundled version of Swiper. For example, the below code will cause the slides to have a flip transition effect:

```html
<swiper-container effect="flip">
...
</swiper-container>
<swiper-container effect="flip"> ... </swiper-container>
```

:::note
Expand Down
3 changes: 2 additions & 1 deletion docs/cli/livereload.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ Remember, with the `--external` option, others on your Wi-Fi network will be abl
Live reload will use HTTP by default which will cause web APIs that require a secure context (like [web crypto](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API)) to fail. To establish a secure context you can use the `--ssl` argument to use HTTPS.

For example, with an Angular application you can run the following to pass a certificate and private key and serve your app with HTTPS:

```shell
ionic capacitor run android --livereload --external --ssl -- --ssl-cert='server.crt' --ssl-key='server.key'
```

Using a self signed certificate and ensuring it is trusted by the device is a complicated topic and is covered in [this article](https://ionic.zendesk.com/hc/en-us/articles/11384425513623).
Using a self signed certificate and ensuring it is trusted by the device is a complicated topic and is covered in [this article](https://ionic.zendesk.com/hc/en-us/articles/11384425513623).
Loading