Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
fix: update typescript rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalmaciejewski committed Feb 28, 2020
1 parent c5c0be6 commit 52fae3d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
2 changes: 1 addition & 1 deletion rules/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
'no-import-assign': ['error'],
'no-inner-declarations': ['error'],
'no-invalid-regexp': ['warn'],
'no-irregular-whitespace': ['error'],
'no-irregular-whitespace': ['warn', {skipStrings: true}],
'no-misleading-character-class': ['error'],
'no-obj-calls': ['error'],
'no-prototype-builtins': ['off'],
Expand Down
4 changes: 2 additions & 2 deletions rules/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ module.exports = {
'line-comment-position': ['off'],
'linebreak-style': ['off'],
'lines-around-comment': ['off'],
'lines-between-class-members': ['warn'],
'lines-between-class-members': ['warn', 'always', {exceptAfterSingleLine: true}],
'max-depth': ['off'],
'max-len': ['warn', 140, 4],
'max-len': ['warn', 120, 4],
'max-lines': ['off'],
'max-nested-callbacks': ['off'],
'max-params': ['off'],
Expand Down
33 changes: 21 additions & 12 deletions rules/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ module.exports = {
'@typescript-eslint/consistent-type-definitions': ['warn'],
'default-param-last': ['off'],
'@typescript-eslint/default-param-last': ['error'],
'@typescript-eslint/explicit-function-return-type': ['warn', {
allowExpressions: true,
}],
'@typescript-eslint/explicit-function-return-type': ['off'],
'@typescript-eslint/explicit-member-accessibility': ['off'],
'@typescript-eslint/explicit-module-boundary-types': ['off'],
'func-call-spacing': ['off'],
Expand Down Expand Up @@ -89,15 +87,26 @@ module.exports = {
'@typescript-eslint/switch-exhaustiveness-check': ['off'],
'@typescript-eslint/triple-slash-reference': ['error'],
'@typescript-eslint/type-annotation-spacing': ['warn'],
'@typescript-eslint/typedef': ['warn', {
arrayDestructuring: false,
arrowParameter: true,
memberVariableDeclaration: true,
objectDestructuring: false,
parameter: true,
propertyDeclaration: true,
variableDeclaration: true,
}],
'@typescript-eslint/typedef': ['off'],
'@typescript-eslint/unified-signatures': ['warn'],
},
overrides: [
{
files: ['**/*.ts?(x)'],
rules: {
'@typescript-eslint/explicit-function-return-type': ['warn', {
allowExpressions: true,
}],
'@typescript-eslint/typedef': ['warn', {
arrayDestructuring: false,
arrowParameter: false,
memberVariableDeclaration: true,
objectDestructuring: false,
parameter: true,
propertyDeclaration: true,
variableDeclaration: false,
}],
},
},
],
};

0 comments on commit 52fae3d

Please sign in to comment.