-
Notifications
You must be signed in to change notification settings - Fork 0
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
Set the ignorePath for prettier #952
Conversation
Prettier's node API does not read a `.prettierignore` file by default, which causes frolint to ignore that file. By simply adding a path to a `.prettierignore` file at the root of a project, prettier should be able to read it.
cb99e94
to
735db10
Compare
Use a temporary file to test the whole behavior of the prettier util, as a kind of an integration test.
735db10
to
920e2b3
Compare
} ;`; | ||
|
||
function createTestFile() { | ||
(writeFileSync || writeFile)(testFilename, baseContent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to use different APIs for different Node.js version. writeFileSync
is not available in v12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice work :D
The test file is awesome to easily check how the function works.
@tkeiyama Thanks 😄 |
Why
#949
What
By simply adding a path to a
.prettierignore
file at the root of a project, prettier should be able to read it.TODO