Use ESLint and 'typescript-eslint' plugin.

Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
David Mehren 2020-04-11 13:01:06 +02:00
parent 22683451bd
commit 0228d00c56
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB
4 changed files with 384 additions and 198 deletions

View file

@ -1,22 +1,36 @@
module.exports = {
"root": true,
"extends": "standard",
"env": {
"node": true
'root': true,
'parser': '@typescript-eslint/parser',
'parserOptions': {
'tsconfigRootDir': __dirname,
'project': ['./tsconfig.json'],
},
"rules": {
'plugins': [
'@typescript-eslint',
],
'extends': [
'standard',
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking'
],
'env': {
'node': true
},
'rules': {
// at some point all of these should return to their default "error" state
// but right now, this is not a good choice, because too many places are
// wrong.
"import/first": ["warn"],
"indent": ["warn"],
"no-console": ["warn"],
"no-multiple-empty-lines": ["warn"],
"no-multi-spaces": ["warn"],
"object-curly-spacing": ["warn"],
"one-var": ["warn"],
"quotes": ["warn"],
"semi": ["warn"],
"space-infix-ops": ["warn"]
'import/first': ['warn'],
'indent': ['warn'],
'no-console': ['warn'],
'no-multiple-empty-lines': ['warn'],
'no-multi-spaces': ['warn'],
'object-curly-spacing': ['warn'],
'one-var': ['warn'],
'quotes': ['warn'],
'semi': ['warn'],
'space-infix-ops': ['warn']
}
};
}