Skip to content

Commit

Permalink
Fix #1004 newline-after-import not recognizing decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
Averin Anton committed Jul 19, 2018
1 parent c72c96a commit f528f60
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/src/rules/newline-after-import.js
Expand Up @@ -368,11 +368,16 @@ ruleTester.run('newline-after-import', require('rules/newline-after-import'), {
parser: 'babel-eslint',
},
{
code : `// issue 10042
code: `// issue 10042
import foo from 'foo';
@SomeDecorator(foo)
export default class Test {}
`,
output: `// issue 10042
import foo from 'foo';\n
@SomeDecorator(foo)
export default class Test {}
`,
errors: [ {
line: 2,
column: 9,
Expand All @@ -382,11 +387,16 @@ ruleTester.run('newline-after-import', require('rules/newline-after-import'), {
parser: 'babel-eslint',
},
{
code : `// issue 1004
code: `// issue 1004
const foo = require('foo');
@SomeDecorator(foo)
export default class Test {}
`,
output: `// issue 1004
const foo = require('foo');\n
@SomeDecorator(foo)
export default class Test {}
`,
errors: [ {
line: 2,
column: 9,
Expand Down

0 comments on commit f528f60

Please sign in to comment.