Skip to content

Commit

Permalink
PASE-2049 | Resolve ESLint errors (#861)
Browse files Browse the repository at this point in the history
* Apply linter fixes

* Testing so far

* Remove seemingly-outdated @wordpress/no-global-event-listener ignore

* Apply lint-fix to a couple files

* Make prod:js happy with VideoShowcase eslint-wise

* Address misc eslint issues in prod:js that were preventing builds to update correctly

* Update package lock with some jest stuff someone apparently thinks we need

* Add claryfing comments on eslint config files

* Disable camelcase for larva eslint rule

* Ignore ESLint import/no-extraneous-dependencies (Larva package)

* Resolve "config is already in outside scope" issue in twig-to-php-parser

* Resolve ESLint issues with twig-to-php-parser

* Allow console.log for error in twig-to-php-parser/getConfig

* Address ESLint issues in css-algo/rule.js

* Address ESLint findings on stylelint-config/.../custom-formatter.js

* Remove duplicate stylelint rules

* sort stylelint rules alphabetically

* Make Prettier happy

* Add missing return types

* Add React compatibility to larva package ESLint

* Swap ReactDOM.render with React client createRoot

* Revert "Swap ReactDOM.render with React client createRoot"

This reverts commit ea6639e.

* Catch up Larva lock versioning to the .1 patch

* Remove @babel/preset-react from pmc-larva package lock? (happened after npm install)

* Remove  @wordpress/jest-preset-default from Jest config because it messes the window/environment and cascades into terrible things

* Update package lock

* Run lint-fix on VideoShowcase (so prod:js can build)

* Ignore old-school React render method

* Update package locks from latest release

* Rename some vars in TokensView that were already defined "above scope"

* Address ESLint issues in TokenListItem

* Address ESLint issues in site/InitialForm

* Address ESLint stuff in write-json.js

* backstopjs-config/index.js linting

* Fix a couple ESLint issues in scripts/init.js

* Address misc ESLint issues in more larva/scripts/*.js

* Address more console.log ignores in writeJson

* Ignore console logs from linting.

* Address ESLint issues in getSubDirectoryNames

* Address getPatternsIndexPath() ESLint issue

* Ignore ESLint issue for console.log() in getPatternRoutes

* Ignore ESLint issue in getPatternVariants

* Address ESLint issues in getPatternData

* Allow console log in getAppConfiguration

* Address ESLint stuff on getAllPatternsObj

* Ignore build console logs.

* Remove broken getPatternRoutes @link

* Ignore ESLint issue

* Remove unused vars from video-card prototype

* Ignore mystery backstop variable.

* Ignore top-stories array map thing

* set special-coverage prototype heading_1/2 consts

* Ignore another array.map return lint

* Ignore more array.map return lint warnings

* eslint define params

* Address ESLint issues in mega menu

* help.js script linting

* Fix parsing error return outside of function with process.exit( 0 )

* Swap console logs with process write

* Fix var scoping in pmc-footer

* Remove unused title component prototype in product-grid

* Remove undefined array value in how-we-test-products

* Address misc undefined constants + unused constants

* Address undefined consts in age-gate prototype

* Ignore duplicate object key (there's styling on both!)

* Note globals and remove unused vars from webfont config

* Fix minor JS lint issues in larva-js/src/interface

* Move MobileHeightToggle test into __test__ dir so ESLint doesn't freak out

* Remove unused event params :D

* Update changelog

---------

Co-authored-by: Nayeon Kim <[email protected]>
Co-authored-by: Marc Garcia <[email protected]>
  • Loading branch information
3 people authored Feb 18, 2025
1 parent dfccd7e commit 858e8dc
Show file tree
Hide file tree
Showing 115 changed files with 7,046 additions and 3,099 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ jest-setup.js

a-space-children.browser-test.js
browser-test-setup.js

**/__tests__
**/__test__
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unpublished Changes
* Resolve ESLint warnings/errors
* Add new FN tokens to WWD for migration.

## 1.67.0 11-19-2024
Expand Down
6 changes: 3 additions & 3 deletions _reports/a-font-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*
* For each brand, go to https://<brand>.larva.pmcdev.io/project/__tests__/style-guide/
* In the console, type:
let arr = [];
document.querySelectorAll( 'p[class^=a-font]').forEach( node => arr.push( node.classList[0] ) )
console.log( arr )
let arr = [];
document.querySelectorAll( 'p[class^=a-font]').forEach( node => arr.push( node.classList[0] ) )
console.log( arr )
* Copy the object and those are the font names.
* This could be automated in the future.
*
Expand Down
161 changes: 2 additions & 159 deletions build/js/common.js

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions build/js/common.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*!
* Flickity v2.3.0
* Touch, responsive, flickable carousels
*
* Licensed GPLv3 for open source use
* or Flickity Commercial License for commercial use
*
* https://flickity.metafizzy.co
* Copyright 2015-2021 Metafizzy
*/

/*!
* Unidragger v2.4.0
* Draggable base class
* MIT license
*/

/*!
* Unipointer v2.4.0
* base class for doing one thing with pointer event
* MIT license
*/

/*!
* getSize v2.0.3
* measure size of elements
* MIT license
*/
31 changes: 1 addition & 30 deletions build/js/larva-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/js/standalone/video-showcase.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion entries/common.entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const spritePath = ( () => {

ajaxIconSprite( spritePath );

// eslint-disable-next-line @wordpress/no-global-event-listener
document.addEventListener( 'DOMContentLoaded', () => {
//document has been completely loaded and parsed
initCollapsible();
Expand Down
Loading

0 comments on commit 858e8dc

Please sign in to comment.