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

TS: Export TextGeometryParameters #20467

Merged
merged 4 commits into from
Oct 9, 2020
Merged

TS: Export TextGeometryParameters #20467

merged 4 commits into from
Oct 9, 2020

Conversation

Methuselah96
Copy link
Contributor

@Methuselah96 Methuselah96 commented Oct 6, 2020

Description

#20437 is helpful in adding missing exports, but it removed exporting some helpful interfaces like TextGeometryParamters. It's a much better experience to be able to do:

import { Geometry, Material, MeshBasicMaterial, TextGeometryParameters } from 'three';

rather than:

import { Geometry, Material, MeshBasicMaterial } from 'three';
import { TextGeometryParameters } from 'three/src/geometries/TextGeometry';

mrdoob#20437 is helpful in adding missing exports, but it removed exporting some helpful interfaces like `TextGeometryParamters`. It's a much better experience to be able to do:
```
import { Geometry, Material, MeshBasicMaterial, TextGeometryParameters } from 'three';
```
rather than:
```
import { Geometry, Material, MeshBasicMaterial } from 'three';
import { TextGeometryParameters } from 'three/src/geometries/TextGeometry';
```
Copy link
Collaborator

@Mugen87 Mugen87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR seems to introduce multiple linter warnings.

@Methuselah96
Copy link
Contributor Author

@Mugen87 Thanks for noticing. Any reason not to make the ESLint config have those rules be errors instead of warnings so that the CI will fail?

@DefinitelyMaybe
Copy link
Contributor

... to make the ESLint config ...

@mrdoob has a preference for less configs last time I checked.

From your knowledge, can you turn the package.json eslint rules from warnings to errors?

@Methuselah96
Copy link
Contributor Author

@DefinitelyMaybe Yeah, just change the 1's to 2's. Should I make a PR?

@DefinitelyMaybe
Copy link
Contributor

Give it a go. My brains trying to think about un-intended consequences (like what I came up against when I added the "lint-fix" rule within the package.json file). coming up blank atm.

Methuselah96 added a commit to Methuselah96/three.js that referenced this pull request Oct 8, 2020
This will `@typescript-eslint/no-unused-vars` an error instead of a warning. It's helpful for the rule to error so that the build will fail so that you don't have to check the logs to see if there was a warning. See mrdoob#20467 for context.
@mrdoob mrdoob added this to the r122 milestone Oct 9, 2020
@mrdoob mrdoob changed the title Include TypeScript type exports when exporting geometries TS: Export TextGeometryParameters Oct 9, 2020
@mrdoob mrdoob merged commit 6267d4f into mrdoob:dev Oct 9, 2020
@mrdoob
Copy link
Owner

mrdoob commented Oct 9, 2020

Thanks!

@Methuselah96 Methuselah96 deleted the patch-1 branch October 9, 2020 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants