Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/NSNG-401-typescript' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayo Horkovic committed Nov 9, 2023
2 parents 37a73a8 + cb89a68 commit f280688
Show file tree
Hide file tree
Showing 120 changed files with 7,288 additions and 2,778 deletions.
68 changes: 68 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
'extends': [
'eslint:recommended',
'@vue/typescript/recommended',
'plugin:vue/vue3-recommended',
'plugin:prettier-vue/recommended',
'prettier',
],
parserOptions: {
ecmaVersion: 'latest'
},
plugins: ['prettier', 'import'],
rules: {
'vue/no-deprecated-slot-attribute': 'off',
'vue/multi-word-component-names': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
'vue/no-v-html': 'off',
'no-mixed-operators': 'off',
'vue/html-button-has-type': 'error',
'unicorn/prefer-includes': 'off',
'space-before-function-paren': 'off',
'curly': 'error',
'@typescript-eslint/no-var-requires': 'off',
'vue/valid-v-slot': 'off',
'vue/no-unused-vars': 'warn',
'@typescript-eslint/quotes': ['error', 'single'],
'@typescript-eslint/consistent-type-imports': ['off'],
"no-restricted-imports": ["error", {
"patterns": [".*"]
}],
'vue/component-tags-order': [
'error',
{
order: ['template', 'script', 'style'],
},
],
'vue/define-macros-order': [
'error',
{
order: ['defineProps', 'defineEmits'],
},
],
'import/order': [
'error',
{
'newlines-between': 'always',
'groups': [
'index',
['sibling', 'parent'],
'internal',
'external',
'builtin',
'object',
'type',
],
},
],
'vue/v-on-event-hyphenation': 'off',
'vue/require-default-prop': 'off',
'prettier-vue/prettier': ['error'],
'@typescript-eslint/ban-ts-comment': 'off',
}
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ dist-ssr
*.sln
*.sw?

src/app.js
auto-imports.d.ts
components.d.ts
/public/fonts/
typed-router.d.ts
/public/fonts/*
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run type-check
11 changes: 11 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"trailingComma": "es5",
"semi": false,
"singleQuote": true,
"useTabs": false,
"quoteProps": "consistent",
"bracketSpacing": true,
"arrowParens": "always",
"printWidth": 100
}
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"],
"typescript.preferences.autoImportFileExcludePatterns": ["vue-router"]
}
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000">
<meta name="theme-color" content="#ffffff">
<title>Atlas SNG</title>
<script type="module" src="/src/app.js"></script>
<script type="module" src="/src/app.ts"></script>
<!-- @todo: add Clarity + GTM when runing in production -->
<!--
<!--
@if (App::environment('production'))
{{-- Clarity --}}
<script type="text/javascript">
Expand Down
7 changes: 0 additions & 7 deletions manual.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
// TODO: move after refactoring

declare module 'vue-router' {
interface RouteMeta {
title: string
}
}
Loading

0 comments on commit f280688

Please sign in to comment.