DEV Community

Discussion on: Using ESLint and Prettier in a TypeScript Project

Collapse
 
tonyfung99 profile image
Tony Fung

Hello, I have encountered an error that my eslint config conflict with the prettier one. Currently, I am trying to make my interface using comma as the delimiter, however, prettier enforce me to delete it. Is there any way to disable the prettier restriction on this rule?

My rule in .eslintrc

  '@typescript-eslint/member-delimiter-style': [
            'warn',
            {
                multiline: {
                    delimiter: 'comma',
                    requireLast: true,
                },
                singleline: {
                    delimiter: 'comma',
                    requireLast: false,
                },
            },
        ],
Enter fullscreen mode Exit fullscreen mode

.prettierrc

{
    "parser": "typescript",
    "trailingComma": "all",
    "semi": false,
    "singleQuote": true,
    "printWidth": 120,
    "tabWidth": 4    
}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
rplaha0390 profile image
Raman

Did you find a solution to this? I have also run into the same issue? Thanks