Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.
[Brief description ]
- [more description]
- [more description]
- [more description]
| const fs = require('fs'); | |
| const path = require("path"); | |
| const FolderName = './zh-CN' | |
| function renameFile(oldPath, newPath, callback) { | |
| fs.rename(oldPath, newPath, (err) => { | |
| if (err) { | |
| console.error(`Error renaming file: ${err}`); | |
| callback(err); | |
| } else { |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
| // 開啟 dev tool | |
| chrome://inspect/#devices |
| // Import JSON parser, place it at the top of the file | |
| import groovy.json.JsonSlurper | |
| // Read package.json and return `version` field | |
| def getVersionFromNpm() { | |
| // Read and parse package.json file from project root | |
| def inputFile = new File("$rootDir/../package.json") | |
| def packageJson = new JsonSlurper().parseText(inputFile.text) | |