Skip to content

Commit e45317f

Browse files
committed
chore: Factoriser les configurations TSConfig.
1 parent 0db2e51 commit e45317f

5 files changed

+42
-32
lines changed

.tsconfig.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compilerOptions": {
3+
"module": "ESNext",
4+
"moduleResolution": "node",
5+
6+
"allowJs": true,
7+
8+
"esModuleInterop": true,
9+
10+
"target": "ESNext"
11+
},
12+
"include": [
13+
"**/*"
14+
],
15+
"exclude": [
16+
".git/",
17+
"coverage/",
18+
"jsdocs/",
19+
"node_modules/",
20+
"src/polyfill/lib/",
21+
"**/*.swp"
22+
]
23+
}

.tsconfig_jsdocs.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./.tsconfig.json",
3+
"compilerOptions": {
4+
"noEmit": true
5+
},
6+
"include": [
7+
"src/"
8+
]
9+
}

tsconfig.json .tsconfig_lint.json

+8-16
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
{
2+
"extends": "./.tsconfig.json",
23
"compilerOptions": {
3-
"allowJs": true,
4-
"checkJs": true,
5-
"module": "ESNext",
6-
"noEmit": true,
7-
"target": "ESNext",
8-
9-
"strict": true,
10-
11-
"esModuleInterop": true,
12-
"moduleResolution": "node",
13-
4+
"allowUnreachableCode": false,
145
"noFallthroughCasesInSwitch": true,
156
"noImplicitReturns": true,
167
"noUnusedLocals": true,
178
"noUnusedParameters": true,
9+
"strict": true,
10+
11+
"noEmit": true,
12+
13+
"checkJs": true,
1814

19-
"allowUnreachableCode": false,
2015
"noStrictGenericChecks": true
21-
},
22-
"include": [
23-
".metalint/", ".script/", "src/", "test/"
24-
]
16+
}
2517
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
"scripts": {
2727
"postinstall": "node .script/sync.js",
2828
"lint": "metalint",
29-
"lint:types": "tsc",
29+
"lint:types": "tsc --project .tsconfig_lint.json",
3030
"test": "npm run test:unit && npm run test:integration",
3131
"test:unit": "c8 mocha test/unit/",
3232
"test:integration": "mocha -t 0 test/integration/",
3333
"coverage:html": "c8 report --reporter html",
3434
"coverage:lcov": "c8 report --reporter lcovonly",
35-
"jsdocs": "typedoc --tsconfig tsconfig_typedoc.json --out jsdocs/ src/",
35+
"jsdocs": "typedoc --tsconfig .tsconfig_jsdocs.json --out jsdocs/ src/",
3636
"start:chromium": "web-ext run -t chromium -s src/",
3737
"start:firefox": "web-ext run -t firefox-desktop -s src/",
3838
"build": "node .script/build.js",

tsconfig_typedoc.json

-14
This file was deleted.

0 commit comments

Comments
 (0)