eslint-config-prettier
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
eslint | 9.2.0 | 2.89 MB | MIT | prod peer |
Eslint-config-prettier is a tool that turns off all the unnecessary rules or rules that might conflict with Prettier, a code formatting tool. This enables you to use your preferred shareable configuration without its stylistic choices interfering when using Prettier. Note that this configuration only disables rules, so it is advisable to use it alongside another configuration.
To utilize eslint-config-prettier, you need to install it first as a dev dependency via npm install eslint-config-prettier --save-dev in your terminal. Then, in your project's ESLint configuration file, you can extend eslint-config-prettier. Here's a simple code example:
{
"extends": ["prettier"]
}
This tells ESLint to stop enforcing stylistic rules that could conflict with Prettier. It's important to note that eslint-config-prettier should be last in the extends array to override other configurations. For configurations that include specific files, use e.g. "prettier/vue" or "prettier/@typescript-eslint".
The eslint-config-prettier documentation can be found on its GitHub page, specifically, the Full README located at https://github.com/prettier/eslint-config-prettier/. This gives you a complete overview and guide on how the tool works, how to install and use it, and how to troubleshoot any issues.