Skip to content

Commit

Permalink
add strict null checks warning, remove unused tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
RomneyDa committed Nov 25, 2024
1 parent 093cddb commit a9c0dec
Show file tree
Hide file tree
Showing 8 changed files with 434 additions and 38 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "import"],
"plugins": ["@typescript-eslint", "import", "strict-null-checks"],
"rules": {
"strict-null-checks/all": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
Expand Down
1 change: 0 additions & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"scripts": {
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --runInBand",
"tsc:check": "tsc -p ./ --noEmit",
"build:npm": "tsc -p ./tsconfig.npm.json",
"lint": "eslint . --ext ts",
"lint:fix": "eslint . --ext ts --fix"
},
Expand Down
3 changes: 2 additions & 1 deletion core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"noEmit": true,
"jsx": "react-jsx",
"noEmitOnError": false,
"types": ["jest", "node"]
"types": ["jest", "node"],
"strictNullChecks": true
},
"include": ["./**/*.ts", "./**/*.js", "./**/*.d.ts"],
"exclude": ["dist"]
Expand Down
25 changes: 0 additions & 25 deletions core/tsconfig.npm.json

This file was deleted.

3 changes: 2 additions & 1 deletion extensions/vscode/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"strict": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"types": ["mocha"] // This solves conflict between jest and mocha: https://github.com/cypress-io/cypress/issues/7435#issuecomment-631695007
"types": ["mocha"], // This solves conflict between jest and mocha: https://github.com/cypress-io/cypress/issues/7435#issuecomment-631695007
"strictNullChecks": true
},
"include": ["src/**/*", "../../core/**/*.ts", "../../core/**/*.d.ts"],
// core/test uses @types/jest, which conflicts with @types/mocha
Expand Down
5 changes: 2 additions & 3 deletions gui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
"noEmit": true,
"jsx": "react-jsx",
"noEmitOnError": false,
"types": ["vitest/globals"]
// Disabled for now since it's causing too many errors
// "strictNullChecks": true
"types": ["vitest/globals"],
"strictNullChecks": true
},
"include": ["src", "../src/util/messenger.ts"],
"references": [{ "path": "./tsconfig.node.json" }]
Expand Down
Loading

0 comments on commit a9c0dec

Please sign in to comment.