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

Create browser-and-node config #418

Closed
zepumph opened this issue Nov 26, 2024 · 7 comments
Closed

Create browser-and-node config #418

zepumph opened this issue Nov 26, 2024 · 7 comments

Comments

@zepumph
Copy link
Member

zepumph commented Nov 26, 2024

From phetsims/chipper#1526 (comment), we have a collection of es modules that we are using in both sims and Node code:

SimVersion
affirm()
phetioCompareAPIs

I'm creating a side issue from phetsims/chipper#1526 (comment). I also want to put this on hold until we complete phetsims/chipper#1483

@zepumph zepumph self-assigned this Nov 26, 2024
@zepumph
Copy link
Member Author

zepumph commented Nov 26, 2024

I was able to confirm that this is what the browser-and-node tsconfig file should be (none of the browser-specific or node-specific config entries should be combined).

{
  "extends": "./tsconfig-core.json",
  "include": [
    "../js/browser-and-node/**/*"
  ]
}

zepumph added a commit to phetsims/quake that referenced this issue Dec 2, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Dec 2, 2024
zepumph added a commit to phetsims/kite that referenced this issue Dec 2, 2024
zepumph added a commit that referenced this issue Dec 2, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Dec 2, 2024
zepumph added a commit to phetsims/dot that referenced this issue Dec 2, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Dec 2, 2024
@zepumph
Copy link
Member Author

zepumph commented Dec 2, 2024

I believe this is complete, but I'll come back once we complete phetsims/chipper#1483.

@zepumph
Copy link
Member Author

zepumph commented Dec 2, 2024

Ok. I don't think there is anything else here. I'd like to check in with @samreid to see what else we may need to do for this one.

  • Move repo/test/ to repo/js/test/
  • Move SimVersion to browser-and-node/

@zepumph
Copy link
Member Author

zepumph commented Dec 2, 2024

I'm a liar! We got the tsconfig stuff working well, but we still need to work out lint. For example. We want to make sure that assert isn't an available global (I think that works), but furthermore, we probably want to adapt a system that says "Take all the node rules AND the browser rules", instead of leaving both of them out.

  • Add eslint config to browser-and-node files.

@samreid
Copy link
Member

samreid commented Dec 3, 2024

@zepumph and I reviewed and agreed we need a browser-and-node.eslint.config.mjs in perennial-alias/eslint/config which extends root.eslint.config.mjs and adds bad-sim-text: error and bad-phet-library-text: error. Then we can extend this new config everywhere we have a browser-and-node/ directory.

zepumph added a commit to phetsims/chipper that referenced this issue Dec 3, 2024
@zepumph
Copy link
Member Author

zepumph commented Dec 3, 2024

I think this is complete. @samreid can you think of anything else here? Feel free to close.

@zepumph zepumph closed this as completed Dec 3, 2024
@zepumph zepumph assigned samreid and unassigned zepumph Dec 3, 2024
@zepumph zepumph reopened this Dec 3, 2024
@samreid
Copy link
Member

samreid commented Dec 3, 2024

Really great, nice work. Closing.

@samreid samreid closed this as completed Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants