@ttionya/prettier-config
v2.0.1
Published
Prettier rules.
Downloads
3
Maintainers
Readme
@ttionya/prettier-config
Prettier rules.
Required
Prettier v3.0.0+
Exports
Rules:
Utils (exported from @ttionya/prettier-config/utils
):
mergeConfig
- Merge only two configuration optionsmergeConfigs
- Merge multiple configuration options
Usage
Base
Basic rules.
# NPM
npm i -D @ttionya/prettier-config
# PNPM
pnpm add -D @ttionya/prettier-config
/* Via CommonJS */
const base = require('@ttionya/prettier-config')
module.exports = {
...base,
// your rules
}
/* Via ESM */
import base from '@ttionya/prettier-config'
export default {
...base,
// your rules
}
Plugins
All plugins are optional dependencies, so you will need to install them yourself.
Each plugin is independent of the base rules, allowing you to combine them using the utility functions mergeConfig
and mergeConfigs
exported from @ttionya/prettier-config/utils
.
Plugin JSDoc
# NPM
npm i -D prettier-plugin-jsdoc @ttionya/prettier-config
# PNPM
pnpm add -D prettier-plugin-jsdoc @ttionya/prettier-config
/* Via CommonJS */
const base = require('@ttionya/prettier-config')
const jsdoc = require('@ttionya/prettier-config/jsdoc')
const { mergeConfigs } = require('@ttionya/prettier-config/utils')
module.exports = mergeConfigs([
base,
jsdoc,
{
// your rules
},
])
/* Via ESM */
import base from '@ttionya/prettier-config'
import jsdoc from '@ttionya/prettier-config/jsdoc'
import { mergeConfigs } from '@ttionya/prettier-config/utils'
export default mergeConfigs([
base,
jsdoc,
{
// your rules
},
])
License
ISC