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(sdk): adding eslint rules for capitalize comment and explicit member accessibility #3725

Merged
merged 2 commits into from
Aug 7, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/contributing/01-start-here/06-pull-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ To help maintainers review them and get them merged in a speedy fashion, please
* [ ] A description of your changes are included, and a reference to a corresponding issue. (This is also a great place to shout-out anyone who helped with the changes!)
* [ ] Tests are added for all changes.
* [ ] Any handwritten documentation in `docs/` or READMEs are updated where appropriate when features are being added or removed (API docs will be automatically generated for you!).
Please make sure to start docstrings with a capital letter.
* [ ] Your fork is in sync with the upstream repository.
* [ ] All build checks on GitHub are passing.

Expand Down
32 changes: 16 additions & 16 deletions docs/docs/04-standard-library/01-cloud/bucket.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ Check failures on the method and retrieve errors if any.

### BucketEvent <a name="BucketEvent" id="@winglang/sdk.cloud.BucketEvent"></a>

on_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.
On_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.

#### Initializer <a name="Initializer" id="@winglang/sdk.cloud.BucketEvent.Initializer"></a>

Expand All @@ -562,8 +562,8 @@ let BucketEvent = cloud.BucketEvent{ ... };

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@winglang/sdk.cloud.BucketEvent.property.key">key</a></code> | <code>str</code> | the bucket key that triggered the event. |
| <code><a href="#@winglang/sdk.cloud.BucketEvent.property.type">type</a></code> | <code><a href="#@winglang/sdk.cloud.BucketEventType">BucketEventType</a></code> | type of event. |
| <code><a href="#@winglang/sdk.cloud.BucketEvent.property.key">key</a></code> | <code>str</code> | The bucket key that triggered the event. |
| <code><a href="#@winglang/sdk.cloud.BucketEvent.property.type">type</a></code> | <code><a href="#@winglang/sdk.cloud.BucketEventType">BucketEventType</a></code> | Type of event. |

---

Expand All @@ -575,7 +575,7 @@ key: str;

- *Type:* str

the bucket key that triggered the event.
The bucket key that triggered the event.

---

Expand All @@ -587,13 +587,13 @@ type: BucketEventType;

- *Type:* <a href="#@winglang/sdk.cloud.BucketEventType">BucketEventType</a>

type of event.
Type of event.

---

### BucketOnCreateProps <a name="BucketOnCreateProps" id="@winglang/sdk.cloud.BucketOnCreateProps"></a>

on create event options.
`onCreate` event options.

#### Initializer <a name="Initializer" id="@winglang/sdk.cloud.BucketOnCreateProps.Initializer"></a>

Expand All @@ -606,7 +606,7 @@ let BucketOnCreateProps = cloud.BucketOnCreateProps{ ... };

### BucketOnDeleteProps <a name="BucketOnDeleteProps" id="@winglang/sdk.cloud.BucketOnDeleteProps"></a>

on delete event options.
`onDelete` event options.

#### Initializer <a name="Initializer" id="@winglang/sdk.cloud.BucketOnDeleteProps.Initializer"></a>

Expand All @@ -619,7 +619,7 @@ let BucketOnDeleteProps = cloud.BucketOnDeleteProps{ ... };

### BucketOnEventProps <a name="BucketOnEventProps" id="@winglang/sdk.cloud.BucketOnEventProps"></a>

on any event options.
`onEvent` options.

#### Initializer <a name="Initializer" id="@winglang/sdk.cloud.BucketOnEventProps.Initializer"></a>

Expand All @@ -632,7 +632,7 @@ let BucketOnEventProps = cloud.BucketOnEventProps{ ... };

### BucketOnUpdateProps <a name="BucketOnUpdateProps" id="@winglang/sdk.cloud.BucketOnUpdateProps"></a>

on update event options.
`onUpdate` event options.

#### Initializer <a name="Initializer" id="@winglang/sdk.cloud.BucketOnUpdateProps.Initializer"></a>

Expand Down Expand Up @@ -761,35 +761,35 @@ Function that will be called when an event notification is fired.

### BucketEventType <a name="BucketEventType" id="@winglang/sdk.cloud.BucketEventType"></a>

bucket events to subscribe to.
Bucket events to subscribe to.

#### Members <a name="Members" id="Members"></a>

