@checkdigit/typescript-config 2.2.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.travis.yml +7 -0
- package/LICENSE.txt +1 -1
- package/README.md +8 -4
- package/package.json +14 -9
- package/tsconfig.json +2 -2
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -1
package/.travis.yml
ADDED
package/LICENSE.txt
CHANGED
package/README.md
CHANGED
@@ -3,13 +3,16 @@
|
|
3
3
|
[![MIT License](https://img.shields.io/github/license/checkdigit/typescript-config)](https://github.com/checkdigit/typescript-config/blob/master/LICENSE.txt)
|
4
4
|
[![David](https://status.david-dm.org/gh/checkdigit/typescript-config.svg)](https://status.david-dm.org/gh/checkdigit/typescript-config.svg)
|
5
5
|
|
6
|
-
Copyright (c)
|
6
|
+
Copyright (c) 2022 [Check Digit, LLC](https://checkdigit.com)
|
7
7
|
|
8
8
|
### Introduction
|
9
9
|
|
10
10
|
This module contains the standard Check Digit Typescript configuration.
|
11
|
-
- requires Node
|
12
|
-
- emits
|
11
|
+
- requires Node 16 or above
|
12
|
+
- emits ES2022
|
13
|
+
- uses the new tsconfig `module` type of `node16`. This specifies that whether commonjs or ESM is emitted is dependent
|
14
|
+
on the value of the `type` field in `package.json`. If not supplied, the default value is `commonjs`.
|
15
|
+
Set `"type": "module"` to emit ESM.
|
13
16
|
- all compiler options set for maximum strictness
|
14
17
|
|
15
18
|
#### A note about versioning
|
@@ -27,10 +30,11 @@ Bear in mind, any update of Typescript can potentially break your build. But ho
|
|
27
30
|
### Installation
|
28
31
|
|
29
32
|
```
|
30
|
-
npm add -D typescript
|
31
33
|
npm add -D @checkdigit/typescript-config
|
32
34
|
```
|
33
35
|
|
36
|
+
Note: you do not need to explicitly install Typescript itself, as it comes in as a peer dependency of `@checkdigit/typescript-config`.
|
37
|
+
|
34
38
|
Make sure your project's `tsconfig.json` extends `@checkdigit/typescript-config`.
|
35
39
|
|
36
40
|
### Example `tsconfig.json`
|
package/package.json
CHANGED
@@ -1,17 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "@checkdigit/typescript-config",
|
3
|
-
"version": "
|
3
|
+
"version": "3.0.0",
|
4
4
|
"description": "Check Digit standard Typescript configuration",
|
5
|
-
"
|
6
|
-
"preversion": "npm test",
|
7
|
-
"postversion": "git push && git push --tags",
|
8
|
-
"test": "tsc --noEmit"
|
9
|
-
},
|
5
|
+
"prettier": "@checkdigit/prettier-config",
|
10
6
|
"engines": {
|
11
|
-
"node": ">=
|
7
|
+
"node": ">=16"
|
12
8
|
},
|
13
9
|
"peerDependencies": {
|
14
|
-
"typescript": ">=4.
|
10
|
+
"typescript": ">=4.7.2"
|
15
11
|
},
|
16
12
|
"repository": {
|
17
13
|
"type": "git",
|
@@ -23,7 +19,16 @@
|
|
23
19
|
"url": "https://github.com/checkdigit/typescript-config/issues"
|
24
20
|
},
|
25
21
|
"homepage": "https://github.com/checkdigit/typescript-config#readme",
|
22
|
+
"scripts": {
|
23
|
+
"preversion": "npm test",
|
24
|
+
"postversion": "git push && git push --tags",
|
25
|
+
"prettier": "prettier --list-different 'src/**/*.ts'",
|
26
|
+
"prettier:fix": "prettier --write 'src/**/*.ts'",
|
27
|
+
"test": "tsc && node build/index.js | grep -q 'complete' && rimraf build && npm run prettier"
|
28
|
+
},
|
26
29
|
"devDependencies": {
|
27
|
-
"
|
30
|
+
"@checkdigit/prettier-config": "2.0.1",
|
31
|
+
"@types/node": "^17.0.35",
|
32
|
+
"rimraf": "^3.0.2"
|
28
33
|
}
|
29
34
|
}
|
package/tsconfig.json
CHANGED
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";try{console.log("hello")}catch(e){console.error(e.message)}
|