Comments (5)
If you enable the beta it should support arrow functions.
from atom-easy-jsdoc.
Thank you that is great, but whenever I have anything 'special' anywhere in my source code eg.
- React syntax
- class properties (https://babeljs.io/docs/plugins/transform-class-properties/) etc.
It will throw the error:
C:\...\.atom\packages\atom-easy-jsdoc\lib\jsdoc\funcParser.js:37
Stack:
Uncaught Error: atom-easy-jsdoc expects valid JavaScript. Error parsing: Unexpected token (x:y)
...
I understand that the configured javascript become too complex. It's just for your information, I can continue without that. Thank you.
from atom-easy-jsdoc.
React should work, which class properties are failing? Classes should work.
from atom-easy-jsdoc.
This is my code:
import React from 'react'
export default class extends React.Component {
state = {
view: "source"
}
render = () => {
return (<div>
<button onClick={(prev)=>this.setState({...prev, view:"source"})}>Tree</button>
<button onClick={(prev)=>this.setState({...prev, view:"preview"})}>Preview</button>
</div>)
}
}
This is the error:
[Enter steps to reproduce below:]
- Press CTRL - J on the line #7
Atom Version: 1.12.6
Electron Version: 1.3.9
System: Microsoft Windows 7 Professional
Thrown From: atom-easy-jsdoc package, v4.8.0
Stack Trace
Uncaught Error: atom-easy-jsdoc expects valid JavaScript. Error parsing: Unexpected token (4:8)
At C:\Users\randust\.atom\packages\atom-easy-jsdoc\lib\jsdoc\funcParser.js:37
Error: atom-easy-jsdoc expects valid JavaScript. Error parsing: Unexpected token (4:8)
at getAST (file:///C:/Users/randust/.atom/packages/atom-easy-jsdoc/lib/jsdoc/funcParser.js:37:11)
at parse (file:///C:/Users/randust/.atom/packages/atom-easy-jsdoc/lib/jsdoc/funcParser.js:313:15)
at comment (file:///C:/Users/randust/.atom/packages/atom-easy-jsdoc/lib/jsdocer.js:17:16)
at createComment (file:///C:/Users/randust/.atom/packages/atom-easy-jsdoc/lib/index.js:23:29)
at atom-text-editor.jsdocBlock (file:///C:/Users/randust/.atom/packages/atom-easy-jsdoc/lib/index.js:54:9)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\randust\AppData\Local\atom\app-1.12.6\resources\app.asar\src\command-registry.js:259:29)
at C:\Users\randust\AppData\Local\atom\app-1.12.6\resources\app.asar\src\command-registry.js:3:59
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\randust\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:587:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\randust\AppData\Local\atom\app-1.12.6\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:382:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (C:\Users\randust\AppData\Local\atom\app-1.12.6\resources\app.asar\src\window-event-handler.js:106:36)
at HTMLDocument.<anonymous> (C:\Users\randust\AppData\Local\atom\app-1.12.6\resources\app.asar\src\window-event-handler.js:3:59)
Commands
-0:42.2.0 core:move-left (atom-text-editor.editor.is-focused)
-0:40.5.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused.autocomplete-active)
8x -0:39.9.0 core:move-down (atom-text-editor.editor.is-focused)
2x -0:38.5.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
-0:38 core:move-down (atom-text-editor.editor.is-focused)
3x -0:37.6.0 core:select-down (atom-text-editor.editor.is-focused)
-0:36.9.0 core:delete (atom-text-editor.editor.is-focused)
5x -0:36.7.0 core:move-up (atom-text-editor.editor.is-focused)
-0:35.2.0 core:select-down (atom-text-editor.editor.is-focused)
-0:34.9.0 core:delete (atom-text-editor.editor.is-focused)
4x -0:34 core:move-down (atom-text-editor.editor.is-focused)
6x -0:32.4.0 core:move-up (atom-text-editor.editor.is-focused)
-0:30 jsdoc:block (atom-text-editor.editor.is-focused)
-0:21.8.0 core:delete (atom-text-editor.editor.is-focused)
-0:09.6.0 jsdoc:block (atom-text-editor.editor.is-focused)
-0:06.9.0 core:copy (atom-text-editor.editor.is-focused)
Config
{
"core": {
"ignoredNames": [
"node_modules",
".git",
".hg",
".svn",
".DS_Store",
"._*",
"Thumbs.db"
]
},
"atom-easy-jsdoc": {
"beta": true,
"useReturns": true
}
}
Installed Packages
# User
atom-beautify, v0.29.13 (active)
atom-easy-jsdoc, v4.8.0 (active)
linter, v1.11.18 (active)
linter-eslint, v8.0.0 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.45.0 (inactive)
base16-tomorrow-dark-theme, v1.3.0 (inactive)
base16-tomorrow-light-theme, v1.3.0 (inactive)
one-dark-ui, v1.6.2 (active)
one-light-ui, v1.6.2 (inactive)
one-dark-syntax, v1.5.0 (active)
one-light-syntax, v1.5.0 (inactive)
solarized-dark-syntax, v1.0.5 (inactive)
solarized-light-syntax, v1.0.5 (inactive)
about, v1.7.0 (active)
archive-view, v0.62.0 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.13.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.4 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.42.0 (active)
bracket-matcher, v0.82.2 (active)
command-palette, v0.39.0 (active)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.202.2 (active)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.60.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.2 (inactive)
markdown-preview, v0.158.8 (active)
metrics, v1.1.2 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.1 (inactive)
settings-view, v0.243.1 (active)
snippets, v1.0.4 (active)
spell-check, v0.68.4 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.2 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.0 (active)
timecop, v0.33.2 (active)
tree-view, v0.210.0 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.35.0 (active)
wrap-guide, v0.38.2 (active)
language-c, v0.54.0 (active)
language-clojure, v0.22.1 (active)
language-coffee-script, v0.48.0 (active)
language-csharp, v0.13.0 (active)
language-css, v0.40.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.43.0 (active)
language-html, v0.47.1 (active)
language-hyperlink, v0.16.1 (active)
language-java, v0.24.0 (active)
language-javascript, v0.122.0 (active)
language-json, v0.18.3 (active)
language-less, v0.29.6 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.37.0 (active)
language-php, v0.37.3 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.1 (active)
language-ruby, v0.70.2 (active)
language-ruby-on-rails, v0.25.1 (active)
language-sass, v0.57.0 (active)
language-shellscript, v0.23.0 (active)
language-source, v0.9.0 (active)
language-sql, v0.25.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.29.1 (active)
language-toml, v0.18.1 (active)
language-xml, v0.34.12 (active)
language-yaml, v0.27.1 (active)
# Dev
No dev packages
from atom-easy-jsdoc.
Awesome. Thanks.
The issue is with the property. It looks like babylon supports this so it should be a small change.
from atom-easy-jsdoc.
Related Issues (20)
- conflict with goto-definition in Atom 1.16.0 under macOS Sierra HOT 6
- An in-range update of mocha is breaking the build 🚨
- Uncaught TypeError: Cannot read property 'getCursorBufferPosition' of undefined HOT 2
- Unavailable tag error should not be considered an error HOT 2
- Syntax highlighting? HOT 2
- Option to disable indentation alignment HOT 1
- Uncaught Error: Unknown param type: MemberExpression HOT 1
- easy preview HOT 2
- Function name in the subject line HOT 2
- Uncaught Error: Unknown param type: ArrowFunctionExpression HOT 1
- arrow function not recognized when it's an object's property value HOT 1
- Version 10 of node.js has been released
- Adding JSDoc with the shortcut while cursor is on the "function" line
- do you change paste manner? please HOT 2
- An in-range update of eslint-plugin-import is breaking the build 🚨 HOT 3
- Autocontinue also applied to singe line comments outside of the docs
- Exported class generated wrong indentation.
- Optional chaining expression results in error
- Does Not Work With Arrow Functions
- Throws error on private class features
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 atom-easy-jsdoc.