Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
ESLint: Enable ignoreRestSiblings option for no-unused-vars rule
  • Loading branch information
tyxla committed Jun 24, 2022
commit e85fc46e2d81df358e6b1e20ef2791b0473d2722
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions packages/block-library/src/comments-title/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ export default [
},
supports,
migrate: ( oldAttributes ) => {
/* eslint-disable no-unused-vars */
const {
singleCommentLabel,
multipleCommentsLabel,
...newAttributes
} = oldAttributes;
/* eslint-enable no-unused-vars */
return newAttributes;
},
isEligible: ( { multipleCommentsLabel, singleCommentLabel } ) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,8 @@ class KeyboardAvoidingView extends Component {
}

render() {
const {
children,
enabled,
keyboardVerticalOffset, // eslint-disable-line no-unused-vars
style,
...props
} = this.props;
const { children, enabled, keyboardVerticalOffset, style, ...props } =
this.props;

let finalStyle = style;
if ( Platform.OS === 'ios' ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const useNavigationTreeNodes = () => {
const getNode = ( key ) => nodes[ key ];

const addNode = ( key, value ) => {
// eslint-disable-next-line no-unused-vars
const { children, ...newNode } = value;
return setNodes( ( original ) => ( {
...original,
Expand All @@ -19,7 +18,6 @@ export const useNavigationTreeNodes = () => {

const removeNode = ( key ) => {
return setNodes( ( original ) => {
// eslint-disable-next-line no-unused-vars
const { [ key ]: removedNode, ...remainingNodes } = original;
return remainingNodes;
} );
Expand Down
8 changes: 1 addition & 7 deletions packages/editor/src/components/provider/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,7 @@ class NativeEditorProvider extends Component {
}

render() {
const {
children,
post, // eslint-disable-line no-unused-vars
capabilities,
settings,
...props
} = this.props;
const { children, post, capabilities, settings, ...props } = this.props;
const editorSettings = this.getEditorSettings( settings, capabilities );

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/configs/es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = {
'no-unreachable': 'error',
'no-unsafe-negation': 'error',
'no-unused-expressions': 'error',
'no-unused-vars': 'error',
'no-unused-vars': [ 'error', { ignoreRestSiblings: true } ],
'no-useless-return': 'error',
'no-whitespace-before-property': 'error',
'no-with': 'error',
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/configs/jshint.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
'no-trailing-spaces': 'error',
'no-undef': 'error',
'no-unused-expressions': 'error',
'no-unused-vars': 'error',
'no-unused-vars': [ 'error', { ignoreRestSiblings: true } ],
'one-var': [ 'error', 'always' ],
quotes: [ 'error', 'single' ],
'wrap-iife': [ 'error', 'any' ],
Expand Down
1 change: 0 additions & 1 deletion packages/react-native-aztec/src/AztecView.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ class AztecView extends Component {
}

render() {
// eslint-disable-next-line no-unused-vars
const { onActiveFormatsChange, ...otherProps } = this.props;
// `style` has to be destructured separately, without `otherProps`, because of:
// https://github.com/WordPress/gutenberg/issues/23611
Expand Down
1 change: 0 additions & 1 deletion packages/react-native-editor/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const registerGutenberg = ( {
constructor( props ) {
super( props );

// eslint-disable-next-line no-unused-vars
const { rootTag, ...parentProps } = this.props;

// Setup locale.
Expand Down