diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..330d9b6 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +*-profile/ +dist/ +vscode-icons/ diff --git a/jest.config.js b/jest.config.js index fbb7f15..f128816 100644 --- a/jest.config.js +++ b/jest.config.js @@ -64,10 +64,7 @@ module.exports = { maxWorkers: 8, // An array of directory names to be searched recursively up from the requiring module's location - moduleDirectories: [ - "src", - "node_modules" - ], + moduleDirectories: ['src', 'node_modules'], // An array of file extensions your modules use // moduleFileExtensions: [ diff --git a/package.json b/package.json index 879dae2..e45eb8a 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "roll": "make release", "test": "yarn run test:parallel && yarn run test:non-parallel", "test:parallel": "NODE_ENV=test jest --config __tests__/jest.parallel.config.js", - "test:non-parallel": "NODE_ENV=test jest --config __tests__/jest.non-parallel.config.js" + "test:non-parallel": "NODE_ENV=test jest --config __tests__/jest.non-parallel.config.js", + "format": "prettier --write '**/*.{js,jsx,ts,tsx}'" }, "dependencies": { "@primer/components": "^22.0.2", @@ -71,6 +72,7 @@ "jest-puppeteer": "^6.1.0", "json-loader": "^0.5.7", "mini-css-extract-plugin": "^0.9.0", + "prettier": "^2.7.1", "puppeteer": "^10.1.0", "raw-loader": "^4.0.0", "sass": "^1.26.2", diff --git a/yarn.lock b/yarn.lock index cbbb753..2515a57 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9113,6 +9113,11 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= +prettier@^2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" + integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== + pretty-format@^24.3.0: version "24.9.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9"