joezo / atom-jshint Goto Github PK
View Code? Open in Web Editor NEWValidate your JS against JSHint as you type, while using Atom
License: MIT License
Validate your JS against JSHint as you type, while using Atom
License: MIT License
Seem to be having some memory leaks after using atom / atom-jshint for a couple of hours.
1.3 will crash when all tabs are closed:
Uncaught TypeError: Cannot read property 'constructor' of undefined
Will look into fixing it right away.
It would be great to have an option to search for the .jshintrc the way the jshint cli works (working up the directory tree from the file being linted until a .jshintrc file is found).
If you split the panes, only files open in the left pane will show the errors in the status bar when you move the cursor to an indicated line.
Use decorations instead: http://blog.atom.io/2014/07/24/decorations.html
[object Object].removeClassFromAllLines (/Applications/Atom.app/Contents/Resources/app/src/editor-view.js:95:13)
AtomJsHint.updateGutter (/Users/xanderdumaine/.atom/packages/atom-jshint/lib/atom-jshint.js:175:14)
<unknown> (/Users/xanderdumaine/.atom/packages/atom-jshint/lib/atom-jshint.js:116:14)
Editor.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:118:15)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/editor.js:111:24)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
DisplayBuffer.set (/Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:166:21)
DisplayBuffer.accessor.set (/Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:57:23)
DisplayBuffer.setScrollTop (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:343:31)
Editor.setScrollTop (/Applications/Atom.app/Contents/Resources/app/src/editor.js:2145:33)
[object Object].module.exports.React.createClass.onMouseWheel (/Applications/Atom.app/Contents/Resources/app/src/editor-component.js:934:16)
HTMLDivElement.boundMethod (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1295:21)
Use decorations instead: http://blog.atom.io/2014/07/24/decorations.html
[object Object].removeClassFromAllLines (/Applications/Atom.app/Contents/Resources/app/src/editor-view.js:95:13)
AtomJsHint.updateGutter (/Users/guillaume/.atom/packages/atom-jshint/lib/atom-jshint.js:175:14)
AtomJsHint.resetState (/Users/guillaume/.atom/packages/atom-jshint/lib/atom-jshint.js:139:10)
AtomJsHint.run (/Users/guillaume/.atom/packages/atom-jshint/lib/atom-jshint.js:95:12)
AtomJsHint.<anonymous> (/Users/guillaume/.atom/packages/atom-jshint/lib/atom-jshint.js:27:16)
HTMLDivElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676:9)
HTMLDivElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360:46)
Object.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4594:12)
HTMLDivElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5119:17)
Function.jQuery.extend.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:590:23)
PaneContainerView.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:237:17)
PaneContainerView.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5118:15)
PaneContainerView.module.exports.PaneContainerView.onActivePaneItemChanged (/Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:87:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:3:61)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Signal.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Signal.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Signal.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:81:29)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:252:38)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:173:28)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
Pane.set (/Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:166:21)
Pane.accessor.set (/Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:57:23)
Pane.addItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:186:25)
Pane.activateItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:171:14)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:252:16)
_fulfilled (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:787:54)
self.promiseDispatch.done (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:816:30)
Promise.promiseDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:749:13)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:557:44)
flush (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:108:17)
process._tickCallback (node.js:349:11)
Use decorations instead: http://blog.atom.io/2014/07/24/decorations.html
[object Object].removeClassFromAllLines (/Applications/Atom.app/Contents/Resources/app/src/editor-view.js:95:13)
AtomJsHint.updateGutter (/Users/Lester/.atom/packages/atom-jshint/lib/atom-jshint.js:175:14)
AtomJsHint.resetState (/Users/Lester/.atom/packages/atom-jshint/lib/atom-jshint.js:139:10)
AtomJsHint.run (/Users/Lester/.atom/packages/atom-jshint/lib/atom-jshint.js:95:12)
AtomJsHint.<anonymous> (/Users/Lester/.atom/packages/atom-jshint/lib/atom-jshint.js:27:16)
HTMLDivElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676:9)
HTMLDivElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360:46)
Object.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4594:12)
HTMLDivElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5119:17)
Function.jQuery.extend.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:590:23)
PaneContainerView.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:237:17)
PaneContainerView.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5118:15)
PaneContainerView.module.exports.PaneContainerView.onActivePaneItemChanged (/Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:87:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:3:61)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Signal.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Signal.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Signal.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:81:29)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:252:38)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:173:28)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
Pane.set (/Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:166:21)
Pane.accessor.set (/Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:57:23)
Pane.addItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:186:25)
Pane.activateItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:171:14)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:252:16)
_fulfilled (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:787:54)
self.promiseDispatch.done (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:816:30)
Promise.promiseDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:749:13)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:557:44)
flush (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:108:17)
process._tickCallback (node.js:349:11)
Hi,
everytime I type I get this error
Uncaught TypeError: Object # has no method 'lineElementForScreenRow' /Users/username/.atom/packages/jshint/index.js:22
I have the latest version of the plugin installed and atom 0.117.0.
Thanks a lot for your attention.
Eugenio
Hi, i've installed this package and I can see it enforcing what assume are the default rules on my js files. However after adding .jshintrc file to the root (the folder i've opened in atom) it doesn't seem to be having any effect. For example it should enforce single quote strings but doesn't, it doesn't seem to enforce any globals and doesn't require brackets around if blocks etc.
Running v1.2.0 of the plugin
my .jshintrc file
{
curly: true,
eqeqeq: true,
immed: true,
indent: 4,
latedef: true,
newcap: true,
quotmark: 'single',
undef: true,
unused: true,
maxerr: 5,
globals: {
angular: true,
FileReader: true,
require: true,
_: true,
confirm: true,
Spinner: true,
Image: true,
describe: true,
it: true,
inject: true,
expect: true,
beforeEach: true,
afterEach: true,
module: true,
spyOn: true,
console: true
}
}
I've also tried embedding these settings in my package.json file. Also to no effect.
Expose option to disable expression warning in package options
http://jshint.com/docs/options/#expr
One some files the performance hit is pretty steep. An option to only lint on a save would make it usable for these files while not impacting normal editing and scrolling.
(Also, is there some reason it would cause Atom 0.115 with React enabled to be very slow when paging up and down, even when not actually typing? Is it possibly re-running when the screen is scrolled?)
When atom-jshint is enabled then the cursor position in the status bar stops auto updating.
Switching between tabs will update the numbers once, but moving the cursor around in the active pane no longer updates the position numbers.
This is also a global issue and not limited to .js files only.
Disabling 'Atom Jshint' and restarting Atom fixes the issue, so it seems like s.th. in this package is affecting the cursor position reporting in Atom.
Best way to reproduce is to disable atom-jshint, restart Atom, confirm cursor position is updating, enable atom-jshint, restart Atom, open a few files, switch between them, move cursor in one of the files and check if cursor position numbers stopped updating.
Edit: I've managed to track this to the offending line: https://github.com/Joezo/atom-jshint/blob/master/lib/atom-jshint.js#L93
Commenting out that line will fix the cursor position issue, but I assume this was disabled on purpose?
Edit 2: it looks like the offending line is unsubscribing the global cursor:moved event, which is why the cursor position stops updating as well. I'm not familiar with Atom's package development yet, but I assume that this would need to be changed to unsubscribe the custom event from the global cursor:moved event instead of unsubscribing the global event itself.
Use decorations instead: http://blog.atom.io/2014/07/24/decorations.html
[object Object].removeClassFromAllLines (/Applications/Atom.app/Contents/Resources/app/src/editor-view.js:95:13)
AtomJsHint.updateGutter (/Users/davidemiliosierrapuentes/.atom/packages/atom-jshint/lib/atom-jshint.js:175:14)
AtomJsHint.resetState (/Users/davidemiliosierrapuentes/.atom/packages/atom-jshint/lib/atom-jshint.js:139:10)
AtomJsHint.run (/Users/davidemiliosierrapuentes/.atom/packages/atom-jshint/lib/atom-jshint.js:95:12)
AtomJsHint.<anonymous> (/Users/davidemiliosierrapuentes/.atom/packages/atom-jshint/lib/atom-jshint.js:27:16)
HTMLDivElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676:9)
HTMLDivElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360:46)
Object.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4594:12)
HTMLDivElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5119:17)
Function.jQuery.extend.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:590:23)
PaneContainerView.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:237:17)
PaneContainerView.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5118:15)
PaneContainerView.module.exports.PaneContainerView.onActivePaneItemChanged (/Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:87:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:3:61)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Signal.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Signal.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Signal.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:81:29)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:252:38)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:173:28)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
Pane.set (/Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:166:21)
Pane.accessor.set (/Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:57:23)
Pane.activateItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:172:32)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:252:16)
_fulfilled (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:787:54)
self.promiseDispatch.done (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:816:30)
Promise.promiseDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:749:13)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:557:44)
flush (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:108:17)
process._tickCallback (node.js:349:11)
Use decorations instead: http://blog.atom.io/2014/07/24/decorations.html
[object Object].removeClassFromAllLines (/Applications/Atom.app/Contents/Resources/app/src/editor-view.js:95:13)
AtomJsHint.updateGutter (/Users/user/.atom/packages/atom-jshint/lib/atom-jshint.js:175:14)
AtomJsHint.resetState (/Users/user/.atom/packages/atom-jshint/lib/atom-jshint.js:139:10)
AtomJsHint.run (/Users/user/.atom/packages/atom-jshint/lib/atom-jshint.js:95:12)
AtomJsHint.<anonymous> (/Users/user/.atom/packages/atom-jshint/lib/atom-jshint.js:27:16)
HTMLDivElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676:9)
HTMLDivElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360:46)
Object.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4594:12)
HTMLDivElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5119:17)
Function.jQuery.extend.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:590:23)
PaneContainerView.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:237:17)
PaneContainerView.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5118:15)
PaneContainerView.module.exports.PaneContainerView.onActivePaneItemChanged (/Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:87:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:3:61)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Signal.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Signal.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Signal.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:81:29)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:252:38)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:173:28)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19)
Pane.set (/Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:166:21)
Pane.accessor.set (/Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:57:23)
Pane.addItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:186:25)
Pane.activateItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:171:14)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:252:16)
_fulfilled (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:787:54)
self.promiseDispatch.done (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:816:30)
Promise.promiseDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:749:13)
<unknown> (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:557:44)
flush (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:108:17)
process._tickCallback (node.js:349:11)
Would be great to have some commands for next and previous jshint error / warning.
Key bindings are precious so I'd prefer it if it didn't provide defaults, I think.
Great package, thanks.
in the new Atom Editor 0.124.0, your atom-jshint package v.1.4.3 is shown in its new deprecated calls section as using a deprecated call —
Deprecated calls
[object Object].removeClassFromAllLines (called 16 times)
Use decorations instead: http://blog.atom.io/2014/07/24/decorations.html
atom-jshint package (called 6 times)Create Issue on atom-jshint repo
[object Object].removeClassFromAllLines - /Applications/Atom.app/Contents/Resources/app/src/editor-view.js:95:13
AtomJsHint.updateGutter - /Users/yuetsu/.atom/packages/atom-jshint/lib/atom-jshint.js:175:14
AtomJsHint.resetState - /Users/yuetsu/.atom/packages/atom-jshint/lib/atom-jshint.js:139:10
AtomJsHint.run - /Users/yuetsu/.atom/packages/atom-jshint/lib/atom-jshint.js:95:12
AtomJsHint.<anonymous> - /Users/yuetsu/.atom/packages/atom-jshint/lib/atom-jshint.js:27:16
HTMLDivElement.jQuery.event.dispatch - /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676:9
HTMLDivElement.elemData.handle - /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360:46
Object.trigger - /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4594:12
HTMLDivElement.<anonymous> - /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5119:17
Function.jQuery.extend.each - /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:590:23
PaneContainerView.each - /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:237:17
PaneContainerView.jQuery.fn.extend.trigger - /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5118:15
PaneContainerView.trigger - /Users/yuetsu/.atom/packages/command-logger/lib/main.coffee:65:24
PaneContainerView.module.exports.PaneContainerView.onActivePaneItemChanged - /Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:87:19
<unknown> - /Applications/Atom.app/Contents/Resources/app/src/pane-container-view.js:3:61
<unknown> - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30
Array.forEach - native
Signal.emitSlow - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47
Signal.emit - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30
Signal.emitValue - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19
<unknown> - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:81:29
<unknown> - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30
Array.forEach - native
Behavior.emitSlow - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47
Behavior.module.exports.Emitter.emit - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30
Behavior.emit - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38
Behavior.emitValue - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19
<unknown> - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:252:38
<unknown> - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30
Array.forEach - native
Behavior.emitSlow - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47
Behavior.module.exports.Emitter.emit - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30
Behavior.emit - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38
Behavior.emitValue - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19
<unknown> - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:173:28
<unknown> - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:155:30
Array.forEach - native
Behavior.emitSlow - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:154:47
Behavior.module.exports.Emitter.emit - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:107:30
Behavior.emit - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/behavior.js:44:38
Behavior.emitValue - /Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/signal.js:82:19
Pane.set - /Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:166:21
Pane.accessor.set - /Applications/Atom.app/Contents/Resources/app/node_modules/theorist/lib/model.js:57:23
Pane.activateItem - /Applications/Atom.app/Contents/Resources/app/src/pane.js:172:32
PaneView.activateItem - /Applications/Atom.app/Contents/Resources/app/node_modules/delegato/lib/delegator.js:67:61
HTMLLIElement.<anonymous> - /Applications/Atom.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:159:24
HTMLUListElement.jQuery.event.dispatch - /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676:9
HTMLUListElement.elemData.handle - /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360:46
it is recommended you use decorations instead.
best,
— faddah wolf
portland, oregon, u.s.a.
https://github.com/faddah/
We need some
If I open a new file and try to add some code, I get a bunch of errors in the inspector. This is the first one:
Uncaught TypeError: Cannot call method 'slice' of undefined .atom/packages/atom-jshint/lib/atom-jshint.js:128
Looks like you're checking the filename, but this editor doesn't have one yet.
Hi,
Every time I save my JS files I see JSHint is not installed
in the status bar. But it actually is installed:
$ which jshint
/usr/local/bin/jshint
Please advise. Thanks.
I get the following error while trying to install from Atom and from apm:
Unable to download https://www.atom.io/api/packages/atom-jshint/versions/0.0.2/tarball: 400 Bad Request Repository inaccessible
It would be nice to have a verbose checkbox in the settings panel to get jshint's warning codes back e.g. W034 so we can disable them using syntax like /* jshint -W034 */
keep up the good work
I have noticed that this plugin causes serious lag when opening editor/files or switching tabs.
Might I strongly recommend moving the JSHint actions to a child process in order to mitigate this?
When I run:
apm install atom-jshint
I get:
Installing atom-jshint to /Users/aharris88/.atom/packages ✗
Unable to download https://www.atom.io/api/packages/atom-jshint/versions/0.0.2/tarball: 400 Bad Request Repository inaccessible
I'm thinking hover over a line number and the error related to that line appears.
I mostly set jshint-settings in my js-files, which seems to work, but atom-jshint doesn't seem to respect the browser:true option.
window, document, navigator etc is reported as undefined.
Example:
/*jshint -W110*/
/*jshint indent:2, undef:true*/
/*browser:true */
/*globals console:true */
Hi,
Could somebody help me to configure the package to run jshint on HTML files?
Like it does automatically on JS files.
There is a jshint option (extract:auto) that allows it to parse the js code in HTML.
It looks this option can be turned on in .jshintrc
But I can't find where to make the package run on HTML files.
Thanks.
-Mic
Use decorations instead: http://blog.atom.io/2014/07/24/decorations.html
[object Object].removeClassFromAllLines (/opt/atom/resources/app/src/editor-view.js:95:13)
AtomJsHint.updateGutter (/home/dima/.atom/packages/atom-jshint/lib/atom-jshint.js:175:14)
AtomJsHint.resetState (/home/dima/.atom/packages/atom-jshint/lib/atom-jshint.js:139:10)
AtomJsHint.run (/home/dima/.atom/packages/atom-jshint/lib/atom-jshint.js:95:12)
AtomJsHint.<anonymous> (/home/dima/.atom/packages/atom-jshint/lib/atom-jshint.js:27:16)
HTMLDivElement.jQuery.event.dispatch (/opt/atom/resources/app/node_modules/space-pen/vendor/jquery.js:4676:9)
HTMLDivElement.elemData.handle (/opt/atom/resources/app/node_modules/space-pen/vendor/jquery.js:4360:46)
Object.trigger (/opt/atom/resources/app/node_modules/space-pen/vendor/jquery.js:4594:12)
HTMLDivElement.<anonymous> (/opt/atom/resources/app/node_modules/space-pen/vendor/jquery.js:5119:17)
Function.jQuery.extend.each (/opt/atom/resources/app/node_modules/space-pen/vendor/jquery.js:590:23)
PaneContainerView.each (/opt/atom/resources/app/node_modules/space-pen/vendor/jquery.js:237:17)
PaneContainerView.trigger (/opt/atom/resources/app/node_modules/space-pen/vendor/jquery.js:5118:15)
PaneContainerView.module.exports.PaneContainerView.onActivePaneItemChanged (/opt/atom/resources/app/src/pane-container-view.js:87:19)
<unknown> (/opt/atom/resources/app/src/pane-container-view.js:3:61)
<unknown> (/opt/atom/resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Signal.emitSlow (/opt/atom/resources/app/node_modules/emissary/lib/emitter.js:154:47)
Signal.emit (/opt/atom/resources/app/node_modules/emissary/lib/emitter.js:107:30)
Signal.emitValue (/opt/atom/resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/opt/atom/resources/app/node_modules/emissary/lib/behavior.js:81:29)
<unknown> (/opt/atom/resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/opt/atom/resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/opt/atom/resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/opt/atom/resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/opt/atom/resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/opt/atom/resources/app/node_modules/emissary/lib/signal.js:252:38)
<unknown> (/opt/atom/resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/opt/atom/resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/opt/atom/resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/opt/atom/resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/opt/atom/resources/app/node_modules/emissary/lib/signal.js:82:19)
<unknown> (/opt/atom/resources/app/node_modules/emissary/lib/signal.js:173:28)
<unknown> (/opt/atom/resources/app/node_modules/emissary/lib/emitter.js:155:30)
Array.forEach (native)
Behavior.emitSlow (/opt/atom/resources/app/node_modules/emissary/lib/emitter.js:154:47)
Behavior.module.exports.Emitter.emit (/opt/atom/resources/app/node_modules/emissary/lib/emitter.js:107:30)
Behavior.emit (/opt/atom/resources/app/node_modules/emissary/lib/behavior.js:44:38)
Behavior.emitValue (/opt/atom/resources/app/node_modules/emissary/lib/signal.js:82:19)
Pane.set (/opt/atom/resources/app/node_modules/theorist/lib/model.js:166:21)
Pane.accessor.set (/opt/atom/resources/app/node_modules/theorist/lib/model.js:57:23)
Pane.addItem (/opt/atom/resources/app/src/pane.js:186:25)
Pane.activateItem (/opt/atom/resources/app/src/pane.js:171:14)
<unknown> (/opt/atom/resources/app/src/workspace.js:252:16)
_fulfilled (/opt/atom/resources/app/node_modules/q/q.js:787:54)
self.promiseDispatch.done (/opt/atom/resources/app/node_modules/q/q.js:816:30)
Promise.promiseDispatch (/opt/atom/resources/app/node_modules/q/q.js:749:13)
<unknown> (/opt/atom/resources/app/node_modules/q/q.js:557:44)
flush (/opt/atom/resources/app/node_modules/q/q.js:108:17)
process._tickCallback (node.js:349:11)
I appreciate that this is very much in its infancy and some of these are probably on your radar and some are a long way off but I thought it would be good to just get them down anyway. Let me know if you want them as separate issues.
Hey,
I've managed to get this installed on my macbook, but having trouble on imac... Am I missing something? Are there any dependancies?
Use decorations instead: http://blog.atom.io/2014/07/24/decorations.html
[object Object].removeClassFromAllLines (/Applications/Atom 2.app/Contents/Resources/app/src/editor-view.js:95:13)
AtomJsHint.updateGutter (/Users/lmauldin/.atom/packages/atom-jshint/lib/atom-jshint.js:175:14)
AtomJsHint.resetState (/Users/lmauldin/.atom/packages/atom-jshint/lib/atom-jshint.js:139:10)
AtomJsHint.run (/Users/lmauldin/.atom/packages/atom-jshint/lib/atom-jshint.js:95:12)
AtomJsHint.<anonymous> (/Users/lmauldin/.atom/packages/atom-jshint/lib/atom-jshint.js:37:14)
When two pages are open side-by-side, both gutters show that there is a linting error at the line number where there is an error on your current active window.
when editing a .jshintrc file parse the file and add the description of each setting as a tooltip when hovering over them (hard to implement but definitely doable)
yanked from issue #4
Some projects like Ember.js have .jshintrc files with comments in there.
Is there any plan to try to pre-sanitize config files before passing it off to JSON.parse?
I'll probably visit it myself if no one is too interested in working on this.
Do you plan on adding this?
Also, is this going to be developed moving forward? Can I do pull requests?
I'm getting the error channel closed
while while typing. It occurs predictably right after typing the strict equality operator in an if-statement, e.g. if (thing ===|)
. The error occurs on line 99 of /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js.
I'm running v0.69.9 of Atom and v1.1.0 of atom-jshint on OS X 10.9.1.
Currently the package will read in .jshintrc on load and then never reload it. We should change this so that if the file is modified it reloads it.
It would be very useful if clicking a line in the error panel makes the cursor jump to the corresponding line.
It will make my atom slow even when it's not lintting
npm http GET https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/emissary
npm ERR! Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR! at TLSSocket. (_tls_wrap.js:777:36)
npm ERR! at TLSSocket.EventEmitter.emit (events.js:98:17)
npm ERR! at TLSSocket._finishInit (_tls_wrap.js:337:8)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! System Darwin 13.0.0
npm ERR! command "/Users/rnagella/Downloads/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/MacOS/Atom Helper" "/Users/rnagella/Downloads/Atom.app/Contents/Resources/app/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js" "--userconfig" "/Users/rnagella/Downloads/Atom.app/Contents/Resources/app/node_modules/atom-package-manager/.apmrc" "install" "/var/folders/ls/vsq6v52n3rbbyp27clkc6tyc0000gn/T/d-114128-2530-1yld9qg/package.tgz" "--target=0.11.10" "--arch=x64"
npm ERR! cwd /private/var/folders/ls/vsq6v52n3rbbyp27clkc6tyc0000gn/T/apm-install-dir-114128-2530-9ln06e
npm ERR! node -v v0.11.10
npm ERR! npm -v 1.3.18
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /private/var/folders/ls/vsq6v52n3rbbyp27clkc6tyc0000gn/T/apm-install-dir-114128-2530-9ln06e/npm-debug.log
npm ERR! not ok code 0
Right clicking indicator could give a menu that includes "add exclusion" which adds the relevant js comment to the previous line to get jshint to ignore the error.
yanked from issue #4
Hi,
Currently JSHint supports .jshintignore file http://www.jshint.com/docs/cli/
I have specified a .jshintignore file to exclude some build folders with minified JS files but it seems that .jshintignore is not considered. Due I can't exclude these files, every time I open one of them atom hangs.
Thanks.
Atom version: 0.152.0, Ubuntu GNOME 14.10
atom-jshint version: 1.5.0
Bug: uncaught error thrown over specific production (specifically ==
when "eqeqeq" is in the package.json)
Repro instructions:
==
.Notes:
JSHINT_Worker.send
. This implies a dead worker.(
, {
, [
). Other syntax errors are mostly irrelevant.I have a .jshint file in my root, and also one in the root of my test folder. The files inside the test folder should respect the .jshint inside the test folder, but instead it looks like its going for the one another level up on the project root. The default behavior should be to use the first .jshint file it encounters. If this is what current behavior is believed to be, then I believe there is a bug
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.