Skip to content

Commit

Permalink
Merge pull request #329 from telosnetwork/328-enable-typescript
Browse files Browse the repository at this point in the history
328 enable typescript
  • Loading branch information
Viterbo authored Jan 25, 2023
2 parents 6dd4819 + 18613ed commit 58fbfcc
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 50 deletions.
23 changes: 23 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,27 @@ module.exports = {
'vue/component-definition-name-casing': ['error', 'PascalCase'],
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
},
overrides:[
{
'files': ['**/*.ts', '**/*.tsx', '**/*/.vue'],
'env': { 'browser': true, 'es6': true, 'node': true },
'extends': [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-essential',
],
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaFeatures': { 'jsx': true },
'ecmaVersion': 2018,
'sourceType': 'module',
'project': './tsconfig.json',
},
'plugins': ['vue', '@typescript-eslint'],
'rules': {
'@typescript-eslint/no-explicit-any': 1,
},
},
],
};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@
"@quasar/app-webpack": "3.6.2",
"@types/jest": "29.1.1",
"@types/lodash": "^4.14.182",
"@typescript-eslint/eslint-plugin": "^5.48.2",
"@typescript-eslint/parser": "^5.48.2",
"@vue/test-utils": "2.1.0",
"@vue/vue3-jest": "29",
"babel-jest": "29.1.2",
"eslint": "8.22.0",
"eslint": "^8.32.0",
"eslint-plugin-jest": "27.1.0",
"eslint-plugin-vue": "^9.0.0",
"eslint-webpack-plugin": "^2.4.0",
Expand Down
11 changes: 9 additions & 2 deletions quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ const nodePolyfillWebpackPlugin = require('node-polyfill-webpack-plugin');

module.exports = function(/* ctx */) {
return {
// https://quasar.dev/quasar-cli/supporting-ts
supportTS: false,
// https://quasar.dev/quasar-cli/supporting-ts
supportTS: {
tsCheckerConfig: {
eslint: {
enabled: true,
files: './src/**/*.{ts,tsx,js,jsx,vue}',
},
},
},

// https://quasar.dev/quasar-cli/prefetch-feature
// preFetch: true,
Expand Down
4 changes: 2 additions & 2 deletions src/store/store-flag.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// THIS FEATURE-FLAG FILE IS AUTOGENERATED,
// REMOVAL OR CHANGES WILL CAUSE RELATED TYPES TO STOP WORKING
import "quasar/dist/types/feature-flag";
import 'quasar/dist/types/feature-flag';

declare module "quasar/dist/types/feature-flag" {
declare module 'quasar/dist/types/feature-flag' {
interface QuasarFeatureFlags {
store: true;
}
Expand Down
6 changes: 6 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "@quasar/app-webpack/tsconfig-preset",
"compilerOptions": {
"baseUrl": "."
}
}
Loading

0 comments on commit 58fbfcc

Please sign in to comment.