Files like eslintrc, prettierrc or .editorconfig should be in .gitignore? Exist any good practice related to linters config?
Files like eslintrc, prettierrc or .editorconfig should be in .gitignore? Exist any good practice related to linters config?
You should check in (that is commit and not ignore) linter configuration files and editor-independent style and formatting configuration files (like .editorconfig or .clang-format). It's important that these live in the repository because they set a style applicable to all developers and let all developers apply the same standards with their tools. This is important for automated linting and formatting checking (e.g., via CI).
However, you should not check in any configuration file that is editor or developer specific. For example, you would not check in a configuration file for Vim, because not all developers use Vim. (You should not do this even if all of your developers do use the same editor, since settings may differ.) Similarly, you would not check in a code signing file that indicated a particular developer's test certificate, because that would change per developer working on the project. Those things should be listed in a user-specific .gitignore unless they are likely to be present on every developer's system (such as a project-specific config file), in which case the one in the repository is best.