Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions eslint-plugin-expensify/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ const CONST = {
'Avoid calling a function directly in the useState initializer. Use an initializer function instead (a callback).',
NO_OBJECT_KEYS_INCLUDES: 'Avoid Object.keys({{object}}).includes({{key}}) for O(n) complexity. Use {{key}} in {{object}} or !!{{object}}[{{key}}] for O(1) complexity.',
PREFER_NARROW_HOOK_DEPENDENCIES: 'Dependency "{{dependency}}" is too broad. Use specific properties instead: {{properties}}',
STATE_CONTEXT_HAS_FUNCTION: 'State context `{{contextName}}` should only contain data values, not functions. Move these functions to an Actions context: {{properties}}',
ACTIONS_CONTEXT_HAS_NON_FUNCTION: 'Actions context `{{contextName}}` should only contain functions, not data values. Move these values to a State context: {{properties}}',
CONTEXT_MIXES_DATA_AND_FUNCTIONS: 'Context `{{contextName}}` mixes data ({{nonFunctionProps}}) and functions ({{functionProps}}). Use separate context providers for state (data) and actions (functions).',
},
};

Expand Down
Loading