-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add prettier * Format * Update for new yargs
- Loading branch information
1 parent
6842955
commit f32ea22
Showing
18 changed files
with
2,151 additions
and
2,594 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
/.vscode | ||
/.github/labels.yml | ||
/.github/workflows/sync-labels.yml | ||
/dist | ||
/node_modules | ||
/test/fixtures | ||
/tmp | ||
|
||
# These are org-wide files (https://github.com/exercism/org-wide-files/) | ||
/.github/labels.yml | ||
/.github/workflows/sync-labels.yml | ||
|
||
/CODE_OF_CONDUCT.md | ||
/LICENSE |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$EXERCISM_PRETTIER_VERSION" ]; then | ||
echo "Pulling prettier version from package.json" | ||
EXERCISM_PRETTIER_VERSION=$(yarn list --pattern prettier | grep -Po '.*\sprettier@\K.*') | ||
fi | ||
|
||
if [ -z "$EXERCISM_PRETTIER_VERSION" ]; then | ||
echo "---------------------------------------------------" | ||
echo "This script requires the EXERCISM_PRETTIER_VERSION variable to work." | ||
echo "Please see https://exercism.org/docs/building/markdown/style-guide for guidance." | ||
echo "---------------------------------------------------" | ||
echo "This is what yarn list reports:" | ||
echo "$(yarn list prettier)" | ||
echo "" | ||
echo "This is the version that can be extracted:" | ||
echo "$(yarn list --pattern prettier | grep -Po '.*\sprettier@\K.*')" | ||
echo "" | ||
echo "These files are found in the repo root:" | ||
echo "$(ls -p | grep -v /)" | ||
echo "---------------------------------------------------" | ||
exit 1 | ||
else | ||
echo "Running format with prettier@$EXERCISM_PRETTIER_VERSION" | ||
fi | ||
|
||
npx "prettier@$EXERCISM_PRETTIER_VERSION" --check "**/*.{js,jsx,ts,tsx,css,sass,scss,html,json,md,yml}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -z "$EXERCISM_PRETTIER_VERSION" ]; then | ||
echo "This script requires the EXERCISM_PRETTIER_VERSION variable to work." | ||
echo "Please see https://github.com/exercism/v3/blob/master/docs/maintainers/style-guide.md for guidance." | ||
exit 1 | ||
echo "Pulling prettier version from package.json" | ||
EXERCISM_PRETTIER_VERSION=$(yarn list --pattern prettier | grep -Po '.*\sprettier@\K.*') | ||
fi | ||
|
||
if [ -z "$EXERCISM_PRETTIER_VERSION" ]; then | ||
echo "---------------------------------------------------" | ||
echo "This script requires the EXERCISM_PRETTIER_VERSION variable to work." | ||
echo "Please see https://exercism.org/docs/building/markdown/style-guide for guidance." | ||
echo "---------------------------------------------------" | ||
echo "This is what yarn list reports:" | ||
echo "$(yarn list prettier)" | ||
echo "" | ||
echo "This is the version that can be extracted:" | ||
echo "$(yarn list --pattern prettier | grep -Po '.*\sprettier@\K.*')" | ||
echo "" | ||
echo "These files are found in the repo root:" | ||
echo "$(ls -p | grep -v /)" | ||
echo "---------------------------------------------------" | ||
exit 1 | ||
else | ||
echo "Running format with prettier@$EXERCISM_PRETTIER_VERSION" | ||
fi | ||
|
||
npx "prettier@$EXERCISM_PRETTIER_VERSION" --write "**/*.{js,jsx,ts,tsx,css,sass,scss,html,json,md,yml}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@exercism/javascript-representer", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Exercism AST representer for javascript", | ||
"repository": "https://github.com/exercism/javascript-representer", | ||
"author": "Derk-Jan Karrenbeld <[email protected]>", | ||
|
@@ -28,31 +28,32 @@ | |
"test:bare": "jest" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.13.15", | ||
"@babel/node": "7.13.13", | ||
"@babel/preset-env": "^7.13.15", | ||
"@babel/preset-typescript": "^7.13.0", | ||
"@babel/core": "^7.15.5", | ||
"@babel/node": "^7.15.4", | ||
"@babel/preset-env": "^7.15.4", | ||
"@babel/preset-typescript": "^7.15.0", | ||
"@tsconfig/recommended": "^1.0.1", | ||
"@types/jest": "^26.0.22", | ||
"@types/node": "^14.14.37", | ||
"@types/yargs": "^16.0.1", | ||
"@typescript-eslint/eslint-plugin": "^4.21.0", | ||
"babel-jest": "^26.6.3", | ||
"eslint": "^7.24.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jest": "^24.3.5", | ||
"jest": "^26.6.3" | ||
"@types/jest": "^27.0.1", | ||
"@types/node": "^16.7.10", | ||
"@types/yargs": "^17.0.2", | ||
"@typescript-eslint/eslint-plugin": "^4.30.0", | ||
"babel-jest": "^27.1.0", | ||
"eslint": "^7.32.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.24.2", | ||
"eslint-plugin-jest": "^24.4.0", | ||
"jest": "^27.1.0", | ||
"prettier": "^2.3.2" | ||
}, | ||
"dependencies": { | ||
"@exercism/static-analysis": "^0.8.1", | ||
"@typescript-eslint/parser": "^4.21.0", | ||
"@typescript-eslint/typescript-estree": "^4.21.0", | ||
"@typescript-eslint/visitor-keys": "^4.21.0", | ||
"@exercism/static-analysis": "^0.10.0", | ||
"@typescript-eslint/parser": "^4.30.0", | ||
"@typescript-eslint/typescript-estree": "^4.30.0", | ||
"@typescript-eslint/visitor-keys": "^4.30.0", | ||
"esm": "^3.2.25", | ||
"module-alias": "^2.2.2", | ||
"typescript": "^4.2.4", | ||
"yargs": "^16.2.0" | ||
"typescript": "^4.4.2", | ||
"yargs": "^17.1.1" | ||
}, | ||
"_moduleAliases": { | ||
"~src": "dist", | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.