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

Uncaught Error: Definition for rule 'space-unary-word-ops' was not found. #24

Closed
pgoldrbx opened this issue Dec 22, 2014 · 1 comment
Closed

Comments

@pgoldrbx
Copy link

This error shows constantly if no .eslintrc exists or if the space-unary-word-ops rule is not explicitly defined.

Atom Version: 0.165.0
System: Mac OS X 10.9.5
Thrown From: linter-eslint package, v0.3.0

Stack Trace

Uncaught Error: Definition for rule 'space-unary-word-ops' was not found.

At /Users/<username>/.atom/packages/linter-eslint/node_modules/eslint/lib/eslint.js:569

Error: Definition for rule 'space-unary-word-ops' was not found.
  at /Users/<username>/.atom/packages/linter-eslint/node_modules/eslint/lib/eslint.js:569:27
  at Array.forEach (native)
  at EventEmitter.module.exports.api.verify (/Users/<username>/.atom/packages/linter-eslint/node_modules/eslint/lib/eslint.js:545:16)
  at LinterESLint.lintFile (/Users/<username>/.atom/packages/linter-eslint/lib/linter-eslint.coffee:62:21)
  at /Users/<username>/.atom/packages/linter/lib/linter-view.coffee:138:18
  at Array.forEach (native)
  at /Users/<username>/.atom/packages/linter/lib/linter-view.coffee:137:18
  at Object.oncomplete (fs.js:93:15)

Commands

     -0:16.1 core:move-right (input.hidden-input)
     -0:13.1 editor:newline (input.hidden-input)
     -0:12.4 editor:move-to-end-of-word (input.hidden-input)
     -0:12.1 core:move-right (input.hidden-input)
     -0:11.3 core:paste (input.hidden-input)
     -0:10.3 editor:move-to-first-character-of-line (input.hidden-input)
     -0:09.8 core:paste (input.hidden-input)
  2x -0:08.7 editor:move-to-first-character-of-line (input.hidden-input)
  3x -0:07.9 core:select-down (input.hidden-input)
     -0:07.1 core:cut (input.hidden-input)
     -0:06.1 core:delete (input.hidden-input)
     -0:05.0 core:select-down (input.hidden-input)
     -0:02.2 core:backspace (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-atom-dark-syntax.theme-atom-dark-ui)
     -0:00.6 editor:select-to-first-character-of-line (input.hidden-input)
  2x -0:00.2 core:backspace (input.hidden-input)
     -0:00.0 core:save (input.hidden-input)

Config

{
  "core": {
    "audioBeep": false,
    "projectHome": "/Users/<username>/dev",
    "disabledPackages": [
      "linter-jshint",
      "atom-lint",
      "linter-scss-lint",
      "atom-jshint"
    ]
  },
  "linter-eslint": {}
}

Installed Packages

# User
Stylus, v0.4.0
atom-beautify, v0.17.2
atom-handlebars, v0.4.0
compare-files, v0.2.6
eslint, v0.15.0
file-icons, v1.4.3
file-types, v0.3.0
git-log, v0.2.0
indentation-indicator, v0.3.0
language-generic-config, v0.1.3
linter, v0.9.0
linter-jsonlint, v0.1.2
linter-jsxhint, v0.0.9
pretty-json, v0.3.1
react, v0.7.1
terminal-panel, v1.7.0

# Dev
No dev packages

/cc @atom/core

@jfaissolle
Copy link
Member

Hello @pgoldrbx, are you sure that there is no .eslintrc file in your home folder (/Users/<username>) ? This would be consistent with this error. In newer eslint versions the name of the rule space-unary-word-ops has been changed to space-unary-ops. I suspect you have an old .eslintrc file in your $HOME directory which is used for defaults. Please note that rules used for linting are computed from all the .eslintrc files found in the file directory hierarchy.

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

No branches or pull requests

2 participants