-
Notifications
You must be signed in to change notification settings - Fork 14
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
require-statement-match problems #1498
Comments
I've revised the rule to require a .js suffix for relative paths (note do not put a .js suffix for npm requires like It has better name comparison with camel casing. After these changes,
I also tested I'll push what I have now, then we can search for usages of the disable-line to see where we may want to rename more things. I'm also OK to separate this into another rule if that would be clearer for users or more maintainable. Right now the one rule is checking multiple aspects. |
…lint-disable directives, rename require variables, see phetsims/chipper#1498
…lint-disable directives, rename require variables, see phetsims/chipper#1498
…lint-disable directives, rename require variables, see phetsims/chipper#1498
…lint-disable directives, rename require variables, see phetsims/chipper#1498
…lint-disable directives, rename require variables, see #1498
…lint-disable directives, rename require variables, see phetsims/chipper#1498
…lint-disable directives, rename require variables, see phetsims/chipper#1498
…lint-disable directives, rename require variables, see phetsims/chipper#1498
…lint-disable directives, rename require variables, see phetsims/chipper#1498
Changes mostly pushed. Topics to review with @zepumph
|
I'm getting blocked on this because this was incorrectly fixed:
Changing now. |
Uh oh, I did not correctly address the case of importing an npm module from a relative path. Thanks for catching it and sorry for the trouble. It looks like you got it covered, but let me know if there more to do here. |
Subject: [PATCH] add authors, https://github.com/phetsims/chipper/issues/1502
---
Index: doc/generate-bibliography.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/doc/generate-bibliography.js b/doc/generate-bibliography.js
--- a/doc/generate-bibliography.js (revision b34ba1617e253f15588841bdd1b285bc10b21dd4)
+++ b/doc/generate-bibliography.js (date 1730747247217)
@@ -5,12 +5,13 @@
// Generates the bibliography for the Alpenglow documentation
// Run with `node js/generate-bibliography.js`
-const Cite = require( 'citation-js' ); // eslint-disable-line phet/require-statement-match
+const x;
+const citationJs = require( 'cifdsatation-js' );
const fs = require( 'fs' );
( async () => {
const links = {};
- const cite = new Cite();
+ const cite = new citationJs();
await cite.add( `@inproceedings{Soerjadi1968OnTC,
title={On the Computation of the Moments of a Polygon, with some Applications}, I'm going to stop my review now here just in case it's a problem on my end we need to fix. |
doc/ is ignored in root.eslint.config.mjs. After this patch, the error above is correctly identified: Subject: [PATCH] add authors, https://github.com/phetsims/chipper/issues/1502
---
Index: js/eslint/root.eslint.config.mjs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/eslint/root.eslint.config.mjs b/js/eslint/root.eslint.config.mjs
--- a/js/eslint/root.eslint.config.mjs (revision 1f5dc79e3cb523e462cc9b55402c1f87cf0ee900)
+++ b/js/eslint/root.eslint.config.mjs (date 1730867056960)
@@ -33,7 +33,6 @@
'templates/',
'js/*Strings.ts',
'images/',
- 'doc/',
'sounds/',
'mipmaps/',
'assets/',
Our doc/ directories often have *.md files. alpenglow is an outlier to have so much *.js there. I wouldn't be surprised to see some *.html files in doc/ (and we do have a plugin to lint js appearing in html files). How should we proceed? |
Excellent! I removed that ignore from root for local testing and only saw trouble in alpenglow, so a repo-specific change seemed preferable.
Let's pick that up in phetsims/perennial#407 Ready to close. |
I believe we need to revert the part requiring a |
I believe this is enough to unblock phetsims/perennial#403. I will report back if more is needed here. |
Although it is fine that this occurred, we will want to proceed with phetsims/perennial#410 instead. Re-closing and likely to revert much of the above as we convert require statements to imports. |
…/chipper#1498" This reverts commit d9cdb79.
I updated the code style for Webstorm to always import require statements with the .js suffix. We should change that since this revert. |
This lint rule could use some work.
The text was updated successfully, but these errors were encountered: