@sapphire/ts-config 3.2.0 → 3.3.0-next.69b9eae.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,6 +13,17 @@
13
13
 
14
14
  </div>
15
15
 
16
+ **Table of Contents**
17
+
18
+ - [Installation](#installation)
19
+ - [Usage](#usage)
20
+ - [Base Config](#base-config)
21
+ - [Config without decorators](#config-without-decorators)
22
+ - [Config with extra strict compiler options](#config-with-extra-strict-compiler-options)
23
+ - [Config with extra strict compiler options and without decorators](#config-with-extra-strict-compiler-options-and-without-decorators)
24
+ - [Buy us some doughnuts](#buy-us-some-doughnuts)
25
+ - [Contributors ✨](#contributors-%E2%9C%A8)
26
+
16
27
  ## Installation
17
28
 
18
29
  You can use the following command to install this package, or replace `npm install` with your package manager of choice.
@@ -25,8 +36,9 @@ npm install --save-dev @sapphire/ts-config
25
36
 
26
37
  ## Usage
27
38
 
28
- You can use `@sapphire/ts-config`'s
29
- [`tsconfig.json`](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/src/tsconfig.json) by extending it in yours:
39
+ ### Base Config
40
+
41
+ You can use `@sapphire/ts-config` base [`tsconfig.json`](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/tsconfig.json) by extending it in yours:
30
42
 
31
43
  ```json
32
44
  {
@@ -75,6 +87,83 @@ Following is a copy of this config file for easy viewing:
75
87
  }
76
88
  ```
77
89
 
90
+ ### Config without decorators
91
+
92
+ You can use `@sapphire/ts-config`'s [`without-decorators.json`](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/extra-strict-without-decorators.json) by extending it in yours:
93
+
94
+ ```json
95
+ {
96
+ "extends": "@sapphire/ts-config/without-decorators"
97
+ }
98
+ ```
99
+
100
+ This TypeScript extends everything from the base config, but disables decorator support.
101
+
102
+ Following is a copy of this config file for easy viewing:
103
+
104
+ ```json
105
+ {
106
+ "$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/tsconfig.json",
107
+ "extends": "./tsconfig.json",
108
+ "compilerOptions": {
109
+ "emitDecoratorMetadata": false,
110
+ "experimentalDecorators": false
111
+ }
112
+ }
113
+ ```
114
+
115
+ ### Config with extra strict compiler options
116
+
117
+ You can use `@sapphire/ts-config`'s [`extra-strict.json`](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/extra-strict.json) by extending it in yours:
118
+
119
+ ```json
120
+ {
121
+ "extends": "@sapphire/ts-config/extra-strict"
122
+ }
123
+ ```
124
+
125
+ This TypeScript extends everything from the base config, while enabling some extra strict options.
126
+
127
+ Following is a copy of this config file for easy viewing:
128
+
129
+ ```json
130
+ {
131
+ "$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/tsconfig.json",
132
+ "extends": "./tsconfig.json",
133
+ "compilerOptions": {
134
+ "allowUnreachableCode": false,
135
+ "allowUnusedLabels": false,
136
+ "exactOptionalPropertyTypes": false,
137
+ "noImplicitOverride": true
138
+ }
139
+ }
140
+ ```
141
+
142
+ ### Config with extra strict compiler options and without decorators
143
+
144
+ You can use `@sapphire/ts-config`'s [`extra-strict-without-decorators.json`](https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/extra-strict-without-decorators.json) by extending it in yours:
145
+
146
+ ```json
147
+ {
148
+ "extends": "@sapphire/ts-config/extra-strict-without-decorators"
149
+ }
150
+ ```
151
+
152
+ This TypeScript is a combination of the [Config without decorators](#config-without-decorators) and [Config with extra strict compiler options](#config-with-extra-strict-compiler-options) config files.
153
+
154
+ Following is a copy of this config file for easy viewing:
155
+
156
+ ```json
157
+ {
158
+ "$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/tsconfig.json",
159
+ "extends": "./extra-strict.json",
160
+ "compilerOptions": {
161
+ "emitDecoratorMetadata": false,
162
+ "experimentalDecorators": false
163
+ }
164
+ }
165
+ ```
166
+
78
167
  ## Buy us some doughnuts
79
168
 
80
169
  Sapphire Community is and always will be open source, even if we don't get donations. That being said, we know there are amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/tsconfig.json",
3
+ "extends": "./tsconfig.json",
4
+ "compilerOptions": {
5
+ "allowUnreachableCode": false,
6
+ "allowUnusedLabels": false,
7
+ "exactOptionalPropertyTypes": false,
8
+ "noImplicitOverride": true
9
+ }
10
+ }
package/package.json CHANGED
@@ -1,35 +1,49 @@
1
1
  {
2
2
  "name": "@sapphire/ts-config",
3
- "version": "3.2.0",
3
+ "version": "3.3.0-next.69b9eae.0",
4
4
  "description": "Shareable TypeScript configuration for the Sapphire Community",
5
5
  "author": "@sapphire",
6
6
  "license": "MIT",
7
7
  "main": "tsconfig.json",
8
8
  "typedocMain": "tests/index.ts",
9
9
  "exports": {
10
- "import": "./tsconfig.json",
11
- "require": "./tsconfig.json"
10
+ ".": {
11
+ "import": "./tsconfig.json",
12
+ "require": "./tsconfig.json"
13
+ },
14
+ "./with-decorators": {
15
+ "import": "./with-decorators.json",
16
+ "require": "./with-decorators.json"
17
+ },
18
+ "./extra-strict": {
19
+ "import": "./extra-strict.json",
20
+ "require": "./extra-strict.json"
21
+ },
22
+ "./extra-strict-with-decorators": {
23
+ "import": "./extra-strict-with-decorators.json",
24
+ "require": "./extra-strict-with-decorators.json"
25
+ }
12
26
  },
13
27
  "sideEffects": false,
14
28
  "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/ts-config",
15
29
  "scripts": {
16
30
  "test": "jest",
17
- "lint": "eslint tests scripts --ext mjs,ts --fix -c ../../.eslintrc",
18
- "prebuild": "yarn lint",
19
- "build": "tsc -b tests",
20
- "prepublishOnly": "node scripts/prepublish.mjs",
21
- "postpublish": "node scripts/postpublish.mjs"
31
+ "lint": "eslint tests --ext mjs,ts --fix -c ../../.eslintrc",
32
+ "build": "yarn lint && tsc -b tests"
22
33
  },
23
34
  "dependencies": {
24
35
  "tslib": "^2.3.1",
25
36
  "typescript": "^4.5.5"
26
37
  },
27
38
  "files": [
28
- "tsconfig.json"
39
+ "tsconfig.json",
40
+ "extra-strict-with-decorators.json",
41
+ "extra-strict.json",
42
+ "with-decorators.json"
29
43
  ],
30
44
  "engines": {
31
- "node": ">=v14.0.0",
32
- "npm": ">=7.0.0"
45
+ "node": ">=v16.0.0",
46
+ "npm": ">=8.0.0"
33
47
  },
34
48
  "repository": {
35
49
  "type": "git",
@@ -52,5 +66,5 @@
52
66
  "publishConfig": {
53
67
  "access": "public"
54
68
  },
55
- "gitHead": "ef79bbcf6ca4c4941cc60f32e211d0b138eef572"
69
+ "gitHead": "69b9eae27928df91adf5b35107106f9ac31da6b8"
56
70
  }