From 721190a93766d6bcb58e0792239438fb1131fac4 Mon Sep 17 00:00:00 2001 From: Mathew <23657891+iammathew@users.noreply.github.com> Date: Sat, 23 Apr 2022 02:39:55 +0200 Subject: [PATCH] docs: add instruction for vscode eslint setup (#151) --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 0e3a1e69e..541761e69 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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.