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

Image import identifier should match image file name. #86

Closed
pixelzoom opened this issue Dec 14, 2021 · 1 comment
Closed

Image import identifier should match image file name. #86

pixelzoom opened this issue Dec 14, 2021 · 1 comment
Assignees

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Dec 14, 2021

Related to #84.

The dev team recently agreed (in phetsims/chipper#1166) to make the import identifer match the file name (minus its suffix). And there will (soon?) be a lint rule that enforces this for image files. That convention is not being followed for image imports in this sim.

For example, in NumberPlayGameScreen.js:

import gameScreenIconImage from '../../images/game_screen_icon_png.js';

gameScreenIconImage does not match game_screen_icon_png.

Two alternatives:

// rename the image file
import gameScreenIcon_png from '../../images/gameScreenIcon_png.js';

// rename the import identifier
import game_screen_icon_png from '../../images/game_screen_icon_png.js';
@chrisklus
Copy link
Contributor

Completed in phetsims/chipper#1177, closing.

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

3 participants