@@ -23,6 +23,122 @@ export const API_TOKEN_HEADER = "X-Api-Token";
2323export const USER_AGENT_HEADER = "User-Agent" ;
2424export const USER_AGENT_CLI = `Cli/${ version } ` ;
2525
26+ // `ruleset-add` PROMPTS
27+ // PYTHON
28+ export const CATEGORY_PYTHON_GENERAL_NAME = "Python (general)" ;
29+ export const CATEGORY_PYTHON_GENERAL_VALUE = "python-general" ;
30+ export const CATEGORY_PYTHON_FLASK_NAME = "Python (Flask)" ;
31+ export const CATEGORY_PYTHON_FLASK_VALUE = "python-flask" ;
32+ // JAVASCRIPT
33+ export const CATEGORY_JS_GENERAL_NAME = "Javascript (general)" ;
34+ export const CATEGORY_JS_GENERAL_VALUE = "javascript-general" ;
35+ export const CATEGORY_JS_REACT_NAME = "Javascript (React)" ;
36+ export const CATEGORY_JS_REACT_VALUE = "javascript-react" ;
37+ export const CATEGORY_JS_EXPRESS_NAME = "Javascript (Express)" ;
38+ export const CATEGORY_JS_EXPRESS_VALUE = "javascript-express" ;
39+ export const CATEGORY_JS_TESTING_NAME = "Javascript (testing)" ;
40+ export const CATEGORY_JS_TESTING_VALUE = "javascript-testing" ;
41+ export const CATEGORY_JS_APOLLO_GRAPHQL_NAME = "Javascript (Apollo GraphQL)" ;
42+ export const CATEGORY_JS_APOLLO_GRAPHQL_VALUE = "javascript-apollo-graphql" ;
43+ // TYPESCRIPT
44+ export const CATEGORY_TS_GENERAL_NAME = "Typescript (general)" ;
45+ export const CATEGORY_TS_GENERAL_VALUE = "typescript-general" ;
46+ export const CATEGORY_TS_TESTING_NAME = "Typescript (testing)" ;
47+ export const CATEGORY_TS_TESTING_VALUE = "typescript-testing" ;
48+ export const CATEGORY_TS_APOLLO_GRAPHQL_NAME = "Typescript (Apollo GraphQL)" ;
49+ export const CATEGORY_TS_APOLLO_GRAPHQL_VALUE = "typescript-apollo-graphql" ;
50+
51+ export const CATEGORY_CHOICES = [
52+ {
53+ name : CATEGORY_PYTHON_GENERAL_NAME ,
54+ value : CATEGORY_PYTHON_GENERAL_VALUE ,
55+ } ,
56+ {
57+ name : CATEGORY_PYTHON_FLASK_NAME ,
58+ value : CATEGORY_PYTHON_FLASK_VALUE ,
59+ } ,
60+ {
61+ name : CATEGORY_JS_GENERAL_NAME ,
62+ value : CATEGORY_JS_GENERAL_VALUE ,
63+ } ,
64+ {
65+ name : CATEGORY_JS_TESTING_NAME ,
66+ value : CATEGORY_JS_TESTING_VALUE ,
67+ } ,
68+ {
69+ name : CATEGORY_JS_REACT_NAME ,
70+ value : CATEGORY_JS_REACT_VALUE ,
71+ } ,
72+ {
73+ name : CATEGORY_JS_EXPRESS_NAME ,
74+ value : CATEGORY_JS_EXPRESS_VALUE ,
75+ } ,
76+ {
77+ name : CATEGORY_JS_APOLLO_GRAPHQL_NAME ,
78+ value : CATEGORY_JS_APOLLO_GRAPHQL_VALUE ,
79+ } ,
80+ {
81+ name : CATEGORY_TS_GENERAL_NAME ,
82+ value : CATEGORY_TS_GENERAL_VALUE ,
83+ } ,
84+ {
85+ name : CATEGORY_TS_TESTING_NAME ,
86+ value : CATEGORY_TS_TESTING_VALUE ,
87+ } ,
88+ {
89+ name : CATEGORY_TS_APOLLO_GRAPHQL_NAME ,
90+ value : CATEGORY_TS_APOLLO_GRAPHQL_VALUE ,
91+ } ,
92+ ] ;
93+
94+ export const RULESET_CHOICES = {
95+ [ CATEGORY_PYTHON_GENERAL_VALUE ] : [
96+ "for-testing" , // for testing
97+ "python-security" , // https://app.codiga.io/hub/ruleset/python-security
98+ "python-best-practices" , // https://app.codiga.io/hub/ruleset/python-best-practices
99+ "python-code-style" , // https://app.codiga.io/hub/ruleset/python-code-style
100+ "python-inclusive" , // https://app.codiga.io/hub/ruleset/python-inclusive
101+ ] ,
102+ [ CATEGORY_PYTHON_FLASK_VALUE ] : [
103+ "python-flask" , // https://app.codiga.io/hub/ruleset/python-flask
104+ ] ,
105+ [ CATEGORY_JS_GENERAL_VALUE ] : [
106+ "javascript-client-security" , // https://app.codiga.io/hub/ruleset/javascript-client-security
107+ "javascript-inclusive" , // https://app.codiga.io/hub/ruleset/javascript-inclusive
108+ ] ,
109+ [ CATEGORY_JS_REACT_VALUE ] : [
110+ "jsx-a11y" , // https://app.codiga.io/hub/ruleset/jsx-a11y
111+ "jsx-react" , // https://app.codiga.io/hub/ruleset/jsx-react
112+ "react-best-practices" , // https://app.codiga.io/hub/ruleset/react-best-practices
113+ ] ,
114+ [ CATEGORY_JS_EXPRESS_VALUE ] : [
115+ "javascript-expressjs" , // https://app.codiga.io/hub/ruleset/javascript-expressjs
116+ "javascript-knex" , // https://app.codiga.io/hub/ruleset/javascript-knex
117+ ] ,
118+ [ CATEGORY_JS_TESTING_VALUE ] : [
119+ "playwright" , // https://app.codiga.io/hub/ruleset/playwright
120+ "testing-library" , // https://app.codiga.io/hub/ruleset/testing-library
121+ "jestjs" , // https://app.codiga.io/hub/ruleset/jestjs
122+ ] ,
123+ [ CATEGORY_JS_APOLLO_GRAPHQL_VALUE ] : [
124+ "apollo-graphql-client-javascript" , // https://app.codiga.io/hub/ruleset/apollo-graphql-client-javascript
125+ ] ,
126+ [ CATEGORY_TS_GENERAL_VALUE ] : [
127+ "typescript-best-practices" , // https://app.codiga.io/hub/ruleset/typescript-best-practices
128+ "jsx-a11y" , // https://app.codiga.io/hub/ruleset/jsx-a11y
129+ "jsx-react" , // https://app.codiga.io/hub/ruleset/jsx-react
130+ "react-best-practices" , // https://app.codiga.io/hub/ruleset/react-best-practices
131+ ] ,
132+ [ CATEGORY_TS_TESTING_VALUE ] : [
133+ "playwright" , // https://app.codiga.io/hub/ruleset/playwright
134+ "testing-library" , // https://app.codiga.io/hub/ruleset/testing-library
135+ "jestjs" , // https://app.codiga.io/hub/ruleset/jestjs
136+ ] ,
137+ [ CATEGORY_TS_APOLLO_GRAPHQL_VALUE ] : [
138+ "apollo-graphql-client-javascript" , // https://app.codiga.io/hub/ruleset/apollo-graphql-client-javascript
139+ ] ,
140+ } ;
141+
26142// EXTRA
27143export const STORE_API_TOKEN = "codiga-token" ;
28144export const BLANK_SHA = "0000000000000000000000000000000000000000" ;
0 commit comments