WATCH NEXT: Javascript Interview Questions and Answers - Dominate Your Next Interview - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-wnYKH2dO620.htmlsi=5DfbGEfhXWiiv0a_
Hello, question...in an Angular project, how can you execute the scripts defined in package.json in a git hook? For example, if you define in .lintstagedrc { "src/**/*.{ts,html}": "npm run lint" } and in package.json the script "lint": "ng lint", it does not recognize the command
@@MonsterlessonsAcademy My question is if in an Angular project it is possible from lint-staged to run the scripts defined in package.json. I couldn't achieve this.
I have an issue - when i run "npx lint-staged" i have only one tasks call but if i do the same with pre-commit hook which calles the same "npx lint-staged" i have too many callings of tasks (50+), wdyt about this issue?, i cant imagine what is going wrong...
Nice one mate! So, am I right it understanding that the pre-commit is primarily for fail-on-linting attempt (eslint) & not for formatting? Because any formatting write by prettier when git commit would be unstaged.
Hi, nice tutorial! Do I push the .husky-folder to the repository to ensure that other developers can use pre-commit hooks automatically? Or what is the best practice for that?
Hey! Can you help me with the error given below when I run npx lint-staged. Error: > Couldn't find any `pages` or `app` directory. Please create one under the project root at findPagesDir (C:\Users\momin.hayat\Desktop\ops-2-next ode_modules ext\dist\lib\find-pages-dir.js:42:15) "lint-staged": { "src/**/*.{js,html,css}": "prettier --write", "src/**/*.{ts,tsx}": "next lint" } and my folder structure is following src/app/*