https://github.com/jihyunlab/prettier-config
JihyunLab Prettier config for TypeScript.
https://github.com/jihyunlab/prettier-config
prettier prettier-config
Last synced: 3 months ago
JSON representation
JihyunLab Prettier config for TypeScript.
- Host: GitHub
- URL: https://github.com/jihyunlab/prettier-config
- Owner: jihyunlab
- License: mit
- Created: 2023-02-22T01:41:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-19T01:56:20.000Z (6 months ago)
- Last Synced: 2025-05-20T15:55:08.206Z (5 months ago)
- Topics: prettier, prettier-config
- Language: JavaScript
- Homepage: https://npmjs.com/package/@jihyunlab/prettier-config
- Size: 158 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @jihyunlab/prettier-config
[](https://www.npmjs.com/package/@jihyunlab/prettier-config?activeTab=versions) [](https://www.npmjs.com/package/@jihyunlab/prettier-config) [](https://github.com/jihyunlab/prettier-config/graphs/commit-activity) [](https://github.com/jihyunlab/prettier-config/blob/master/LICENSE) [](https://eslint.org) [](https://github.com/prettier/prettier)\
[](https://github.com/jihyunlab/prettier-config/actions/workflows/build.yml) [](https://github.com/jihyunlab/prettier-config/actions/workflows/lint.yml) [](https://github.com/jihyunlab/prettier-config/actions/workflows/prettier.yml)@jihyunlab/prettier-config provides Prettier config for TypeScript.
## Installation
```bash
npm i --save-dev @jihyunlab/prettier-config prettier eslint-config-prettier eslint-plugin-prettier
```## Configuration
### Configure Prettier
Create and edit the prettier.config.mjs file.
```
├─ prettier.config.mjs
└─ ...
``````
import { jihyunlabPrettierConfig } from '@jihyunlab/prettier-config';export default {
...jihyunlabPrettierConfig,
};
```### Configure Prettier Ignore
Create and edit the .prettierignore file.
```
├─ .prettierignore
└─ ...
``````
/node_modules
/build
/dist
/coverage
```### Configure ESLint for Prettier
When using ESLint, edit the eslint.config.mjs file.\
For ESLint installation and configuration, see [@jihyunlab/eslint-config](https://www.npmjs.com/package/@jihyunlab/eslint-config).```
├─ eslint.config.mjs
└─ ...
``````
import eslint from '@eslint/js';
import tsEslint from 'typescript-eslint';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import { jihyunlabEslintConfig } from '@jihyunlab/eslint-config';export default tsEslint.config(
{
ignores: ['node_modules', 'dist', 'build', 'coverage'],
},
{
languageOptions: {
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
extends: [
eslint.configs.recommended,
...tsEslint.configs.recommendedTypeChecked,
jihyunlabEslintConfig,
eslintPluginPrettierRecommended,
],
}
);
```### Configure VSCode for Prettier
When using VSCode, create and edit the .vscode/settings.json file.
```
├─ .vscode
│ └─ settings.json
└─ ...
``````
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
```## Credits
Authored and maintained by JihyunLab <>
## License
Open source [licensed as MIT](https://github.com/jihyunlab/prettier-config/blob/master/LICENSE).