Skip to content

Commit 05da885

Browse files
authored
Merge pull request #902 from nscuro/json-sorting
Configure prettier to sort JSON files
2 parents af17196 + 94a3fc6 commit 05da885

File tree

6 files changed

+66
-44
lines changed

6 files changed

+66
-44
lines changed

.prettierrc.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2+
"jsonRecursiveSort": true,
3+
"plugins": ["prettier-plugin-sort-json"],
4+
"semi": true,
25
"singleQuote": true,
36
"tabWidth": 2,
4-
"semi": true,
57
"trailingComma": "all"
68
}

package-lock.json

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
"growl": "1.10.5",
8383
"https-proxy-agent": "2.2.4",
8484
"prettier": "3.2.5",
85+
"prettier-plugin-sort-json": "4.0.0",
8586
"sass": "1.72.0",
8687
"sass-loader": "8.0.2",
8788
"uuid": "9.0.1",

public/static/config.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"API_BASE_URL": "",
33
"API_WITH_CREDENTIALS": "",
4-
"OIDC_ISSUER": "",
54
"OIDC_CLIENT_ID": "",
6-
"OIDC_SCOPE": "openid email profile",
75
"OIDC_FLOW": "code",
8-
"OIDC_LOGIN_BUTTON_TEXT": ""
6+
"OIDC_ISSUER": "",
7+
"OIDC_LOGIN_BUTTON_TEXT": "",
8+
"OIDC_SCOPE": "openid email profile"
99
}

src/shared/api.json

