Skip to content

Commit 8bbf642

Browse files
authored
Merge branch 'aws:master' into feature/securityscans
2 parents 2c5a4fd + fba0246 commit 8bbf642

File tree

36 files changed

+1084
-92
lines changed

36 files changed

+1084
-92
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Help > View Toolkit Logs opens an empty file if other menu items were interacted with first."
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Amazon Q: Fixed an issue where sometimes /transform won't appear when switching between idC/builder id"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Amazon Q: 'Switch to Q Chat' button not working for some users."
4+
}

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
node: true,
1010
mocha: true,
1111
},
12-
plugins: ['@typescript-eslint', 'header', 'no-null'],
12+
plugins: ['@typescript-eslint', 'header', 'no-null', 'aws-toolkits'],
1313
extends: [
1414
'eslint:recommended',
1515
'plugin:@typescript-eslint/eslint-recommended',
@@ -115,5 +115,6 @@ module.exports = {
115115
},
116116
{ lineEndings: 'unix' },
117117
],
118+
'aws-toolkits/no-only-in-tests': 'error',
118119
},
119120
}

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ src/testFixtures/**
99
dist/**
1010
types/*.d.ts
1111
src.gen/**
12+
plugins/*/dist/**

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,15 @@ See [docs/cfn-schema-support.md](./docs/cfn-schema-support.md) for how to fix
335335
and improve the JSON schema that provides auto-completion and syntax checking
336336
of SAM and CloudFormation `template.yaml` files.
337337

338+
### Custom Lint Rules
339+
340+
The package.json 'devDependencies' includes `eslint-plugin-aws-toolkits`. This is a local eslint plugin where we define custom lint rules. Additional lint rules and tests for lint rules can be added to this plugin:
341+
342+
1. Define a new rule in `plugins/eslint-plugin-aws-toolkits/lib/rules`.
343+
2. Create a test for your rule in `plugins/eslint-plugin-aws-toolkits/test/rules` and run with `npm run test` in the root directory of `eslint-plugin-aws-toolkits`.
344+
3. Register your rule in `plugins/eslint-plugin-aws-toolkits/index.ts`.
345+
4. Enable your rule in `.eslintrc`.
346+
338347
### AWS SDK generator
339348

340349
When the AWS SDK does not (yet) support a service but you have an API

docs/TESTPLAN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ modifications/workarounds in `src/test/testRunner.ts`.
8181
- Testing AWS SDK client functionality is cumbersome, verbose, and low-yield.
8282
- Test code uses multiple “mocking” frameworks, which is confusing, error-prone, hard to onboard, and hard to use.
8383
- Coverage not counted for integ tests (because of unresolved tooling issue).
84+
- [Backlog](https://github.com/aws/aws-toolkit-vscode/blob/0f3685ab0dc8af3a214136ebfa233829d5d72b2c/src/shared/telemetry/exemptMetrics.ts) of metrics that do not pass validation but are temporarily exempted to not fail CI.
8485

8586
## Window
8687

package-lock.json

Lines changed: 21 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4238,15 +4238,16 @@
42384238
"runInBrowser": "npm run buildBrowser && npx @vscode/test-web --open-devtools --extensionDevelopmentPath=. .",
42394239
"compile": "npm run clean && npm run buildScripts && webpack --mode development && npm run copyFiles",
42404240
"watch": "npm run clean && npm run buildScripts && tsc -watch -p ./",
4241-
"postinstall": "npm run generateTelemetry && npm run generateConfigurationAttributes",
4241+
"postinstall": "npm run generateTelemetry && npm run generateConfigurationAttributes && npm run buildCustomLintPlugin",
42424242
"testCompile": "npm run buildScripts && tsc -p ./ && npm run instrument",
42434243
"test": "npm run testCompile && ts-node ./scripts/test/test.ts && npm run report",
42444244
"testE2E": "npm run testCompile && ts-node ./scripts/test/testE2E.ts && npm run report",
42454245
"testInteg": "npm run testCompile && ts-node ./scripts/test/testInteg.ts && npm run report",
42464246
"lint": "ts-node ./scripts/lint/testLint.ts && npm run format",
42474247
"lintfix": "eslint -c .eslintrc.js --fix --ext .ts . && npm run formatfix",
4248-
"format": "prettier --check src",
4249-
"formatfix": "prettier --write src",
4248+
"buildCustomLintPlugin": "cd ./plugins/eslint-plugin-aws-toolkits && npm run build",
4249+
"format": "prettier --check src plugins",
4250+
"formatfix": "prettier --write src plugins",
42504251
"package": "ts-node ./scripts/build/package.ts",
42514252
"install-plugin": "vsce package -o aws-toolkit-vscode-test.vsix && code --install-extension aws-toolkit-vscode-test.vsix",
42524253
"generateClients": "npm run build -w @amzn/codewhisperer-streaming && ts-node ./scripts/build/generateServiceClient.ts ",
@@ -4311,6 +4312,7 @@
43114312
"eslint-config-prettier": "8.8",
43124313
"eslint-plugin-header": "^3.1.1",
43134314
"eslint-plugin-no-null": "^1.0.2",
4315+
"eslint-plugin-aws-toolkits": "file:plugins/eslint-plugin-aws-toolkits",
43144316
"file-loader": "^6.2.0",
43154317
"glob": "^7.1.7",
43164318
"husky": "^7.0.2",
@@ -4397,7 +4399,6 @@
43974399
"winston": "^3.7.1",
43984400
"winston-transport": "^4.5.0",
43994401
"xml2js": "^0.6.0",
4400-
"yaml": "^1.9.2",
44014402
"yaml-cfn": "^0.3.2"
44024403
},
44034404
"prettier": {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*!
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
import NoOnlyInTests from './lib/rules/no-only-in-tests'
7+
8+
const rules = {
9+
'no-only-in-tests': NoOnlyInTests,
10+
}
11+
12+
export { rules }

0 commit comments

Comments
 (0)