Skip to content

Commit 6c08c96

Browse files
tlabajjeff-phillips-18dominik-petrikkmcfauljonkoops
authored
Cherry pick main into V6 (#10828)
* fix(TypeaheadSelect): Add callback on clear selection (#10719) * fix(CodeEditor) resizeObserver resize loop (#10644) * fix(CodeEditor) resizeObserver resize loop * yarn * add debounce --------- Co-authored-by: Titani <tlabaj@redhat.com> * cherry pick fix(SimpleSelect,CheckboxSelect): Handle initial selection(s) * (Drag and drop): Updated example for multi list to use flex * docs(Table): add Editable Table example * fix(DragDrop): fix flexgrow type * feat(MultiTypeaheadSelect): Add MultiTypeaheadSelect to react-templates (#10757) * feat(MultiTypeaheadSelect): Add MultiTypeaheadSelect to react-templates * Update packages/react-templates/src/components/Select/MultiTypeaheadSelect.tsx Co-authored-by: kmcfaul <45077788+kmcfaul@users.noreply.github.com> --------- Co-authored-by: Titani Labaj <39532947+tlabaj@users.noreply.github.com> Co-authored-by: kmcfaul <45077788+kmcfaul@users.noreply.github.com> * fix(TypeaheadSelect): Correctly show the newly selected item on selection (#10792) * feat(TypeaheadSelect) Add creation options to TypeaheadSelect (#10802) * update MultiTypeaheadSelect to use label instead of chip * chore(deps): upgrade eslint-plugin-react to the latest (#10739) * chore(deps): upgrade `eslint-plugin-markdown` to the latest version (#10738) Signed-off-by: Jon Koops <jonkoops@gmail.com> * resolve merge conflicts * feat(eslint-plugin-patternfly-react): update rules for eslint v9 (#10743) * resolve conflicts for chore(deps): upgrade ESLint to the latest version * fix yarn lint issue * fix yarn lint issue * fix(TypeaheadSelect): Update input value only when appropriate (#10826) * fix lint errors and demo-app --------- Signed-off-by: Jon Koops <jonkoops@gmail.com> Co-authored-by: Jeff Phillips <jephilli@redhat.com> Co-authored-by: Dominik Petřík <77832970+Dominik-Petrik@users.noreply.github.com> Co-authored-by: kmcfaul <45077788+kmcfaul@users.noreply.github.com> Co-authored-by: Jon Koops <jonkoops@gmail.com>
1 parent 431a35e commit 6c08c96

94 files changed

Lines changed: 1980 additions & 647 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 0 additions & 49 deletions
This file was deleted.

.eslintrc-md.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626
"react/no-unknown-property": 2,
2727
"react/jsx-no-undef": 2
2828
},
29-
"extends": "plugin:markdown/recommended"
30-
}
29+
"extends": "plugin:markdown/recommended-legacy"
30+
}

.eslintrc.json

Lines changed: 0 additions & 152 deletions
This file was deleted.

.github/split.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1+
/* eslint-disable no-console */
12
const fs = require('fs');
23
const path = require('path');
34

45
const BASE_DIR = path.join(__dirname, '../packages/react-integration/cypress/integration');
5-
const WORKER_NUM = +process.env['WORKER_NUM'];
6-
const WORKER_COUNT = +process.env['WORKER_COUNT'];
6+
const WORKER_NUM = +process.env.WORKER_NUM;
7+
const WORKER_COUNT = +process.env.WORKER_COUNT;
78

8-
const testFiles = fs.readdirSync(BASE_DIR)
9+
const testFiles = fs
10+
.readdirSync(BASE_DIR)
911
.sort()
1012
.filter((_, i) => i % WORKER_COUNT === WORKER_NUM)
11-
.map(f => path.join(BASE_DIR, f));
13+
.map((f) => path.join(BASE_DIR, f));
1214

1315
console.log(testFiles.join(' '));
14-

.github/upload-preview.js

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-console, camelcase */
12
const path = require('path');
23
const { Octokit } = require('@octokit/rest');
34
const octokit = new Octokit({ auth: process.env.GH_PR_TOKEN });
@@ -12,22 +13,20 @@ const prbranch = process.env.GITHUB_REF.split('/').pop();
1213

