Skip to content

Commit

Permalink
refactor(eslint-plugin): remove unnecessary type casting (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
armano2 authored and bradzacher committed Feb 11, 2019
1 parent f44783c commit b50a68b
Show file tree
Hide file tree
Showing 6 changed files with 197 additions and 197 deletions.
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/camelcase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default util.createRule<Options, MessageIds>({
category: 'Stylistic Issues',
recommended: 'error'
},
schema: baseRule.meta.schema!,
schema: baseRule.meta.schema,
messages: baseRule.meta.messages
},
defaultOptions: [
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin/src/rules/indent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ export default util.createRule<Options, MessageIds>({
recommended: 'error'
},
fixable: 'whitespace',
schema: baseRule.meta!.schema,
messages: baseRule.meta!.messages
schema: baseRule.meta.schema,
messages: baseRule.meta.messages
},
defaultOptions: [
// typescript docs and playground use 4 space indent
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/no-use-before-define.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export default util.createRule<Options, MessageIds>({
reference.init ||
!variable ||
variable.identifiers.length === 0 ||
(variable.identifiers[0].range![1] < reference.identifier.range![1] &&
(variable.identifiers[0].range[1] < reference.identifier.range[1] &&
!isInInitializer(variable, reference)) ||
!isForbidden(variable, reference)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ class Foo {}
`
export class Foo {}
export class Bar {}
export type FooBar = Foo | Bar;
export type FooBar = Foo | Bar;
`,
`
export interface Foo {}
export class Foo {}
export class Bar {}
export type FooBar = Foo | Bar;
export type FooBar = Foo | Bar;
`,
`
export function foo(s: string);
Expand Down
Loading

0 comments on commit b50a68b

Please sign in to comment.