0

In my nuxt2 project I have eslint(8.25) & prettier & stylelint. eslint config:

      extends: [
        '@nuxtjs',
        'plugin:nuxt/recommended',
        'prettier'
      ],
      plugins: [
        'modules-newlines',
        'prettier',
      ],
      rules: {
        'semi': [2, 'always'],
        'prettier/prettier': ['error'],

And in .prettierrc I have rule "semi": true,

And in my styleling I have rule 'declaration-block-trailing-semicolon': 'always',

And my stylelint extends:

extends: [
    'stylelint-config-standard',
    'stylelint-config-standard-scss',
    'stylelint-config-recommended-vue/scss',
    'stylelint-config-prettier',
  ],

I have html tag in template with style attribute, and conflicts only with semicolons here. Eslint suggesting to delete ";" by rule (prettier/prettier). But all is well in js code, scss, etc.

Sinneren
  • 178
  • 12
  • Hi, you can give a try to [that one](https://stackoverflow.com/a/68225547/8816585) and [this one](https://stackoverflow.com/a/68880413/8816585) for a properly working ESlint + Prettier flow. Make sure that those are working well before proceeding. For Stylelint, I recommend using the extension. Or do you want it to be part of the ESlint flow? Like ESlint, then Prettier then Stylelint? If it's the case, you should consider adding the Stylelint config at the end of the array. – kissu Oct 18 '22 at 13:33
  • I tried this configs. Doesn't work. And I am already using stylelint-config-standard and *-scss – Sinneren Oct 18 '22 at 14:15
  • Put Stylelint aside for now so and focus on making those work first. Stacking a lot of things is not gonna help you achieve a functioning setup. – kissu Oct 18 '22 at 14:16
  • I think I found why it's happen https://github.com/prettier/prettier/pull/8013 – Sinneren Oct 19 '22 at 06:17

0 Answers0