Skip to content

Commit c62c514

Browse files
authored
Merge pull request #12061 from linode/staging
Release v1.140.0 - staging → master
2 parents a28496b + c6361bf commit c62c514

File tree

654 files changed

+17278
-9098
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

654 files changed

+17278
-9098
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: ESLint Review
2+
on: [pull_request]
3+
jobs:
4+
eslint:
5+
name: ESLint Review
6+
runs-on: ubuntu-latest
7+
permissions:
8+
contents: read
9+
checks: write
10+
strategy:
11+
matrix:
12+
package: [manager, api-v4, queries, shared, ui, utilities, validation]
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: pnpm/action-setup@v2
16+
with:
17+
run_install: false
18+
version: 10
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: "20.17"
22+
cache: "pnpm"
23+
- run: pnpm install
24+
- uses: abailly-akamai/action-eslint@8ad68ba04fa60924ef7607b07deb5989f38f5ed6 # v1.0.2
25+
with:
26+
workdir: packages/${{ matrix.package }}
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
reporter: github-pr-check
29+
level: warning # This will report both warnings and errors
30+
filter_mode: added # Only comment on new/modified lines

package.json

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,35 @@
22
"name": "root",
33
"private": true,
44
"license": "Apache-2.0",
5+
"type": "module",
56
"devDependencies": {
7+
"@eslint/js": "^9.23.0",
68
"concurrently": "9.1.0",
79
"husky": "^9.1.6",
810
"typescript": "^5.7.3",
911
"vitest": "^3.0.7",
1012
"@vitest/ui": "^3.0.7",
11-
"lint-staged": "^15.4.3"
13+
"lint-staged": "^15.4.3",
14+
"eslint": "^9.23.0",
15+
"eslint-config-prettier": "^10.1.1",
16+
"eslint-plugin-cypress": "^4.2.1",
17+
"eslint-plugin-jsx-a11y": "^6.10.2",
18+
"eslint-plugin-perfectionist": "^4.10.1",
19+
"eslint-plugin-prettier": "~5.2.6",
20+
"eslint-plugin-react": "^7.37.4",
21+
"eslint-plugin-react-hooks": "^5.2.0",
22+
"eslint-plugin-sonarjs": "^3.0.2",
23+
"eslint-plugin-testing-library": "^7.1.1",
24+
"eslint-plugin-xss": "^0.1.12",
25+
"prettier": "~3.5.3",
26+
"typescript-eslint": "^8.29.0",
27+
"@typescript-eslint/eslint-plugin": "^8.29.0",
28+
"@typescript-eslint/parser": "^8.29.0",
29+
"@linode/eslint-plugin-cloud-manager": "^0.0.10",
30+
"jiti": "^2.4.2"
1231
},
1332
"scripts": {
14-
"lint": "eslint . --quiet --ext .js,.ts,.tsx",
33+
"lint:all": "pnpm -r --parallel lint",
1534
"install:all": "pnpm install --frozen-lockfile",
1635
"build:sdk": "pnpm run --filter @linode/api-v4 build",
1736
"build:validation": "pnpm run --filter @linode/validation build",
@@ -46,7 +65,7 @@
4665
"package-versions": "pnpm run --filter @linode/scripts package-versions",
4766
"junit:summary": "pnpm run --filter @linode/scripts --silent junit:summary",
4867
"generate-tod": "pnpm run --filter @linode/scripts --silent generate-tod",
49-
"clean": "rm -rf node_modules && rm -rf packages/manager/node_modules && rm -rf packages/api-v4/node_modules && rm -rf packages/validation/node_modules && rm -rf packages/api-v4/lib && rm -rf packages/validation/lib && rm -rf packages/ui/node_modules && rm -rf packages/utilities/node_modules",
68+
"clean": "concurrently \"rm -rf node_modules\" \"pnpm -r exec rm -rf node_modules lib dist\" \"pnpm store prune\"",
5069
"prepare": "husky"
5170
},
5271
"resolutions": {

packages/api-v4/.eslintrc.json

Lines changed: 0 additions & 112 deletions
This file was deleted.

packages/api-v4/CHANGELOG.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
1-
## [2025-04-08] - v0.137.0
1+
## [2025-04-22] - v0.138.0
2+
3+
### Added:
4+
5+
- `Linode Interfaces` to the `AccountCapability` type ([#11995](https://github.com/linode/manager/pull/11995))
6+
7+
### Changed:
8+
9+
- Add VPC field to `LinodeIPsResponseIPV4` ([#11976](https://github.com/linode/manager/pull/11976))
10+
11+
### Tech Stories:
212

13+
- Eslint Overhaul ([#11941](https://github.com/linode/manager/pull/11941))
14+
15+
### Upcoming Features:
16+
17+
- Add schema validation for `edit alert` call in cloudpulse alerts ([#11868](https://github.com/linode/manager/pull/11868))
18+
- Fix the iam api for put method ([#11978](https://github.com/linode/manager/pull/11978))
19+
- fix the api to the right one for iam ([#11998](https://github.com/linode/manager/pull/11998))
20+
- Rename `DeleteLinodeConfigInterfacePayload` to `DeleteInterfaceIds` ([#12016](https://github.com/linode/manager/pull/12016))
21+
- fix the api to the right one for iam ([#12027](https://github.com/linode/manager/pull/12027))
22+
23+
## [2025-04-08] - v0.137.0
324

425
### Added:
526

@@ -27,7 +48,6 @@
2748

2849
## [2025-03-25] - v0.136.0
2950

30-
3151
### Added:
3252

3353
- Add and update `/v4beta/nodebalancers` endpoints for NB-VPC Integration ([#11811](https://github.com/linode/manager/pull/11811))
@@ -73,7 +93,6 @@
7393

7494
## [2025-02-11] - v0.134.0
7595

76-
7796
### Added:
7897

7998
- Labels and Taints types and params ([#11528](https://github.com/linode/manager/pull/11528))
@@ -116,7 +135,6 @@
116135
- Add types for Quotas endpoints ([#11493](https://github.com/linode/manager/pull/11493))
117136
- Add Notification Channel related types to cloudpulse/alerts.ts ([#11511](https://github.com/linode/manager/pull/11511))
118137

119-
120138
## [2025-01-14] - v0.132.0
121139

122140
### Added:
@@ -126,7 +144,7 @@
126144

127145
### Changed:
128146

129-
- Type of `AlertDefinitionType` to `'system'|'user'` ([#11346](https://github.com/linode/manager/pull/11346))
147+
- Type of `AlertDefinitionType` to `'system'|'user'` ([#11346](https://github.com/linode/manager/pull/11346))
130148
- Property names, and types of the CreateAlertDefinitionPayload and Alert interfaces ([#11392](https://github.com/linode/manager/pull/11392))
131149
- BaseDatabase total_disk_size_gb and used_disk_size_gb are always expected and used_disk_size_gb can be null ([#11426](https://github.com/linode/manager/pull/11426))
132150
- Renamed `AvailableMetrics` type to `MetricDefinition` ([#11433](https://github.com/linode/manager/pull/11433))

packages/api-v4/eslint.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from 'eslint/config';
2+
3+
import { baseConfig } from '../manager/eslint.config.js';
4+
5+
export default defineConfig({
6+
extends: baseConfig,
7+
});

packages/api-v4/package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@linode/api-v4",
3-
"version": "0.137.0",
3+
"version": "0.138.0",
44
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
55
"bugs": {
66
"url": "https://github.com/linode/manager/issues"
@@ -58,9 +58,6 @@
5858
"devDependencies": {
5959
"axios-mock-adapter": "^1.22.0",
6060
"concurrently": "^9.0.1",
61-
"eslint": "^6.8.0",
62-
"eslint-plugin-sonarjs": "^0.5.0",
63-
"prettier": "~2.2.1",
6461
"tsup": "^8.4.0"
6562
},
6663
"lint-staged": {
@@ -72,4 +69,4 @@
7269
"tsc -p tsconfig.json --noEmit true --emitDeclarationOnly false"
7370
]
7471
}
75-
}
72+
}

packages/api-v4/src/account/types.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export const accountCapabilities = [
7070
'Kubernetes',
7171
'Kubernetes Enterprise',
7272
'Linodes',
73+
'Linode Interfaces',
7374
'LKE HA Control Planes',
7475
'LKE Network Access Control List (IP ACL)',
7576
'Machine Images',
@@ -87,7 +88,7 @@ export const accountCapabilities = [
8788
'VPCs',
8889
] as const;
8990

90-
export type AccountCapability = typeof accountCapabilities[number];
91+
export type AccountCapability = (typeof accountCapabilities)[number];
9192

9293
export interface AccountAvailability {
9394
region: string; // will be slug of dc (matches id field of region object returned by API)
@@ -101,7 +102,8 @@ export const linodeInterfaceAccountSettings = [
101102
'linode_only',
102103
] as const;
103104

104-
export type LinodeInterfaceAccountSetting = typeof linodeInterfaceAccountSettings[number];
105+
export type LinodeInterfaceAccountSetting =
106+
(typeof linodeInterfaceAccountSettings)[number];
105107

106108
export interface AccountSettings {
107109
managed: boolean;
@@ -494,7 +496,7 @@ export const EventActionKeys = [
494496
'vpc_update',
495497
] as const;
496498

497-
export type EventAction = typeof EventActionKeys[number];
499+
export type EventAction = (typeof EventActionKeys)[number];
498500

499501
export type EventStatus =
500502
| 'scheduled'

packages/api-v4/src/cloudpulse/alerts.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { createAlertDefinitionSchema } from '@linode/validation';
1+
import {
2+
createAlertDefinitionSchema,
3+
editAlertDefinitionSchema,
4+
} from '@linode/validation';
25
import Request, {
36
setURL,
47
setMethod,
@@ -54,16 +57,16 @@ export const getAlertDefinitionByServiceTypeAndId = (
5457
export const editAlertDefinition = (
5558
data: EditAlertDefinitionPayload,
5659
serviceType: string,
57-
alertId: number
60+
alertId: number,
5861
) =>
5962
Request<Alert>(
6063
setURL(
6164
`${API_ROOT}/monitor/services/${encodeURIComponent(
62-
serviceType
63-
)}/alert-definitions/${encodeURIComponent(alertId)}`
65+
serviceType,
66+
)}/alert-definitions/${encodeURIComponent(alertId)}`,
6467
),
6568
setMethod('PUT'),
66-
setData(data)
69+
setData(data, editAlertDefinitionSchema),
6770
);
6871
export const getNotificationChannels = (params?: Params, filters?: Filter) =>
6972
Request<ResourcePage<NotificationChannel>>(

0 commit comments

Comments
 (0)