-
Notifications
You must be signed in to change notification settings - Fork 903
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
fix(eslint-plugin): Cast a wider net in api-no-slashes.js #8649
Merged
mergify
merged 4 commits into
spinnaker:master
from
christopherthielen:api-no-slashes-wider-net
Oct 14, 2020
Merged
fix(eslint-plugin): Cast a wider net in api-no-slashes.js #8649
mergify
merged 4 commits into
spinnaker:master
from
christopherthielen:api-no-slashes-wider-net
Oct 14, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
const variableArgs = args.filter((argument) => { | ||
if (argument.type !== 'Identifier') { | ||
// Get the source code (think .toString()) of the AST node and find a slash | ||
// This isn't 100% accurate, but it's good enough. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// This isn't 100% accurate, but it's good enough.
christopherthielen
force-pushed
the
api-no-slashes-wider-net
branch
from
October 13, 2020 01:19
55cbc5a
to
dbd15ca
Compare
christopherthielen
force-pushed
the
api-no-slashes-wider-net
branch
from
October 13, 2020 01:20
dbd15ca
to
a65c57f
Compare
vigneshm
approved these changes
Oct 13, 2020
…when a null node is passed
christopherthielen
added a commit
to christopherthielen/deck
that referenced
this pull request
Nov 10, 2020
fix(pluginsdk-peerdeps): Move eslint peer deps to plugin-eslint package ([64d5708](spinnaker@64d5708)) chore(eslint-plugin): bump jest and lodash ([96b2b86](spinnaker@96b2b86)) feat(eslint-plugin): Add a new rule prefer-promise-like to help migrate off of ng.IPromise [spinnaker#8673](spinnaker#8673) ([3dc0309](spinnaker@3dc0309)) feat(eslint-plugin): Auto-fix arbitrary expressions with slashes in api-no-slashes lint rule ([28e95ee](spinnaker@28e95ee)) fix(eslint-plugin): Allow .split('/') in API.one() calls in api-no-slashes lint rule ([e547389](spinnaker@e547389)) fix(eslint-plugin): Cast a wider net in api-no-slashes.js [spinnaker#8649](spinnaker#8649) ([cf5ab83](spinnaker@cf5ab83)) feat(eslint-plugin): Write a new rule react2angular-with-error-boundary All react2angular components should be wrapped in an error boundary ([bd9858d](spinnaker@bd9858d)) refactor(eslint-plugin): move angular-rule utils to a separate directory ([873bec3](spinnaker@873bec3)) feat(eslint-plugin): Add a new rule api-no-slashes that forbids using string literals with slashes to API.one() [spinnaker#8629](spinnaker#8629) ([75a054e](spinnaker@75a054e)) feat(eslint-plugin): Add a README.md with instructions on creating eslint rules [spinnaker#8628](spinnaker#8628) ([6cab9e6](spinnaker@6cab9e6))
mergify bot
pushed a commit
that referenced
this pull request
Nov 10, 2020
fix(pluginsdk-peerdeps): Move eslint peer deps to plugin-eslint package ([64d5708](64d5708)) chore(eslint-plugin): bump jest and lodash ([96b2b86](96b2b86)) feat(eslint-plugin): Add a new rule prefer-promise-like to help migrate off of ng.IPromise [#8673](#8673) ([3dc0309](3dc0309)) feat(eslint-plugin): Auto-fix arbitrary expressions with slashes in api-no-slashes lint rule ([28e95ee](28e95ee)) fix(eslint-plugin): Allow .split('/') in API.one() calls in api-no-slashes lint rule ([e547389](e547389)) fix(eslint-plugin): Cast a wider net in api-no-slashes.js [#8649](#8649) ([cf5ab83](cf5ab83)) feat(eslint-plugin): Write a new rule react2angular-with-error-boundary All react2angular components should be wrapped in an error boundary ([bd9858d](bd9858d)) refactor(eslint-plugin): move angular-rule utils to a separate directory ([873bec3](873bec3)) feat(eslint-plugin): Add a new rule api-no-slashes that forbids using string literals with slashes to API.one() [#8629](#8629) ([75a054e](75a054e)) feat(eslint-plugin): Add a README.md with instructions on creating eslint rules [#8628](#8628) ([6cab9e6](6cab9e6))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Simplified the detection logic for slashes.
Now detects slashes in the following new cases:
some arg is template string or string concatenation with a slash
some arg is reference to a template string or concatenated string with a slash