Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add strict null checks warning #3064

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 deletions binary/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
"resolveJsonModule": true /* Enable importing .json files */,
"types": ["jest"]
"types": ["jest"],
"resolveJsonModule": true /* Enable importing .json files */
},
"include": ["src/**/*", "test/**/*"]
}
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
5 changes: 3 additions & 2 deletions core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"noEmitOnError": false,
"types": ["jest", "node"]
"types": ["jest", "node"],
"strictNullChecks": true,
"resolveJsonModule": true
},
"include": ["./**/*.ts", "./**/*.js", "./**/*.d.ts"],
"exclude": ["dist"]
Expand Down
25 changes: 0 additions & 25 deletions core/tsconfig.npm.json

This file was deleted.

5 changes: 3 additions & 2 deletions extensions/vscode/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
"rootDir": "../../",
"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,
"resolveJsonModule": true
},
"include": ["src/**/*", "../../core/**/*.ts", "../../core/**/*.d.ts"],
// core/test uses @types/jest, which conflicts with @types/mocha
Expand Down
7 changes: 3 additions & 4 deletions gui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"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,
"resolveJsonModule": true
},
"include": ["src", "../src/util/messenger.ts"],
"references": [{ "path": "./tsconfig.node.json" }]
Expand Down
Loading
Loading