Skip to content

Commit ccd8fc3

Browse files
authored
feat: introduce @scaleway/tsconfig (#1119)
* feat: introduce @scaleway/tsconfig * fix: harden configuration * fix: update * fix: update
1 parent ba5fb68 commit ccd8fc3

File tree

7 files changed

+2371
-6360
lines changed

7 files changed

+2371
-6360
lines changed

.eslintrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
{
1717
"parser": "@babel/eslint-parser",
1818
"files": ["*.js", "*.mjs"],
19-
"extends": "./packages/eslint-config-react/index.js"
19+
"extends": "@scaleway/react/index.js"
2020
},
2121
{
2222
"files": ["*.ts", "*.tsx"],
2323
"parserOptions": {
2424
"project": ["tsconfig.json"]
2525
},
26-
"extends": ["./packages/eslint-config-react/typescript.js"]
26+
"extends": ["@scaleway/react/typescript.js"]
2727
}
2828
]
2929
}

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
"@commitlint/config-conventional": "17.3.0",
1818
"@rollup/plugin-babel": "6.0.3",
1919
"@rollup/plugin-node-resolve": "15.0.1",
20+
"@scaleway/tsconfig": "workspace:*",
21+
"@scaleway/eslint-config-react": "workspace:*",
2022
"@testing-library/jest-dom": "5.16.5",
2123
"@testing-library/react": "13.4.0",
2224
"@tsd/typescript": "4.9.3",
@@ -52,7 +54,7 @@
5254
"scripts": {
5355
"lint": "eslint --ext js,ts,tsx --cache .",
5456
"lint:fix": "pnpm run lint --fix",
55-
"build": "pnpm recursive --filter='!@scaleway/eslint-config-react' exec -- rollup -c ../../rollup.config.mjs",
57+
"build": "pnpm recursive --filter='!@scaleway/eslint-config-react' --filter='!@scaleway/tsconfig' exec -- rollup -c ../../rollup.config.mjs",
5658
"build:profile": "cross-env PROFILE=true pnpm run build",
5759
"commit": "npx git-cz -a",
5860
"format": "prettier --write '**/*.{ts,tsx,js,json,md,mdx}'",

packages/tsconfig/README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# `@scaleway/tsconfig`
2+
3+
## Install
4+
5+
```bash
6+
$ pnpm add --dev @scaleway/tsconfig
7+
```
8+
9+
## Usage
10+
11+
Add to your `.tsconfig.json`
12+
13+
```json
14+
{
15+
"extends": "@scaleway/tsconfig"
16+
}
17+
```

packages/tsconfig/package.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "@scaleway/tsconfig",
3+
"version": "1.0.0",
4+
"description": "Scaleway shared tsconfig",
5+
"keywords": [
6+
"typescript",
7+
"tsconfig",
8+
"shared typescript config"
9+
],
10+
"main": "tsconfig.json",
11+
"publishConfig": {
12+
"access": "public"
13+
},
14+
"repository": {
15+
"type": "git",
16+
"url": "https://github.com/scaleway/scaleway-lib",
17+
"directory": "packages/tsconfig"
18+
},
19+
"license": "MIT"
20+
}

packages/tsconfig/tsconfig.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"compilerOptions": {
3+
"esModuleInterop": true,
4+
"resolveJsonModule": true,
5+
"moduleResolution": "node",
6+
7+
"jsx": "react-jsx",
8+
9+
"strict": true,
10+
"allowUnreachableCode": false,
11+
"noImplicitAny": true,
12+
"noImplicitThis": true,
13+
"noImplicitOverride": true,
14+
"noImplicitReturns": true,
15+
"strictBindCallApply": true,
16+
"strictFunctionTypes": true,
17+
"strictNullChecks": true,
18+
"strictPropertyInitialization": true,
19+
"noFallthroughCasesInSwitch": true,
20+
"noUnusedLocals": true,
21+
"noUnusedParameters": true,
22+
"useUnknownInCatchVariables": true,
23+
"noUncheckedIndexedAccess": true,
24+
"noPropertyAccessFromIndexSignature": true
25+
}
26+
}

0 commit comments

Comments
 (0)