Skip to content

Commit

Permalink
📦 Update linting devDependencies (#36856)
Browse files Browse the repository at this point in the history
* 📦 Update linting devDependencies

* `amp lint --fix`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Rozenberg <rodaniel@google.com>
  • Loading branch information
renovate[bot] and danielrozenberg committed May 23, 2023
1 parent 87aae46 commit fc84bdb
Show file tree
Hide file tree
Showing 36 changed files with 1,529 additions and 928 deletions.
2 changes: 1 addition & 1 deletion build-system/common/esbuild-babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ let transformCache;
function getEsbuildBabelPlugin(
callerName,
enableCache,
{preSetup = () => {}, postLoad = () => {}, plugins} = {}
{plugins, postLoad = () => {}, preSetup = () => {}} = {}
) {
const babelMaps = new Map();

Expand Down
2 changes: 1 addition & 1 deletion build-system/server/app-index/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ function renderTemplate(opt_params = {}) {
basepath = '/',
css,
fileSet = [],
serveMode = 'default',
htmlEnvelopePrefix = '/',
serveMode = 'default',
} = opt_params;

const body = joinFragments([
Expand Down
2 changes: 1 addition & 1 deletion build-system/tasks/e2e/describes-e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ function getDriver({headless = false}, browserName, deviceName) {
*/
async function setUpTest(
{ampDriver, controller, environment},
{testUrl = '', version, experiments = [], initialRect}
{experiments = [], initialRect, testUrl = '', version}
) {
const url = new URL(testUrl);

Expand Down
6 changes: 3 additions & 3 deletions extensions/amp-date-countdown/1.0/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ const DEFAULT_RENDER = (data) =>
* @return {PreactDef.Renderable}
*/
export function BentoDateCountdown({
datetime,
whenEnded = DEFAULT_WHEN_ENDED,
locale = DEFAULT_LOCALE,
biggestUnit = DEFAULT_BIGGEST_UNIT,
countUp = DEFAULT_COUNT_UP,
datetime,
locale = DEFAULT_LOCALE,
render = DEFAULT_RENDER,
whenEnded = DEFAULT_WHEN_ENDED,
...rest
}) {
useResourcesNotify();
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-date-picker/1.0/component/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function BentoDatePickerWithRef(
props: BentoDatePickerProps,
ref: Ref<SingleDatePickerAPI | DateRangePickerAPI>
) {
const {children, type = 'single', onError = DEFAULT_ON_ERROR} = props;
const {children, onError = DEFAULT_ON_ERROR, type = 'single'} = props;

const DatePicker = datePickerForType[type];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ function SingleDatePickerWithRef(
const {
blockedDates,
formatDate,
parseDate,
initialVisibleMonth,
inputSelector = DEFAULT_INPUT_SELECTOR,
mode,
openAfterClear,
openAfterSelect,
parseDate,
today,
} = useDatePickerContext();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,25 @@ const DATE_FORMAT = 'cccc, LLLL d, yyyy';
export function DatePickerProvider({
allowBlockedEndDate,
allowBlockedRanges,
blocked,
children,
endInputSelector = DEFAULT_END_INPUT_SELECTOR,
format = ISO_8601,
highlighted,
inputSelector = DEFAULT_INPUT_SELECTOR,
locale = DEFAULT_LOCALE,
max,
maximumNights = 0,
min: optionalMin,
minimumNights = 1,
mode = 'static',
monthFormat = DEFAULT_MONTH_FORMAT,
numberOfMonths = 1,
onError = DEFAULT_ON_ERROR,
startInputSelector = DEFAULT_START_INPUT_SELECTOR,
today = getCurrentDate(),
type = 'single',
weekDayFormat = DEFAULT_WEEK_DAY_FORMAT,
maximumNights = 0,
minimumNights = 1,
numberOfMonths = 1,
min: optionalMin,
blocked,
highlighted,
...rest
}: BentoDatePickerProps) {
const min = optionalMin || today;
Expand Down
8 changes: 4 additions & 4 deletions extensions/amp-experiment/1.0/apply-experiment.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {user, userAssert} from '#utils/log';

import {
assertMutationRecordFormat,
getElementsFromMutationRecordSelector,
} from './mutation-record';
import {AttributeMutationDefaultClass} from './mutation/attribute-mutation-default-class';
import {AttributeMutationDefaultStyle} from './mutation/attribute-mutation-default-style';
import {AttributeMutationDefaultUrl} from './mutation/attribute-mutation-default-url';
import {CharacterDataMutation} from './mutation/character-data-mutation';
import {
assertMutationRecordFormat,
getElementsFromMutationRecordSelector,
} from './mutation-record';

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

Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-gist/1.0/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const FULL_HEIGHT = '100%';
* @return {PreactDef.Renderable}
*/
export function BentoGist({
gistId,
file,
title = DEFAULT_TITLE,
gistId,
requestResize,
style,
title = DEFAULT_TITLE,
...rest
}) {
const iframeRef = useRef(null);
Expand Down
12 changes: 6 additions & 6 deletions extensions/amp-list/1.0/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,18 @@ function getItemsFromPage(pageData, itemsKey) {
*/
export function BentoListWithRef(
{
src = null,
errorTemplate = defaultErrorTemplate,
fetchJson = xhrUtils.fetchJson,
itemsKey = 'items',
maxItems = 0,
loadMore: loadMoreMode = 'none',
loadMoreBookmark = 'load-more-src',
viewportBuffer = 2.0, // When loadMore === 'auto', keep loading up to 2 viewports of data
loadMoreTemplate = defaultLoadMoreTemplate,
loadingTemplate = defaultLoadingTemplate, // When loadMore === 'auto', keep loading up to 2 viewports of data
maxItems = 0,
src = null,
template: itemTemplate = defaultItemTemplate,
viewportBuffer = 2.0,
wrapperTemplate = defaultWrapperTemplate,
loadMoreTemplate = defaultLoadMoreTemplate,
loadingTemplate = defaultLoadingTemplate,
errorTemplate = defaultErrorTemplate,
...rest
},
ref
Expand Down
10 changes: 5 additions & 5 deletions extensions/amp-render/1.0/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ const DEFAULT_GET_JSON = (url) => {
*/
export function RenderWithRef(
{
src = '',
getJson = DEFAULT_GET_JSON,
render = DEFAULT_RENDER,
ariaLiveValue = 'polite',
onLoading,
getJson = DEFAULT_GET_JSON,
onError,
onLoad,
onLoading,
onRefresh,
onError,
render = DEFAULT_RENDER,
src = '',
...rest
},
ref
Expand Down
6 changes: 3 additions & 3 deletions extensions/amp-selector/1.0/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ export const KEYBOARD_SELECT_MODE = {
function SelectorWithRef(
{
as: Comp = 'div',
disabled,
children,
defaultValue = [],
disabled,
form,
keyboardSelectMode = KEYBOARD_SELECT_MODE.NONE,
value,
multiple,
name,
onChange,
role = 'listbox',
children,
value,
...rest
},
ref
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ describes.realWin(
}

async function getGallery({
slideCount = 5,
attrs = {},
customArrows = false,
slideCount = 5,
width,
attrs = {},
} = {}) {
const el = doc.createElement('amp-stream-gallery');
el.setAttribute('layout', 'fixed');
Expand Down
6 changes: 3 additions & 3 deletions extensions/amp-stream-gallery/1.0/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ const OUTSET_ARROWS_WIDTH = 100;
*/
function BentoStreamGalleryWithRef(props, ref) {
const {
arrowPrevAs = DefaultArrow,
arrowNextAs = DefaultArrow,
arrowPrevAs = DefaultArrow,
children,
[propName('class')]: className,
extraSpace,
maxItemWidth = Number.MAX_VALUE,
minItemWidth = 1,
maxVisibleCount = Number.MAX_VALUE,
minItemWidth = 1,
minVisibleCount = 1,
outsetArrows,
peek = 0,
slideAlign = 'start',
[propName('class')]: className,
...rest
} = props;
const classes = useStyles();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describes.realWin(

async function createElement(
content,
{width, height, layout = 'fixed', container = doc.body}
{container = doc.body, height, layout = 'fixed', width}
) {
const element = win.document.createElement('amp-truncate-text');
element.setAttribute('layout', layout);
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-video-iframe/1.0/amp-video-iframe.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {BUBBLE_MESSAGE_EVENTS} from '#bento/apis/video-iframe-api';
import {BaseElement} from '#bento/components/bento-video-iframe/1.0/base-element';
import {AmpVideoBaseElement} from '#bento/components/bento-video/1.0/video-base-element';
import {BaseElement} from '#bento/components/bento-video-iframe/1.0/base-element';

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

Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-video/1.0/storybook/_helpers.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as Preact from '#preact';

export const VideoElementWithActions = ({
id,
children,
actions = ['play', 'pause', 'mute', 'unmute', 'fullscreen'],
children,
id,
}) => (
<div style="max-width: 800px">
<p style={{display: 'flex'}}>
Expand Down

0 comments on commit fc84bdb

Please sign in to comment.