Skip to content

Commit

Permalink
Merge pull request #21 from mihhu/typescript-lint-rules
Browse files Browse the repository at this point in the history
Add eslint config for typescript
  • Loading branch information
Calinteodor authored Nov 29, 2021
2 parents aeb2fd1 + ac207dc commit 73d5f86
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
]
}
```
16 changes: 16 additions & 0 deletions typescript.js
Original file line number Diff line number Diff line change
@@ -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',
}
}

0 comments on commit 73d5f86

Please sign in to comment.