mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 10:15:17 -04:00
Use ESLint and 'typescript-eslint' plugin.
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
22683451bd
commit
0228d00c56
4 changed files with 384 additions and 198 deletions
46
.eslintrc.js
46
.eslintrc.js
|
@ -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']
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue