Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Throwing errors in JSON files #174

Closed
casesandberg opened this issue Feb 6, 2016 · 0 comments
Closed

Throwing errors in JSON files #174

casesandberg opened this issue Feb 6, 2016 · 0 comments
Labels

Comments

@casesandberg
Copy link
Contributor

[Enter steps to reproduce below:]

  1. Add comma to last string in array in package.json
  2. save

Atom Version: 1.4.1
System: Mac OS X 10.11
Thrown From: linter-jscs package, v3.4.2

Stack Trace

Uncaught Error: Parse error on line 10:
....174.0 <2.0.0" },}
---------------------^
Expecting 'STRING', got '}'

At /Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:829

Error: Parse error on line 10:
....174.0 <2.0.0"  },}
---------------------^
Expecting 'STRING', got '}'
    at Object.parseError (/Users/case/Github/linter-jscs/node_modules/jscs/node_modules/jsonlint/lib/jsonlint.js:55:11)
    at Object.parse (/Users/case/Github/linter-jscs/node_modules/jscs/node_modules/jsonlint/lib/jsonlint.js:132:22)
    at exports.parse (/Users/case/Github/linter-jscs/node_modules/jscs/node_modules/jsonlint/lib/jsonlint.js:417:53)
    at Object.exports.getContent (/Users/case/Github/linter-jscs/node_modules/jscs/lib/cli-config.js:81:27)
    at Object.<anonymous> (/Users/case/Github/linter-jscs/node_modules/jscs/lib/cli-config.js:142:31)
    at /Users/case/Github/linter-jscs/node_modules/jscs/lib/cli-config.js:36:24
    at Array.filter (native)
    at findup (/Users/case/Github/linter-jscs/node_modules/jscs/lib/cli-config.js:32:25)
    at Object.exports.load (/Users/case/Github/linter-jscs/node_modules/jscs/lib/cli-config.js:140:9)
    at Function.getConfig (/Users/case/Github/linter-jscs/src/linter-jscs.js:162:23)
    at /Users/case/Github/linter-jscs/src/linter-jscs.js:81:29
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1067:27)
    at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1037:19)
    at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:602:26)
    at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:534:18)
    at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:517:19)
    at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:643:35)
    at atom-workspace.commandRegistry.add.core:save (/Applications/Atom.app/Contents/Resources/app.asar/src/register-default-commands.js:173:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

  2x -6:10 core:save (atom-text-editor.editor.is-focused)
     -3:06.6.0 editor:newline (atom-text-editor.editor.is-focused)
  2x -3:04.3.0 core:save (atom-text-editor.editor.is-focused)
     -1:00.1.0 application:add-project-folder (span.name.icon.icon-file-directory)
     -0:50.9.0 core:save (atom-text-editor.editor.is-focused)
     -0:09.8.0 core:cut (atom-text-editor.editor.is-focused)
  2x -0:07.1.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:06.3.0 core:save (atom-text-editor.editor.is-focused)
     -0:04.7.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:04.7.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:03.8.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:03.6.0 core:save (atom-text-editor.editor.is-focused)
     -0:02.3.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:02.3.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:01.5.0 core:undo (atom-text-editor.editor.is-focused)
     -0:01.1.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "language-jsx",
      "linter-eslint",
      "jshint",
      "jscs-fixer",
      "autocomplete-inline-css",
      "atom-typescript"
    ]
  },
  "linter-jscs": {
    "esnext": true,
    "fixOnSave": true,
    "onlyConfig": true
  }
}

Installed Packages

# User
dixie, vundefined
language-cjsx, v0.3.0
language-jade, v0.6.2
language-javascript-jsx, v0.3.7
linter, v1.2.1
linter-jscs, v3.4.2
react, v0.12.6

# Dev
No dev packages
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants