platformatic / tutorial-movie-quotes-app

This is the application code for the Movie Quotes App Tutorial 🎬
https://oss.platformatic.dev/docs/getting-started/movie-quotes-app-tutorial/
Apache License 2.0
31 stars 6 forks source link

standardjs (triggered from git commit) fails on quote-actions.js #5

Closed ricfio closed 1 year ago

ricfio commented 2 years ago

git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - standard: Use JavaScript Standard Style (https://standardjs.com)

/home/ricfio/projects/platformatic/tutorial-movie-quotes-app/apps/movie-quotes-frontend/src/scripts/quote-actions.js 4:7 error 'confirm' is not defined no-undef

✖ 1 problem pre-commit: pre-commit: We've failed to pass the specified git pre-commit hooks as the test pre-commit: hook returned an exit code (1). If you're feeling adventurous you can pre-commit: skip the git pre-commit hooks by adding the following flags to your commit: pre-commit: pre-commit: git commit -n (or --no-verify) pre-commit: pre-commit: This is ill-advised since the commit is broken. pre-commit:

mcollina commented 2 years ago

Thanks for reporting! Would you like to send a Pull Request to address this issue?

ricfio commented 2 years ago

Sorry, but I don't know how fix it:

'confirm' is not defined. (no-undef)

This is the snippet of souce code in apps/movie-quotes-frontend/src/scripts/quote-actions.js:

import { quotesApi, gql } from '../lib/quotes-api.js'

export function confirmDeleteQuote (form) {
  if (confirm('Are you sure want to delete this quote?')) {
    form.submit()
  }
}
...