Skip to content

Commit

Permalink
typescript: Always include comments when parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
j-f1 authored and ljharb committed Sep 10, 2017
1 parent 7383977 commit 34e4b95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/src/rules/exports-last.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ ruleTester.run('exports-last', rule, {
// Multiline export
test({
code: `
const baz = 'quux'
export default function foo () {
const foo = 'bar'
export default function bar () {
const very = 'multiline'
}
export const bar = true
export const baz = true
`,
}),
// Many exports
Expand Down
3 changes: 2 additions & 1 deletion utils/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ exports.default = function parse(path, content, context) {
parserOptions = Object.assign({}, parserOptions)
parserOptions.ecmaFeatures = Object.assign({}, parserOptions.ecmaFeatures)

// always attach comments
// always include and attach comments
parserOptions.comment = true
parserOptions.attachComment = true

// provide the `filePath` like eslint itself does, in `parserOptions`
Expand Down

0 comments on commit 34e4b95

Please sign in to comment.