How to integrate Prettier into a shareable ESLint configuration?

Viewed 108

One can create shareable ESLint configs to use in multiple projects. It is also possible to integrate Prettier settings into an ESLint config like so:

[...]

rules: {
'prettier/prettier': [
  'error',
  {
    printWidth: 120,
    tabWidth: 2,
    useTabs: false,
    semi: false,
    singleQuote: true,
  },
],

[...]

However, when I do this with my shared config I can't get it to work. When I run eslint --fix it just does nothing at all. How can I integrate ESLint and Prettier somewhere and then just extend my local ESLint with that configuration so I don't have to configure the exact same thing in 20 different repositories?

0 Answers
Related