Giter Site home page Giter Site logo

Comments (5)

aleclarson avatar aleclarson commented on May 22, 2024

Can you reproduce with prettier-tslint in command line?

What is happening instead?

from prettier-tslint.

AmedMoore avatar AmedMoore commented on May 22, 2024

Hi, @aleclarson I'm facing the same issue here, this is the rule in tslint.json

"max-line-length": [
            true,
            {
                "limit": 100,
                "ignore-pattern": "^import |^export {(.*?)}"
            }
        ]

using npm "pretty": "prettier-tslint fix **/*.ts" the rule seems to be ignored and lines wrap at 80 columns, but for me adding .prettierrc file with "printWidth": 100 fixed the issue.

@CyberMew please try to rename .prettierrc.json to .prettierrc and check if it's going to solve the problem.

from prettier-tslint.

aleclarson avatar aleclarson commented on May 22, 2024

@AhmedMKamal That's not the same. You're looking for #25.

@CyberMew is claiming that neither Prettier's printWidth nor TSLint's max-line-length are being respected, even when they're equal.

from prettier-tslint.

CyberMew avatar CyberMew commented on May 22, 2024

Can you reproduce with prettier-tslint in command line?

What is happening instead?

Sorry for the late reply. Nothing happens to the file when I run the command, no output either. I wonder whose issue this belongs to.

mac:react-native username$ npx prettier-tslint fix ./src/Components/SelectionRow.ts 
./src/Components/SelectionRow.ts

There are several situations where it will just flatout exceed 80 characters even when I have formatted it manually nicely. You can also reproduce this easily by having a long line like this:

import { SelectionRow as Template } from "Some/Very/Long/Name/That/Just/Exceeds80/SelectionRow";

I think by right it should format it to:

import {
  SelectionRow as Template
 } from "Some/Very/Long/Name/That/Just/Exceeds80/SelectionRow";

from prettier-tslint.

aleclarson avatar aleclarson commented on May 22, 2024

Prettier leaves that import statement alone. See here.

Closing this until you provide a sample repository.

from prettier-tslint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.