@tinkoff/prettier-config
v4.1.1
Published
Prettier config
Downloads
1,247
Readme
@tinkoff/prettier-config
Common Prettier configuration. Compatible with another eslint configs.
Usage
- Install from npm
npm i --save-dev @tinkoff/prettier-config
- Create
.prettierrc.js
(or.prettierrc.mjs
if you use CJS in project) at project root
export { default } from '@tinkoff/prettier-config';
More information about available at prettier documentation
Available presets
- angular
{
// ...
prettier: '@tinkoff/prettier-config/angular',
}
Migration guide
From v3 to v4
- Upgrade Prettier: Update Prettier to version
^3.2.5
. You can do this by running:
npm install prettier@^3.2.5 -D
- Update Configuration File: If you are using CommonJS (
cjs
) in your project, you need to rename your configuration file and update the export syntax.- Rename
.prettierrc.js
to.prettierrc.mjs.
- Update the content of
.prettierrc.mjs
to useexport default
instead ofmodule.exports
. The updated file should look like this:
- Rename
export { default } from '@tinkoff/eslint-config';
import config from '@tinkoff/eslint-config';
export default {
...config,
// your prettier configuration
};