Skip to content

Commit fe80bc1

Browse files
committed
Add tsconfig and packages 📦
1 parent d837a27 commit fe80bc1

File tree

3 files changed

+95
-3
lines changed

3 files changed

+95
-3
lines changed

Diff for: package-lock.json

+57-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"@testing-library/dom": "7.2.2",
5353
"@testing-library/jest-dom": "5.5.0",
5454
"@testing-library/react": "9.4.1",
55+
"@types/lodash": "^4.14.175",
5556
"@woocommerce/components": "4.0.0",
5657
"@wordpress/babel-plugin-import-jsx-pragma": "2.5.0",
5758
"@wordpress/block-editor": "5.2.0",
@@ -145,10 +146,12 @@
145146
"svg-inline-loader": "0.8.0",
146147
"terser-webpack-plugin": "2.3.4",
147148
"tinycolor2": "^1.4.2",
149+
"typescript": "^4.4.4",
148150
"webpack": "4.41.5",
149151
"webpack-cli": "3.3.10",
150152
"webpack-fix-style-only-entries": "0.4.0",
151-
"webpackbar": "4.0.0"
153+
"webpackbar": "4.0.0",
154+
"wp-types": "^2.12.0"
152155
},
153156
"scripts": {
154157
"build": "npm-run-all build:*",

Diff for: tsconfig.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"compilerOptions": {
3+
"allowUnreachableCode": false,
4+
"allowUnusedLabels": false,
5+
"declaration": true,
6+
"forceConsistentCasingInFileNames": true,
7+
"lib": ["dom", "ESNext"],
8+
"module": "esnext",
9+
"noEmitOnError": true,
10+
"noFallthroughCasesInSwitch": true,
11+
"noImplicitReturns": true,
12+
"pretty": true,
13+
"sourceMap": true,
14+
"strict": true,
15+
"target": "esnext",
16+
// From gutenberg.
17+
"jsx": "preserve",
18+
"moduleResolution": "node",
19+
"allowJs": true,
20+
"checkJs": true,
21+
"noUnusedLocals": true,
22+
"noUnusedParameters": true,
23+
"typeRoots": [ "./node_modules/@types" ],
24+
// Custom
25+
"noEmit": true,
26+
},
27+
"include": [
28+
"theme/assets/src/**/*",
29+
"plugin/assets/src/**/*"
30+
],
31+
"exclude": [
32+
"node_modules"
33+
]
34+
}

0 commit comments

Comments
 (0)