Skip to content

Commit fc84bdb

Browse files
📦 Update linting devDependencies (ampproject#36856)
* 📦 Update linting devDependencies * `amp lint --fix` --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Rozenberg <[email protected]>
1 parent 87aae46 commit fc84bdb

File tree

36 files changed

+1529
-928
lines changed

36 files changed

+1529
-928
lines changed

Diff for: ‎build-system/common/esbuild-babel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ let transformCache;
3838
function getEsbuildBabelPlugin(
3939
callerName,
4040
enableCache,
41-
{preSetup = () => {}, postLoad = () => {}, plugins} = {}
41+
{plugins, postLoad = () => {}, preSetup = () => {}} = {}
4242
) {
4343
const babelMaps = new Map();
4444

Diff for: ‎build-system/server/app-index/template.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ function renderTemplate(opt_params = {}) {
6868
basepath = '/',
6969
css,
7070
fileSet = [],
71-
serveMode = 'default',
7271
htmlEnvelopePrefix = '/',
72+
serveMode = 'default',
7373
} = opt_params;
7474

7575
const body = joinFragments([

Diff for: ‎build-system/tasks/e2e/describes-e2e.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ function getDriver({headless = false}, browserName, deviceName) {
670670
*/
671671
async function setUpTest(
672672
{ampDriver, controller, environment},
673-
{testUrl = '', version, experiments = [], initialRect}
673+
{experiments = [], initialRect, testUrl = '', version}
674674
) {
675675
const url = new URL(testUrl);
676676

Diff for: ‎extensions/amp-date-countdown/1.0/component.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ const DEFAULT_RENDER = (data) =>
5858
* @return {PreactDef.Renderable}
5959
*/
6060
export function BentoDateCountdown({
61-
datetime,
62-
whenEnded = DEFAULT_WHEN_ENDED,
63-
locale = DEFAULT_LOCALE,
6461
biggestUnit = DEFAULT_BIGGEST_UNIT,
6562
countUp = DEFAULT_COUNT_UP,
63+
datetime,
64+
locale = DEFAULT_LOCALE,
6665
render = DEFAULT_RENDER,
66+
whenEnded = DEFAULT_WHEN_ENDED,
6767
...rest
6868
}) {
6969
useResourcesNotify();

Diff for: ‎extensions/amp-date-picker/1.0/component/component.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function BentoDatePickerWithRef(
2424
props: BentoDatePickerProps,
2525
ref: Ref<SingleDatePickerAPI | DateRangePickerAPI>
2626
) {
27-
const {children, type = 'single', onError = DEFAULT_ON_ERROR} = props;
27+
const {children, onError = DEFAULT_ON_ERROR, type = 'single'} = props;
2828

2929
const DatePicker = datePickerForType[type];
3030

Diff for: ‎extensions/amp-date-picker/1.0/component/single-date-picker.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ function SingleDatePickerWithRef(
3131
const {
3232
blockedDates,
3333
formatDate,
34-
parseDate,
3534
initialVisibleMonth,
3635
inputSelector = DEFAULT_INPUT_SELECTOR,
3736
mode,
3837
openAfterClear,
3938
openAfterSelect,
39+
parseDate,
4040
today,
4141
} = useDatePickerContext();
4242

Diff for: ‎extensions/amp-date-picker/1.0/component/use-date-picker-context.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,25 @@ const DATE_FORMAT = 'cccc, LLLL d, yyyy';
5454
export function DatePickerProvider({
5555
allowBlockedEndDate,
5656
allowBlockedRanges,
57+
blocked,
5758
children,
5859
endInputSelector = DEFAULT_END_INPUT_SELECTOR,
5960
format = ISO_8601,
61+
highlighted,
6062
inputSelector = DEFAULT_INPUT_SELECTOR,
6163
locale = DEFAULT_LOCALE,
6264
max,
65+
maximumNights = 0,
66+
min: optionalMin,
67+
minimumNights = 1,
6368
mode = 'static',
6469
monthFormat = DEFAULT_MONTH_FORMAT,
70+
numberOfMonths = 1,
6571
onError = DEFAULT_ON_ERROR,
6672
startInputSelector = DEFAULT_START_INPUT_SELECTOR,
6773
today = getCurrentDate(),
6874
type = 'single',
6975
weekDayFormat = DEFAULT_WEEK_DAY_FORMAT,
70-
maximumNights = 0,
71-
minimumNights = 1,
72-
numberOfMonths = 1,
73-
min: optionalMin,
74-
blocked,
75-
highlighted,
7676
...rest
7777
}: BentoDatePickerProps) {
7878
const min = optionalMin || today;

Diff for: ‎extensions/amp-experiment/1.0/apply-experiment.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import {user, userAssert} from '#utils/log';
22

3-
import {
4-
assertMutationRecordFormat,
5-
getElementsFromMutationRecordSelector,
6-
} from './mutation-record';
73
import {AttributeMutationDefaultClass} from './mutation/attribute-mutation-default-class';
84
import {AttributeMutationDefaultStyle} from './mutation/attribute-mutation-default-style';
95
import {AttributeMutationDefaultUrl} from './mutation/attribute-mutation-default-url';
106
import {CharacterDataMutation} from './mutation/character-data-mutation';
7+
import {
8+
assertMutationRecordFormat,
9+
getElementsFromMutationRecordSelector,
10+
} from './mutation-record';
1111

1212
const TAG = 'amp-experiment apply-experiment';
1313

Diff for: ‎extensions/amp-gist/1.0/component.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ const FULL_HEIGHT = '100%';
1313
* @return {PreactDef.Renderable}
1414
*/
1515
export function BentoGist({
16-
gistId,
1716
file,
18-
title = DEFAULT_TITLE,
17+
gistId,
1918
requestResize,
2019
style,
20+
title = DEFAULT_TITLE,
2121
...rest
2222
}) {
2323
const iframeRef = useRef(null);

Diff for: ‎extensions/amp-list/1.0/component.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,18 @@ function getItemsFromPage(pageData, itemsKey) {
100100
*/
101101
export function BentoListWithRef(
102102
{
103-
src = null,
103+
errorTemplate = defaultErrorTemplate,
104104
fetchJson = xhrUtils.fetchJson,
105105
itemsKey = 'items',
106-
maxItems = 0,
107106
loadMore: loadMoreMode = 'none',
108107
loadMoreBookmark = 'load-more-src',
109-
viewportBuffer = 2.0, // When loadMore === 'auto', keep loading up to 2 viewports of data
108+
loadMoreTemplate = defaultLoadMoreTemplate,
109+
loadingTemplate = defaultLoadingTemplate, // When loadMore === 'auto', keep loading up to 2 viewports of data
110+
maxItems = 0,
111+
src = null,
110112
template: itemTemplate = defaultItemTemplate,
113+
viewportBuffer = 2.0,
111114
wrapperTemplate = defaultWrapperTemplate,
112-
loadMoreTemplate = defaultLoadMoreTemplate,
113-
loadingTemplate = defaultLoadingTemplate,
114-
errorTemplate = defaultErrorTemplate,
115115
...rest
116116
},
117117
ref

Diff for: ‎extensions/amp-render/1.0/component.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ const DEFAULT_GET_JSON = (url) => {
2626
*/
2727
export function RenderWithRef(
2828
{
29-
src = '',
30-
getJson = DEFAULT_GET_JSON,
31-
render = DEFAULT_RENDER,
3229
ariaLiveValue = 'polite',
33-
onLoading,
30+
getJson = DEFAULT_GET_JSON,
31+
onError,
3432
onLoad,
33+
onLoading,
3534
onRefresh,
36-
onError,
35+
render = DEFAULT_RENDER,
36+
src = '',
3737
...rest
3838
},
3939
ref

Diff for: ‎extensions/amp-selector/1.0/component.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ export const KEYBOARD_SELECT_MODE = {
4343
function SelectorWithRef(
4444
{
4545
as: Comp = 'div',
46-
disabled,
46+
children,
4747
defaultValue = [],
48+
disabled,
4849
form,
4950
keyboardSelectMode = KEYBOARD_SELECT_MODE.NONE,
50-
value,
5151
multiple,
5252
name,
5353
onChange,
5454
role = 'listbox',
55-
children,
55+
value,
5656
...rest
5757
},
5858
ref

Diff for: ‎extensions/amp-stream-gallery/0.1/test/test-amp-stream-gallery.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ describes.realWin(
112112
}
113113

114114
async function getGallery({
115-
slideCount = 5,
115+
attrs = {},
116116
customArrows = false,
117+
slideCount = 5,
117118
width,
118-
attrs = {},
119119
} = {}) {
120120
const el = doc.createElement('amp-stream-gallery');
121121
el.setAttribute('layout', 'fixed');

Diff for: ‎extensions/amp-stream-gallery/1.0/component.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ const OUTSET_ARROWS_WIDTH = 100;
2828
*/
2929
function BentoStreamGalleryWithRef(props, ref) {
3030
const {
31-
arrowPrevAs = DefaultArrow,
3231
arrowNextAs = DefaultArrow,
32+
arrowPrevAs = DefaultArrow,
3333
children,
34-
[propName('class')]: className,
3534
extraSpace,
3635
maxItemWidth = Number.MAX_VALUE,
37-
minItemWidth = 1,
3836
maxVisibleCount = Number.MAX_VALUE,
37+
minItemWidth = 1,
3938
minVisibleCount = 1,
4039
outsetArrows,
4140
peek = 0,
4241
slideAlign = 'start',
42+
[propName('class')]: className,
4343
...rest
4444
} = props;
4545
const classes = useStyles();

Diff for: ‎extensions/amp-truncate-text/0.1/test/test-amp-truncate-text.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describes.realWin(
4848

4949
async function createElement(
5050
content,
51-
{width, height, layout = 'fixed', container = doc.body}
51+
{container = doc.body, height, layout = 'fixed', width}
5252
) {
5353
const element = win.document.createElement('amp-truncate-text');
5454
element.setAttribute('layout', layout);

Diff for: ‎extensions/amp-video-iframe/1.0/amp-video-iframe.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {BUBBLE_MESSAGE_EVENTS} from '#bento/apis/video-iframe-api';
2-
import {BaseElement} from '#bento/components/bento-video-iframe/1.0/base-element';
32
import {AmpVideoBaseElement} from '#bento/components/bento-video/1.0/video-base-element';
3+
import {BaseElement} from '#bento/components/bento-video-iframe/1.0/base-element';
44

55
import {measureIntersection} from '#core/dom/layout/intersection';
66

Diff for: ‎extensions/amp-video/1.0/storybook/_helpers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as Preact from '#preact';
22

33
export const VideoElementWithActions = ({
4-
id,
5-
children,
64
actions = ['play', 'pause', 'mute', 'unmute', 'fullscreen'],
5+
children,
6+
id,
77
}) => (
88
<div style="max-width: 800px">
99
<p style={{display: 'flex'}}>

0 commit comments

Comments
 (0)