Skip to content

Commit

Permalink
refactor: Squirrel away internal tools
Browse files Browse the repository at this point in the history
Move `eslint` and `integration-test` directories into a `tools` directory.
  • Loading branch information
akash1810 committed Jul 7, 2021
1 parent c50c73e commit 9b707e9
Show file tree
Hide file tree
Showing 34 changed files with 402 additions and 412 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ updates:
schedule:
interval: 'weekly'
# somewhat arbitrary, this is to spread Dependabot PRs throughout the week to avoid Monday overload
day: "wednesday"
day: "wednesday"
commit-message:
prefix: "chore(deps): "
- package-ecosystem: 'npm'
directory: '/integration-test'
directory: '/tools/integration-test'
schedule:
interval: 'weekly'
# somewhat arbitrary, this is to spread Dependabot PRs throughout the week to avoid Monday overload
day: "wednesday"
day: "wednesday"
commit-message:
prefix: "chore(deps): "
# The version of @aws-cdk/* libraries must match those from @guardian/cdk.
Expand Down
4 changes: 2 additions & 2 deletions docs/006-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This stack isn't user facing. Accidentally causing destruction there is ok - bet

<!-- only links below here -->
[internal-testing-adr]: ./architecture-decision-records/004-testing.md
[internal-integration-project]: ../integration-test
[internal-integration-project-stack]: ../integration-test/src/integration-test-stack.ts
[internal-integration-project]: ../tools/integration-test
[internal-integration-project-stack]: ../tools/integration-test/src/integration-test-stack.ts

[cdk-playground]: https://github.com/guardian/cdk-playground
1 change: 0 additions & 1 deletion integration-test/.nvmrc

This file was deleted.

2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
setupFilesAfterEnv: ["./jest.setup.js"],

// ignore this file as it's used to demonstrate custom lint rule and Jest flags unused declarations
testPathIgnorePatterns: ["<rootDir>/eslint/rules/valid-constructors.test.ts"],
testPathIgnorePatterns: ["<rootDir>/tools/eslint/rules/valid-constructors.test.ts"],

/*
Ignore `lib` to prevent a 'duplicate manual mock found" warning
Expand Down
788 changes: 389 additions & 399 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"format": "prettier --write \"src/**/*.ts\"",
"watch": "tsc -w",
"test": "jest --detectOpenHandles --runInBand",
"test:custom-lint-rule": "eslint eslint/rules/valid-constructors.test.ts",
"test:custom-lint-rule": "eslint tools/eslint/rules/valid-constructors.test.ts",
"test:dev": "jest --detectOpenHandles --runInBand --watch",
"prepare": "tsc",
"release": "semantic-release",
Expand All @@ -29,7 +29,7 @@
"@types/node": "15.12.5",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^7.29.0",
"eslint-plugin-custom-rules": "file:eslint",
"eslint-plugin-custom-rules": "file:tools/eslint",
"gh-pages": "^3.2.3",
"jest": "^26.4.2",
"npm-check-updates": "^11.7.1",
Expand Down
2 changes: 1 addition & 1 deletion script/ci
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ preamble() {

runIntegrationTest() {
(
cd "$ROOT_DIR/integration-test"
cd "$ROOT_DIR/tools/integration-test"
./script/ci
)
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars -- testing file */

import type { GuStack } from "../../src/constructs/core";
import type { GuStack } from "../../../src/constructs/core";

interface MyProps {
name: string;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tools/integration-test/.nvmrc
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"typescript": "~4.3.4"
},
"dependencies": {
"@guardian/cdk": "file:.."
"@guardian/cdk": "file:../.."
},
"private": true
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tsconfig.eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "./tsconfig.json",
"include": [
"src/**/*",
"eslint/rules/valid-constructors.test.ts"
"tools/eslint/rules/valid-constructors.test.ts"
],
"exclude": [
"node_modules"
Expand Down

0 comments on commit 9b707e9

Please sign in to comment.