Giter VIP home page Giter VIP logo

Comments (10)

hzoo avatar hzoo commented on May 31, 2024

The rule is checking for all quotes so currently it doesn't knowing if it's in JSX or not. So you didn't have this issue with esprima-fb? If you did then it's not really specific to babel-jscs.

It's a valid request but something will have to be changed to support it since we don't have any JSX specific rules so this wasn't an issue before.

There's actually an issue in eslint to enforce quotes for JSX eslint/eslint#2011

Also eslint-plugin-react has a seperate rule for jsx-quotes: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-quotes.md

Maybe we should also do something like eslint-plugin-react - like a jscs-plugin-react with react specific rules.

from babel-jscs.

sebastienbarre avatar sebastienbarre commented on May 31, 2024

Thanks for the quick reply. I didn't have this issue with esprima-fb, no, but this didn't surprise me, since it was responsible for parsing JSX, right? I assumed that by switching to babel to parse ES6/ES7 and JSX I was probably going to experience a different behavior.

Or could this be related to that recent commit that was also about validateQuoteMarks? (I reverted to 1.0.3 but same issue).

Is there any way to disable validateQuoteMarks until this is eventually addressed? Setting it to false had no effect.

from babel-jscs.

hzoo avatar hzoo commented on May 31, 2024

The recent commit was actually to fix the rule because it wasn't erroring at all. You actually can disable any rules through putting null not false. Should be in the docs now http://jscs.info/overview.html#presets

So this would be fixed upstream in jscs - probably as an option to the rule to check jsx quotes separately or if not as a separate rule.

from babel-jscs.

sebastienbarre avatar sebastienbarre commented on May 31, 2024

That did the trick, thank you.

from babel-jscs.

DanLipsitt avatar DanLipsitt commented on May 31, 2024

I just cross-filed this as jscs-dev/node-jscs#1953.

from babel-jscs.

hzoo avatar hzoo commented on May 31, 2024

Ok closing in favor of ^ (a new rule option in jscs)

from babel-jscs.

DanLipsitt avatar DanLipsitt commented on May 31, 2024

Ok closing in favor of ^ (a new rule option in jscs)

I'm looking for that in the jscs project but it's a hard thing to search for. Can you point me in the right direction?

Note that there is a patch in progress at jscs-dev/node-jscs#1953 that might also be relevant.

from babel-jscs.

hzoo avatar hzoo commented on May 31, 2024

Yeah that's what I mean - the issue you made and that PR

from babel-jscs.

DanLipsitt avatar DanLipsitt commented on May 31, 2024

OK, gotcha. I thought you were talking about a rule option literally involving the caret symbol ('^'). 😝

from babel-jscs.

hzoo avatar hzoo commented on May 31, 2024

Haha

On Wed, Nov 4, 2015, 3:45 PM Dan Lipsitt [email protected] wrote:

OK, gotcha. I thought you were talking about a rule option literally
involving the caret symbol ('^'). [image: 😝]


Reply to this email directly or view it on GitHub
#12 (comment).

from babel-jscs.

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.