Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat(ts): compat for typescript-eslint 2 (#114)
* feat(ts): compat for typescript-eslint 2

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

* haha prettier you old chap
  • Loading branch information
Haroenv committed Sep 10, 2019
1 parent 78270f8 commit 170a113
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions rules/typescript.js
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 170a113

Please sign in to comment.