Skip to content
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
16 changes: 15 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
mocha: true,
es2024: true,
},
plugins: ['@typescript-eslint', 'unicorn', 'header', 'security-node', 'aws-toolkits'],
plugins: ['@typescript-eslint', '@stylistic', 'unicorn', 'header', 'security-node', 'aws-toolkits'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
Expand Down Expand Up @@ -113,6 +113,20 @@ module.exports = {
'no-constant-condition': ['error', { checkLoops: false }],
'no-empty': 'off',

// https://eslint.style/rules/default/spaced-comment
// Require space after // comment.
'@stylistic/spaced-comment': [
'error',
'always',
{
block: {
markers: ['!'], // Allow the /*!…*/ license header.
// exceptions: ['*'],
// balanced: true
},
},
],

// Rules from https://github.com/sindresorhus/eslint-plugin-unicorn
// TODO: 'unicorn/no-useless-promise-resolve-reject': 'error',
// TODO: 'unicorn/prefer-at': 'error',
Expand Down
214 changes: 212 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"devDependencies": {
"@aws-toolkits/telemetry": "^1.0.284",
"@playwright/browser-chromium": "^1.43.1",
"@stylistic/eslint-plugin": "^2.11.0",
"@types/he": "^1.2.3",
"@types/vscode": "^1.68.0",
"@types/vscode-webview": "^1.57.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*
*/
//TODO: Refactor the common functionality between Transform, FeatureDev, CWSPRChat, Scan and UTG to a new Folder.
// TODO: Refactor the common functionality between Transform, FeatureDev, CWSPRChat, Scan and UTG to a new Folder.

export default class MessengerUtils {
static stringToEnumValue = <T extends { [key: string]: string }, K extends keyof T & string>(
Expand Down
2 changes: 1 addition & 1 deletion packages/amazonq/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
errors.init(fs.getUsername(), env.isAutomation())
await initializeComputeRegion()

globals.contextPrefix = 'amazonq.' //todo: disconnect from above line
globals.contextPrefix = 'amazonq.' // todo: disconnect from above line

// Avoid activation if older toolkit is installed
// Amazon Q is only compatible with AWS Toolkit >= 3.0.0
Expand Down
2 changes: 1 addition & 1 deletion packages/core/resources/js/graphStateMachine.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ zoomoutBtn.addEventListener('click', () => {

// Message passing from extension to webview.
// Capture state machine definition
window.addEventListener('message', event => {
window.addEventListener('message', (event) => {
// event.data is object passed in from postMessage from vscode
const message = event.data
switch (message.command) {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/amazonq/commons/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

export enum FollowUpTypes {
//UnitTestGeneration
// UnitTestGeneration
ViewDiff = 'ViewDiff',
AcceptCode = 'AcceptCode',
RejectCode = 'RejectCode',
Expand All @@ -14,7 +14,7 @@ export enum FollowUpTypes {
InstallDependenciesAndContinue = 'InstallDependenciesAndContinue',
ContinueBuildAndExecute = 'ContinueBuildAndExecute',
ViewCodeDiffAfterIteration = 'ViewCodeDiffAfterIteration',
//FeatureDev
// FeatureDev
GenerateCode = 'GenerateCode',
InsertCode = 'InsertCode',
ProvideFeedbackAndRegenerateCode = 'ProvideFeedbackAndRegenerateCode',
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/amazonq/lsp/lspController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ export class LspController {
})
}
} catch (error) {
//TODO: use telemetry.run()
// TODO: use telemetry.run()
getLogger().error(`LspController: Failed to build index of project`)
telemetry.amazonq_indexWorkspace.emit({
duration: performance.now() - start,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/amazonq/lsp/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const QueryVectorIndexRequestType: RequestType<QueryVectorIndexRequest, a

export type IndexConfig = 'all' | 'default'

//RepoMapData
// RepoMapData
export type QueryRepomapIndexRequestPayload = { filePaths: string[] }
export type QueryRepomapIndexRequest = string
export const QueryRepomapIndexRequestType: RequestType<QueryRepomapIndexRequest, any, any> = new RequestType(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface MessageData {
tabID: string
type: TestMessageType
}
//TODO: Refactor testChatConnector, scanChatConnector and other apps connector files post RIV
// TODO: Refactor testChatConnector, scanChatConnector and other apps connector files post RIV
export class Connector extends BaseConnector {
override getTabType(): TabType {
return 'testgen'
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/amazonq/webview/ui/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const createMynahUI = (
let mynahUI: MynahUI
// eslint-disable-next-line prefer-const
let connector: Connector
//Store the mapping between messageId and messageUserIntent for amazonq_interactWithMessage telemetry
// Store the mapping between messageId and messageUserIntent for amazonq_interactWithMessage telemetry
const responseMetadata = new Map<string, string[]>()

window.addEventListener('error', (e) => {
Expand Down Expand Up @@ -107,7 +107,7 @@ export const createMynahUI = (
let featureConfigs: Map<string, FeatureContext> = tryNewMap(featureConfigsSerialized)

function getCodeBlockActions(messageData: any) {
//Show ViewDiff and AcceptDiff for allowedCommands in CWC
// Show ViewDiff and AcceptDiff for allowedCommands in CWC
const isEnabled = featureConfigs.get('ViewDiffInChat')?.variation === 'TREATMENT'
const tab = tabsStorage.getTab(messageData?.tabID || '')
const allowedCommands = [
Expand All @@ -133,13 +133,13 @@ export const createMynahUI = (
},
}
}
//Show only "Copy" option for codeblocks in Q Test Tab
// Show only "Copy" option for codeblocks in Q Test Tab
if (tab?.type === 'testgen') {
return {
'insert-to-cursor': undefined,
}
}
//Default will show "Copy" and "Insert at cursor" for codeblocks
// Default will show "Copy" and "Insert at cursor" for codeblocks
return {}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class QuickActionGenerator {
return []
}

//TODO: Update acc to UX
// TODO: Update acc to UX
const quickActionCommands = [
{
groupName: `Q Developer agentic capabilities`,
Expand Down
Loading
Loading