New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing: Add lint rule for path on Lodash property functions #9615

Merged
merged 3 commits into from Sep 13, 2018

Conversation

Projects
None yet
3 participants
@aduth
Member

aduth commented Sep 4, 2018

Related: #6247

This pull request seeks to enhance existing custom ESLint rules forbidding the use of string paths for Lodash functions (see #6247 for context). It adds a few more functions which allow for path as an argument. It's suspected these were previously overlooked because for other functions, path was passed as the second argument.

For existing usage, instead of adding array wrappers, I opted to stop using the Lodash utility in favor of an equivalent arrow function. It uses a few more characters, but I think is a bit easier to read for those who aren't already familiar with the intent of the property utility function. This may be open to debate and I'm not strongly committed to keeping it this way.

Testing instructions:

Verify linting passes:

npm run lint

Ensure there are no regressions in affected runtime behavior: The updating of components which depend on viewport size (e.g. small screen requiring two-tap for select vs. interaction of a block).

Show outdated Hide outdated .eslintrc.js Outdated
@jorgefilipecosta

Looks good in my tests 👍

@aduth aduth merged commit 6dad836 into master Sep 13, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@aduth aduth deleted the add/eslint-property-path branch Sep 13, 2018

@mtias mtias added this to the 3.9 milestone Sep 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment