Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade typescript-eslint packages to v2.1 #161

Merged
merged 1 commit into from Nov 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
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
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
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 }],
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'@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
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typescript-eslint/typescript-eslint#876
I feel that it's a welcome relaxation of the rule. I don't see any downside to it.

}],
'@typescript-eslint/member-delimiter-style': [
'error',
Expand Down