Skip to content

Commit 431928f

Browse files
committed
handle JSXSpreadAttribute
1 parent f526726 commit 431928f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ const noUndefRule = context => {
7878
if (name.type == 'JSXNamespacedName') name = name.namespace
7979
const variables = variablesInScope(context)
8080
node.attributes.forEach(attr => {
81+
if (attr.type == 'JSXSpreadAttribute') return
8182
if (attr.value == null) checkDefined(context, variables, attr.name)
8283
})
8384
if (!standardTags.has(name.name)) checkDefined(context, variables, name)

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
{
22
"name": "eslint-plugin-jsx",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "JSX specific linting rules for ESLint",
55
"main": "built.js",
66
"dependencies": {
77
"eslint-plugin-react": "3.4.2",
88
"html-tags": "1",
99
"svg-tags": "1"
1010
},
11+
"devDependencies": {
12+
"babel-cli": "6",
13+
"babel-preset-node": "5"
14+
},
1115
"files": ["index.js", "built.js"],
1216
"repository": "jkroso/eslint-plugin-jsx",
1317
"keywords": ["eslint", "plugin", "jsx"],
1418
"scripts": {
15-
"prepublish": "babel index.js > built.js"
19+
"prepublish": "babel --presets node index.js > built.js"
1620
},
1721
"author": "Jake Rosoman",
1822
"license": "MIT"

0 commit comments

Comments
 (0)