Skip to content

Commit 399ece1

Browse files
authored
Ignore unused destructured rest members. (rjsf-team#505)
1 parent 73a2ea7 commit 399ece1

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
"linebreak-style": [2, "unix"],
1414
"semi": [2, "always"],
1515
"comma-dangle": [0],
16-
"no-unused-vars": [2, {"vars": "all", "args": "none"}],
16+
"no-unused-vars": [2, {
17+
"vars": "all",
18+
"args": "none",
19+
"ignoreRestSiblings": true
20+
}],
1721
"no-console": [0],
1822
"object-curly-spacing": [2, "never"],
1923
"keyword-spacing": ["error"]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"babel-preset-react": "^6.16.0",
4747
"babel-register": "^6.18.0",
4848
"codemirror": "^5.20.2",
49-
"eslint": "^2.13.1",
49+
"eslint": "^3.15.0",
5050
"chai": "^3.3.0",
5151
"cross-env": "^2.0.1",
5252
"css-loader": "^0.23.1",

src/components/widgets/BaseInput.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ function BaseInput(props) {
99
readonly,
1010
autofocus,
1111
onBlur,
12-
options, // eslint-disable-line
13-
schema, // eslint-disable-line
14-
formContext, // eslint-disable-line
15-
registry, // eslint-disable-line
12+
options,
13+
schema,
14+
formContext,
15+
registry,
1616
...inputProps
1717
} = props;
1818
const _onChange = ({target: {value}}) => {

src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ export function retrieveSchema(schema, definitions={}) {
303303
// Retrieve the referenced schema definition.
304304
const $refSchema = findSchemaDefinition(schema.$ref, definitions);
305305
// Drop the $ref property of the source schema.
306-
const {$ref, ...localSchema} = schema; // eslint-disable-line no-unused-vars
306+
const {$ref, ...localSchema} = schema;
307307
// Update referenced schema definition with local schema properties.
308308
return {...$refSchema, ...localSchema};
309309
}

0 commit comments

Comments
 (0)