cdfzo v0.2.1
cdfzo/npm
My personal linting/formatting configuration for TypeScript projects using Bun. This is very specific to my needs, but you can use it if you want. It only works on Unix-like systems and without JSX.
Prerequisites
Installation
- Run
bun a -d cdfzo
- Run
bunx cdfzo setup
Usage
Following options are available:
- Default: All created/modified files in this branch (uses
git diff main
) -a
: All files tracked by Git (usesgit ls-files
)-f
: Automatically fix problems (e.g.eslint --fix
)
Following linters are executed by default (in this order):
p
/prettier
: Prettiere
/eslint
: ESLint
Here are some examples of how to use it:
bunx cdfzo
: Run all linters, but only on modified filesbunx cdfzo -f
: Fix or format modified filesbunx cdfzo eslint prettier
: Run ESLint and Prettierbunx cdfzo -a prettier
: Check all files with Prettierbunx cdfzo -fa p
: Format all files with Prettier (shorthand)
Overriding the Configuration
Please do not rename any of the configuration files. If you really want to change the configuration, you can override it in the following way:
Prettier: You can modify the .prettierrc.json
directly.
ESLint: You can override eslint and
typescript-eslint rules in the
eslint.config.ts
like this:
export default [config, { rules: { 'no-undef': 0 } }]
Note
This package already includes @types/bun
, @typescript-eslint/eslint-plugin
,
@typescript-eslint/parser
, eslint
, prettier
, and typescript
. You don't
have to add them separately.