@tammergard/tsconfig 1.0.0 → 2.1.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.
Files changed (3) hide show
  1. package/README.md +22 -9
  2. package/package.json +43 -46
  3. package/tsconfig.json +25 -24
package/README.md CHANGED
@@ -1,26 +1,39 @@
1
- # @tammergard/prettier-config
1
+ # @tammergard/tsconfig
2
2
 
3
- A sharable Prettier config with personal preferences.
3
+ A sharable TSconfig with personal preferences.
4
4
 
5
5
  ## Installation
6
6
 
7
- Install this Prettier config together with its peer dependencies:
7
+ Install this package as a dev dependency.
8
8
 
9
9
  ```bash
10
10
  # npm
11
- npm install @tammergard/prettier-config prettier --save-dev
11
+ npm install @tammergard/tsconfig --save-dev
12
12
 
13
13
  # yarn
14
- yarn add @tammergard/prettier-config prettier --dev
14
+ yarn add @tammergard/tsconfig --dev
15
15
  ```
16
16
 
17
17
  ## Usage
18
18
 
19
- Add the config to your `.prettierrc.js` file:
19
+ Register the config in your `tsconfig.json`:
20
20
 
21
- ```js
22
- module.exports = {
23
- ...require("@tammergard/prettier-config"),
21
+ ```json
22
+ {
23
+ "extends": "@tammergard/tsconfig/tsconfig.json"
24
+ }
25
+ ```
26
+
27
+ You can add additional options in your project, which will override the option
28
+ in `@tammergard/tsconfig` if it's defined there.
29
+
30
+ ```json
31
+ {
32
+ "extends": "@tammergard/tsconfig/tsconfig.json",
33
+ "compilerOptions": {
34
+ "strict": false,
35
+ "baseUrl": "src"
36
+ }
24
37
  }
25
38
  ```
26
39
 
package/package.json CHANGED
@@ -1,48 +1,45 @@
1
1
  {
2
- "name": "@tammergard/tsconfig",
3
- "version": "1.0.0",
4
- "description": "A sharable TSconfig with personal preferences",
5
- "scripts": {
6
- "lint": "eslint .",
7
- "prettier": "prettier --write .",
8
- "review": "yarn install --frozen-lockfile && yarn lint && yarn prettier"
9
- },
10
- "devDependencies": {
11
- "@tammergard/eslint-config-base": "2.2.0",
12
- "@tammergard/prettier-config": "1.4.0",
13
- "@tammergard/semantic-release-config-npm": "1.0.0",
14
- "eslint": "8.7.0",
15
- "eslint-config-airbnb-base": "15.0.0",
16
- "eslint-config-prettier": "8.3.0",
17
- "eslint-plugin-import": "2.25.4",
18
- "eslint-plugin-jest": "25.7.0",
19
- "eslint-plugin-prettier": "4.0.0",
20
- "prettier": "2.5.1",
21
- "semantic-release": "19.0.2"
22
- },
23
- "peerDependencies": {
24
- "typescript": "^4.4.0"
25
- },
26
- "main": "tsconfig.json",
27
- "files": [
28
- "tsconfig.json"
29
- ],
30
- "publishConfig": {
31
- "access": "public"
32
- },
33
- "repository": {
34
- "type": "git",
35
- "url": "git+https://github.com/filiptammergard/tsconfig.git"
36
- },
37
- "keywords": [
38
- "tsconfig",
39
- "typescript",
40
- "config"
41
- ],
42
- "author": "Filip Tammergård <filip+npm@tammergard.se> (https://tammergard.se/)",
43
- "license": "MIT",
44
- "bugs": {
45
- "url": "https://github.com/filiptammergard/tsconfig/issues"
46
- },
47
- "homepage": "https://github.com/filiptammergard/tsconfig#readme"
2
+ "name": "@tammergard/tsconfig",
3
+ "version": "2.1.0",
4
+ "description": "A sharable TSconfig with personal preferences",
5
+ "scripts": {
6
+ "format": "prettier --write .",
7
+ "format-check": "prettier --check .",
8
+ "lint": "eslint .",
9
+ "release": "yarn changeset publish",
10
+ "review": "yarn install --frozen-lockfile && yarn format-check && yarn lint"
11
+ },
12
+ "devDependencies": {
13
+ "@changesets/cli": "2.26.1",
14
+ "@tammergard/eslint-config-base": "3.2.0",
15
+ "@tammergard/prettier-config": "2.0.0",
16
+ "@tammergard/semantic-release-config-npm": "1.2.0",
17
+ "eslint": "8.37.0",
18
+ "prettier": "2.8.7"
19
+ },
20
+ "peerDependencies": {
21
+ "typescript": "5"
22
+ },
23
+ "main": "tsconfig.json",
24
+ "files": [
25
+ "tsconfig.json"
26
+ ],
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/filiptammergard/tsconfig.git"
33
+ },
34
+ "keywords": [
35
+ "tsconfig",
36
+ "typescript",
37
+ "config"
38
+ ],
39
+ "author": "Filip Tammergård <filip+npm@tammergard.se> (https://tammergard.se/)",
40
+ "license": "MIT",
41
+ "bugs": {
42
+ "url": "https://github.com/filiptammergard/tsconfig/issues"
43
+ },
44
+ "homepage": "https://github.com/filiptammergard/tsconfig#readme"
48
45
  }
package/tsconfig.json CHANGED
@@ -1,32 +1,33 @@
1
1
  {
2
- "compilerOptions": {
3
- // type checking
4
- "exactOptionalPropertyTypes": true,
5
- "noFallthroughCasesInSwitch": true,
6
- "strict": true,
2
+ "compilerOptions": {
3
+ // type checking
4
+ "exactOptionalPropertyTypes": true,
5
+ "noFallthroughCasesInSwitch": true,
6
+ "noUncheckedIndexedAccess": true,
7
+ "strict": true,
7
8
 
8
- // modules
9
- "module": "es2020",
10
- "moduleResolution": "node",
11
- "resolveJsonModule": true,
9
+ // modules
10
+ "module": "es2020",
11
+ "moduleResolution": "bundler",
12
+ "resolveJsonModule": true,
12
13
 
13
- // emit
14
- "noEmit": true,
14
+ // emit
15
+ "noEmit": true,
15
16
 
16
- // javascript support
17
- "allowJs": false,
17
+ // javascript support
18
+ "allowJs": false,
18
19
 
19
- // interop constraints
20
- "esModuleInterop": true,
21
- "forceConsistentCasingInFileNames": true,
22
- "isolatedModules": true,
20
+ // interop constraints
21
+ "esModuleInterop": true,
22
+ "forceConsistentCasingInFileNames": true,
23
+ "isolatedModules": true,
23
24
 
24
- // landguage and environment
25
- "jsx": "react-jsx",
26
- "lib": ["es2021", "dom", "dom.iterable"],
27
- "target": "es2021",
25
+ // landguage and environment
26
+ "jsx": "react-jsx",
27
+ "lib": ["es2021", "dom", "dom.iterable"],
28
+ "target": "es2021",
28
29
 
29
- // completeness
30
- "skipLibCheck": true
31
- }
30
+ // completeness
31
+ "skipLibCheck": true
32
+ }
32
33
  }