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.

Replace `↹` with `··`

See original GitHub issue

What version of eslint are you using? 4.18.2

What version of prettier are you using? 1.13.7

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

Please paste any applicable config files that you’re using (e.g. .prettierrc or .eslintrc files)

.prettierrc.js

module.exports = {
  semi: false,
  tabWidth: 2,
  singleQuote: true,
  useTabs: false
}

.eslintrc

module.exports = {
  root: true,
  parserOptions: {
    parser: 'babel-eslint'
  },
  env: {
    browser: true
  },
  extends: [
    'plugin:vue/essential',
    'standard',
    'prettier'
  ],
	plugins: ['vue', 'prettier'],
  rules: {
    'generator-star-spacing': 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'prettier/prettier': 'error'
  }
}

Additional Info MacOS 10.13.5 Keyboard Layout: UK (British) English Software: Visual Studio Code 1.25.0 node: 10.5.0 npm: 6.1.0

Visual Studio User settings:

"editor.formatOnSave": true,
"[javascript]": {
  "editor.formatOnSave": false
},
"eslint.autoFixOnSave": true,
"eslint.alwaysShowStatus": true,
"prettier.disableLanguages": [
  "js"
],
"files.autoSave": "onFocusChange",
"git.enableSmartCommit": true,
"editor.fontSize": 14,
"editor.formatOnType": false,
"prettier.singleQuote": true,
"prettier.semi": false,
"prettier.eslintIntegration": true,
"vetur.format.defaultFormatter.html": "js-beautify-html"

What source code are you linting?

<template>
	<section id="contact-form" class="contact-form">
		<form v-if="isSent == false" class="form" @submit="onSubmit" method="post">
			<input name="name" v-model="contact.name" placeholder="NAME" type="text" autocomplete="name" required>
			<input name="email" v-model="contact.email" placeholder="EMAIL" type="email" autocomplete="email" required>
			<input name="phone" v-model="contact.phone" placeholder="PHONE" type="text" autocomplete="phone" required>
			<textarea name="enquiry" v-model="contact.enquiry" rows="4" placeholder="ENQUIRY" required></textarea>
			<div class="button-wrap">
				<button class="button" :disabled="isSending === true">Send Enquiry</button>
			</div>
		</form>

		<h3 class="thank-you" v-if="isSent"> Thank you for sending your enquiry!</h3>
	</section>

</template>

<script>
import axios from 'axios'
export default {
  name: 'ContactForm',

  data() {
    return {
      contact: {
        name: '',
        email: '',
        phone: '',
        enquiry: ''
      },
      isSending: false,
      isSent: false
    }
  },

  methods: {
    onSubmit: function(e) {
      e.preventDefault()
      const qs = require('qs')

      this.isSending = true

      axios
        .post(
          '/app.php',
          qs.stringify({
            name: this.contact.name,
            email: this.contact.email,
            phone: this.contact.phone,
            enquiry: this.contact.enquiry
          })
        )
        .then(response => {
          if (response.status === 200) {
            this.isSent = true
            this.isSending = false
          }
        })
        .catch(e => {
          console.log(e)
        })
    }
  }
}
</script>
<style lang="scss" scoped>
@import '~@/scss/main';

.contact-form {
  background: $color-black;
  color: $color-white;
  padding: 4.5rem 3.5rem;

  p,
  form {
    max-width: 66rem;
    margin: 0 auto;
  }

  form {
    margin-top: 4rem;
  }
}

.button {
  margin: 6rem 0 4rem;
  border: 0.2rem solid $color-black;
  cursor: pointer;

  &:hover {
    background: $color-black;
    color: $color-aureolin;
    border: 0.2rem solid $color-aureolin;
  }

  &:disabled,
  &:disabled:hover,
  &:disabled:focus {
    border: 1px solid $color-gray;
    background-color: $color-iron;
    color: $color-mine-shaft;
    cursor: not-allowed;
  }
}
</style>

What did you expect to happen? I was expecting Prettier plugin to automatically fix any spacing issue on the script section of the ‘.vue’ file as it does for the ‘.js’ files or not throw any error.

What actually happened? During each build, it throws errors like these: Replace ↹↹↹↹↹ with ··········. The only way to fix it is manually delete the ‘tab’ characters and replace them with spaces one by one.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:23
  • Comments:25 (2 by maintainers)

github_iconTop GitHub Comments

152reactions
not-an-aardvarkcommented, Jul 20, 2018

Hi,

In order to automatically fix your code, you need to run ESLint with the --fix flag.

63reactions
ivalsarajcommented, Feb 11, 2020

Had the same issue.

{
  "useTabs": false
}

This fixed my issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prettier ask me to replace ⏎↹↹ with
I cloned a github repo and literally just tried to change like one line but I got hit by this prettier error which...
Read more >
eslint/eslint - Gitter
There are rules in semistandard that should replace the prettier ones, but that isnot working as expected. What am I doing wrong? The...
Read more >
Replace ···· with ········ prettier/prettier And Failed to load config ...
ERROR:Line 2:1: Insert ·· prettier/prettier Line 3:1: Replace ···· with ········ prettier/prettier Replace...
Read more >
[Solved]-Prettier ask me to replace ⏎↹↹ with ·-Reactjs
I figured the formatting issue (VS Code):. settings.json: "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, "editor.
Read more >
How to replace Prettier by ESLint rules ? | by Florian Briand
Prettier is a well-known solution to enforce a consistent coding style along a project. It can address things like rewriting code where ...
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