Skip to content

Commit

Permalink
docs: add instruction for vscode eslint setup (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
iammathew authored Apr 23, 2022
1 parent 3eb61d7 commit 721190a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Despite all the recent hype, setting up a new TypeScript (x React) library can b
- [`npm test` or `yarn test`](#npm-test-or-yarn-test)
- [`npm run lint` or `yarn lint`](#npm-run-lint-or-yarn-lint)
- [`prepare` script](#prepare-script)
- [Setting up VSCode](#setting-up-vscode)
- [Optimizations](#optimizations)
- [Development-only Expressions + Treeshaking](#development-only-expressions--treeshaking)
- [Rollup Treeshaking](#rollup-treeshaking)
Expand Down Expand Up @@ -121,6 +122,10 @@ If you want to customize eslint you can add an `eslint` block to your package.js
Bundles and packages to the `dist` folder.
Runs automatically when you run either `npm publish` or `yarn publish`. The `prepare` script will run the equivalent of `npm run build` or `yarn build`. It will also be run if your module is installed as a git dependency (ie: `"mymodule": "github:myuser/mymodule#some-branch"`) so it can be depended on without checking the transpiled code into git.

## Setting up VSCode

By default the eslint VSCode extension won't work, since it can't find the configuration file needed in order to start the eslint server. Run `npm run lint --write-file` in order to write the config file in the correct location.

## Optimizations

Aside from just bundling your module into different formats, DTS comes with some optimizations for your convenience. They yield objectively better code and smaller bundle sizes.
Expand Down

0 comments on commit 721190a

Please sign in to comment.