Skip to content

Commit b50a68b

Browse files
armano2bradzacher
authored andcommitted
refactor(eslint-plugin): remove unnecessary type casting (typescript-eslint#246)
1 parent f44783c commit b50a68b

File tree

6 files changed

+197
-197
lines changed

6 files changed

+197
-197
lines changed

packages/eslint-plugin/src/rules/camelcase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default util.createRule<Options, MessageIds>({
1919
category: 'Stylistic Issues',
2020
recommended: 'error'
2121
},
22-
schema: baseRule.meta.schema!,
22+
schema: baseRule.meta.schema,
2323
messages: baseRule.meta.messages
2424
},
2525
defaultOptions: [

packages/eslint-plugin/src/rules/indent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ export default util.createRule<Options, MessageIds>({
9191
recommended: 'error'
9292
},
9393
fixable: 'whitespace',
94-
schema: baseRule.meta!.schema,
95-
messages: baseRule.meta!.messages
94+
schema: baseRule.meta.schema,
95+
messages: baseRule.meta.messages
9696
},
9797
defaultOptions: [
9898
// typescript docs and playground use 4 space indent

packages/eslint-plugin/src/rules/no-use-before-define.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export default util.createRule<Options, MessageIds>({
237237
reference.init ||
238238
!variable ||
239239
variable.identifiers.length === 0 ||
240-
(variable.identifiers[0].range![1] < reference.identifier.range![1] &&
240+
(variable.identifiers[0].range[1] < reference.identifier.range[1] &&
241241
!isInInitializer(variable, reference)) ||
242242
!isForbidden(variable, reference)
243243
) {

packages/eslint-plugin/tests/rules/adjacent-overload-signatures.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ class Foo {}
4949
`
5050
export class Foo {}
5151
export class Bar {}
52-
export type FooBar = Foo | Bar;
52+
export type FooBar = Foo | Bar;
5353
`,
5454
`
5555
export interface Foo {}
5656
export class Foo {}
5757
export class Bar {}
58-
export type FooBar = Foo | Bar;
58+
export type FooBar = Foo | Bar;
5959
`,
6060
`
6161
export function foo(s: string);

0 commit comments

Comments
 (0)