| **Name** | **Description** |
| --- | --- |
| <code><a href="#@winglang/sdk.cloud.BucketEventType.CREATE">CREATE</a></code> | create. |
| <code><a href="#@winglang/sdk.cloud.BucketEventType.DELETE">DELETE</a></code> | delete. |
| <code><a href="#@winglang/sdk.cloud.BucketEventType.UPDATE">UPDATE</a></code> | update. |
| <code><a href="#@winglang/sdk.cloud.BucketEventType.CREATE">CREATE</a></code> | Create. |
| <code><a href="#@winglang/sdk.cloud.BucketEventType.DELETE">DELETE</a></code> | Delete. |
| <code><a href="#@winglang/sdk.cloud.BucketEventType.UPDATE">UPDATE</a></code> | Update. |

---

##### `CREATE` <a name="CREATE" id="@winglang/sdk.cloud.BucketEventType.CREATE"></a>

create.
Create.

---


##### `DELETE` <a name="DELETE" id="@winglang/sdk.cloud.BucketEventType.DELETE"></a>

delete.
Delete.

---


##### `UPDATE` <a name="UPDATE" id="@winglang/sdk.cloud.BucketEventType.UPDATE"></a>

update.
Update.

---

38 changes: 19 additions & 19 deletions docs/docs/04-standard-library/02-std/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ Create a Datetime from UTC timezone.
| <code><a href="#@winglang/sdk.std.Datetime.property.sec">sec</a></code> | <code>num</code> | Returns the seconds of the local machine time or in utc. |
| <code><a href="#@winglang/sdk.std.Datetime.property.timestamp">timestamp</a></code> | <code>num</code> | Return a timestamp of non-leap year seconds since epoch. |
| <code><a href="#@winglang/sdk.std.Datetime.property.timestampMs">timestampMs</a></code> | <code>num</code> | Return a timestamp of non-leap year milliseconds since epoch. |
| <code><a href="#@winglang/sdk.std.Datetime.property.timezone">timezone</a></code> | <code>num</code> | returns the offset in minutes from UTC. |
| <code><a href="#@winglang/sdk.std.Datetime.property.timezone">timezone</a></code> | <code>num</code> | Returns the offset in minutes from UTC. |
| <code><a href="#@winglang/sdk.std.Datetime.property.year">year</a></code> | <code>num</code> | Returns the year of the local machine time or in utc. |

---
Expand Down Expand Up @@ -412,7 +412,7 @@ timezone: num;

- *Type:* num

returns the offset in minutes from UTC.
Returns the offset in minutes from UTC.

---

Expand Down Expand Up @@ -2055,7 +2055,7 @@ The length of the string.

### DatetimeComponents <a name="DatetimeComponents" id="@winglang/sdk.std.DatetimeComponents"></a>

interface that is used for setting Datetime date.
Interface that is used for setting Datetime date.

#### Initializer <a name="Initializer" id="@winglang/sdk.std.DatetimeComponents.Initializer"></a>

Expand All @@ -2067,14 +2067,14 @@ let DatetimeComponents = DatetimeComponents{ ... };

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.day">day</a></code> | <code>num</code> | day. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.hour">hour</a></code> | <code>num</code> | hours. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.min">min</a></code> | <code>num</code> | minutes. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.month">month</a></code> | <code>num</code> | month. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.ms">ms</a></code> | <code>num</code> | milliseconds. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.sec">sec</a></code> | <code>num</code> | seconds. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.tz">tz</a></code> | <code>num</code> | timezone offset in minutes from UTC. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.year">year</a></code> | <code>num</code> | year. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.day">day</a></code> | <code>num</code> | Day. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.hour">hour</a></code> | <code>num</code> | Hours. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.min">min</a></code> | <code>num</code> | Minutes. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.month">month</a></code> | <code>num</code> | Month. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.ms">ms</a></code> | <code>num</code> | Milliseconds. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.sec">sec</a></code> | <code>num</code> | Seconds. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.tz">tz</a></code> | <code>num</code> | Timezone offset in minutes from UTC. |
| <code><a href="#@winglang/sdk.std.DatetimeComponents.property.year">year</a></code> | <code>num</code> | Year. |

---

Expand All @@ -2086,7 +2086,7 @@ day: num;

- *Type:* num

day.
Day.

---

Expand All @@ -2098,7 +2098,7 @@ hour: num;

- *Type:* num

hours.
Hours.

---

Expand All @@ -2110,7 +2110,7 @@ min: num;

- *Type:* num

minutes.
Minutes.

---

Expand All @@ -2122,7 +2122,7 @@ month: num;

- *Type:* num

