Skip to content

Commit 2a24633

Browse files
committed
update format, lint scripts, and .ignore files
1 parent 88d86c7 commit 2a24633

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

.prettierignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ CHANGELOG.md
55
*.gen.ts
66
dist
77
src.gen/**
8-
packages/toolkit/resources/endpoints.json
9-
packages/toolkit/types/*.d.ts
8+
9+
# Duplicate entries because prettier can be ran from root or within the workspace/subpackage.
10+
# TODO: Avoid this.
11+
src/shared/telemetry/service-2.json
12+
src/testFixtures/**
13+
1014
packages/toolkit/src/shared/telemetry/service-2.json
1115
packages/toolkit/src/testFixtures/**

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
"package": "npm run package -w packages/",
3131
"newChange": "ts-node ./scripts/newChange.ts",
3232
"createRelease": "npm run createRelease -w packages/",
33-
"format": "prettier --check packages plugins",
34-
"formatfix": "prettier --write packages plugins",
35-
"lint": "ts-node ./scripts/lint/testLint.ts && npm run format",
33+
"format": "prettier --check plugins && npm run format -w packages/",
34+
"formatfix": "prettier --write plugins && npm run formatfix -w packages/",
35+
"lint": "npm run lint -w packages/ && npm run format",
3636
"lintfix": "eslint -c .eslintrc.js --fix --ext .ts packages plugins && npm run formatfix",
3737
"clean": "npm run clean -w packages/ -w plugins/",
3838
"reset": "npm run clean && ts-node ./scripts/clean.ts node_modules packages/toolkit/node_modules && npm install"

packages/toolkit/.vscodeignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
*
33
*/**
44

5-
# Ignore from the root package.json otherwise those dirs will be collected as well.
5+
# Ignore outside dirs up to the root package.json, otherwise those will be collected as well
6+
# (until vsce officially supports workspaces: https://github.com/microsoft/vscode-vsce/issues/580)
67
../../*
78
../../*/**
89

910
# Allowlist
11+
# ---------
1012
!dist/*
1113
!dist/libs
1214
!dist/*/!(testFixtures|test)/**/!(*.*.map)
@@ -15,10 +17,12 @@
1517
!syntaxes/**
1618
!templates/**
1719
!types/**
18-
!LICENSE
19-
!NOTICE
2020
!package.json
2121
!package.nls.json
22+
23+
# Automatically copied from root project directory
2224
!quickStart**
2325
!README.**
2426
!CHANGELOG.md
27+
!LICENSE
28+
!NOTICE

packages/toolkit/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4249,6 +4249,9 @@
42494249
"test": "npm run testCompile && c8 ts-node ./scripts/test/test.ts",
42504250
"testE2E": "npm run testCompile && c8 ts-node ./scripts/test/testE2E.ts",
42514251
"testInteg": "npm run testCompile && c8 ts-node ./scripts/test/testInteg.ts",
4252+
"format": "prettier --ignore-path ../../.prettierignore --check src scripts",
4253+
"formatfix": "prettier --ignore-path ../../.prettierignore --write src scripts",
4254+
"lint": "ts-node ./scripts/lint/testLint.ts && npm run format",
42524255
"package": "ts-node ./scripts/build/package.ts",
42534256
"install-plugin": "vsce package -o aws-toolkit-vscode-test.vsix && code --install-extension aws-toolkit-vscode-test.vsix",
42544257
"generateClients": "npm run build -w @amzn/codewhisperer-streaming && ts-node ./scripts/build/generateServiceClient.ts ",

0 commit comments

Comments
 (0)