Skip to content

Commit

Permalink
refactor: minor tunes
Browse files Browse the repository at this point in the history
* Added suggested options to tsconfig.json by Vite docs:
  https://vitejs.dev/guide/features.html#typescript-compiler-options
* Ignore inline comments capitalization
* Add jsonc/auto rule to automatically inherit eslint rules for JSON files
* Improve dpdm run parameters

Signed-off-by: Fernando Fernández <[email protected]>
  • Loading branch information
ferferga committed Dec 31, 2023
1 parent dcf18dc commit 757e357
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
10 changes: 8 additions & 2 deletions frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ module.exports = {
'@stylistic/type-named-tuple-spacing': 'error',
'no-extend-native': 'error',
'file-progress/activate': CI_environment,
'capitalized-comments': 'error',
'capitalized-comments': [
'error', 'always',
{
'ignoreInlineComments': true,
ignoreConsecutiveComments: true
}],
'multiline-comment-style': 'error',
'unicode-bom': ['error', 'never'],
'no-restricted-globals': ['error', ...restrictedGlobals],
Expand Down Expand Up @@ -232,7 +237,8 @@ module.exports = {
parser: 'jsonc-eslint-parser',
rules: {
'@stylistic/quotes': ['error', 'double'],
'@stylistic/semi': 'off'
'@stylistic/semi': 'off',
'jsonc/auto': 'error'
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"defaults and supports es6-module"
],
"scripts": {
"analyze": "dpdm --no-warning --no-tree src/main.ts && vite build --mode analyze",
"analyze": "dpdm --no-warning --no-tree src/**/*.{ts,vue} && vite build --mode analyze",
"build": "vite build",
"check": "npm run lint && npm run typecheck",
"start": "vite",
Expand Down
3 changes: 2 additions & 1 deletion frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"moduleResolution": "Bundler",
"esModuleInterop": true,
"resolveJsonModule": true,
"allowJs": true,
"sourceMap": true,
"strict": true,
"noEmit": true,
"isolatedModules": true,
"useDefineForClassFields": true,
"noImplicitThis": true,
"noImplicitAny": true,
"experimentalDecorators": true,
Expand Down

0 comments on commit 757e357

Please sign in to comment.