- Install prettier
- Make a .prettierignore file, and add directories you'd like prettier to not format, for example:
**/node_modules
- Run
prettier --write "**/*.js"
*Don't forget the quotes. - Optional: if you want to format JSON/SCSS files too, replace js with json/scss.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const state = () => ({ | |
categories: [] | |
}); | |
export const mutations = { | |
setCategories(state) { | |
state.categories = [ | |
"Pablo", | |
"Automotor", | |
"Compras", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ajax = new XMLHttpRequest(); | |
ajax.onreadystatechange = function() { | |
if (ajax.status == 200 && ajax.readyState == 4) { | |
var answer = document.createElement( 'html' ); | |
answer.innerHTML = ajax.responseText; | |
console.log(answer.querySelector('.language-python').innerHTML); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import os | |
def get_urls(content): | |
''' | |
Parses the css file and retrieves the font urls. | |
Parameters: | |
content (string): The data which needs to be parsed for the font urls. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const AFTER_DATE = "2024-12-02"; | |
const MY_GITHUB_ID = "ravgeetdhillon"; | |
const REPOS = ["cloudanswers/designeradvantage-2"]; | |
const beautifyCommitObject = ({ | |
messageBody, | |
messageHeadline, | |
prNumber, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const PR_NUMBER = "2454"; // pr number for master to production merge | |
const execSync = require("child_process").execSync; | |
const getCommitsUnderPrQuery = `gh pr view ${PR_NUMBER} --json "commits"`; | |
const commitsUnderPrQueryResponse = JSON.parse( | |
execSync(getCommitsUnderPrQuery, (error, stdout, stderr) => stdout).toString() |