@davidsneighbour/prettier-config v2024.3.6
@davidsneighbour/prettier-config
is a shared Prettier configuration for my projects. It's uses the ESM format and exports an object with the configuration.
Add @davidsneighbour/prettier-config
to your project
Install the plugin:
npm install --save-dev @davidsneighbour/prettier-config
There are several ways to add a configuration, but the following are the config options I advise to use @davidsneighbour/prettier-config
without or with overrides.
Add a key to your package.json
file:
{
"prettier": "@davidsneighbour/prettier-config"
}
or create a .prettierrc.js
file and export an object that overrides settings:
import prettierConfig from "@davidsneighbour/prettier-config";
export default {
...prettierConfig,
// Add your overrides here.
};
If your project does not uses the ESM format, you need to use the .mjs
extension for this file.
Use with TailwindCSS
This configuration implements Tailwind's Prettier Plugin. To activate it either have a tailwind.config.js
in your project root or override the prettier configuration at tailwindConfig
with the proper path.
const defaultConfiguration = require("@davidsneighbour/prettier-config");
const localConfiguration = {
tailwindConfig: "new path to your config",
};
const configuration = {
...defaultConfiguration,
...localConfiguration,
};
module.exports = configuration;
More information
All configurations
Configurations | ||
---|---|---|
Build Tools | ||
Babel | Webpack | |
Testing | ||
Cypress | HTML Validate | |
Linters and Formatters | ||
Browserslist | ESLint | PostCSS |
Prettier | Stylelint | |
Project Management | ||
Commitlint | Release | |
Markdown and Writing | ||
Markdownlint | Remark Lint | |
Other Tools | ||
Bootstrap | Tools |
7 days ago
7 days ago
8 days ago
9 days ago
15 days ago
15 days ago
18 days ago
19 days ago
18 days ago
20 days ago
21 days ago
21 days ago
21 days ago
23 days ago
23 days ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
7 months ago
7 months ago
7 months ago
10 months ago
10 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
6 months ago
9 months ago
9 months ago
6 months ago
6 months ago
10 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago