phetsims / wave-interference

"Wave Interference" is an educational simulation in HTML5, by PhET Interactive Simulations.
MIT License
18 stars 5 forks source link

Change how lint rules are overridden in package.json #531

Closed pixelzoom closed 1 year ago

pixelzoom commented 1 year ago

@samreid you may want to make this change in package.json. It's the override syntax used by all repos except wave-interference. Search for "rules" in all package.json to confirm.

Subject: [PATCH] use simpler syntax for overriding eslint rules, https://github.com/phetsims/chipper/issues/1380
---
Index: package.json
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/package.json b/package.json
--- a/package.json  (revision 3927a11f9d14c0432934e412b0fd3556164dba93)
+++ b/package.json  (date 1676746313154)
@@ -36,16 +36,9 @@
     "globals": {
       "FFT": "readonly"
     },
-    "overrides": [
-      {
-        "files": [
-          "**/*.ts"
-        ],
-        "rules": {
-          "@typescript-eslint/explicit-module-boundary-types": "off",
-          "bad-typescript-text": "off"
-        }
-      }
-    ]
+    "rules": {
+      "@typescript-eslint/explicit-module-boundary-types": "off",
+      "bad-typescript-text": "off"
+    }
   }
 }
\ No newline at end of file
samreid commented 1 year ago

Thanks, I confirmed the patch is good, and I applied it. Closing.

pixelzoom commented 1 year ago

In https://github.com/phetsims/chipper/issues/1380#issuecomment-1439113249, @zepumph recommended putting TypeScript rules in eslintConfig.overrides.rules, for performance reasons. So I reverted what was done here. @samreid FYI.