Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refused to evaluate a string as JavaScript error #10

Closed
subblue opened this issue Jan 22, 2017 · 2 comments
Closed

Refused to evaluate a string as JavaScript error #10

subblue opened this issue Jan 22, 2017 · 2 comments

Comments

@subblue
Copy link

subblue commented Jan 22, 2017

I just installed this new version and now Atom is failing to load the package on startup.

Atom Version: 1.13.0
Electron Version: 1.3.13
System: Mac OS X 10.12.2
Thrown From: prettier-eslint package, v1.1.0

Stack Trace

Failed to load the prettier-eslint package

At Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".


EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".

    at Function.line.toFunction (/Users/tom/.atom/packages/prettier-eslint/node_modules/generate-function/index.js:55:21)
    at compile (/Users/tom/.atom/packages/prettier-eslint/node_modules/is-my-json-valid/index.js:562:23)
    at visit (/Users/tom/.atom/packages/prettier-eslint/node_modules/is-my-json-valid/index.js:337:16)
    at /Users/tom/.atom/packages/prettier-eslint/node_modules/is-my-json-valid/index.js:540:9
    at Array.forEach (native)
    at visit (/Users/tom/.atom/packages/prettier-eslint/node_modules/is-my-json-valid/index.js:537:31)
    at compile (/Users/tom/.atom/packages/prettier-eslint/node_modules/is-my-json-valid/index.js:556:3)
    at module.exports (/Users/tom/.atom/packages/prettier-eslint/node_modules/is-my-json-valid/index.js:585:10)
    at Object.<anonymous> (/Users/tom/.atom/packages/prettier-eslint/node_modules/eslint/lib/testers/rule-tester.js:76:24)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:109:30)
    at Object.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:216:21)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/tom/.atom/packages/prettier-eslint/node_modules/eslint/lib/api.js:11:17)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:109:30)
    at Object.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:216:21)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/tom/.atom/packages/prettier-eslint/dist/index.js:12:15)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:109:30)
    at Object.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:216:21)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)

Commands

     -0:04.1.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-atom-material-syntax.theme-one-dark-ui)

Config

{
  "core": {
    "audioBeep": false,
    "disabledPackages": [
      "tag",
      "react",
      "smart-tab-name",
      "autocomplete-emojis",
      "autocomplete-paths",
      "atom-ternjs",
      "ide-flow",
      "prettier-atom"
    ],
    "packagesWithKeymapsDisabled": [
      "merge-conflicts"
    ],
    "telemetryConsent": "limited",
    "themes": [
      "one-dark-ui",
      "atom-material-syntax"
    ],
    "useCustomTitleBar": true
  }
}

Installed Packages

