Skip to content

Commit

Permalink
[cascading] from release/9.5 to main (#1167)
Browse files Browse the repository at this point in the history
<!--
{"currentBranch":"release/9.5","targetBranch":"main","bypassReviewers":false,"isConflicting":false}
-->

## Cascading from release/9.5 to main

---

:heavy_exclamation_mark: The pull request is conflicting with the target
branch.
You can fix the issue locally with the following commands:

<details open>
  <summary>Using <b>gh CLI</b></summary>

  ```shell
  gh pr checkout 1167
  git pull --ff origin main
  ```

  and update this Pull Request with

  ```shell
  gh pr push 1167
  ```
</details>

<details>
  <summary>Using <b>git</b> only</summary>

  ```shell
  git fetch origin
  git checkout origin/cascading/9.5.0-main
  git pull --ff origin main
  ```

  and update this Pull Request with

  ```shell
  git push origin main
  ```
</details>

---

<small>This Pull Request has been generated with :heart: by the
[Otter](https://github.com/AmadeusITGroup/otter) cascading tool.</small>
  • Loading branch information
kpanot authored Dec 20, 2023
2 parents 2c7c5ff + a520a48 commit 9ad0bbc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
- name: 'Publish Cascading Azure Functions'
env:
PUBLISH_PROFILE: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_8996AC226FB9456EA73A6B8439B12946 || secrets.CASCADING_AZURE_APP_PUBLISH_PROFILE }}
if: env.PUBLISH_PROFILE != null && steps.get-npm-tag.outputs.tag == 'latest'
if: env.PUBLISH_PROFILE != null && (github.base_ref == 'main' || github.ref_name == 'main')
uses: Azure/functions-action@v1
with:
app-name: 'github-cascading'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ export default createRule<[Options, ...any], 'tooManyAsyncOnTag', any>({

defaultOptions,

create: (context) => {
create: (context, [options]: [Options]) => {
const parserServices = getTemplateParserServices(context);
const options = context.options[0] || defaultOptions[0];
const asyncRegExp = /\| *async\b/g;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface NoMultipleTypeConfigurationPropertyOption {
supportedInterfaceNames?: string[];
}

export default createRule<NoMultipleTypeConfigurationPropertyOption[], 'error' | 'suggestion'>({
export default createRule<[Required<NoMultipleTypeConfigurationPropertyOption>, ...any], 'error' | 'suggestion'>({
name: 'no-multiple-type-configuration-property',
meta: {
hasSuggestions: true,
Expand Down Expand Up @@ -35,9 +35,11 @@ export default createRule<NoMultipleTypeConfigurationPropertyOption[], 'error' |
suggestion: 'Replace {{currentValue}} by {{recommendedValue}}'
}
},
defaultOptions: [],
create: (context) => {
const supportedInterfaceNames = context.options.reduce((acc: string[], option) => acc.concat(option.supportedInterfaceNames || []), []);
defaultOptions: [{
supportedInterfaceNames: defaultSupportedInterfaceNames
}],
create: (context, [options]: [Required<NoMultipleTypeConfigurationPropertyOption>]) => {
const supportedInterfaceNames = options.supportedInterfaceNames;
const sourceCode = context.getSourceCode();

const rule = (node: TSESTree.TSUnionType | TSESTree.TSIntersectionType) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ type O3rWidgetRuleErrorId =

const createCommentString = (comment: string) => `/*${comment}*/`;

export default createRule<O3rWidgetTagsRuleOption[], O3rWidgetRuleErrorId>({
const defaultOptions: [Required<O3rWidgetTagsRuleOption>] = [{
supportedInterfaceNames: defaultSupportedInterfaceNames,
widgets: {}
}];

export default createRule<[Required<O3rWidgetTagsRuleOption>, ...any], O3rWidgetRuleErrorId>({
name: 'o3r-widget-tags',
meta: {
hasSuggestions: true,
Expand Down Expand Up @@ -99,17 +104,8 @@ export default createRule<O3rWidgetTagsRuleOption[], O3rWidgetRuleErrorId>({
suggestReplaceO3rWidgetType: 'Replace {{ currentType }} by {{ suggestedType }}.'
}
},
defaultOptions: [],
create: (context) => {
const options: Required<O3rWidgetTagsRuleOption> = context.options
.reduce((acc: Required<O3rWidgetTagsRuleOption>, option) => {
acc.supportedInterfaceNames = (acc.supportedInterfaceNames || []).concat(option.supportedInterfaceNames || []);
acc.widgets = {
...acc.widgets,
...option.widgets
};
return acc;
}, { widgets: {}, supportedInterfaceNames: [] });
defaultOptions,
create: (context, [options]: [Required<O3rWidgetTagsRuleOption>]) => {
const supportedO3rWidgets = new Set(Object.keys(options.widgets));
return {
// eslint-disable-next-line @typescript-eslint/naming-convention
Expand Down

0 comments on commit 9ad0bbc

Please sign in to comment.