0
votes

I have tons of little projects that come and go and I don’t want to always have to create a .eslintrc file in my root dir or do any other special configuration to get my default lint settings to work.

After a few hours of googling and getting nowhere — I finally found one way to share the eslint settings across multiple Sublime projects that seems to work - just put the .eslintrc file in the parent directory of my projects. SublimeLinter seems smart enough to find it there.

I'm publishing this as one possible way to maybe help someone else in my predicament. I feel like maybe I'm doing something wrong though and there could be a better way?

ESLint offers sharable configs, which make things a little easier but still involve work for each project that wants to use them.

1

1 Answers

1
votes

You can create a .eslintrc file in your home directory, and ESLint will use that as a fallback for any projects that don't specify their own .eslintrc. This is perfect for quick, temporary projects that you create. You can read more in the configuration cascade docs.

If any of them advance to a point where you want to collaborate with other developers, only then do you need to configure a project-specific .eslintrc to make sure that all collaborators are using the same configuration.