From ac207dcd41ea7f4788b1ff8522f6692f35a54d71 Mon Sep 17 00:00:00 2001 From: Mihaela Dumitru Date: Thu, 18 Nov 2021 18:25:58 +0200 Subject: [PATCH] Add eslint config for typescript --- README.md | 15 +++++++++++++++ typescript.js | 16 ++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 typescript.js diff --git a/README.md b/README.md index 45fee6d..0f9eabc 100644 --- a/README.md +++ b/README.md @@ -70,3 +70,18 @@ If you are using `flow`: ] } ``` + +If you are using `typescript`: + +```bash + npm install --save-dev @typescript-eslint/eslint-plugin @typescript-eslint/parser +``` + +``` +{ + 'extends': [ + '@jitsi/eslint-config', + '@jitsi/eslint-config/typescript' + ] +} +``` diff --git a/typescript.js b/typescript.js new file mode 100644 index 0000000..a6940ca --- /dev/null +++ b/typescript.js @@ -0,0 +1,16 @@ +module.exports = { + parser: '@typescript-eslint/parser', + parserOptions: { + sourceType: 'module' + }, + plugins: [ + '@typescript-eslint' + ], + rules: { + semi: 'off', + + // Ignore unused function params in type declarations + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'error', + } +}