1314
const uploadFolder = process.argv[2];
1415
if (!uploadFolder) {
15-
console.log('Usage: upload-preview uploadFolder');
1616
process.exit(1);
1717
}
1818

1919
const uploadFolderName = path.basename(uploadFolder);
20-
let uploadURL = `${repo}-${prnum ? `pr-${prnum}` : prbranch}`.replace(/[\/|\.]/g, '-');
20+
let uploadURL = `${repo}-${prnum ? `pr-${prnum}` : prbranch}`.replace(/[/|.]/g, '-');
2121

22-
switch(uploadFolderName) {
22+
switch (uploadFolderName) {
2323
case 'coverage':
2424
uploadURL += '-a11y.surge.sh';
2525
break;
2626
case 'public':
2727
if (!prnum && prbranch === 'main') {
2828
uploadURL = 'react-staging.patternfly.org';
29-
}
30-
else {
29+
} else {
3130
uploadURL += '.surge.sh';
3231
}
3332
break;
@@ -54,41 +53,45 @@ function tryAddComment(comment, commentBody) {
5453
}
5554

5655
if (prnum) {
57-
octokit.issues.listComments({
58-
owner,
59-
repo,
60-
issue_number: prnum
61-
})
62-
.then(res => res.data)
63-
.then(comments => {
56+
octokit.issues
57+
.listComments({
58+
owner,
59+
repo,
60+
issue_number: prnum
61+
})
62+
.then((res) => res.data)
63+
.then((comments) => {
6464
let commentBody = '';
65-
const existingComment = comments.find(comment => comment.user.login === 'patternfly-build');
65+
const existingComment = comments.find((comment) => comment.user.login === 'patternfly-build');
6666
if (existingComment) {
6767
commentBody += existingComment.body.trim();
6868
commentBody += '\n\n';
6969
}
7070

7171
if (uploadFolderName === 'public') {
7272
commentBody += tryAddComment(`Preview: https://${uploadURL}`, commentBody);
73-
}
74-
else if (uploadFolderName === 'coverage') {
73+
} else if (uploadFolderName === 'coverage') {
7574
commentBody += tryAddComment(`A11y report: https://${uploadURL}`, commentBody);
7675
}
7776

7877
if (existingComment) {
79-
octokit.issues.updateComment({
80-
owner,
81-
repo,
82-
comment_id: existingComment.id,
83-
body: commentBody
84-
}).then(() => console.log('Updated comment!'));
78+
octokit.issues
79+
.updateComment({
80+
owner,
81+
repo,
82+
comment_id: existingComment.id,
83+
body: commentBody
84+
})
85+
.then(() => console.log('Updated comment!'));
8586
} else {
86-
octokit.issues.createComment({
87-
owner,
88-
repo,
89-
issue_number: prnum,
90-
body: commentBody
91-
}).then(() => console.log('Created comment!'));
87+
octokit.issues
88+
.createComment({
89+
owner,
90+
repo,
91+
issue_number: prnum,
92+
body: commentBody
93+
})
94+
.then(() => console.log('Created comment!'));
9295
}
9396
});
9497
}

eslint.config-md.mjs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import markdown from 'eslint-plugin-markdown';
2+
import patternflyReact from 'eslint-plugin-patternfly-react';
3+
import react from 'eslint-plugin-react';
4+
import tseslint from 'typescript-eslint';
5+
6+
export default [
7+
{
8+
ignores: ['.history/*']
9+
},
10+
...markdown.configs.recommended,
11+
{
12+
plugins: {
13+
react,
14+
'patternfly-react': patternflyReact
15+
},
16+
languageOptions: {
17+
parser: tseslint.parser
18+
},
19+
settings: {
20+
react: {
21+
version: 'detect'
22+
}
23+
},
24+
rules: {
25+
'eol-last': 'error',
26+
'spaced-comment': 'error',
27+
'no-unused-vars': 'off',
28+
'no-this-before-super': 'error',
29+
'patternfly-react/import-tokens-icons': 'error',
30+
'react/jsx-uses-react': 'error',
31+
'react/jsx-uses-vars': 'error',
32+
'react/no-unknown-property': 'error',
33+
'react/jsx-no-undef': 'error'
34+
}
35+
}
36+
];

0 commit comments

Comments
 (0)