Comments (10)
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.
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.
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.
That did the trick, thank you.
from babel-jscs.
I just cross-filed this as jscs-dev/node-jscs#1953.
from babel-jscs.
Ok closing in favor of ^ (a new rule option in jscs)
from babel-jscs.
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.
Yeah that's what I mean - the issue you made and that PR
from babel-jscs.
OK, gotcha. I thought you were talking about a rule option literally involving the caret symbol ('^'). 😝
from babel-jscs.
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)
- validateQuoteMarks HOT 8
- Getting "Warning: Unknown node type Super" error after upgrading to 2.0.0 HOT 10
- disallowSpaceAfterObjectKeys rule is breaking babel stage 1 code HOT 11
- Speed
- Issue with nested conditional ternary operator HOT 7
- Pre-release v2.0.0 is marked as latest in npm HOT 2
- Unknown node type ExportDefaultDeclaration HOT 2
- Tests don't pass, babel-jscs released a breaking change with 5.7.0 HOT 5
- Add JSCS tests HOT 4
- `disallowSpaceAfterObjectKeys` evaluating functions as objects in 2.0.x HOT 3
- requireSpacesInFunctionExpression breaks object literal methods HOT 3
- Jsdoc and destructuring HOT 2
- error after updating to babel@6 HOT 26
- Side-effect unescaping HTML from auto-fix HOT 1
- Few questions HOT 5
- Shorthand methods don't cooperate with space checks HOT 8
- Error running rule disallowSpacesInFunctionDeclaration HOT 2
- parseError: undefined on function declaraion HOT 2
- requireSpacesInFunctionExpression issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-jscs.