Needs advice
on
ESLintESLintSass Lint Sass Lint
and
StylelintStylelint

Scenario: I want to integrate Prettier in our code base which is currently using ESLint (for .js and .scss both). The project is using gulp.

It doesn't feel quite right to me to use ESLint, I wonder if it would be better to use Stylelint or Sass Lint instead.

I completed integrating ESLint + Prettier, Planning to do the same with [ Stylelint || Sasslint || EsLint] + Prettier.

And have gulp 'fix' on file save (Watcher).

Any recommendation is appreciated.

READ LESS
7 upvotes·450.6K views
Replies (3)
Software Engineer at SpeedUrWeb·
Recommends
on
Stylelint

Pura vida! Well, I had a similar issue and at the end I decided to use Stylelint + Prettier for that job, in our case, we wanted that our linting process includes the SCSS files and not only the JS file, base on that we concluded that using only ESLint to do both things wasn't the best option, so, we integrated prettier with Stylelint, and for that we used a neat plugin that allowed us to use Prettier inside Stylelint here is the link, https://github.com/prettier/stylelint-prettier#recommended-configuration, I hope that this can help you, hasta pronto!, :)

READ MORE
5 upvotes·1 comment·163.7K views
Carlos Benavides
Carlos Benavides
·
May 15th 2020 at 8:28PM

Thanks for commenting @Alexis,

Honestly, I did forget what I did at the end, so I just went back to see what was my decision...

and... yes Stylelint was the one.

·
Reply
Senior Frontend Developer at Landbot.io·
Recommends
on
ESLint

In the case of .js files I would recommend using both Eslint and Prettier.

You can set up Prettier as an Eslint rule using the following plugin:

https://github.com/prettier/eslint-plugin-prettier

And in order to avoid conflicts between Prettier and Eslint, you can use this config:

https://github.com/prettier/eslint-config-prettier

Which turns off all Eslint rules that are unnecessary or might conflict with Prettier.

READ MORE
6 upvotes·1 comment·164K views
Alex Spieslechner
Alex Spieslechner
·
August 7th 2020 at 7:05PM

prettier officially discourages the use of eslint-plugin-prettier.

https://prettier.io/docs/en/integrating-with-linters.html

·
Reply
View all (3)
Avatar of Alexis Villegas Torres

Alexis Villegas Torres

Software Engineer at SpeedUrWeb