Skip to content

Commit

Permalink
Merge pull request #36 from Expensify/Rory-DestructuringAssignment
Browse files Browse the repository at this point in the history
Ban destructuring of props or state
  • Loading branch information
marcaaron authored Nov 5, 2021
2 parents 211e217 + 7554ad0 commit 5ec12a8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-expensify",
"version": "2.0.17",
"version": "2.0.18",
"description": "Expensify's ESLint configuration following our style guide",
"main": "index.js",
"repository": {
Expand Down
5 changes: 1 addition & 4 deletions rules/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ module.exports = {
'react/forbid-prop-types': 'error',
'react/no-string-refs': 'error',
'react/jsx-filename-extension': [1, {extensions: ['.js']}],

// Do not warn or error for destructuring
// See: https://github.com/Expensify/Style-Guide/blob/master/javascript.md#destructuring
'react/destructuring-assignment': 'off',
'react/destructuring-assignment': ['error', 'never'],

// New versions of react are removing some methods, and those methods have been prefixed with "UNSAFE_" for now.
// We need to prevent more usages of these methods and their aliases from being added
Expand Down

0 comments on commit 5ec12a8

Please sign in to comment.