-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
code format collides with existing tslint rules #187
Comments
Could you provide an example of the expression before and after? |
@vsavkin I was able to get around the problem by adding these rules:
If I don't have these rules, my tslint will fail after npm run format. I have uploaded a repo here in case you want to see it -- just take out the three rules at the bottom of tslint.json: https://github.com/dereklin/nx-demo-jest/tree/try-tslint-config |
I am having some issues with the formatter too:
So I would like to be able to customize the formatting parameters. |
@dereklin I cannot reproduce the issue with the repo. @Springrbua you can customize prettier as follows: https://prettier.io/docs/en/configuration.html |
@vsavkin Anyways, I have created another repo where I have removed those rules. I have updated the libraries Here is the repo: https://github.com/dereklin/nx-demo-jest/tree/code-format-tslint-collision After npm run format, I run npm run lint. I get these errors:
|
@vsavkin thanks for your answer.
|
@dereklin the repo you linked doesn't seem to be in synced with the errors you pasted (there is no prerender.ts). Since you aren't using Npm5 or yarn, the packages you have installed locally are likely different from what I have locally. If you could reproduce the issue with a new project by creating it using create-nx-workspace and either npm5 or yarn, that would be great. Make sure to check in yarn.lock or package-lock.json. |
@Springrbua we are going to make the prettier setup more flexible. Instead of passing the single quote and print width, we will rely on .prettierrc. The if statement inlining cannot be customized though. |
Closing this issue. If the problem persists, please reopen it with a repro created using npm5 or yarn. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
I am using nx 0.6.7
I just gave a code formatting a try.
Before formatting, my linting was perfect.
After npm run format
I have tons of errors like:
How can I adjust the formatting rules to match my existing tslint rules?
The text was updated successfully, but these errors were encountered: