@omnific/tsconfig 0.0.1 → 0.0.3

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
@@ -4,20 +4,22 @@ Shared TypeScript configuration presets for Omnific packages.
4
4
 
5
5
  ## Presets
6
6
 
7
- - `@omnific/tsconfig/browser.json`
8
7
  - `@omnific/tsconfig/node.json`
8
+ - `@omnific/tsconfig/web.json`
9
+ - `@omnific/tsconfig/bundler.json`
9
10
 
10
11
  ## Notes
11
12
 
12
- - `@omnific/tsconfig/browser.json` does not require extra global type packages.
13
13
  - Projects that extend `@omnific/tsconfig/node.json` should install `@types/node` in the consuming workspace.
14
+ - `@omnific/tsconfig/web.json` provides Web platform globals without static asset module declarations.
15
+ - `@omnific/tsconfig/bundler.json` adds ambient declarations for static asset imports such as `*.css` and `*.svg`.
14
16
  - If a preset references additional entries in `compilerOptions.types`, the consuming project is responsible for providing those packages.
15
17
 
16
18
  ## Example
17
19
 
18
20
  ```json
19
21
  {
20
- "extends": "@omnific/tsconfig/browser.json",
22
+ "extends": "@omnific/tsconfig/web.json",
21
23
  "include": ["./**/*.ts"],
22
24
  "exclude": ["./dist"]
23
25
  }
package/base.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "compilerOptions": {
4
- "target": "ES2022",
4
+ "target": "ESNext",
5
5
  "module": "ESNext",
6
- "moduleDetection": "force",
6
+ "moduleResolution": "Bundler",
7
7
  "strict": true,
8
8
  "declaration": true,
9
9
  "noEmit": true,
10
10
  "isolatedDeclarations": false,
11
11
  "isolatedModules": true,
12
12
  "verbatimModuleSyntax": true,
13
- "exactOptionalPropertyTypes": true,
14
13
  "noUncheckedIndexedAccess": true,
15
14
  "noImplicitOverride": true,
16
- "noImplicitReturns": true,
17
15
  "esModuleInterop": true,
18
16
  "allowSyntheticDefaultImports": true,
19
17
  "forceConsistentCasingInFileNames": true,
20
18
  "skipLibCheck": true,
21
19
  "resolveJsonModule": true,
22
- "noFallthroughCasesInSwitch": true
20
+ "noFallthroughCasesInSwitch": true,
21
+ "exactOptionalPropertyTypes": false,
22
+ "noImplicitReturns": false
23
23
  }
24
24
  }
package/bundler.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ declare module '*.png';
2
+ declare module '*.svg';
3
+ declare module '*.jpeg';
4
+
5
+ declare module '*.scss' {
6
+ const content: Record<string, string>;
7
+ export = content;
8
+ }
9
+
10
+ declare module '*.css' {
11
+ const content: Record<string, string>;
12
+ export = content;
13
+ }
14
+
15
+ declare module '*.less' {
16
+ const content: Record<string, string>;
17
+ export = content;
18
+ }
package/bundler.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./web.json",
4
+ "files": ["./bundler.d.ts"]
5
+ }
package/node.json CHANGED
@@ -2,9 +2,8 @@
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "extends": "./base.json",
4
4
  "compilerOptions": {
5
- "lib": ["ES2022"],
5
+ "lib": ["ESNext"],
6
6
  "module": "ESNext",
7
- "moduleResolution": "Bundler",
8
7
  "types": ["node"]
9
8
  }
10
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnific/tsconfig",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Shared TypeScript configuration presets for Omnific packages",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,13 +19,16 @@
19
19
  },
20
20
  "files": [
21
21
  "base.json",
22
- "browser.json",
22
+ "bundler.d.ts",
23
+ "bundler.json",
23
24
  "node.json",
25
+ "web.json",
24
26
  "README.md"
25
27
  ],
26
28
  "exports": {
27
- "./browser.json": "./browser.json",
28
- "./node.json": "./node.json"
29
+ "./bundler.json": "./bundler.json",
30
+ "./node.json": "./node.json",
31
+ "./web.json": "./web.json"
29
32
  },
30
33
  "peerDependencies": {
31
34
  "typescript": ">=6.0.0"
@@ -2,7 +2,6 @@
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "extends": "./base.json",
4
4
  "compilerOptions": {
5
- "lib": ["DOM", "ES2022"],
6
- "moduleResolution": "Bundler"
5
+ "lib": ["DOM", "ESNext"]
7
6
  }
8
7
  }