@qvaroo/configs 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +391 -0
- package/eslint/index.js +222 -0
- package/eslint/node.js +126 -0
- package/eslint/react.js +159 -0
- package/eslint/rules/architecture.js +152 -0
- package/eslint/rules/code-quality.js +142 -0
- package/eslint/rules/naming-conventions.js +183 -0
- package/eslint/rules/spellcheck.js +263 -0
- package/index.d.ts +4 -0
- package/index.js +11 -0
- package/package.json +69 -0
- package/prettier/index.js +47 -0
- package/typescript/tsconfig.json +84 -0
- package/typescript/tsconfig.node.json +52 -0
- package/typescript/tsconfig.react.json +59 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Naming Convention Rules
|
|
3
|
+
*
|
|
4
|
+
* Enforces strict naming patterns:
|
|
5
|
+
* - Classes, Controllers, Models, UI Components → PascalCase
|
|
6
|
+
* - Interfaces → IPascalCase (must start with I)
|
|
7
|
+
* - Local variables & method parameters → camelCase
|
|
8
|
+
* - Constants → UPPER_SNAKE_CASE
|
|
9
|
+
* - UI event names → kebab-case (enforced via custom pattern)
|
|
10
|
+
* - Methods returning Promise/Task → must end with Async
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
'@typescript-eslint/naming-convention': [
|
|
15
|
+
'error',
|
|
16
|
+
|
|
17
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
18
|
+
// Default: camelCase for everything unless overridden
|
|
19
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
20
|
+
{
|
|
21
|
+
selector: 'default',
|
|
22
|
+
format: ['camelCase'],
|
|
23
|
+
leadingUnderscore: 'allow',
|
|
24
|
+
trailingUnderscore: 'forbid',
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
28
|
+
// Variables: camelCase or UPPER_CASE for constants
|
|
29
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
30
|
+
{
|
|
31
|
+
selector: 'variable',
|
|
32
|
+
format: ['camelCase'],
|
|
33
|
+
leadingUnderscore: 'allow',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
selector: 'variable',
|
|
37
|
+
modifiers: ['const', 'global'],
|
|
38
|
+
format: ['camelCase', 'UPPER_CASE'],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
selector: 'variable',
|
|
42
|
+
modifiers: ['const', 'exported'],
|
|
43
|
+
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
47
|
+
// Parameters: camelCase only
|
|
48
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
49
|
+
{
|
|
50
|
+
selector: 'parameter',
|
|
51
|
+
format: ['camelCase'],
|
|
52
|
+
leadingUnderscore: 'allow',
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
56
|
+
// Functions: camelCase, Async suffix for async functions
|
|
57
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
58
|
+
{
|
|
59
|
+
selector: 'function',
|
|
60
|
+
format: ['camelCase'],
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
selector: 'function',
|
|
64
|
+
modifiers: ['async'],
|
|
65
|
+
format: ['camelCase'],
|
|
66
|
+
suffix: ['Async'],
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
70
|
+
// Methods: camelCase, Async suffix for async methods
|
|
71
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
72
|
+
{
|
|
73
|
+
selector: 'method',
|
|
74
|
+
format: ['camelCase'],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
selector: 'method',
|
|
78
|
+
modifiers: ['async'],
|
|
79
|
+
format: ['camelCase'],
|
|
80
|
+
suffix: ['Async'],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
selector: 'method',
|
|
84
|
+
modifiers: ['private'],
|
|
85
|
+
format: ['camelCase'],
|
|
86
|
+
leadingUnderscore: 'require',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
selector: 'method',
|
|
90
|
+
modifiers: ['private', 'async'],
|
|
91
|
+
format: ['camelCase'],
|
|
92
|
+
leadingUnderscore: 'require',
|
|
93
|
+
suffix: ['Async'],
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
97
|
+
// Properties: camelCase for most, special handling for constants
|
|
98
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
99
|
+
{
|
|
100
|
+
selector: 'property',
|
|
101
|
+
format: ['camelCase'],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
selector: 'property',
|
|
105
|
+
modifiers: ['private'],
|
|
106
|
+
format: ['camelCase'],
|
|
107
|
+
leadingUnderscore: 'require',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
selector: 'property',
|
|
111
|
+
modifiers: ['static', 'readonly'],
|
|
112
|
+
format: ['UPPER_CASE', 'camelCase'],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
selector: 'classProperty',
|
|
116
|
+
modifiers: ['readonly'],
|
|
117
|
+
format: ['camelCase', 'UPPER_CASE'],
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
121
|
+
// Classes: PascalCase (includes Controllers, Models, Components)
|
|
122
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
123
|
+
{
|
|
124
|
+
selector: 'class',
|
|
125
|
+
format: ['PascalCase'],
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
129
|
+
// Interfaces: IPascalCase (must start with 'I')
|
|
130
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
131
|
+
{
|
|
132
|
+
selector: 'interface',
|
|
133
|
+
format: ['PascalCase'],
|
|
134
|
+
prefix: ['I'],
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
138
|
+
// Type Aliases: PascalCase
|
|
139
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
140
|
+
{
|
|
141
|
+
selector: 'typeAlias',
|
|
142
|
+
format: ['PascalCase'],
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
146
|
+
// Type Parameters (Generics): PascalCase with T prefix
|
|
147
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
148
|
+
{
|
|
149
|
+
selector: 'typeParameter',
|
|
150
|
+
format: ['PascalCase'],
|
|
151
|
+
prefix: ['T', 'K', 'V', 'E', 'P'],
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
155
|
+
// Enums and Enum Members: PascalCase
|
|
156
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
157
|
+
{
|
|
158
|
+
selector: 'enum',
|
|
159
|
+
format: ['PascalCase'],
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
selector: 'enumMember',
|
|
163
|
+
format: ['PascalCase', 'UPPER_CASE'],
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
167
|
+
// Object literal properties: allow flexibility for API responses
|
|
168
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
169
|
+
{
|
|
170
|
+
selector: 'objectLiteralProperty',
|
|
171
|
+
format: null,
|
|
172
|
+
modifiers: ['requiresQuotes'],
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
176
|
+
// Import names: allow as-imported
|
|
177
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
178
|
+
{
|
|
179
|
+
selector: 'import',
|
|
180
|
+
format: ['camelCase', 'PascalCase'],
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
};
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spellcheck Rules
|
|
3
|
+
*
|
|
4
|
+
* Enforces meaningful and correctly spelled variable/function names
|
|
5
|
+
* for code clarity and maintainability.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
module.exports = {
|
|
9
|
+
'spellcheck/spell-checker': [
|
|
10
|
+
'warn',
|
|
11
|
+
{
|
|
12
|
+
comments: true,
|
|
13
|
+
strings: false,
|
|
14
|
+
identifiers: true,
|
|
15
|
+
lang: 'en_US',
|
|
16
|
+
skipWords: [
|
|
17
|
+
// Common programming terms
|
|
18
|
+
'async',
|
|
19
|
+
'await',
|
|
20
|
+
'bool',
|
|
21
|
+
'boolean',
|
|
22
|
+
'calc',
|
|
23
|
+
'callback',
|
|
24
|
+
'config',
|
|
25
|
+
'configs',
|
|
26
|
+
'const',
|
|
27
|
+
'ctx',
|
|
28
|
+
'dev',
|
|
29
|
+
'devops',
|
|
30
|
+
'enum',
|
|
31
|
+
'env',
|
|
32
|
+
'eslint',
|
|
33
|
+
'fn',
|
|
34
|
+
'func',
|
|
35
|
+
'href',
|
|
36
|
+
'html',
|
|
37
|
+
'http',
|
|
38
|
+
'https',
|
|
39
|
+
'impl',
|
|
40
|
+
'init',
|
|
41
|
+
'instanceof',
|
|
42
|
+
'json',
|
|
43
|
+
'jsx',
|
|
44
|
+
'keyof',
|
|
45
|
+
'len',
|
|
46
|
+
'middleware',
|
|
47
|
+
'namespace',
|
|
48
|
+
'nav',
|
|
49
|
+
'nodejs',
|
|
50
|
+
'noop',
|
|
51
|
+
'nullable',
|
|
52
|
+
'param',
|
|
53
|
+
'params',
|
|
54
|
+
'parseInt',
|
|
55
|
+
'pathname',
|
|
56
|
+
'readonly',
|
|
57
|
+
'rerender',
|
|
58
|
+
'req',
|
|
59
|
+
'res',
|
|
60
|
+
'rgba',
|
|
61
|
+
'src',
|
|
62
|
+
'stderr',
|
|
63
|
+
'stdin',
|
|
64
|
+
'stdout',
|
|
65
|
+
'str',
|
|
66
|
+
'stringify',
|
|
67
|
+
'svg',
|
|
68
|
+
'tsx',
|
|
69
|
+
'typeof',
|
|
70
|
+
'ui',
|
|
71
|
+
'undef',
|
|
72
|
+
'url',
|
|
73
|
+
'urls',
|
|
74
|
+
'utf',
|
|
75
|
+
'util',
|
|
76
|
+
'utils',
|
|
77
|
+
'uuid',
|
|
78
|
+
'webpack',
|
|
79
|
+
'whitespace',
|
|
80
|
+
'xhr',
|
|
81
|
+
'xml',
|
|
82
|
+
|
|
83
|
+
// TypeScript specific
|
|
84
|
+
'tsconfig',
|
|
85
|
+
'tslint',
|
|
86
|
+
'dts',
|
|
87
|
+
'keyof',
|
|
88
|
+
'readonly',
|
|
89
|
+
|
|
90
|
+
// React specific
|
|
91
|
+
'classname',
|
|
92
|
+
'classnames',
|
|
93
|
+
'componentdidmount',
|
|
94
|
+
'componentwillunmount',
|
|
95
|
+
'createref',
|
|
96
|
+
'forwardref',
|
|
97
|
+
'getinitialprops',
|
|
98
|
+
'getstaticprops',
|
|
99
|
+
'getserversideprops',
|
|
100
|
+
'onclick',
|
|
101
|
+
'onchange',
|
|
102
|
+
'onsubmit',
|
|
103
|
+
'onkeydown',
|
|
104
|
+
'onkeyup',
|
|
105
|
+
'onmouseenter',
|
|
106
|
+
'onmouseleave',
|
|
107
|
+
'onfocus',
|
|
108
|
+
'onblur',
|
|
109
|
+
'unmount',
|
|
110
|
+
'usestate',
|
|
111
|
+
'useeffect',
|
|
112
|
+
'usememo',
|
|
113
|
+
'usecallback',
|
|
114
|
+
'useref',
|
|
115
|
+
'usecontext',
|
|
116
|
+
'usereducer',
|
|
117
|
+
'uselayouteffect',
|
|
118
|
+
'useimperativehandle',
|
|
119
|
+
'usedebugvalue',
|
|
120
|
+
|
|
121
|
+
// Common abbreviations
|
|
122
|
+
'api',
|
|
123
|
+
'apis',
|
|
124
|
+
'auth',
|
|
125
|
+
'btn',
|
|
126
|
+
'cta',
|
|
127
|
+
'db',
|
|
128
|
+
'dto',
|
|
129
|
+
'dtos',
|
|
130
|
+
'guid',
|
|
131
|
+
'guids',
|
|
132
|
+
'i18n',
|
|
133
|
+
'id',
|
|
134
|
+
'ids',
|
|
135
|
+
'idx',
|
|
136
|
+
'img',
|
|
137
|
+
'imgs',
|
|
138
|
+
'io',
|
|
139
|
+
'ips',
|
|
140
|
+
'js',
|
|
141
|
+
'lib',
|
|
142
|
+
'libs',
|
|
143
|
+
'localstorage',
|
|
144
|
+
'msg',
|
|
145
|
+
'num',
|
|
146
|
+
'obj',
|
|
147
|
+
'ok',
|
|
148
|
+
'os',
|
|
149
|
+
'pdf',
|
|
150
|
+
'pdfs',
|
|
151
|
+
'prev',
|
|
152
|
+
'pwa',
|
|
153
|
+
'rgb',
|
|
154
|
+
'sdk',
|
|
155
|
+
'sql',
|
|
156
|
+
'ssr',
|
|
157
|
+
'ssg',
|
|
158
|
+
'tmp',
|
|
159
|
+
'ts',
|
|
160
|
+
'txt',
|
|
161
|
+
'vm',
|
|
162
|
+
'vs',
|
|
163
|
+
'ws',
|
|
164
|
+
'wss',
|
|
165
|
+
|
|
166
|
+
// Domain-specific (add your own)
|
|
167
|
+
'auth',
|
|
168
|
+
'jwt',
|
|
169
|
+
'oauth',
|
|
170
|
+
'oauth2',
|
|
171
|
+
'saml',
|
|
172
|
+
'ldap',
|
|
173
|
+
'csrf',
|
|
174
|
+
'xss',
|
|
175
|
+
'cors',
|
|
176
|
+
'cdn',
|
|
177
|
+
'dns',
|
|
178
|
+
'ssl',
|
|
179
|
+
'tls',
|
|
180
|
+
|
|
181
|
+
// Framework/Library names
|
|
182
|
+
'axios',
|
|
183
|
+
'lodash',
|
|
184
|
+
'dayjs',
|
|
185
|
+
'luxon',
|
|
186
|
+
'zod',
|
|
187
|
+
'yup',
|
|
188
|
+
'formik',
|
|
189
|
+
'chakra',
|
|
190
|
+
'tailwind',
|
|
191
|
+
'vite',
|
|
192
|
+
'vitest',
|
|
193
|
+
'jest',
|
|
194
|
+
'mocha',
|
|
195
|
+
'chai',
|
|
196
|
+
'sinon',
|
|
197
|
+
'playwright',
|
|
198
|
+
'cypress',
|
|
199
|
+
'storybook',
|
|
200
|
+
'nextjs',
|
|
201
|
+
'vercel',
|
|
202
|
+
'netlify',
|
|
203
|
+
'heroku',
|
|
204
|
+
'kubernetes',
|
|
205
|
+
'k8s',
|
|
206
|
+
'docker',
|
|
207
|
+
'redis',
|
|
208
|
+
'mongodb',
|
|
209
|
+
'postgres',
|
|
210
|
+
'prisma',
|
|
211
|
+
'sequelize',
|
|
212
|
+
'typeorm',
|
|
213
|
+
'graphql',
|
|
214
|
+
'apollo',
|
|
215
|
+
'trpc',
|
|
216
|
+
|
|
217
|
+
// Event names (kebab-case components)
|
|
218
|
+
'keydown',
|
|
219
|
+
'keyup',
|
|
220
|
+
'keypress',
|
|
221
|
+
'mousedown',
|
|
222
|
+
'mouseup',
|
|
223
|
+
'mousemove',
|
|
224
|
+
'mouseenter',
|
|
225
|
+
'mouseleave',
|
|
226
|
+
'mouseover',
|
|
227
|
+
'mouseout',
|
|
228
|
+
'touchstart',
|
|
229
|
+
'touchend',
|
|
230
|
+
'touchmove',
|
|
231
|
+
'focusin',
|
|
232
|
+
'focusout',
|
|
233
|
+
'dragstart',
|
|
234
|
+
'dragend',
|
|
235
|
+
'dragover',
|
|
236
|
+
'dragleave',
|
|
237
|
+
'pointerdown',
|
|
238
|
+
'pointerup',
|
|
239
|
+
'pointermove',
|
|
240
|
+
],
|
|
241
|
+
skipIfMatch: [
|
|
242
|
+
// Skip hex colors
|
|
243
|
+
'^#[0-9a-fA-F]{3,8}$',
|
|
244
|
+
// Skip URLs
|
|
245
|
+
'^https?://',
|
|
246
|
+
// Skip file paths
|
|
247
|
+
'^\\./',
|
|
248
|
+
'^\\.\\./',
|
|
249
|
+
// Skip version numbers
|
|
250
|
+
'^v?\\d+\\.\\d+\\.\\d+',
|
|
251
|
+
// Skip UUIDs
|
|
252
|
+
'^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$',
|
|
253
|
+
// Skip base64
|
|
254
|
+
'^[A-Za-z0-9+/]+=*$',
|
|
255
|
+
],
|
|
256
|
+
skipWordIfMatch: [
|
|
257
|
+
// Skip camelCase compound words
|
|
258
|
+
'^[a-z]+[A-Z]',
|
|
259
|
+
],
|
|
260
|
+
minLength: 3,
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
};
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @qvaroo/configs
|
|
3
|
+
* Centralized Qvaroo coding standards for TypeScript projects.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
eslint: require('./eslint'),
|
|
8
|
+
eslintReact: require('./eslint/react'),
|
|
9
|
+
eslintNode: require('./eslint/node'),
|
|
10
|
+
prettier: require('./prettier'),
|
|
11
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@qvaroo/configs",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Centralized Qvaroo coding standards, ESLint, Prettier, and TypeScript configurations for TypeScript frontend projects",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"author": "Qvaroo DevOps Team",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/aman-technyx/code-guard.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"eslint",
|
|
15
|
+
"prettier",
|
|
16
|
+
"typescript",
|
|
17
|
+
"config",
|
|
18
|
+
"qvaroo-standards",
|
|
19
|
+
"linting",
|
|
20
|
+
"code-quality"
|
|
21
|
+
],
|
|
22
|
+
"files": [
|
|
23
|
+
"eslint/",
|
|
24
|
+
"prettier/",
|
|
25
|
+
"typescript/",
|
|
26
|
+
"index.js",
|
|
27
|
+
"index.d.ts"
|
|
28
|
+
],
|
|
29
|
+
"exports": {
|
|
30
|
+
".": "./index.js",
|
|
31
|
+
"./eslint": "./eslint/index.js",
|
|
32
|
+
"./eslint/react": "./eslint/react.js",
|
|
33
|
+
"./eslint/node": "./eslint/node.js",
|
|
34
|
+
"./prettier": "./prettier/index.js",
|
|
35
|
+
"./typescript": "./typescript/tsconfig.json",
|
|
36
|
+
"./typescript/react": "./typescript/tsconfig.react.json",
|
|
37
|
+
"./typescript/node": "./typescript/tsconfig.node.json"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"lint": "eslint \"**/*.{js,ts}\" --ignore-pattern node_modules/",
|
|
41
|
+
"format": "prettier --write .",
|
|
42
|
+
"test": "echo \"No tests yet\" && exit 0",
|
|
43
|
+
"prepublishOnly": "echo \"Skipping lint for publish\""
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"eslint": "^8.0.0 || ^9.0.0",
|
|
47
|
+
"prettier": "^3.0.0",
|
|
48
|
+
"typescript": "^5.0.0"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
52
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
53
|
+
"eslint-plugin-spellcheck": "^0.0.20",
|
|
54
|
+
"eslint-plugin-boundaries": "^4.0.0",
|
|
55
|
+
"eslint-plugin-import": "^2.29.0",
|
|
56
|
+
"eslint-plugin-promise": "^6.1.0",
|
|
57
|
+
"eslint-plugin-unicorn": "^51.0.0",
|
|
58
|
+
"eslint-plugin-sonarjs": "^0.24.0",
|
|
59
|
+
"eslint-config-prettier": "^9.1.0"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"eslint": "^8.57.0",
|
|
63
|
+
"prettier": "^3.2.0",
|
|
64
|
+
"typescript": "^5.3.0"
|
|
65
|
+
},
|
|
66
|
+
"engines": {
|
|
67
|
+
"node": ">=18.0.0"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @qvaroo/configs - Prettier Configuration
|
|
3
|
+
* Prioritizes readability over cleverness.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/** @type {import('prettier').Config} */
|
|
7
|
+
module.exports = {
|
|
8
|
+
printWidth: 100,
|
|
9
|
+
tabWidth: 2,
|
|
10
|
+
useTabs: false,
|
|
11
|
+
semi: true,
|
|
12
|
+
trailingComma: 'all',
|
|
13
|
+
singleQuote: true,
|
|
14
|
+
jsxSingleQuote: false,
|
|
15
|
+
quoteProps: 'as-needed',
|
|
16
|
+
bracketSpacing: true,
|
|
17
|
+
bracketSameLine: false,
|
|
18
|
+
arrowParens: 'always',
|
|
19
|
+
proseWrap: 'preserve',
|
|
20
|
+
htmlWhitespaceSensitivity: 'css',
|
|
21
|
+
endOfLine: 'lf',
|
|
22
|
+
embeddedLanguageFormatting: 'auto',
|
|
23
|
+
singleAttributePerLine: false,
|
|
24
|
+
|
|
25
|
+
overrides: [
|
|
26
|
+
{
|
|
27
|
+
files: ['*.json', '*.jsonc'],
|
|
28
|
+
options: { tabWidth: 2, trailingComma: 'none' },
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
files: ['*.md', '*.mdx'],
|
|
32
|
+
options: { printWidth: 80, proseWrap: 'always' },
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
files: ['*.yml', '*.yaml'],
|
|
36
|
+
options: { tabWidth: 2, singleQuote: false },
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
files: ['*.html'],
|
|
40
|
+
options: { printWidth: 120, htmlWhitespaceSensitivity: 'strict' },
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
files: ['*.css', '*.scss', '*.less'],
|
|
44
|
+
options: { singleQuote: false },
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"display": "@qvaroo/configs - Base TypeScript Configuration",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"strict": true,
|
|
6
|
+
"noImplicitAny": true,
|
|
7
|
+
"noUnusedLocals": true,
|
|
8
|
+
"noUnusedParameters": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"noImplicitReturns": true,
|
|
11
|
+
"noImplicitThis": true,
|
|
12
|
+
"noFallthroughCasesInSwitch": true,
|
|
13
|
+
"strictNullChecks": true,
|
|
14
|
+
"strictFunctionTypes": true,
|
|
15
|
+
"strictBindCallApply": true,
|
|
16
|
+
"strictPropertyInitialization": true,
|
|
17
|
+
"useUnknownInCatchVariables": true,
|
|
18
|
+
"noUncheckedIndexedAccess": true,
|
|
19
|
+
"exactOptionalPropertyTypes": true,
|
|
20
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
21
|
+
"allowUnusedLabels": false,
|
|
22
|
+
"allowUnreachableCode": false,
|
|
23
|
+
"target": "ES2022",
|
|
24
|
+
"module": "ESNext",
|
|
25
|
+
"moduleResolution": "bundler",
|
|
26
|
+
"esModuleInterop": true,
|
|
27
|
+
"allowSyntheticDefaultImports": true,
|
|
28
|
+
"isolatedModules": true,
|
|
29
|
+
"resolveJsonModule": true,
|
|
30
|
+
"declaration": true,
|
|
31
|
+
"declarationMap": true,
|
|
32
|
+
"sourceMap": true,
|
|
33
|
+
"removeComments": false,
|
|
34
|
+
"skipLibCheck": true,
|
|
35
|
+
"lib": [
|
|
36
|
+
"ES2022"
|
|
37
|
+
],
|
|
38
|
+
"types": [
|
|
39
|
+
"node"
|
|
40
|
+
],
|
|
41
|
+
"baseUrl": ".",
|
|
42
|
+
"paths": {
|
|
43
|
+
"@/*": [
|
|
44
|
+
"src/*"
|
|
45
|
+
],
|
|
46
|
+
"@api/*": [
|
|
47
|
+
"src/api/*"
|
|
48
|
+
],
|
|
49
|
+
"@components/*": [
|
|
50
|
+
"src/components/*"
|
|
51
|
+
],
|
|
52
|
+
"@services/*": [
|
|
53
|
+
"src/services/*"
|
|
54
|
+
],
|
|
55
|
+
"@events/*": [
|
|
56
|
+
"src/events/*"
|
|
57
|
+
],
|
|
58
|
+
"@animations/*": [
|
|
59
|
+
"src/animations/*"
|
|
60
|
+
],
|
|
61
|
+
"@styles/*": [
|
|
62
|
+
"src/styles/*"
|
|
63
|
+
],
|
|
64
|
+
"@utils/*": [
|
|
65
|
+
"src/utils/*"
|
|
66
|
+
],
|
|
67
|
+
"@types/*": [
|
|
68
|
+
"src/types/*"
|
|
69
|
+
],
|
|
70
|
+
"@constants/*": [
|
|
71
|
+
"src/constants/*"
|
|
72
|
+
],
|
|
73
|
+
"@hooks/*": [
|
|
74
|
+
"src/hooks/*"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"exclude": [
|
|
79
|
+
"node_modules",
|
|
80
|
+
"dist",
|
|
81
|
+
"build",
|
|
82
|
+
"coverage"
|
|
83
|
+
]
|
|
84
|
+
}
|