Integrate tsec into the linting process (#33746)
* Integrate tsec into the linting process * Update tsec-exemptions.json
This commit is contained in:
parent
ae2d901eed
commit
ce4923c659
8 changed files with 45 additions and 3 deletions
|
@ -163,6 +163,7 @@
|
||||||
"tailwindcss": "1.1.3",
|
"tailwindcss": "1.1.3",
|
||||||
"taskr": "1.1.0",
|
"taskr": "1.1.0",
|
||||||
"tree-kill": "1.2.2",
|
"tree-kill": "1.2.2",
|
||||||
|
"tsec": "0.2.1",
|
||||||
"turbo": "1.0.28",
|
"turbo": "1.0.28",
|
||||||
"typescript": "4.4.3",
|
"typescript": "4.4.3",
|
||||||
"wait-port": "0.2.2",
|
"wait-port": "0.2.2",
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
"release": "taskr release",
|
"release": "taskr release",
|
||||||
"prepublish": "npm run release && yarn types",
|
"prepublish": "npm run release && yarn types",
|
||||||
"types": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
|
"types": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
|
||||||
"typescript": "tsc --noEmit --declaration",
|
"typescript": "tsec --noEmit",
|
||||||
"ncc-compiled": "ncc cache clean && taskr ncc"
|
"ncc-compiled": "ncc cache clean && taskr ncc"
|
||||||
},
|
},
|
||||||
"taskr": {
|
"taskr": {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"extends": "../../tsconfig-tsec.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepublish": "tsc -d -p tsconfig.json",
|
"prepublish": "tsc -d -p tsconfig.json",
|
||||||
"dev": "tsc -d -w -p tsconfig.json"
|
"dev": "tsc -d -w -p tsconfig.json",
|
||||||
|
"typescript": "tsec --noEmit -p tsconfig.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "7.12.11",
|
"@babel/code-frame": "7.12.11",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"extends": "../../tsconfig-tsec.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|
10
tsconfig-tsec.json
Normal file
10
tsconfig-tsec.json
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "tsec",
|
||||||
|
"exemptionConfig": "./tsec-exemptions.json"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
20
tsec-exemptions.json
Normal file
20
tsec-exemptions.json
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"ban-element-innerhtml-assignments": [
|
||||||
|
"packages/next/client/head-manager.ts",
|
||||||
|
"packages/next/client/script.tsx",
|
||||||
|
"packages/react-dev-overlay/src/internal/components/Overlay/maintain--tab-focus.ts"
|
||||||
|
],
|
||||||
|
"ban-element-setattribute": [
|
||||||
|
"packages/next/client/head-manager.ts",
|
||||||
|
"packages/next/client/script.tsx"
|
||||||
|
],
|
||||||
|
"ban-script-content-assignments": ["packages/next/client/script.tsx"],
|
||||||
|
"ban-script-src-assignments": [
|
||||||
|
"packages/next/client/route-loader.ts",
|
||||||
|
"packages/next/client/script.tsx"
|
||||||
|
],
|
||||||
|
"ban-window-stringfunctiondef": [
|
||||||
|
"packages/next/lib/recursive-delete.ts",
|
||||||
|
"packages/next/client/dev/fouc.ts"
|
||||||
|
]
|
||||||
|
}
|
10
yarn.lock
10
yarn.lock
|
@ -14603,7 +14603,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
|
||||||
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
|
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
|
||||||
integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=
|
integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=
|
||||||
|
|
||||||
minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4, minimatch@~3.0.2:
|
minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2:
|
||||||
version "3.0.4"
|
version "3.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||||
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
|
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
|
||||||
|
@ -20142,6 +20142,14 @@ tsconfig-paths@^3.9.0:
|
||||||
minimist "^1.2.0"
|
minimist "^1.2.0"
|
||||||
strip-bom "^3.0.0"
|
strip-bom "^3.0.0"
|
||||||
|
|
||||||
|
tsec@0.2.1:
|
||||||
|
version "0.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/tsec/-/tsec-0.2.1.tgz#017423174b2be54f26da5cb7591dc7035996086b"
|
||||||
|
integrity sha512-RP9vhbRbRI9VH4CfOlQvo5W9HdfiPKq0gdiUOWI5oKmLaZKNFN8CsPwBfT5ySmhnKNwmmAS/BtY3WoTfABwwig==
|
||||||
|
dependencies:
|
||||||
|
glob "^7.1.1"
|
||||||
|
minimatch "^3.0.3"
|
||||||
|
|
||||||
tslib@1.11.1, tslib@^1.8.1, tslib@^1.9.0:
|
tslib@1.11.1, tslib@^1.8.1, tslib@^1.9.0:
|
||||||
version "1.11.1"
|
version "1.11.1"
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35"
|
||||||
|
|
Loading…
Reference in a new issue