Skip to content

Commit

Permalink
chore: remove unneeded prettier eslint plugin
Browse files Browse the repository at this point in the history
Issue
=====

Prettier rules seem to be enforced both via prettier itself, and in addition by eslint via
eslint-plugin-prettier.

Prettier docs state the following recommendation:

> When searching for both Prettier and your linter on the Internet you’ll probably find more related
> projects. These are generally not recommended[...]
>
> By running Prettier inside your linters, you didn’t have to set up any new infrastructure and you
> could re-use your editor integrations for the linters.
> But these days you can run `prettier --check .` and most editors have Prettier support.
>
> The downsides of those plugins are:
>
> - You end up with a lot of red squiggly lines in your editor, which gets annoying. Prettier is
>   supposed to make you forget about formatting – and not be in your face about it!
>
> https://prettier.io/docs/en/integrating-with-linters.html

Solution
========

Remove eslint-plugin-prettier from the project, and continue to use prettier as a standalone tool.
This removes the red squiggly lines in the editor.
  • Loading branch information
mikavilpas committed Nov 1, 2024
1 parent 7488014 commit e5df183
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 135 deletions.
5 changes: 1 addition & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'prettier',
],
plugins: ['unicorn', 'import', 'prettier', '@typescript-eslint'],
plugins: ['unicorn', 'import', '@typescript-eslint'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
Expand Down Expand Up @@ -67,9 +67,6 @@ module.exports = {
'no-shadow': 'off',
'prefer-destructuring': 'off', // Intentionally disabled trash.

// prettier things
'prettier/prettier': 'error',

'import/extensions': 'off',
'import/prefer-default-export': 'off',

Expand Down
130 changes: 0 additions & 130 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^50.0.1",
"husky": "^9.1.4",
"lint-staged": "^15.2.10",
Expand Down

0 comments on commit e5df183

Please sign in to comment.