OmniSharp / atom-json-schema

Json schema intellisense and validation for Atom
MIT License
43 stars 15 forks source link

Unsafe eval error when registering json-schema as atom linter #36

Closed ijdickinson closed 2 years ago

ijdickinson commented 7 years ago

Having recently upgraded to Atom 1.17.2 on Ubuntu 17.04, I'm getting an error every time any linter tries to run:

/home/ian/.atom/packages/linter/lib/linter-registry.js:159 [Linter] Error running Unknown 
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 (/home/ian/.atom/packages/json-schema/node_modules/generate-function/index.js:55:21)

The full stacktrace is long, so I've put it in a gist.

Other info:

$ atom --version
Atom    : 1.17.2
Electron: 1.3.15
Chrome  : 52.0.2743.82
Node    : 6.5.0

$ apm ls
Built-in Atom Packages (90)
├── atom-dark-syntax@0.28.0
├── atom-dark-ui@0.53.0
├── atom-light-syntax@0.29.0
├── atom-light-ui@0.46.0
├── base16-tomorrow-dark-theme@1.5.0
├── base16-tomorrow-light-theme@1.5.0
├── one-dark-ui@1.10.3
├── one-light-ui@1.10.3
├── one-dark-syntax@1.7.1
├── one-light-syntax@1.7.1
├── solarized-dark-syntax@1.1.2
├── solarized-light-syntax@1.1.2
├── about@1.7.6
├── archive-view@0.63.2
├── autocomplete-atom-api@0.10.1
├── autocomplete-css@0.16.1
├── autocomplete-html@0.7.3
├── autocomplete-plus@2.35.3
├── autocomplete-snippets@1.11.0
├── autoflow@0.29.0
├── autosave@0.24.2
├── background-tips@0.27.0
├── bookmarks@0.44.3
├── bracket-matcher@0.85.5
├── command-palette@0.40.4
├── dalek@0.2.1
├── deprecation-cop@0.56.7
├── dev-live-reload@0.47.1
├── encoding-selector@0.23.3
├── exception-reporting@0.41.4
├── find-and-replace@0.208.3
├── fuzzy-finder@1.5.8
├── git-diff@1.3.5
├── go-to-line@0.32.0
├── grammar-selector@0.49.4
├── image-view@0.61.2
├── incompatible-packages@0.27.3
├── keybinding-resolver@0.38.0
├── line-ending-selector@0.6.3
├── link@0.31.3
├── markdown-preview@0.159.12
├── metrics@1.2.5
├── notifications@0.67.2
├── open-on-github@1.2.1
├── package-generator@1.1.1
├── settings-view@0.249.4
├── snippets@1.1.4
├── spell-check@0.71.4
├── status-bar@1.8.7
├── styleguide@0.49.6
├── symbols-view@0.115.5
├── tabs@0.106.0
├── timecop@0.36.0
├── tree-view@0.217.1
├── update-package-dependencies@0.12.0
├── welcome@0.36.3
├── whitespace@0.36.2
├── wrap-guide@0.40.1
├── language-c@0.57.0
├── language-clojure@0.22.2
├── language-coffee-script@0.48.6
├── language-csharp@0.14.2
├── language-css@0.42.2
├── language-gfm@0.88.1
├── language-git@0.19.0
├── language-go@0.43.1
├── language-html@0.47.2
├── language-hyperlink@0.16.1
├── language-java@0.27.0
├── language-javascript@0.126.1
├── language-json@0.19.0
├── language-less@0.32.0
├── language-make@0.22.3
├── language-mustache@0.13.1
├── language-objective-c@0.15.1
├── language-perl@0.37.0
├── language-php@0.38.0
├── language-property-list@0.9.1
├── language-python@0.45.2
├── language-ruby@0.71.0
├── language-ruby-on-rails@0.25.2
├── language-sass@0.59.0
├── language-shellscript@0.25.0
├── language-source@0.9.0
├── language-sql@0.25.4
├── language-text@0.7.2
├── language-todo@0.29.1
├── language-toml@0.18.1
├── language-xml@0.35.0
└── language-yaml@0.29.0

Community Packages (19) /home/ian/.atom/packages
├── api-workbench@0.8.45
├── atom-language-velocity@1.1.0
├── busy-signal@1.4.1
├── docblockr@0.10.3
├── highlight-selected@0.13.1
├── intentions@1.1.2
├── json-schema@0.1.15
├── language-haml@0.24.5
├── language-rdf@0.5.0
├── linter@2.1.4
├── linter-eslint@8.2.1
├── linter-rubocop@2.1.1
├── linter-ui-default@1.6.0
├── minimap@4.28.2
├── open-recent@5.0.0
├── pigments@0.39.1
├── project-manager@3.3.5
├── sync-settings@0.8.1
└── todo-show@1.11.0
Arcanemagus commented 7 years ago

Just a note, this should only show when editing a JSON file, not "any linter".

ijdickinson commented 7 years ago

@Arcanemagus Would that that were true. I get it when viewing my *.js and *.rb files in any project that contains ESLint or Rubocop config files. If it only happened when I was viewing a JSON file I could probably live with it.

Arcanemagus commented 7 years ago

Hmmm, I wonder if this line is breaking CompositeDisposable for everything...

ijdickinson commented 2 years ago

Closing as obsolete