+36-37
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,58 @@
11
{
2+
"BASE_URL": "",
23
"CONTENT_TYPE_JSON": "application/json",
3-
"ENCODE_MULTIPART_FORM_DATA": "multipart/form-data",
44
"CONTENT_TYPE_TEXT": "text/plain",
5-
"TOTAL_COUNT_HEADER": "X-Total-Count",
65
"DATA_TYPE": "json",
6+
"ENCODE_MULTIPART_FORM_DATA": "multipart/form-data",
7+
"FORCE_PASSWORD_CHANGE": "FORCE_PASSWORD_CHANGE",
8+
"METHOD_DELETE": "DELETE",
79
"METHOD_GET": "GET",
810
"METHOD_POST": "POST",
911
"METHOD_PUT": "PUT",
10-
"METHOD_DELETE": "DELETE",
11-
"FORCE_PASSWORD_CHANGE": "FORCE_PASSWORD_CHANGE",
12-
"WITH_CREDENTIALS": "",
13-
14-
"BASE_URL": "",
12+
"TOTAL_COUNT_HEADER": "X-Total-Count",
1513
"URL_ABOUT": "api/version",
16-
"URL_LOGIN": "api/v1/user/login",
17-
"URL_FORCE_PW_CHANGE": "api/v1/user/forceChangePassword",
18-
"URL_TEAM": "api/v1/team",
19-
"URL_USER": "api/v1/user",
20-
"URL_USER_LDAP": "api/v1/user/ldap",
21-
"URL_USER_OIDC": "api/v1/user/oidc",
22-
"URL_USER_OIDC_LOGIN": "api/v1/user/oidc/login",
23-
"URL_USER_MANAGED": "api/v1/user/managed",
24-
"URL_USER_SELF": "api/v1/user/self",
25-
"URL_PERMISSION": "api/v1/permission",
26-
"URL_PROJECT": "api/v1/project",
27-
"URL_TAG": "api/v1/tag",
28-
"URL_FINDING": "api/v1/finding",
29-
"URL_LICENSE": "api/v1/license",
30-
"URL_LICENSE_CONCISE": "api/v1/license/concise",
31-
"URL_CWE": "api/v1/cwe",
32-
"URL_COMPONENT": "api/v1/component",
33-
"URL_DEPENDENCY_GRAPH": "api/v1/dependencyGraph",
34-
"URL_SERVICE": "api/v1/service",
35-
"URL_VULNERABILITY": "api/v1/vulnerability",
14+
"URL_ACL_MAPPING": "api/v1/acl/mapping",
15+
"URL_ACL_TEAM": "api/v1/acl/team",
3616
"URL_ANALYSIS": "api/v1/analysis",
37-
"URL_SEARCH": "api/v1/search",
38-
"URL_METRICS": "api/v1/metrics",
17+
"URL_BOM": "api/v1/bom",
3918
"URL_CALCULATOR_CVSS": "api/v1/calculator/cvss",
4019
"URL_CALCULATOR_OWASP": "api/v1/calculator/owasp",
41-
"URL_REPOSITORY": "api/v1/repository",
20+
"URL_COMPONENT": "api/v1/component",
4221
"URL_CONFIG_PROPERTY": "api/v1/configProperty",
43-
"URL_NOTIFICATION_PUBLISHER": "api/v1/notification/publisher",
44-
"URL_NOTIFICATION_RULE": "api/v1/notification/rule",
22+
"URL_CWE": "api/v1/cwe",
23+
"URL_DEPENDENCY_GRAPH": "api/v1/dependencyGraph",
24+
"URL_FINDING": "api/v1/finding",
25+
"URL_FORCE_PW_CHANGE": "api/v1/user/forceChangePassword",
4526
"URL_LDAP_GROUPS": "api/v1/ldap/groups",
4627
"URL_LDAP_MAPPING": "api/v1/ldap/mapping",
28+
"URL_LICENSE": "api/v1/license",
29+
"URL_LICENSE_CONCISE": "api/v1/license/concise",
30+
"URL_LICENSE_GROUP": "api/v1/licenseGroup",
31+
"URL_LOGIN": "api/v1/user/login",
32+
"URL_METRICS": "api/v1/metrics",
33+
"URL_NOTIFICATION_PUBLISHER": "api/v1/notification/publisher",
34+
"URL_NOTIFICATION_RULE": "api/v1/notification/rule",
4735
"URL_OIDC_AVAILABLE": "api/v1/oidc/available",
4836
"URL_OIDC_GROUP": "api/v1/oidc/group",
4937
"URL_OIDC_MAPPING": "api/v1/oidc/mapping",
50-
"URL_BOM": "api/v1/bom",
38+
"URL_OSV_ECOSYSTEM": "api/v1/integration/osv/ecosystem",
39+
"URL_PERMISSION": "api/v1/permission",
5140
"URL_POLICY": "api/v1/policy",
5241
"URL_POLICY_VIOLATION": "api/v1/violation",
5342
"URL_POLICY_VIOLATION_ANALYSIS": "api/v1/violation/analysis",
54-
"URL_LICENSE_GROUP": "api/v1/licenseGroup",
55-
"URL_ACL_MAPPING": "api/v1/acl/mapping",
56-
"URL_ACL_TEAM": "api/v1/acl/team",
43+
"URL_PROJECT": "api/v1/project",
44+
"URL_REPOSITORY": "api/v1/repository",
45+
"URL_SEARCH": "api/v1/search",
46+
"URL_SERVICE": "api/v1/service",
47+
"URL_TAG": "api/v1/tag",
48+
"URL_TEAM": "api/v1/team",
49+
"URL_USER": "api/v1/user",
50+
"URL_USER_LDAP": "api/v1/user/ldap",
51+
"URL_USER_MANAGED": "api/v1/user/managed",
52+
"URL_USER_OIDC": "api/v1/user/oidc",
53+
"URL_USER_OIDC_LOGIN": "api/v1/user/oidc/login",
54+
"URL_USER_SELF": "api/v1/user/self",
5755
"URL_VEX": "api/v1/vex",
58-
"URL_OSV_ECOSYSTEM": "api/v1/integration/osv/ecosystem"
56+
"URL_VULNERABILITY": "api/v1/vulnerability",
57+
"WITH_CREDENTIALS": ""
5958
}

src/shared/oidc.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"ISSUER": "",
32
"CLIENT_ID": "",
4-
"SCOPE": "",
53
"FLOW": "",
6-
"LOGIN_BUTTON_TEXT": ""
4+
"ISSUER": "",
5+
"LOGIN_BUTTON_TEXT": "",
6+
"SCOPE": ""
77
}

0 commit comments

Comments
 (0)