Skip to content

Commit

Permalink
feat: upgrade plugin to v2.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mightyiam committed Dec 24, 2019
1 parent 7f2aacd commit 4feb840
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@
"eslint-plugin-node": ">=9.1.0",
"eslint-plugin-promise": ">=4.2.1",
"eslint-plugin-standard": ">=4.0.0",
"@typescript-eslint/eslint-plugin": ">=2.7.0"
"@typescript-eslint/eslint-plugin": ">=2.8.0"
},
"devDependencies": {
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@commitlint/travis-cli": "^8.2.0",
"@types/node": "^13.1.0",
"@typescript-eslint/eslint-plugin": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^2.8.0",
"ava": "^2.4.0",
"editorconfig-checker": "^3.0.3",
"eslint": "^6.7.2",
Expand Down
2 changes: 1 addition & 1 deletion src/fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface Boo { b_oo: null }
* https://github.com/standard/eslint-config-standard-with-typescript/issues/110
*/
// Inline callbacks don't need return types:
setTimeout(() => {}, 1)
setTimeout(() => { console.log() }, 1)

// The return type is clear from the left side of the assignment:
const double: ((n: number) => number) = n => n * 2
Expand Down
4 changes: 4 additions & 0 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ test('export', (t): void => {
'no-unused-expressions': 'off',
'no-useless-constructor': 'off',
quotes: 'off',
'space-before-function-paren': 'off',
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
'@typescript-eslint/brace-style': ['error', '1tbs', { allowSingleLine: true }],
Expand Down Expand Up @@ -79,6 +80,7 @@ test('export', (t): void => {
}
],
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-dynamic-delete': 'error',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
Expand All @@ -102,6 +104,8 @@ test('export', (t): void => {
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/require-array-sort-compare': 'error',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-template-expressions': 'error',
'@typescript-eslint/space-before-function-paren': ['error', 'always'],
'@typescript-eslint/strict-boolean-expressions': 'error',
'@typescript-eslint/triple-slash-reference': ['error', { lib: 'never', path: 'never', types: 'never' }],
'@typescript-eslint/type-annotation-spacing': 'error'
Expand Down
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const equivalents = [
'no-unused-vars',
'no-unused-expressions',
'no-useless-constructor',
'quotes'
'quotes',
'space-before-function-paren'
] as const

function fromEntries<T> (iterable: Array<[string, T]>): { [key: string]: T } {
Expand Down Expand Up @@ -66,6 +67,7 @@ export = {
singleline: { delimiter: 'comma', requireLast: false }
}
],
'@typescript-eslint/no-dynamic-delete': 'error',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
Expand All @@ -84,6 +86,7 @@ export = {
'@typescript-eslint/require-array-sort-compare': 'error',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/restrict-template-expressions': 'error',
'@typescript-eslint/strict-boolean-expressions': 'error',
'@typescript-eslint/triple-slash-reference': ['error', { lib: 'never', path: 'never', types: 'never' }],
'@typescript-eslint/type-annotation-spacing': 'error'
Expand Down

0 comments on commit 4feb840

Please sign in to comment.