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

Conflicts between TypeScript and @typescript-eslint/eslint-plugin #2078

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@types/react": "^16.8.14",
"@types/terser-webpack-plugin": "^1.2.1",
"@types/webpack": "^4.4.27",
"@typescript-eslint/eslint-plugin": "^1.7.0",
"@typescript-eslint/eslint-plugin": "^1.9.0",
"ava": "^1.4.0",
"chrome-webstore-upload-cli": "^1.2.0",
"copy-webpack-plugin": "^5.0.2",
Expand Down
2 changes: 1 addition & 1 deletion source/features/bypass-checks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function init(): Promise<void> {
}

async function bypass(check: HTMLElement): Promise<void> {
const details = select<HTMLAnchorElement>('.status-actions', check.parentElement!)!;
const details = select<HTMLAnchorElement>('.status-actions', check.parentElement)!;
const directLink = await fetchDom(details.href, 'a.text-small .octicon-link-external');
details.href = (directLink.parentElement as HTMLAnchorElement).href;
}
Expand Down
4 changes: 2 additions & 2 deletions source/features/comment-fields-keyboard-shortcuts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function init(): void {
const field = event.delegateTarget;

// Don't do anything if the suggester box is active
if (select.exists('.suggester:not([hidden])', field.form!)) {
if (select.exists('.suggester:not([hidden])', field.form)) {
return;
}

Expand All @@ -35,7 +35,7 @@ function init(): void {
const cancelButton = select<HTMLButtonElement>(`
.js-hide-inline-comment-form,
.js-comment-cancel-button
`, field.form!);
`, field.form);

// Cancel if there is a button, else blur the field
if (cancelButton) {
Expand Down
2 changes: 1 addition & 1 deletion source/features/copy-file.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import features from '../libs/features';

function handleClick({currentTarget: button}: React.MouseEvent<HTMLButtonElement>): void {
const file = button.closest('.Box');
const content = select.all('.blob-code-inner', file!)
const content = select.all('.blob-code-inner', file)
.map(({innerText: line}) => line === '\n' ? '' : line) // Must be `.innerText`
.join('\n');
copyToClipboard(content);
Expand Down
2 changes: 1 addition & 1 deletion source/features/hide-comments-faster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import delegate, {DelegateEvent} from 'delegate-it';
import features from '../libs/features';

function handleMenuOpening(event: DelegateEvent): void {
const hideButton = select('.js-comment-hide-button', event.delegateTarget.parentElement!);
const hideButton = select('.js-comment-hide-button', event.delegateTarget.parentElement);
if (!hideButton) {
// User unable to hide or menu already created
return;
Expand Down
2 changes: 1 addition & 1 deletion source/features/highlight-closing-prs-in-open-issues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function add(): void {
<a
href={link}
className="btn btn-outline btn-sm border-blue rgh-closing-pr tooltipped tooltipped-se"
aria-label={infoBubble.getAttribute('aria-label')!}>
aria-label={infoBubble.getAttribute('aria-label')}>
{isIssue ? icons.openPullRequest() : icons.commit()}
{isIssue ? ' ' + ref.textContent : ''}
</a>
Expand Down
6 changes: 3 additions & 3 deletions source/features/open-all-notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function openNotifications({delegateTarget}: DelegateEvent): void {
const container = delegateTarget.closest('.boxed-group, .notification-center');

// Ask for confirmation
const unreadNotifications = select.all<HTMLAnchorElement>(unreadNotificationsClass, container!);
const unreadNotifications = select.all<HTMLAnchorElement>(unreadNotificationsClass, container);
if (
unreadNotifications.length >= confirmationRequiredCount &&
!confirm(`This will open ${unreadNotifications.length} new tabs. Continue?`)
Expand All @@ -28,7 +28,7 @@ function openNotifications({delegateTarget}: DelegateEvent): void {
});

// Mark all as read
for (const notification of select.all('.unread', container!)) {
for (const notification of select.all('.unread', container)) {
notification.classList.replace('unread', 'read');
}

Expand All @@ -38,7 +38,7 @@ function openNotifications({delegateTarget}: DelegateEvent): void {
.open-repo-notifications,
.mark-all-as-read,
[href='#mark_as_read_confirm_box']
`, container!)) {
`, container)) {
button.remove();
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/features/recently-pushed-branches-enhancements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const selector = `[data-url='${fragmentURL}'], [src='${fragmentURL}']`;
// Ajaxed pages will load a new fragment on every ajaxed load;
// but we only really need the one generated on the first load
function removeDuplicateList(): void {
const duplicate = select(selector, select('main')!);
const duplicate = select(selector, select('main'));

if (duplicate) {
duplicate.remove();
Expand Down