month.
Month.

---

Expand All @@ -2134,7 +2134,7 @@ ms: num;

- *Type:* num

milliseconds.
Milliseconds.

---

Expand All @@ -2146,7 +2146,7 @@ sec: num;

- *Type:* num

seconds.
Seconds.

---

Expand All @@ -2158,7 +2158,7 @@ tz: num;

- *Type:* num

timezone offset in minutes from UTC.
Timezone offset in minutes from UTC.

---

Expand All @@ -2170,7 +2170,7 @@ year: num;

- *Type:* num

year.
Year.

---

Expand Down
6 changes: 3 additions & 3 deletions docs/docs/04-standard-library/03-http/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sidebar_position: 100

### Http <a name="Http" id="@winglang/sdk.http.Util"></a>

the Http class is used for calling different HTTP methods and requesting and sending information online, as well as testing public accessible resources.
The Http class is used for calling different HTTP methods and requesting and sending information online, as well as testing public accessible resources.


#### Static Functions <a name="Static Functions" id="Static Functions"></a>
Expand Down Expand Up @@ -214,7 +214,7 @@ let RequestOptions = http.RequestOptions{ ... };
| <code><a href="#@winglang/sdk.http.RequestOptions.property.cache">cache</a></code> | <code><a href="#@winglang/sdk.http.RequestCache">RequestCache</a></code> | The cache mode you want to use for the request. |
| <code><a href="#@winglang/sdk.http.RequestOptions.property.headers">headers</a></code> | <code>MutMap&lt;str&gt;</code> | Any headers you want to add to your request. |
| <code><a href="#@winglang/sdk.http.RequestOptions.property.method">method</a></code> | <code><a href="#@winglang/sdk.http.HttpMethod">HttpMethod</a></code> | The request method, e.g., GET, POST. The default is GET. |
| <code><a href="#@winglang/sdk.http.RequestOptions.property.redirect">redirect</a></code> | <code><a href="#@winglang/sdk.http.RequestRedirect">RequestRedirect</a></code> | he redirect mode to use: follow, error. |
| <code><a href="#@winglang/sdk.http.RequestOptions.property.redirect">redirect</a></code> | <code><a href="#@winglang/sdk.http.RequestRedirect">RequestRedirect</a></code> | The redirect mode to use: follow, error. |
| <code><a href="#@winglang/sdk.http.RequestOptions.property.referrer">referrer</a></code> | <code>str</code> | A string specifying "no-referrer", client, or a URL. |

---
Expand Down Expand Up @@ -279,7 +279,7 @@ redirect: RequestRedirect;
- *Type:* <a href="#@winglang/sdk.http.RequestRedirect">RequestRedirect</a>
- *Default:* follow

he redirect mode to use: follow, error.
The redirect mode to use: follow, error.

The default is follow.

Expand Down
20 changes: 10 additions & 10 deletions docs/docs/04-standard-library/06-ex/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -752,45 +752,45 @@ Table column types.

| **Name** | **Description** |
| --- | --- |
| <code><a href="#@winglang/sdk.ex.ColumnType.STRING">STRING</a></code> | string type. |
| <code><a href="#@winglang/sdk.ex.ColumnType.NUMBER">NUMBER</a></code> | number type. |
| <code><a href="#@winglang/sdk.ex.ColumnType.BOOLEAN">BOOLEAN</a></code> | bool type. |
| <code><a href="#@winglang/sdk.ex.ColumnType.DATE">DATE</a></code> | date type. |
| <code><a href="#@winglang/sdk.ex.ColumnType.JSON">JSON</a></code> | json type. |
| <code><a href="#@winglang/sdk.ex.ColumnType.STRING">STRING</a></code> | String type. |
| <code><a href="#@winglang/sdk.ex.ColumnType.NUMBER">NUMBER</a></code> | Number type. |
| <code><a href="#@winglang/sdk.ex.ColumnType.BOOLEAN">BOOLEAN</a></code> | Bool type. |
| <code><a href="#@winglang/sdk.ex.ColumnType.DATE">DATE</a></code> | Date type. |
| <code><a href="#@winglang/sdk.ex.ColumnType.JSON">JSON</a></code> | Json type. |

---

##### `STRING` <a name="STRING" id="@winglang/sdk.ex.ColumnType.STRING"></a>

string type.
String type.

---


##### `NUMBER` <a name="NUMBER" id="@winglang/sdk.ex.ColumnType.NUMBER"></a>

