-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from d2phap/feature/vue-3
Feature: Support Vue 3 + TypeScript
- Loading branch information
Showing
45 changed files
with
25,053 additions
and
11,416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
const isProduction = process.env.NODE_ENV === 'production'; | ||
|
||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
}, | ||
extends: [ | ||
'plugin:vue/vue3-essential', | ||
'@vue/airbnb', | ||
'@vue/typescript/recommended', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2021, | ||
}, | ||
rules: { | ||
'@typescript-eslint/ban-types': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/brace-style': 'off', | ||
'@typescript-eslint/lines-between-class-members': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unused-vars': isProduction ? 'error' : 'warn', | ||
'arrow-parens': 'off', | ||
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }], | ||
'camelcase': 'off', | ||
'class-methods-use-this': 'off', | ||
'import/extensions': 'off', | ||
'import/no-cycle': 'off', | ||
'linebreak-style': 'off', | ||
'lines-between-class-members': 'off', | ||
'max-classes-per-file': 'off', | ||
'no-await-in-loop': 'off', | ||
'no-console': isProduction ? 'warn' : 'off', | ||
'no-continue': 'off', | ||
'no-debugger': isProduction ? 'warn' : 'off', | ||
'no-empty': 'off', | ||
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1, maxBOF: 1 }], | ||
'no-param-reassign': 'off', | ||
'no-plusplus': 'off', | ||
'no-restricted-globals': 'off', | ||
// https://github.com/typescript-eslint/typescript-eslint/blob/main/docs/linting/TROUBLESHOOTING.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors | ||
'no-undef': 'off', | ||
'prefer-object-spread': 'off', | ||
|
||
'vuejs-accessibility/heading-has-content': 'off', | ||
'vuejs-accessibility/mouse-events-have-key-events': 'off', | ||
'vuejs-accessibility/click-events-have-key-events': 'off', | ||
'vuejs-accessibility/label-has-for': 'off', | ||
'vuejs-accessibility/form-control-has-label': 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
files: [ | ||
'**/__tests__/*.{j,t}s?(x)', | ||
'**/tests/unit/**/*.spec.{j,t}s?(x)', | ||
], | ||
env: { | ||
jest: true, | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
presets: [ | ||
'@vue/cli-plugin-babel/preset', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
> 1% | ||
last 2 versions | ||
not dead | ||
not ie 11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[*.{js,jsx,ts,tsx,vue}] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
const isProduction = process.env.NODE_ENV === 'production'; | ||
|
||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
}, | ||
extends: [ | ||
'plugin:vue/vue3-essential', | ||
'@vue/airbnb', | ||
'@vue/typescript/recommended', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2021, | ||
}, | ||
rules: { | ||
'@typescript-eslint/ban-types': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/brace-style': 'off', | ||
'@typescript-eslint/lines-between-class-members': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unused-vars': isProduction ? 'error' : 'warn', | ||
'arrow-parens': 'off', | ||
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }], | ||
'camelcase': 'off', | ||
'class-methods-use-this': 'off', | ||
'import/extensions': 'off', | ||
'import/no-cycle': 'off', | ||
'linebreak-style': 'off', | ||
'lines-between-class-members': 'off', | ||
'max-classes-per-file': 'off', | ||
'no-await-in-loop': 'off', | ||
'no-console': isProduction ? 'warn' : 'off', | ||
'no-continue': 'off', | ||
'no-debugger': isProduction ? 'warn' : 'off', | ||
'no-empty': 'off', | ||
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1, maxBOF: 1 }], | ||
'no-param-reassign': 'off', | ||
'no-plusplus': 'off', | ||
'no-restricted-globals': 'off', | ||
// https://github.com/typescript-eslint/typescript-eslint/blob/main/docs/linting/TROUBLESHOOTING.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors | ||
'no-undef': 'off', | ||
'prefer-object-spread': 'off', | ||
|
||
'vuejs-accessibility/heading-has-content': 'off', | ||
'vuejs-accessibility/mouse-events-have-key-events': 'off', | ||
'vuejs-accessibility/click-events-have-key-events': 'off', | ||
'vuejs-accessibility/label-has-for': 'off', | ||
'vuejs-accessibility/form-control-has-label': 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
files: [ | ||
'**/__tests__/*.{j,t}s?(x)', | ||
'**/tests/unit/**/*.spec.{j,t}s?(x)', | ||
], | ||
env: { | ||
jest: true, | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# demo | ||
|
||
## Project setup | ||
``` | ||
npm install | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
``` | ||
npm run serve | ||
``` | ||
|
||
### Compiles and minifies for production | ||
``` | ||
npm run build | ||
``` | ||
|
||
### Lints and fixes files | ||
``` | ||
npm run lint | ||
``` | ||
|
||
### Customize configuration | ||
See [Configuration Reference](https://cli.vuejs.org/config/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
presets: [ | ||
'@vue/cli-plugin-babel/preset', | ||
], | ||
}; |
Oops, something went wrong.