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

Uncaught Error: Config values to remove in 3.0:The esprima option since CST uses babylon (the ... #235

Closed
joecarney opened this issue May 8, 2016 · 3 comments
Labels

Comments

@joecarney
Copy link

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.7.3
System: Mac OS X 10.11.4
Thrown From: linter-jscs package, v4.0.0

Stack Trace

Uncaught Error: Config values to remove in 3.0:
The esprima option since CST uses babylon (the babel parser) under the hood

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

Error: Config values to remove in 3.0:
The `esprima` option since CST uses babylon (the babel parser) under the hood
    at NodeConfiguration.Configuration._errorOnRemovedOptions (/Users/josephcarney/.atom/packages/linter-jscs/node_modules/jscs/lib/config/configuration.js:401:15)
    at NodeConfiguration.Configuration._processConfig (/Users/josephcarney/.atom/packages/linter-jscs/node_modules/jscs/lib/config/configuration.js:420:10)
    at NodeConfiguration.Configuration.load (/Users/josephcarney/.atom/packages/linter-jscs/node_modules/jscs/lib/config/configuration.js:203:10)
    at [object Object].StringChecker.configure (/Users/josephcarney/.atom/packages/linter-jscs/node_modules/jscs/lib/string-checker.js:62:29)
    at [object Object].Checker.configure (/Users/josephcarney/.atom/packages/linter-jscs/node_modules/jscs/lib/checker.js:28:39)
    at Function.fixString (/Users/josephcarney/.atom/packages/linter-jscs/src/linter-jscs.js:240:15)
    at /Users/josephcarney/.atom/packages/linter-jscs/src/linter-jscs.js:95:18
    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:1091:20)
    at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1083:19)
    at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:660:26)
    at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:718:18)
    at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:701:19)
    at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:684:35)
    at atom-workspace.commandRegistry.add.core:save (/Applications/Atom.app/Contents/Resources/app.asar/src/register-default-commands.js:214: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:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

  3x -0:36.1.0 core:close (atom-text-editor.editor.is-focused)
     -0:00.8.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "tool-bar",
      "tool-bar-atom"
    ],
    "themes": [
      "seti-ui",
      "seti-syntax"
    ]
  },
  "linter-jscs": {
    "displayAs": "warning",
    "esnext": true,
    "fixOnSave": true,
    "onlyConfig": true
  }
}

Installed Packages

# User
atom-beautify, v0.29.7
atom-html-preview, v0.1.19
atom-ternjs, v0.14.1
auto-update-packages, v1.0.1
autocomplete-modules, v1.4.1
autocomplete-paths, v1.0.2
character-count, v1.0.3
color-picker, v2.1.1
docblockr, v0.7.3
javascript-snippets, v1.2.1
jsonlint, v1.1.2
language-babel, vundefined
language-javascript-jsx, v0.3.7
linter, v1.11.4
linter-csslint, v1.3.2
linter-eslint, v7.2.2
linter-jscs, v4.0.0
linter-jsxhint, v0.1.2
linter-php, v1.2.0
linter-tidy, v2.1.0
minimap, vundefined
minimap-pigments, v0.2.1
pigments, v0.26.2
pretty-json, v1.0.3
react, v0.15.0
react-snippets, v0.4.2
redux-snippets, v0.2.2
seti-syntax, v1.0.1
seti-ui, v1.0.4
sync-settings, v0.7.2
wordcount, v2.6.0

# Dev
No dev packages
@EvHaus
Copy link

EvHaus commented May 8, 2016

Upgrading to JSCS 3.0 was probably a bit premature. JSCS 3.0 is completely broken for some projects at the moment due to this bug: jscs-dev/node-jscs#2219

@Arcanemagus
Copy link
Member

Arcanemagus commented May 8, 2016

@EvNaverniouk I would recommend you just use an older version of this package then until jscs@3 meets your needs. There are no plans to downgrade the version of the bundled jscs here, especially as the old versions of this package still work just fine.

Personally I would recommend you look into switching to eslint, the jscs team has merged into the ESLint organization, and have begun the work of migrating the few things that jscs does that eslint doesn't yet over to it.

@joecarney and @piotr-cz If you read the error message it is telling you that you have specified the esprima option in your jscs configuration somewhere, which is no longer valid as of jscs@3.

@piotr-cz
Copy link
Contributor

piotr-cz commented May 9, 2016

Yes, I've specified

/*jscs:enable esnext */

in my gulpfile. After removing it, error goes away

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

4 participants