Skip to content

Commit 5ec12a8

Browse files
authored
Merge pull request #36 from Expensify/Rory-DestructuringAssignment
Ban destructuring of props or state
2 parents 211e217 + 7554ad0 commit 5ec12a8

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-expensify",
3-
"version": "2.0.17",
3+
"version": "2.0.18",
44
"description": "Expensify's ESLint configuration following our style guide",
55
"main": "index.js",
66
"repository": {

rules/react.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ module.exports = {
1919
'react/forbid-prop-types': 'error',
2020
'react/no-string-refs': 'error',
2121
'react/jsx-filename-extension': [1, {extensions: ['.js']}],
22-
23-
// Do not warn or error for destructuring
24-
// See: https://github.com/Expensify/Style-Guide/blob/master/javascript.md#destructuring
25-
'react/destructuring-assignment': 'off',
22+
'react/destructuring-assignment': ['error', 'never'],
2623

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

0 commit comments

Comments
 (0)