question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Visual Studio Code - "[eslint] Insert `··` (prettier/prettier)"

See original GitHub issue

What version of eslint are you using? 5.6.0

What version of prettier are you using? 1.14.2

What version of eslint-plugin-prettier are you using? 2.6.2

Please paste any applicable config files that you’re using (e.g. .prettierrc or .eslintrc files) // .eslintrc { “parser”: “babel-eslint”, “plugins”: [“react”, “jest”, “prettier”], “extends”: [“airbnb”, “plugin:prettier/recommended”, “prettier/react”], “globals”: { “React”: true, “document”: true, “window”: true, “jQuery”: true, “$”: true, “localStorage”: true, “fetch”: true }, “root”: true, “rules”: { “indent”: [“error”, 2], “react/prefer-stateless-function”: “warn”, “react/self-closing-comp”: [ “warn”, { “component”: true, “html”: false } ], “react/sort-comp”: [ 1, { “order”: [ “static-methods”, “lifecycle”, “everything-else”, “rendering” ], “groups”: { “rendering”: [“/^render.+$/”, “render”] } } ], “jest/no-disabled-tests”: “warn”, “jest/no-focused-tests”: “error”, “jest/no-identical-title”: “error”, “jest/prefer-to-have-length”: “warn”, “jest/valid-expect”: “error”, “react/require-default-props”: 0, “jsx-a11y/href-no-hash”: “off”, “jsx-a11y/anchor-is-valid”: [“warn”, { “aspects”: [“invalidHref”] }], “react/jsx-boolean-value”: [“warn”, “never”], “react/jsx-closing-bracket-location”: [“warn”, “after-props”], “react/jsx-curly-spacing”: [“warn”, “never”], “react/jsx-filename-extension”: [“warn”, { “extensions”: [“.js”, “.jsx”] }], “react/jsx-first-prop-new-line”: [“warn”, “multiline”], “react/jsx-handler-names”: [ “warn”, { “eventHandlerPrefix”: “handle”, “eventHandlerPropPrefix”: “on” } ], “react/jsx-indent”: [“warn”, 2], “react/jsx-key”: “error”, “react/jsx-wrap-multilines”: [“warn”], “react/jsx-indent-props”: 0, “no-trailing-spaces”: [2, { “skipBlankLines”: true }], “prefer-template”: 0, “import/prefer-default-export”: 0, “import/no-unresolved”: 0, “import/no-extraneous-dependencies”: 0, “import/extensions”: 0, “babel/object-curly-spacing”: 0 }, “env”: { “es6”: true, “jest”: true, “browser”: true, “node”: true } }

// .prettierrc { “singleQuote”: true, “trailingComma”: “all” }

What source code are you linting? A react component with the foloowing jsx:

        <div className={styles.contentWrapper}>
          {!isComplete &&
            !isErrored && (
            <div className={styles.loading}>
              <p>Loading...</p>
            </div>
          )}
        </div>

What did you expect to happen? Using Visual Studio Code, Eslint / Prettier warned me to insert line breaks to the ‘loading’ div. I expected adding line breaks would fix the issue.

What actually happened? The warning persists but the instructions are unclear: [eslint] Insert ·· (prettier/prettier)

What is it asking me to insert?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

37reactions
j-f1commented, Oct 3, 2018

It’s telling you to insert two spaces. Running your plugin’s “fix” function will make sure everything’s formatted correctly.

29reactions
begueradjcommented, Mar 31, 2019

running --fix does not fix it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Insert `··` prettier/prettier - visual studio code - Stack Overflow
I have a project that has both prettier and eslint installed. The problem is that when I save a file eslint automatically changes...
Read more >
How to use Prettier with ESLint and TypeScript in VSCode
Install the Prettier VS Code extension here. To set the defaults, press CMD + SHIFT + P (on MacOS) or CTRL + Shift...
Read more >
Config Eslint and Prettier in Visual Studio Code for React js ...
Open the terminal in your project root folder and install eslint as a dev dependency. We also need to enable the eslint and...
Read more >
How to use Prettier with ESLint - Robin Wieruch
We will start by installing the Prettier and ESLint extension/plugin for your editor/IDE. For instance, in VSCode you can find Prettier and ...
Read more >
How to Setup VS Code + Prettier + ESLint - YouTube
A quick video on how I solved my config issues with VS Code, ESLint and Prettier.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found