L
L
lexstile2021-12-20 18:01:33
Linter
lexstile, 2021-12-20 18:01:33

How to set up prettier/eslint linking with tabs replaced with spaces?

Tell me, please, how can I enable the rule so that prettier replaces tabs with spaces?
While I observe such a situation with the current configuration:
61c09a93d0522763849293.png
eslint:

spoiler
module.exports = {
  "env": {
    "browser": true,
    "es2021": true,
    "node": true
  },
  "extends": [
    "eslint:recommended",
    "plugin:react/recommended",
    "plugin:@typescript-eslint/recommended",
    "plugin:prettier/recommended",
    "prettier"
  ],
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true
    },
    "ecmaVersion": 13,
    "sourceType": "module"
  },
  "plugins": [
    "react",
    "@typescript-eslint",
    "prettier"
  ],
  "rules": {
    "@typescript-eslint/ban-ts-comment": "off",
    "prettier/prettier": [
      "error",
      {
        "endOfLine": "auto",
      }
    ]
  }
};

prettier
spoiler
{
  "printWidth": 120,
  "useTabs": false,
  "singleQuote": true
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question