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

"Uncaught SyntaxError: Cannot read configuration file" when invalid syntax #76

Closed
rugk opened this issue Jun 29, 2016 · 0 comments
Closed
Labels

Comments

@rugk
Copy link

rugk commented Jun 29, 2016

[Enter steps to reproduce below:]

  1. Create this config file:
{
    "plugins": {
        "remark-lint": {
            "no-literal-urls": false,
            "list-item-indent": false,
            "no-missing-blank-lines": false
            "maximum-line-length": false
        }
    }
}

Atom Version: 1.8.0
System: LMDE Cinnamon
Thrown From: linter-markdown package, v1.5.2

Stack Trace

Uncaught SyntaxError: Cannot read configuration file: /projectdir/.remarkrc
Unexpected string

At /profiledir/.atom/packages/linter-markdown/node_modules/remark/lib/cli/configuration.js:145

SyntaxError: Cannot read configuration file: /projectdir/.remarkrc
Unexpected string
    at Object.parse (native)
    at load (/profiledir/.atom/packages/linter-markdown/node_modules/remark/lib/cli/configuration.js:139:38)
    at /profiledir/.atom/packages/linter-markdown/node_modules/remark/lib/cli/configuration.js:211:21
    at /profiledir/.atom/packages/linter-markdown/node_modules/remark/node_modules/vfile-find-up/index.js:207:17
    at FSReqWrap.oncomplete (fs.js:82:15)

Commands

     -2:05.6.0 editor:outdent-selected-rows (atom-text-editor.editor.is-focused)
     -1:22.1.0 core:delete (atom-text-editor.editor.is-focused)
     -1:20.6.0 core:backspace (atom-text-editor.editor.is-focused)
  2x -1:18 core:undo (atom-text-editor.editor.is-focused)
     -1:13.1.0 core:cut (atom-text-editor.editor.is-focused)
     -1:11.4.0 core:delete (atom-text-editor.editor.is-focused)
     -1:09.7.0 core:save (atom-text-editor.editor.is-focused)
     -1:08.8.0 core:paste (atom-text-editor.editor.is-focused)
     -1:07.5.0 core:save (atom-text-editor.editor.is-focused)
     -0:43.9.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:43.3.0 core:paste (atom-text-editor.editor.is-focused)
  2x -0:42.6.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:17.9.0 core:paste (atom-text-editor.editor.is-focused)
  2x -0:12.9.0 core:backspace (atom-text-editor.editor.is-focused)
  2x -0:11.6.0 core:save (atom-text-editor.editor.is-focused)
     -0:04.7.0 core:backspace (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "metrics",
      "linter-tidy",
      "pigments",
      "css-clean"
    ],
    "packagesWithKeymapsDisabled": [
      "csscomb"
    ],
    "themes": [
      "atom-dark-ui",
      "one-dark-syntax"
    ]
  }
}

Installed Packages

# User
atom-easy-jsdoc, v4.6.0
color-picker, v2.1.1
csscomb, v0.3.1
editorconfig, v1.4.1
linter, v1.11.14
linter-js-yaml, v1.2.5
linter-markdown, v1.5.2
linter-sass-lint, v1.6.1

# Dev
No dev packages

I would at least expect a friendlier error message...

@rugk rugk changed the title "Uncaught SyntaxError: Cannot read configuration file" when invalid syntax(?) "Uncaught SyntaxError: Cannot read configuration file" when invalid syntax Jun 29, 2016
wooorm added a commit that referenced this issue Jul 22, 2016
*  Update remark to version 5.0.0;
*  Use `unified-engine-atom` to deal with processing,
   this adds support for `.remarkignore` files, local remark-lint
   configuration files.

---

Closes GH-71

`remark-lint` specified in `.remarkrc` or `package.json` files now
precedes over the packaged `remark-lint`.

---

Closes GH-83.
Closes GH-76.

Using `unified-engine`, which comes with pretty JSON errors.
wooorm added a commit that referenced this issue Jul 25, 2016
*  Update remark to version 5.0.0;
*  Use `unified-engine-atom` to deal with processing,
   this adds support for `.remarkignore` files, local remark-lint
   configuration files.

---

Closes GH-71

`remark-lint` specified in `.remarkrc` or `package.json` files now
precedes over the packaged `remark-lint`.

---

Closes GH-83.
Closes GH-76.

Using `unified-engine`, which comes with pretty JSON errors.
wooorm added a commit that referenced this issue Jul 27, 2016
*  Update remark to version 5.0.0;
*  Use `unified-engine-atom` to deal with processing,
   this adds support for `.remarkignore` files, local remark-lint
   configuration files.

Closes GH-71 -  `remark-lint` specified in `.remarkrc` or
`package.json` files now precedes over the packaged `remark-lint`.

Closes GH-73 - Update `remark`;

Closes GH-76, closes GH-83 - Using `unified-engine`, which comes with
pretty JSON errors.
wooorm added a commit that referenced this issue Jul 27, 2016
*  Update remark to version 5.0.0;
*  Use `unified-engine-atom` to deal with processing,
   this adds support for `.remarkignore` files, local remark-lint
   configuration files.

Closes GH-71 -  `remark-lint` specified in `.remarkrc` or
`package.json` files now precedes over the packaged `remark-lint`.

Closes GH-73 - Update `remark`;

Closes GH-76, closes GH-83 - Using `unified-engine`, which comes with
pretty JSON errors.
wooorm added a commit that referenced this issue Aug 10, 2016
*   Update `remark` to 5.1.0;
*   Update `remark-lint` to 4.1.0;
*   Update `eslint`, `eslint-config-airbnb-base`
*   Use `unified-engine-atom` to deal with processing,
    this adds support for `.remarkignore` files, local remark-lint
    configuration files.

Closes GH-71 -  `remark-lint` specified in `.remarkrc` or
`package.json` files now precedes over the packaged `remark-lint`.

Closes GH-93 - Update `remark`;

Closes GH-92 - Update `remark-lint`;

Closes GH-76, closes GH-83 - Using `unified-engine`, which comes with
pretty JSON errors.
wooorm added a commit that referenced this issue Aug 10, 2016
*   Update `remark` to 5.1.0;
*   Update `remark-lint` to 4.1.0;
*   Update `eslint`, `eslint-config-airbnb-base`
*   Use `unified-engine-atom` to deal with processing,
    this adds support for `.remarkignore` files, local remark-lint
    configuration files.

Closes GH-71 -  `remark-lint` specified in `.remarkrc` or
`package.json` files now precedes over the packaged `remark-lint`.

Closes GH-93 - Update `remark`;

Closes GH-92 - Update `remark-lint`;

Closes GH-76, closes GH-83 - Using `unified-engine`, which comes with
pretty JSON errors.
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