# User
advanced-open-file, v0.16.5 (inactive)
alignment, v1.1.5 (inactive)
an-old-hope-syntax, v0.5.0 (inactive)
atom-beautify, v0.29.16 (inactive)
atom-eco, v0.2.0 (inactive)
atom-material-syntax, v1.0.2 (inactive)
atom-material-ui, v1.3.9 (inactive)
atom-ternjs, v0.17.0 (inactive)
atom-wallaby, v1.0.14 (inactive)
auto-indent, v0.5.0 (inactive)
autoclose-html, v0.23.0 (inactive)
autocomplete-emojis, v2.5.0 (inactive)
autocomplete-glsl, v0.2.3 (inactive)
autocomplete-html-entities, v0.1.0 (inactive)
autocomplete-modules, v1.6.7 (inactive)
autocomplete-paths, v1.0.5 (inactive)
autocomplete-python, v1.8.27 (inactive)
change-case, v0.6.3 (inactive)
chester-atom-syntax, v0.1.1 (inactive)
color-picker, v2.2.4 (inactive)
compare-files, v0.8.0 (inactive)
css-comb, v2.5.0 (inactive)
css-snippets, v1.1.0 (inactive)
dash, v1.7.0 (inactive)
es6-javascript, v1.0.0 (inactive)
file-icons, v2.0.10 (inactive)
file-types, v0.5.5 (inactive)
git-control, v0.8.2 (inactive)
git-log, v0.4.1 (inactive)
git-time-machine, v1.5.4 (inactive)
highlight-selected, v0.12.0 (inactive)
ide-flow, v0.8.0 (inactive)
javascript-snippets, v1.2.1 (inactive)
jump-to-import, v1.7.5 (inactive)
jumpy, v3.1.3 (inactive)
language-babel, v2.49.4 (inactive)
language-ect, v0.4.0 (inactive)
language-elm, v1.5.0 (inactive)
language-fish-shell, v1.0.5 (inactive)
language-glsl, v2.0.1 (inactive)
language-haml, v0.24.1 (inactive)
linter, v1.11.21 (inactive)
linter-coffeescript, v1.0.0 (inactive)
linter-eslint, v8.0.0 (inactive)
linter-glsl, v2.0.5 (inactive)
linter-stylelint, v3.7.0 (inactive)
merge-conflicts, v1.4.4 (inactive)
minimap, v4.26.7 (inactive)
minimap-cursorline, v0.2.0 (inactive)
minimap-find-and-replace, v4.5.1 (inactive)
minimap-highlight-selected, v4.5.0 (inactive)
open-recent, v5.0.0 (inactive)
pigments, v0.38.0 (inactive)
prettier-atom, v0.0.10 (inactive)
prettier-eslint, v1.1.0 (inactive)
qolor, v0.4.1 (inactive)
quick-query, v0.9.0 (inactive)
react, v0.16.2 (inactive)
script, v3.14.0 (inactive)
set-syntax, v0.3.2 (inactive)
show-in-system, v0.4.0 (inactive)
slime, v2.0.0 (inactive)
smart-tab-name, v1.0.5 (inactive)
sort-lines, v0.14.0 (inactive)
split-diff, v1.1.1 (inactive)
Sublime-Style-Column-Selection, v1.7.2 (inactive)
swap-panes, v0.2.0 (inactive)
sync-settings, v0.8.1 (inactive)
tab-switcher, v1.5.4 (inactive)
tag, v0.4.0 (inactive)
zentabs, v0.8.8 (inactive)
atom-dark-syntax, v0.28.0 (inactive)
atom-dark-ui, v0.53.0 (inactive)
atom-light-syntax, v0.29.0 (inactive)
atom-light-ui, v0.46.0 (inactive)
base16-tomorrow-dark-theme, v1.4.0 (inactive)
base16-tomorrow-light-theme, v1.4.0 (inactive)
one-dark-ui, v1.8.2 (inactive)
one-light-ui, v1.8.2 (inactive)
one-dark-syntax, v1.6.0 (inactive)
one-light-syntax, v1.6.0 (inactive)
solarized-dark-syntax, v1.1.1 (inactive)
solarized-light-syntax, v1.1.1 (inactive)
about, v1.7.2 (inactive)
archive-view, v0.62.0 (inactive)
autocomplete-atom-api, v0.10.0 (inactive)
autocomplete-css, v0.14.1 (inactive)
autocomplete-html, v0.7.2 (inactive)
autocomplete-plus, v2.33.1 (inactive)
autocomplete-snippets, v1.11.0 (inactive)
autoflow, v0.29.0 (inactive)
autosave, v0.23.2 (inactive)
background-tips, v0.26.1 (inactive)
bookmarks, v0.43.2 (inactive)
bracket-matcher, v0.85.1 (inactive)
command-palette, v0.39.1 (inactive)
deprecation-cop, v0.55.1 (inactive)
dev-live-reload, v0.47.0 (inactive)
encoding-selector, v0.22.0 (inactive)
exception-reporting, v0.40.0 (inactive)
find-and-replace, v0.204.5 (inactive)
fuzzy-finder, v1.4.0 (inactive)
git-diff, v1.2.0 (inactive)
go-to-line, v0.31.2 (inactive)
grammar-selector, v0.48.2 (inactive)
image-view, v0.60.0 (inactive)
incompatible-packages, v0.26.1 (inactive)
keybinding-resolver, v0.35.0 (inactive)
line-ending-selector, v0.5.1 (inactive)
link, v0.31.2 (inactive)
markdown-preview, v0.159.1 (inactive)
metrics, v1.1.2 (inactive)
notifications, v0.65.1 (inactive)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.2 (inactive)
settings-view, v0.244.0 (inactive)
snippets, v1.0.4 (inactive)
spell-check, v0.68.5 (inactive)
status-bar, v1.6.0 (inactive)
styleguide, v0.48.0 (inactive)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.1 (inactive)
timecop, v0.33.2 (inactive)
tree-view, v0.211.1 (inactive)
update-package-dependencies, v0.10.0 (inactive)
welcome, v0.35.1 (inactive)
whitespace, v0.35.0 (inactive)
wrap-guide, v0.39.0 (inactive)
language-c, v0.54.0 (inactive)
language-clojure, v0.22.1 (inactive)
language-coffee-script, v0.48.1 (inactive)
language-csharp, v0.13.0 (inactive)
language-css, v0.40.1 (inactive)
language-gfm, v0.88.0 (inactive)
language-git, v0.15.0 (inactive)
language-go, v0.43.0 (inactive)
language-html, v0.47.1 (inactive)
language-hyperlink, v0.16.1 (inactive)
language-java, v0.24.0 (inactive)
language-javascript, v0.122.0 (inactive)
language-json, v0.18.3 (inactive)
language-less, v0.29.6 (inactive)
language-make, v0.22.2 (inactive)
language-mustache, v0.13.0 (inactive)
language-objective-c, v0.15.1 (inactive)
language-perl, v0.37.0 (inactive)
language-php, v0.37.3 (inactive)
language-property-list, v0.8.0 (inactive)
language-python, v0.45.1 (inactive)
language-ruby, v0.70.2 (inactive)
language-ruby-on-rails, v0.25.1 (inactive)
language-sass, v0.57.0 (inactive)
language-shellscript, v0.23.0 (inactive)
language-source, v0.9.0 (inactive)
language-sql, v0.25.0 (inactive)
language-text, v0.7.1 (inactive)
language-todo, v0.29.1 (inactive)
language-toml, v0.18.1 (inactive)
language-xml, v0.34.12 (inactive)
language-yaml, v0.27.1 (inactive)

# Dev
No dev packages

Thanks!

@kentcdodds
Copy link
Member

Hmmm... Did Atom open the issue on this repo? If so I need to fix it because this issue should be on https://github.com/kentcdodds/prettier-eslint-atom

But no worries. Do you think you could dig a little deeper and find out why this is happening? And even submit a fix? Thanks! makeapullrequest.com

@kentcdodds
Copy link
Member

Things have changed a bit. I expect this is no longer a problem. If you do have further issues, please file a new issue on the atom plugin repo as mentioned.

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

No branches or pull requests

2 participants