-
Notifications
You must be signed in to change notification settings - Fork 36
feat: integrate prettier and enforce code formatting #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Rahul-R79
wants to merge
6
commits into
accordproject:main
Choose a base branch
from
Rahul-R79:feat/add-prettier
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+193
−159
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a11a36e
feat: setup prettier infrastructure
Rahul-R79 62ccc46
Merge branch 'main' into feat/add-prettier
Rahul-R79 cd1360c
fix: resolve merge conflict in package.json
Rahul-R79 86dcc34
Merge branch 'feat/add-prettier' of origin/feat/add-prettier
Rahul-R79 7a65fd9
fix: resolve merge conflict with main branch
Rahul-R79 9f325c9
chore: update eslintrc with 4-space indent and prettier extension, se…
Rahul-R79 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| coverage | ||
| out | ||
| doc | ||
| node_modules | ||
| dist | ||
| packages | ||
| **/*.min.js |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "singleQuote": true, | ||
| "printWidth": 100, | ||
| "tabWidth": 4, | ||
| "trailingComma": "none", | ||
| "semi": true | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode", | ||
| "editor.formatOnSave": true, | ||
| "editor.codeActionsOnSave": { | ||
| "source.fixAll.eslint": "explicit" | ||
| }, | ||
| "[javascript]": { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode" | ||
| }, | ||
| "[json]": { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode" | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,158 +1,163 @@ | ||
| { | ||
| "name": "@accordproject/concerto-codegen", | ||
| "version": "3.31.3", | ||
| "description": "Code Generation for the Concerto Modeling Language", | ||
| "homepage": "https://github.com/accordproject/concerto", | ||
| "engines": { | ||
| "node": ">=18", | ||
| "npm": ">=6" | ||
| }, | ||
| "main": "index.js", | ||
| "browser": "umd/concerto-codegen.js", | ||
| "typings": "types/index.d.ts", | ||
| "scripts": { | ||
| "coverage": "node ./scripts/coverage.js \"packages/concerto-*\" && nyc report -t coverage --cwd . --report-dir coverage --reporter=lcov && cat ./coverage/lcov.info", | ||
| "prepublishOnly": "npm run webpack", | ||
| "pretest": "npm run lint", | ||
| "lint": "eslint . && npm run lint:lockfile && npm run lint:deps", | ||
| "postlint": "npm run licchk", | ||
| "licchk": "license-check-and-add", | ||
| "postlicchk": "npm run doc", | ||
| "doc": "jsdoc --pedantic --recurse -c jsdoc.json", | ||
| "test": "nyc mocha --recursive -t 10000", | ||
| "test:updateSnapshots": "nyc mocha --updateSnapshot --recursive -t 10000", | ||
| "test:watch": "nyc mocha --watch --recursive -t 10000", | ||
| "mocha": "mocha --recursive -t 10000", | ||
| "nyc": "nyc mocha --recursive -t 10000", | ||
| "build": "npm run build:types", | ||
| "postbuild": "npm run webpack", | ||
| "webpack": "webpack --config webpack.config.js --mode production", | ||
| "build:types": "tsc index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --esModuleInterop --outDir types", | ||
| "lint:deps": "syncpack lint", | ||
| "lint:deps:fix": "syncpack fix", | ||
| "lint:lockfile": "lockfile-lint --path package-lock.json --type npm --allowed-hosts npm --validate-https" | ||
| }, | ||
| "mocha": { | ||
| "require": "mocha-expect-snapshot" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/accordproject/concerto-codegen.git", | ||
| "directory": "packages/concerto-codegen" | ||
| }, | ||
| "keywords": [ | ||
| "concerto", | ||
| "codegen", | ||
| "modeling" | ||
| "name": "@accordproject/concerto-codegen", | ||
| "version": "3.31.3", | ||
| "description": "Code Generation for the Concerto Modeling Language", | ||
| "homepage": "https://github.com/accordproject/concerto", | ||
| "engines": { | ||
| "node": ">=18", | ||
| "npm": ">=6" | ||
| }, | ||
| "main": "index.js", | ||
| "browser": "umd/concerto-codegen.js", | ||
| "typings": "types/index.d.ts", | ||
| "scripts": { | ||
| "coverage": "node ./scripts/coverage.js \"packages/concerto-*\" && nyc report -t coverage --cwd . --report-dir coverage --reporter=lcov && cat ./coverage/lcov.info", | ||
| "prepublishOnly": "npm run webpack", | ||
| "format": "prettier --write .", | ||
| "format:check": "prettier --check .", | ||
| "pretest": "npm run lint", | ||
| "lint": "eslint .", | ||
| "postlint": "npm run licchk", | ||
| "licchk": "license-check-and-add", | ||
| "postlicchk": "npm run doc", | ||
| "doc": "jsdoc --pedantic --recurse -c jsdoc.json", | ||
| "test": "nyc mocha --recursive -t 10000", | ||
| "test:updateSnapshots": "nyc mocha --updateSnapshot --recursive -t 10000", | ||
| "test:watch": "nyc mocha --watch --recursive -t 10000", | ||
| "mocha": "mocha --recursive -t 10000", | ||
| "nyc": "nyc mocha --recursive -t 10000", | ||
| "build": "npm run build:types", | ||
| "postbuild": "npm run webpack", | ||
| "webpack": "webpack --config webpack.config.js --mode production", | ||
| "build:types": "tsc index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --esModuleInterop --outDir types", | ||
| "lint:deps": "syncpack lint", | ||
| "lint:deps:fix": "syncpack fix", | ||
| "lint:lockfile": "lockfile-lint --path package-lock.json --type npm --allowed-hosts npm --validate-https", | ||
| "preinstall": "npm run lint:lockfile && npm run lint:deps" | ||
| }, | ||
| "mocha": { | ||
| "require": "mocha-expect-snapshot" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/accordproject/concerto-codegen.git", | ||
| "directory": "packages/concerto-codegen" | ||
| }, | ||
| "keywords": [ | ||
| "concerto", | ||
| "codegen", | ||
| "modeling" | ||
| ], | ||
| "author": "accordproject.org", | ||
| "license": "Apache-2.0", | ||
| "devDependencies": { | ||
| "@accordproject/concerto-cto": "3.25.7", | ||
| "@babel/preset-env": "7.16.11", | ||
| "@types/webgl-ext": "0.0.37", | ||
| "babel-loader": "8.2.3", | ||
| "chai": "4.3.6", | ||
| "chai-as-promised": "7.1.1", | ||
| "chai-things": "0.2.0", | ||
| "eslint": "8.2.0", | ||
| "eslint-config-prettier": "10.1.8", | ||
| "expect": "30.2.0", | ||
| "jsdoc": "4.0.3", | ||
| "json-schema-to-ts": "3.1.1", | ||
| "license-check-and-add": "2.3.6", | ||
| "lockfile-lint": "4.14.1", | ||
| "mocha": "11.3.0", | ||
| "mocha-expect-snapshot": "8.0.0", | ||
| "moxios": "0.4.0", | ||
| "node-polyfill-webpack-plugin": "4.1.0", | ||
| "nunjucks": "3.2.4", | ||
| "nyc": "15.1.0", | ||
| "openapi-typescript": "7.13.0", | ||
| "prettier": "3.8.0", | ||
| "sinon": "12.0.0", | ||
| "sinon-chai": "3.7.0", | ||
| "syncpack": "14.0.0-alpha.32", | ||
| "tmp-promise": "3.0.2", | ||
| "ts-json-schema-generator": "2.3.0", | ||
| "typescript": "5.7.2", | ||
| "webpack": "5.105.0", | ||
| "webpack-cli": "4.9.1" | ||
| }, | ||
| "dependencies": { | ||
| "@accordproject/concerto-core": "3.25.0", | ||
| "@accordproject/concerto-util": "3.25.0", | ||
| "@accordproject/concerto-vocabulary": "3.25.0", | ||
| "@openapi-contrib/openapi-schema-to-json-schema": "4.0.0", | ||
| "ajv": "8.18.0", | ||
| "ajv-formats": "3.0.1", | ||
| "camelcase": "6.3.0", | ||
| "debug": "4.3.4", | ||
| "get-value": "3.0.1", | ||
| "json-schema-migrate": "2.0.0", | ||
| "pluralize": "8.0.0" | ||
| }, | ||
| "license-check-and-add-config": { | ||
| "folder": "./lib", | ||
| "license": "HEADER", | ||
| "exact_paths_method": "EXCLUDE", | ||
| "exact_paths": [ | ||
| "api.txt", | ||
| "composer-logs", | ||
| "coverage", | ||
| "index.d.ts", | ||
| "./system", | ||
| "./introspect/parser.js", | ||
| "LICENSE", | ||
| "node_modules", | ||
| ".nyc-output", | ||
| "out", | ||
| ".tern-project" | ||
| ], | ||
| "author": "accordproject.org", | ||
| "license": "Apache-2.0", | ||
| "devDependencies": { | ||
| "@accordproject/concerto-cto": "3.25.7", | ||
| "@babel/preset-env": "7.16.11", | ||
| "@types/webgl-ext": "0.0.37", | ||
| "babel-loader": "8.2.3", | ||
| "chai": "4.3.6", | ||
| "chai-as-promised": "7.1.1", | ||
| "chai-things": "0.2.0", | ||
| "eslint": "8.2.0", | ||
| "expect": "30.2.0", | ||
| "jsdoc": "4.0.3", | ||
| "json-schema-to-ts": "3.1.1", | ||
| "license-check-and-add": "2.3.6", | ||
| "lockfile-lint": "4.14.1", | ||
| "mocha": "11.3.0", | ||
| "mocha-expect-snapshot": "8.0.0", | ||
| "moxios": "0.4.0", | ||
| "node-polyfill-webpack-plugin": "4.1.0", | ||
| "nunjucks": "3.2.4", | ||
| "nyc": "15.1.0", | ||
| "openapi-typescript": "7.13.0", | ||
| "sinon": "12.0.0", | ||
| "sinon-chai": "3.7.0", | ||
| "syncpack": "14.0.0-alpha.32", | ||
| "tmp-promise": "3.0.2", | ||
| "ts-json-schema-generator": "2.3.0", | ||
| "typescript": "5.7.2", | ||
| "webpack": "5.105.0", | ||
| "webpack-cli": "4.9.1" | ||
| }, | ||
| "dependencies": { | ||
| "@accordproject/concerto-core": "3.25.0", | ||
| "@accordproject/concerto-util": "3.25.0", | ||
| "@accordproject/concerto-vocabulary": "3.25.0", | ||
| "@openapi-contrib/openapi-schema-to-json-schema": "4.0.0", | ||
| "ajv": "8.18.0", | ||
| "ajv-formats": "3.0.1", | ||
| "camelcase": "6.3.0", | ||
| "debug": "4.3.4", | ||
| "get-value": "3.0.1", | ||
| "json-schema-migrate": "2.0.0", | ||
| "pluralize": "8.0.0" | ||
| }, | ||
| "license-check-and-add-config": { | ||
| "folder": "./lib", | ||
| "license": "HEADER", | ||
| "exact_paths_method": "EXCLUDE", | ||
| "exact_paths": [ | ||
| "api.txt", | ||
| "composer-logs", | ||
| "coverage", | ||
| "index.d.ts", | ||
| "./system", | ||
| "./introspect/parser.js", | ||
| "LICENSE", | ||
| "node_modules", | ||
| ".nyc-output", | ||
| "out", | ||
| ".tern-project" | ||
| ], | ||
| "file_type_method": "EXCLUDE", | ||
| "file_types": [ | ||
| ".yml", | ||
| ".yaml", | ||
| ".zip", | ||
| ".tgz" | ||
| ], | ||
| "insert_license": false, | ||
| "license_formats": { | ||
| "js|njk|pegjs|cto|acl|qry": { | ||
| "prepend": "/*", | ||
| "append": " */", | ||
| "eachLine": { | ||
| "prepend": " * " | ||
| } | ||
| }, | ||
| "npmrc|editorconfig|txt": { | ||
| "eachLine": { | ||
| "prepend": "# " | ||
| } | ||
| }, | ||
| "md": { | ||
| "file": "./HEADER.md" | ||
| } | ||
| "file_type_method": "EXCLUDE", | ||
| "file_types": [ | ||
| ".yml", | ||
| ".yaml", | ||
| ".zip", | ||
| ".tgz" | ||
| ], | ||
| "insert_license": false, | ||
| "license_formats": { | ||
| "js|njk|pegjs|cto|acl|qry": { | ||
| "prepend": "/*", | ||
| "append": " */", | ||
| "eachLine": { | ||
| "prepend": " * " | ||
| } | ||
| }, | ||
| "npmrc|editorconfig|txt": { | ||
| "eachLine": { | ||
| "prepend": "# " | ||
| } | ||
| }, | ||
| "nyc": { | ||
| "produce-source-map": "true", | ||
| "sourceMap": "inline", | ||
| "reporter": [ | ||
| "lcov", | ||
| "text-summary", | ||
| "html", | ||
| "json" | ||
| ], | ||
| "include": [ | ||
| "lib/**/*.js" | ||
| ], | ||
| "exclude": [ | ||
| "lib/codegen/codegen.js" | ||
| ], | ||
| "all": true, | ||
| "check-coverage": true, | ||
| "statements": 98, | ||
| "branches": 96, | ||
| "functions": 98, | ||
| "lines": 98 | ||
| }, | ||
| "md": { | ||
| "file": "./HEADER.md" | ||
| } | ||
| } | ||
| }, | ||
| "nyc": { | ||
| "produce-source-map": "true", | ||
| "sourceMap": "inline", | ||
| "reporter": [ | ||
| "lcov", | ||
| "text-summary", | ||
| "html", | ||
| "json" | ||
| ], | ||
| "include": [ | ||
| "lib/**/*.js" | ||
| ], | ||
| "exclude": [ | ||
| "lib/codegen/codegen.js" | ||
| ], | ||
| "all": true, | ||
| "check-coverage": true, | ||
| "statements": 98, | ||
| "branches": 96, | ||
| "functions": 98, | ||
| "lines": 98 | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.