Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Commit 8406209

Browse filesBrowse files
authored
Fix: Remove start and end values from JSX tokens (fixes eslint#341) (eslint#351)
1 parent 046727a commit 8406209
Copy full SHA for 8406209

File tree

Expand file treeCollapse file tree

6 files changed

+83
-153
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+83
-153
lines changed

‎lib/node-utils.js

Copy file name to clipboardExpand all lines: lib/node-utils.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,6 @@ function convertToken(token, ast) {
627627
newToken = {
628628
type: getTokenType(token),
629629
value,
630-
start,
631-
end,
632630
range: [start, end],
633631
loc: getLocFor(start, end, ast)
634632
};

‎package.json

Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"license": "BSD-2-Clause",
2020
"devDependencies": {
2121
"babel-code-frame": "^6.22.0",
22-
"babylon": "^7.0.0-beta.16",
22+
"babylon": "^7.0.0-beta.19",
2323
"eslint": "3.19.0",
2424
"eslint-config-eslint": "4.0.0",
2525
"eslint-plugin-node": "4.2.2",

‎tests/ast-alignment/parse.js

Copy file name to clipboardExpand all lines: tests/ast-alignment/parse.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ function parseWithTypeScriptESLintParser(text) { // eslint-disable-line
4646
range: true,
4747
tokens: false,
4848
comment: false,
49+
useJSXTextNode: true,
50+
errorOnUnknownASTType: true,
4951
ecmaFeatures: {
5052
jsx: true
5153
}

‎tests/ast-alignment/spec.js

Copy file name to clipboardExpand all lines: tests/ast-alignment/spec.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const fixturePatternsToTest = [
1111
"basics/instanceof.src.js",
1212
"basics/update-expression.src.js",
1313
"basics/new-without-parens.src.js",
14-
"ecma-features/arrowFunctions/**/as*.src.js"
14+
"ecma-features/arrowFunctions/**/as*.src.js",
15+
"jsx/attributes.src.js"
1516
];
1617

1718
const fixturesToTest = [];

‎tests/fixtures/jsx/attributes.src.js

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<foo bar="baz" qux={quz} spread={...rest}>test</foo>
1+
<foo bar="baz" qux={quz} {...rest}>test</foo>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.