Comments (7)
Hmm I tried reproducing with your code snippet but don't get any errors? This is with babel-jscs 2.0.0, jscs#master and latest babel version as well (maybe update that).
from babel-jscs.
I am using latest babel: 5.6.23 (babel-core 5.7.4)
I have created a minimal repo for the issue at https://github.com/priyatham-aps/babel-jscs-ternaryop-issue.
Please check it out, run npm install and jscs. Hopefully, this will help in demonstrating the issue.
from babel-jscs.
I added a few more scenarios in the above repo. Looks like the issue is not with the nesting of ternary operators but usage of brackets in the expressions of ternary operator.
from babel-jscs.
@hzoo
Are you able to reproduce the issue? Or do you need any further help from me on this?
from babel-jscs.
Sorry been kinda busy so couldn't get to this. I just tried it again and cannot reproduce - what node version are you using? Also what you can do now is just do
"devDependencies": {
"jscs": "jscs-dev/node-jscs"
}
because jscs will include babel and babel-jscs
already.
In your .jscsrc
you can do
{
"esnext": true,
"disallowMultipleSpaces": true
}
since it will exclude node_modules
by default now and esnext will use babel-jscs
Or you can do ./node_modules/.bin/jscs index.js --esnext
. I didn't get any errors after doing this either (with io.js 2.3.4)
I just updated the readme with this - hopefully it's more useful now.
from babel-jscs.
I just tried it the way you have recommended by uninstalling babel-jscs
and babel
from dev-dependencies
and removing esprima
option from .jscsrc
. When I ran jscs
, I got an error saying Cannot find module 'babel-jscs'
.
I then did npm uninstall jscs --save-dev
and installed it again. Now, I am not getting the issue anymore. At this point, it looks like I may have been using an earlier commit from master branch of jscs, though I am not entirely sure.
Appreciate the info and help though. Thanks.
from babel-jscs.
Ok great!
from babel-jscs.
Related Issues (20)
- validateQuoteMarks HOT 8
- Getting "Warning: Unknown node type Super" error after upgrading to 2.0.0 HOT 10
- JSX and validateQuoteMarks issue HOT 10
- disallowSpaceAfterObjectKeys rule is breaking babel stage 1 code HOT 11
- Speed
- 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.