Skip to content

Commit 56dab76

Browse files
JordonPhillipssrchase
authored andcommitted
Add top-level ts tooling
This adds a package.json and associated files to manage the typescript libraries.
1 parent a03de51 commit 56dab76

File tree

8 files changed

+8079
-10
lines changed

8 files changed

+8079
-10
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module.exports = {
2+
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
3+
parserOptions: {
4+
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
5+
sourceType: "module", // Allows for the use of imports
6+
},
7+
extends: [
8+
// Uses the recommended rules from the @typescript-eslint/eslint-plugin
9+
"plugin:@typescript-eslint/recommended",
10+
],
11+
plugins: ["@typescript-eslint", "simple-import-sort"],
12+
rules: {
13+
/** Turn off strict enforcement */
14+
"@typescript-eslint/ban-types": "off",
15+
"@typescript-eslint/ban-ts-comment": "off",
16+
"@typescript-eslint/no-var-requires": "off",
17+
"@typescript-eslint/no-empty-function": "off",
18+
"@typescript-eslint/no-empty-interface": "off",
19+
"@typescript-eslint/no-explicit-any": "off",
20+
"@typescript-eslint/explicit-module-boundary-types": "off",
21+
"prefer-rest-params": "off",
22+
"@typescript-eslint/no-non-null-assertion": "off",
23+
24+
/** Warnings */
25+
"@typescript-eslint/no-namespace": "warn",
26+
27+
/** Errors */
28+
"simple-import-sort/imports": "error",
29+
},
30+
};

smithy-typescript-ssdk-libs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
**/*.tsbuildinfo
33
**/*.d.ts
44
**/yarn-error.log
5+
coverage
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
preset: "ts-jest",
3+
testEnvironment: "node",
4+
transform: {
5+
"^.+\\.(ts|tsx)$": "ts-jest",
6+
},
7+
globals: {
8+
"ts-jest": {
9+
tsconfig: "tsconfig.json",
10+
},
11+
},
12+
testMatch: ["**/*.spec.ts", "!**/*.integ.spec.ts"],
13+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const base = require("./jest.config.base.js");
2+
3+
module.exports = {
4+
...base,
5+
projects: ["<rootDir>/*/jest.config.js"],
6+
testPathIgnorePatterns: ["/node_modules/"],
7+
coveragePathIgnorePatterns: ["/node_modules/"],
8+
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"version": "1.0.0-alpha.0",
3+
"npmClient": "yarn",
4+
"useWorkspaces": true,
5+
"command": {
6+
"run": {
7+
"npmClient": "yarn"
8+
}
9+
}
10+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "smithy-typescript-ssdk",
3+
"private": true,
4+
"version": "1.0.0-alpha.0",
5+
"description": "Smithy TypeScript SSDK packages",
6+
"main": "index.js",
7+
"scripts": {
8+
"clean": "yarn clear-build-cache && yarn clear-build-info && lerna clean -y",
9+
"clear-build-cache": "rimraf ./*/dist ./*/types",
10+
"clear-build-info": "rimraf **/*.tsbuildinfo",
11+
"build": "lerna run build",
12+
"pretest": "yarn build",
13+
"test": "jest",
14+
"lint": "yarn run eslint **/src/**/*.ts",
15+
"format": "prettier --write **/*.{ts,js,md,json}"
16+
},
17+
"repository": {
18+
"type": "git",
19+
"url": "https://github.com/awslabs/smithy-typescript/tree/main/smithy-typescript-ssdk-libs"
20+
},
21+
"author": "AWS Smithy Team",
22+
"license": "UNLICENSED",
23+
"dependencies": {
24+
"glob": "^7.1.6",
25+
"rimraf": "^3.0.2"
26+
},
27+
"devDependencies": {
28+
"@types/jest": "^26.0.4",
29+
"lerna": "3.22.1",
30+
"jest": "^26.1.0",
31+
"ts-jest": "^26.4.1",
32+
"yarn": "1.22.10",
33+
"prettier": "2.2.1",
34+
"typescript": "~4.2.4",
35+
"eslint": "7.14.0",
36+
"eslint-config-prettier": "6.15.0",
37+
"eslint-plugin-prettier": "3.1.4",
38+
"eslint-plugin-simple-import-sort": "6.0.1",
39+
"@typescript-eslint/eslint-plugin": "4.22.1",
40+
"@typescript-eslint/parser": "4.22.1"
41+
},
42+
"workspaces": {
43+
"packages": [
44+
"*"
45+
]
46+
}
47+
}
Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1+
const base = require("../jest.config.base.js");
2+
13
module.exports = {
24
preset: "ts-jest",
3-
testEnvironment: "node",
4-
transform: {
5-
"^.+\\.(ts|tsx)$": "ts-jest",
6-
},
7-
testMatch: ["**/src/**/?(*.)+(spec|test).ts"],
8-
globals: {
9-
"ts-jest": {
10-
tsconfig: "tsconfig.json",
11-
},
12-
},
5+
...base,
136
};

0 commit comments

Comments
 (0)