Skip to content

Commit

Permalink
Address misc ESLint issues in more larva/scripts/*.js
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanPak committed Dec 17, 2024
1 parent 9d9d5ed commit 1d6d49e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/larva/scripts/build-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ generateStatic(
// TODO: copy assets into build path
// copy assets from larva package to static
// copy assets from project to assets
// eslint-disable-next-line no-console
console.log( message );
},
urlBase
Expand Down
5 changes: 4 additions & 1 deletion packages/larva/scripts/build-icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const svgFiles = globby.sync( [ larvaIconsPath, projectIconsPath ], {
// TODO: unfinished feature
// let scssIcons = {};

// eslint-disable-next-line no-console
console.log(
`Looking for icon SVGs in ${ path.relative(
process.cwd(),
Expand All @@ -68,14 +69,15 @@ svgFiles.forEach( ( file ) => {
);
} );

// eslint-disable-next-line no-console
console.log( 'Building SVG icon sprite...' );

// Write the Sass variables.
// TODO: unfinished feature.
// fs.writeFileSync( path.join( process.cwd(), './build/a-icon-svg.scss' ), getSassVarsString( scssIcons ) );

// Compile the sprite
spriter.compile( function ( error, result, cssData ) {
spriter.compile( function ( error, result ) {
// Run through all configured output modes
for ( const mode in result ) {
// Run through all created resources and write them to disk
Expand All @@ -88,5 +90,6 @@ spriter.compile( function ( error, result, cssData ) {
}
}

// eslint-disable-next-line no-console
console.log( 'Completed building SVG icon sprite.' );
} );
2 changes: 1 addition & 1 deletion packages/larva/scripts/config/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const composeTask = ( done, generateImportantVariants = false ) => {
*
* @param {Object} style PostCSS Root object for current CSS.
* @param {Object} result PostCSS Result object containing transformed CSS.
* @return {Result} PostCSS Result object.
* @return {Object} PostCSS Result object.
*/
const declareImportanceForAll = ( style, result ) => {
const root = postCss.parse( style );
Expand Down
1 change: 1 addition & 0 deletions packages/larva/scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ module.exports = ( env, argv ) => {
}

if ( 'production' === argv.mode ) {
// eslint-disable-next-line no-console
console.log( 'Building Prod JS..' );

config.module.rules = ( config.module.rules || [] ).concat( [
Expand Down

0 comments on commit 1d6d49e

Please sign in to comment.