@jupyter/eslint-plugin 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -230,6 +230,11 @@ const jupyterPluginActivationArgs = (0, create_rule_1.createRule)({
|
|
|
230
230
|
const tsNode = services?.esTreeNodeToTSNodeMap.get(paramNode);
|
|
231
231
|
if (tsNode) {
|
|
232
232
|
const type = checker.getTypeAtLocation(tsNode);
|
|
233
|
+
// Fall back to the syntactic check so `T | null` annotations are still
|
|
234
|
+
// accepted even when T cannot be resolved. (happens when package is unbuilt)
|
|
235
|
+
if (type.flags & ts.TypeFlags.Any) {
|
|
236
|
+
return (0, plugin_utils_1.isNullableAnnotation)(paramNode);
|
|
237
|
+
}
|
|
233
238
|
if (type.isUnion()) {
|
|
234
239
|
return type.types.some(t => !!(t.flags & ts.TypeFlags.Null) ||
|
|
235
240
|
!!(t.flags & ts.TypeFlags.Undefined));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter/eslint-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "ESLint plugin for Jupyter core and extensions with early error catching and best practices enforcement",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -59,14 +59,14 @@
|
|
|
59
59
|
"eslint": "^9.39.2",
|
|
60
60
|
"eslint-plugin": "^1.0.1",
|
|
61
61
|
"jest": "^30.2.0",
|
|
62
|
-
"jsonc-eslint-parser": "^2.4.2",
|
|
63
62
|
"pre-commit": "^1.2.2",
|
|
64
63
|
"prettier": "^3.8.1",
|
|
65
64
|
"ts-jest": "^29.4.6",
|
|
66
65
|
"typescript": "^5.9.3"
|
|
67
66
|
},
|
|
68
67
|
"dependencies": {
|
|
69
|
-
"@typescript-eslint/utils": "^8.54.0"
|
|
68
|
+
"@typescript-eslint/utils": "^8.54.0",
|
|
69
|
+
"jsonc-eslint-parser": "^2.4.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"eslint": ">=9.0.0"
|