Comments (3)
That shorthand is technically an object property whose value is a function expression which is why it's evaluated.
We have a test in JSCS core showing that this is the expected behavior: https://github.com/jscs-dev/node-jscs/blob/ca39a8912b4d498432fc92230b8a68f82174cd48/test/specs/rules/disallow-space-after-object-keys.js#L180-L186.
Sounds like you want a new rule value like allExcept: ['functionShorthand']
. I'm not actually sure what the proper name for that "shorthand" version is. @mikesherov would know. We'll substitute "shorthand" with whatever it is.
@globexdesigns Would you mind creating an issue for this in JSCS proper?
from babel-jscs.
Done. Issue opened with JSCS.
from babel-jscs.
Great. Thanks @globexdesigns
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
- 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
- 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.