Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Fix: Remove start and end values from JSX tokens (fixes #341) #351

Merged
merged 1 commit into from
Aug 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/node-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,6 @@ function convertToken(token, ast) {
newToken = {
type: getTokenType(token),
value,
start,
end,
range: [start, end],
loc: getLocFor(start, end, ast)
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"license": "BSD-2-Clause",
"devDependencies": {
"babel-code-frame": "^6.22.0",
"babylon": "^7.0.0-beta.16",
"babylon": "^7.0.0-beta.19",
"eslint": "3.19.0",
"eslint-config-eslint": "4.0.0",
"eslint-plugin-node": "4.2.2",
Expand Down
2 changes: 2 additions & 0 deletions tests/ast-alignment/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ function parseWithTypeScriptESLintParser(text) { // eslint-disable-line
range: true,
tokens: false,
comment: false,
useJSXTextNode: true,
errorOnUnknownASTType: true,
ecmaFeatures: {
jsx: true
}
Expand Down
3 changes: 2 additions & 1 deletion tests/ast-alignment/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const fixturePatternsToTest = [
"basics/instanceof.src.js",
"basics/update-expression.src.js",
"basics/new-without-parens.src.js",
"ecma-features/arrowFunctions/**/as*.src.js"
"ecma-features/arrowFunctions/**/as*.src.js",
"jsx/attributes.src.js"
];

const fixturesToTest = [];
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/jsx/attributes.src.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<foo bar="baz" qux={quz} spread={...rest}>test</foo>
<foo bar="baz" qux={quz} {...rest}>test</foo>
Loading