'Prettier makes eslint error using Google Typescript Styleguide

I'm using gts npm package for my linter and prettier configuration in NestJS. The problem is that Prettier plugin in vs code adds parenthesis that makes eslint errors. this is typescript code

// Prettier does this
(request.body as unknown) as CreateCustomerDto

// And esLint fixes to this
request.body as unknown as CreateCustomerDto

This is my .prettierrc.js:

module.exports = {
  ...require('gts/.prettierrc.json')
}

And eslintrc.js

module.exports = {
  parser: '@typescript-eslint/parser',
  parserOptions: {
    project: 'tsconfig.json',
    sourceType: 'module',
  },
  plugins: ['@typescript-eslint/eslint-plugin'],
  extends: [
    './node_modules/gts/',
    'plugin:@typescript-eslint/recommended',
    'prettier/@typescript-eslint',
    'plugin:prettier/recommended',
  ],
  root: true,
  env: {
    node: true,
    jest: true,
  },
  rules: {
    '@typescript-eslint/interface-name-prefix': 'off',
    '@typescript-eslint/explicit-function-return-type': 'off',
    '@typescript-eslint/explicit-module-boundary-types': 'off',
    '@typescript-eslint/no-explicit-any': 'warn',
    'node/no-extraneous-import': [
      'error',
      {
        allowModules: ['express'],
      },
    ],
  },
};


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source