Skip to content

Commit

Permalink
feat(ts): compat for typescript-eslint 2
Browse files Browse the repository at this point in the history
I based my changes on xojs/eslint-config-xo-typescript@1053f6b

and the changelog: https://github.com/typescript-eslint/typescript-eslint/blob/master/CHANGELOG.md#200-2019-08-13

fixes #113

This doesn't seem to be tested anywhere, so :fingers_crossed: haha

BREAKING CHANGE: /typescript requires typescript-eslint v2 now
  • Loading branch information
Haroenv committed Aug 22, 2019
1 parent ff6d4cb commit 2ea17a5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions rules/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@ module.exports = {
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/adjacent-overload-signatures': ['error'],
'@typescript-eslint/array-type': ['error', 'array-simple'],
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
'@typescript-eslint/ban-types': ['error'],
'@typescript-eslint/ban-ts-ignore': ['off'],
'@typescript-eslint/camelcase': ['error'],
'@typescript-eslint/class-name-casing': ['error'],
'@typescript-eslint/consistent-type-assertions': [
'error',
{
assertionStyle: 'as',
objectLiteralTypeAssertions: 'allow-as-parameter'
}
],
'@typescript-eslint/explicit-function-return-type': ['off'],
'@typescript-eslint/explicit-member-accessibility': ['error'],
'@typescript-eslint/generic-type-naming': ['error', '^T[A-Z][a-zA-Z]+$'],
Expand All @@ -21,7 +28,6 @@ module.exports = {
default: ['static-field'],
},
],
'@typescript-eslint/no-angle-bracket-type-assertion': ['error'],
'@typescript-eslint/no-array-constructor': ['error'],
'@typescript-eslint/no-empty-interface': ['error'],
'@typescript-eslint/no-explicit-any': ['off'],
Expand All @@ -31,7 +37,6 @@ module.exports = {
'@typescript-eslint/no-misused-new': ['error'],
'@typescript-eslint/no-namespace': ['error'],
'@typescript-eslint/no-non-null-assertion': ['off'],
'@typescript-eslint/no-object-literal-type-assertion': ['off'],
'@typescript-eslint/no-parameter-properties': ['off'],
'@typescript-eslint/no-require-imports': ['off'],
'@typescript-eslint/no-this-alias': ['off'],
Expand Down

0 comments on commit 2ea17a5

Please sign in to comment.