Skip to content

Commit

Permalink
feat: upgrade typescript-eslint packages to v2.1
Browse files Browse the repository at this point in the history
Closes #152.
  • Loading branch information
mightyiam committed Nov 12, 2019
1 parent d1ee68e commit 99ced30
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"TypeScript"
],
"dependencies": {
"@typescript-eslint/parser": "^2.0.0",
"@typescript-eslint/parser": "^2.1.0",
"eslint-config-standard": "^14.0.0"
},
"peerDependencies": {
Expand All @@ -71,7 +71,7 @@
"@commitlint/config-conventional": "^8.2.0",
"@commitlint/travis-cli": "^8.2.0",
"@types/node": "^12.7.9",
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^2.1.0",
"ava": "^2.4.0",
"editorconfig-checker": "^3.0.3",
"eslint": "^6.5.1",
Expand Down
5 changes: 4 additions & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ test('export', (t): void => {
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'no-useless-constructor': 'off',
quotes: 'off',
'require-await': 'off',
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
Expand All @@ -33,7 +34,8 @@ test('export', (t): void => {
'@typescript-eslint/explicit-function-return-type': ['error', {
allowExpressions: true,
allowHigherOrderFunctions: true,
allowTypedFunctionExpressions: true
allowTypedFunctionExpressions: true,
allowDirectConstAssertionInArrowFunctions: true
}],
'@typescript-eslint/indent': ['error', 2, {
SwitchCase: 1,
Expand Down Expand Up @@ -75,6 +77,7 @@ test('export', (t): void => {
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-readonly': 'error',
'@typescript-eslint/promise-function-async': 'error',
'@typescript-eslint/quotes': ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }],
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/require-array-sort-compare': 'error',
'@typescript-eslint/require-await': 'error',
Expand Down
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export = {
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'no-useless-constructor': 'off',
quotes: 'off',
'require-await': 'off',

// @typescript-eslint versions of Standard.js rules:
Expand All @@ -40,6 +41,7 @@ export = {
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false, variables: false, typedefs: false }],
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/quotes': ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }],
'@typescript-eslint/require-await': 'error',

// New Typescript-only rules:
Expand All @@ -56,7 +58,8 @@ export = {
'@typescript-eslint/explicit-function-return-type': ['error', {
allowExpressions: true,
allowHigherOrderFunctions: true,
allowTypedFunctionExpressions: true
allowTypedFunctionExpressions: true,
allowDirectConstAssertionInArrowFunctions: true
}],
'@typescript-eslint/member-delimiter-style': [
'error',
Expand Down

0 comments on commit 99ced30

Please sign in to comment.