number type.
Number type.

---


##### `BOOLEAN` <a name="BOOLEAN" id="@winglang/sdk.ex.ColumnType.BOOLEAN"></a>

bool type.
Bool type.

---


##### `DATE` <a name="DATE" id="@winglang/sdk.ex.ColumnType.DATE"></a>

date type.
Date type.

---


##### `JSON` <a name="JSON" id="@winglang/sdk.ex.ColumnType.JSON"></a>

json type.
Json type.

---

Original file line number Diff line number Diff line change
Expand Up @@ -143,31 +143,31 @@ source: libs/wingc/src/lsp/completions.rs
kind: 22
documentation:
kind: markdown
value: "```wing\nstruct BucketEvent\n```\n---\non_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.\n### Fields\n- `key` — the bucket key that triggered the event.\n- `type` — type of event."
value: "```wing\nstruct BucketEvent\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.\n### Fields\n- `key` — The bucket key that triggered the event.\n- `type` — Type of event."
sortText: hh|BucketEvent
- label: BucketOnCreateProps
kind: 22
documentation:
kind: markdown
value: "```wing\nstruct BucketOnCreateProps\n```\n---\non create event options."
value: "```wing\nstruct BucketOnCreateProps\n```\n---\n`onCreate` event options."
sortText: hh|BucketOnCreateProps
- label: BucketOnDeleteProps
kind: 22
documentation:
kind: markdown
value: "```wing\nstruct BucketOnDeleteProps\n```\n---\non delete event options."
value: "```wing\nstruct BucketOnDeleteProps\n```\n---\n`onDelete` event options."
sortText: hh|BucketOnDeleteProps
- label: BucketOnEventProps
kind: 22
documentation:
kind: markdown
value: "```wing\nstruct BucketOnEventProps\n```\n---\non any event options."
value: "```wing\nstruct BucketOnEventProps\n```\n---\n`onEvent` options."
sortText: hh|BucketOnEventProps
- label: BucketOnUpdateProps
kind: 22
documentation:
kind: markdown
value: "```wing\nstruct BucketOnUpdateProps\n```\n---\non update event options."
value: "```wing\nstruct BucketOnUpdateProps\n```\n---\n`onUpdate` event options."
sortText: hh|BucketOnUpdateProps
- label: BucketProps
kind: 22
Expand Down Expand Up @@ -425,7 +425,7 @@ source: libs/wingc/src/lsp/completions.rs
kind: 13
documentation:
kind: markdown
value: "```wing\nenum BucketEventType\n```\n---\nbucket events to subscribe to.\n- `CREATE`\n- `DELETE`\n- `UPDATE`"
value: "```wing\nenum BucketEventType\n```\n---\nBucket events to subscribe to.\n- `CREATE`\n- `DELETE`\n- `UPDATE`"
sortText: jj|BucketEventType
- label: HttpMethod
kind: 13
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ source: libs/wingc/src/lsp/completions.rs
kind: 7
documentation:
kind: markdown
value: "```wing\nclass Util\n```\n---\nthe Http class is used for calling different HTTP methods and requesting and sending information online, as well as testing public accessible resources."
value: "```wing\nclass Util\n```\n---\nThe Http class is used for calling different HTTP methods and requesting and sending information online, as well as testing public accessible resources."
sortText: gg|Util
- label: RequestOptions
kind: 22
documentation:
kind: markdown
value: "```wing\nstruct RequestOptions\n```\n---\nAn object containing any custom settings that you want to apply to the request.\n### Fields\n- `body?` — Any body that you want to add to your request.\n- `cache?` — The cache mode you want to use for the request.\n- `headers?` — Any headers you want to add to your request.\n- `method?` — The request method, e.g., GET, POST. The default is GET.\n- `redirect?` — he redirect mode to use: follow, error.\n- `referrer?` — A string specifying \"no-referrer\", client, or a URL."
value: "```wing\nstruct RequestOptions\n```\n---\nAn object containing any custom settings that you want to apply to the request.\n### Fields\n- `body?` — Any body that you want to add to your request.\n- `cache?` — The cache mode you want to use for the request.\n- `headers?` — Any headers you want to add to your request.\n- `method?` — The request method, e.g., GET, POST. The default is GET.\n- `redirect?` — The redirect mode to use: follow, error.\n- `referrer?` — A string specifying \"no-referrer\", client, or a URL."
sortText: hh|RequestOptions
- label: Response
kind: 22
Expand Down
Loading
Loading