eknkc / atom-format-standard Goto Github PK
View Code? Open in Web Editor NEWAtom Package: Formats JavaScript files using standard style
License: MIT License
Atom Package: Formats JavaScript files using standard style
License: MIT License
[Enter steps to reproduce:]
Atom: 1.14.2 ia32
Electron: 1.3.13
OS: Microsoft Windows 10 Pro
Thrown From: format-standard package 4.3.0
Uncaught TypeError: editor.getText is not a function
At C:\Users\Jonny\AppData\Local\atom\app-1.14.2\resources\app.asar\src\pane.js:1045
TypeError: editor.getText is not a function
at Object.format (/packages/format-standard/lib/format-standard.js:31:23)
at /packages/format-standard/lib/format-standard.js:65:14)
at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
at TextBuffer.module.exports.TextBuffer.saveAs (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1060:20)
at TextBuffer.module.exports.TextBuffer.save (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1049:19)
at TextEditor.module.exports.TextEditor.save (/app.asar/src/text-editor.js:890:26)
at Pane.module.exports.Pane.saveItem (/app.asar/src/pane.js:753:18)
at Pane.saveItem (/app.asar/src/pane.js:3:59)
at Object.autosavePaneItem (/app.asar/node_modules/autosave/lib/autosave.js:71:21)
at Object.autosaveAllPaneItems (/app.asar/node_modules/autosave/lib/autosave.js:82:27)
at /app.asar/node_modules/autosave/lib/autosave.js:29:26
-1:24 core:confirm (input.hidden-input)
4x -1:20.3.0 find-and-replace:select-next (input.hidden-input)
-1:16.8.0 core:save (input.hidden-input)
-1:10.3.0 editor:select-to-beginning-of-word (input.hidden-input)
-1:04.8.0 project-find:show (input.hidden-input)
-1:03.9.0 core:confirm (input.hidden-input)
-0:59.7.0 core:move-right (input.hidden-input)
3x -0:59.3.0 core:backspace (input.hidden-input)
-0:56.3.0 core:save (input.hidden-input)
3x -0:50.2.0 core:backspace (input.hidden-input)
-0:47 core:save (input.hidden-input)
5x -0:43 core:backspace (input.hidden-input)
-0:40.3.0 editor:move-to-first-character-of-line (input.hidden-input)
-0:40.1.0 core:delete (input.hidden-input)
-0:38.3.0 core:confirm (input.hidden-input)
-0:29.6.0 core:backspace (input.hidden-input)
autocomplete-modules 1.6.7
extract-selection 0.2.1
file-icons 2.0.15
format-standard 4.3.0
highlight-selected 0.12.0
linter 1.11.23
linter-eslint 8.1.1
minimap 4.26.8
minimap-highlight-selected 4.5.0
minimap-linter 1.6.0
open-recent 5.0.0
project-plus 0.9.0
react 0.16.2
simple-drag-drop-text 0.3.4
The space after function name gets correctly formatted when it's structured like a normal function:
function foo() {
console.log('bar')
}
But it's not working when the function is an ECMAScript 6 class like this:
class Foo {
construct() {
this.bar = 'baz'
}
}
EDIT: I've just seen this is only the Atom wrapper for 'standard-format' 🙊sorry!
If I use the menu stadard format then it formats (but doesnt tell me whats wrong ) then it works (spacing at least) - I cant read what issues I have but I see a blue dot where the close tab is - is that saying there is an error ? Where do I get into the settings. TY
[Enter steps to reproduce:]
Atom: 1.18.0 x64
Electron: 1.3.15
OS: Mac OS X 10.12.5
Thrown From: format-standard package 4.3.0
Uncaught TypeError: editor.getSelectedText is not a function
At /Users/patrickhildreth/.atom/packages/format-standard/lib/format-standard.js:40
TypeError: editor.getSelectedText is not a function
at Object.formatSelection (/packages/format-standard/lib/format-standard.js:40:27)
at /packages/format-standard/lib/format-standard.js:10:12)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:265:35)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:65)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:166:25)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1314:34)
at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:334:31)
at emitThree (events.js:116:13)
at EventEmitter.emit (events.js:194:7)
-4:04.6.0 core:backspace (input.hidden-input)
-3:58.5.0 autocomplete-plus:confirm (input.hidden-input)
3x -3:57.2.0 core:backspace (input.hidden-input)
2x -3:51.9.0 editor:newline (input.hidden-input)
-3:48.5.0 auto-id-class:insert_class_attribute (input.hidden-input)
-3:44.4.0 core:backspace (input.hidden-input)
-3:43.3.0 core:move-right (input.hidden-input)
4x -3:40.2.0 core:backspace (input.hidden-input)
-3:27.6.0 core:move-right (input.hidden-input)
-3:24.9.0 editor:newline (input.hidden-input)
-3:16 auto-id-class:insert_class_attribute (input.hidden-input)
2x -3:10.6.0 core:move-down (input.hidden-input)
-3:09.8.0 editor:newline (input.hidden-input)
-3:08.8.0 auto-id-class:insert_class_attribute (input.hidden-input)
4x -3:04.5.0 core:save (input.hidden-input)
-0:12.6.0 format-standard:format (div.tool-panel.tree-view)
atom-material-syntax 1.0.6
atom-material-ui 2.0.4
atom-wrap-in-tag 0.6.0
atomatigit 1.5.5
auto-id-class 0.2.6
autoclose-html 0.23.0
autocomplete-paths 1.0.5
busy-signal 1.4.3
fonts 3.0.1
format-standard 4.3.0
intentions 1.1.2
language-babel 2.65.2
language-diff 0.7.0
linter 2.1.4
linter-js-standard 3.9.1
linter-ruby 1.2.5
linter-ui-default 1.6.1
minimap 4.28.2
minimap-pigments 0.2.2
monokai-seti 0.9.0
Parinfer 1.18.0
pigments 0.39.1
pretty-json 1.6.3
rails-snippets 2.15.1
react-snippets 0.8.0
seti-syntax 1.1.3
seti-ui 1.8.0
spacegray-atom-dark-syntax 1.3.2
standard-formatter 2.8.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.