Skip to content
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

feat(eslint-plugin): Add a new rule api-no-slashes that forbids using string literals with slashes to API.one() #8629

Merged

Conversation

christopherthielen
Copy link
Contributor

Pushing this out as an eslint rule to give plugin authors a chance to fix their code before we flip the new API encoding on.

This is first pass at this rule and it doesn't detect literals passed in as variables. Also it probably wont pass CI, heh. I'm going to run this on the OSS repo and see what happens.

@christopherthielen christopherthielen marked this pull request as ready for review October 7, 2020 00:07
@christopherthielen christopherthielen force-pushed the eslint-rule-api-no-slashes branch 2 times, most recently from c5d31cb to 3cad0d3 Compare October 7, 2020 00:11
… passing string literals to API.one() with slashes
@christopherthielen christopherthielen changed the title feat(eslint-plugin): Add a new rule api-no-slashes that forbids using passing string literals to API.one() with slashes feat(eslint-plugin): Add a new rule api-no-slashes that forbids using string literals to API.one() with slashes Oct 7, 2020
@christopherthielen christopherthielen changed the title feat(eslint-plugin): Add a new rule api-no-slashes that forbids using string literals to API.one() with slashes feat(eslint-plugin): Add a new rule api-no-slashes that forbids using string literals with slashes to API.one() Oct 7, 2020
@christopherthielen christopherthielen added the ready to merge Reviewed and ready for merge label Oct 7, 2020
@mergify mergify bot merged commit 75a054e into spinnaker:master Oct 7, 2020
@german-muzquiz
Copy link
Contributor

@christopherthielen at which point can we enable encoding in API again? I can create the PR in the meantime to have it ready, ideally it would be merged before release branches for 1.23 are cut next week.

@christopherthielen christopherthielen deleted the eslint-rule-api-no-slashes branch October 12, 2020 20:32
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
Labels
ready to merge Reviewed and ready for merge target-release/1.23
Projects
None yet
4 participants