Skip to content
This repository was archived by the owner on Feb 18, 2020. It is now read-only.

Commit 13d8c8d

Browse files
init
0 parents  commit 13d8c8d

16 files changed

+9159
-0
lines changed

.browserslistrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not ie < 11

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[*.{js,jsx,ts,tsx,vue}]
2+
indent_style = space
3+
indent_size = 2
4+
end_of_line = lf
5+
trim_trailing_whitespace = true
6+
insert_final_newline = true

.eslintrc.js

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true,
5+
jest: true,
6+
},
7+
plugins: [
8+
'@typescript-eslint',
9+
],
10+
extends: [
11+
'standard',
12+
'plugin:vue/recommended',
13+
/*
14+
'@vue/typescript',
15+
*/
16+
],
17+
parserOptions: {
18+
parser: '@typescript-eslint/parser',
19+
},
20+
rules: {
21+
// 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
22+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
23+
'arrow-parens': ['error', 'as-needed'],
24+
'comma-dangle': ['error', 'always-multiline'],
25+
'constructor-super': 'error',
26+
'generator-star-spacing': 0,
27+
indent: ['error', 2],
28+
'object-shorthand': ['error', 'always'],
29+
'no-const-assign': 'error',
30+
'no-empty': 'error',
31+
'no-extra-semi': 'error',
32+
'no-redeclare': 'error',
33+
'no-return-assign': 'error',
34+
'no-return-await': 'warn',
35+
'no-template-curly-in-string': 'warn',
36+
'no-this-before-super': 'warn',
37+
'no-undef': 'error',
38+
'no-unreachable': 'error',
39+
'no-unused-vars': 'off',
40+
'newline-after-var': ['error', 'always'],
41+
'import/newline-after-import': 'error',
42+
semi: ['error', 'always'],
43+
'no-useless-constructor': 'off',
44+
'space-infix-ops': 'error',
45+
'space-before-function-paren': [
46+
'error',
47+
{
48+
anonymous: 'always',
49+
named: 'always',
50+
asyncArrow: 'always',
51+
},
52+
],
53+
'valid-typeof': 'error',
54+
55+
'vue/require-default-prop': 'off',
56+
'vue/no-v-html': 'off',
57+
'vue/prop-name-casing': 'error',
58+
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
59+
'vue/singleline-html-element-content-newline': 'off',
60+
'vue/multiline-html-element-content-newline': 'off',
61+
},
62+
overrides: [
63+
{
64+
files: '**/*.ts',
65+
rules: {
66+
// Can't overload function exports with this enabled
67+
'import/export': 'error',
68+
69+
// https://github.com/eslint/typescript-eslint-parser/issues/445
70+
// https://github.com/eslint/typescript-eslint-parser/issues/457
71+
// enabled in tslint instead
72+
'no-unused-vars': 'off',
73+
// '@typescript-eslint/no-unused-vars': 'error',
74+
75+
'@typescript-eslint/prefer-namespace-keyword': 'error',
76+
'@typescript-eslint/adjacent-overload-signatures': 'error',
77+
'@typescript-eslint/member-ordering': 'error',
78+
'@typescript-eslint/type-annotation-spacing': 'error',
79+
'@typescript-eslint/member-delimiter-style': ['error', {
80+
multiline: {
81+
delimiter: 'semi',
82+
},
83+
singleline: {
84+
delimiter: 'semi',
85+
},
86+
}],
87+
},
88+
},
89+
],
90+
};

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
15+
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw*

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# web
2+
3+
## Project setup
4+
```
5+
yarn install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
yarn run serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
yarn run build
16+
```
17+
18+
### Run your tests
19+
```
20+
yarn run test
21+
```
22+
23+
### Lints and fixes files
24+
```
25+
yarn run lint
26+
```
27+
28+
### Run your unit tests
29+
```
30+
yarn run test:unit
31+
```
32+
33+
### Customize configuration
34+
See [Configuration Reference](https://cli.vuejs.org/config/).

babel.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/app',
4+
],
5+
};

jest.config.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
module.exports = {
2+
moduleFileExtensions: [
3+
'js',
4+
'jsx',
5+
'json',
6+
'vue',
7+
'ts',
8+
'tsx',
9+
],
10+
transform: {
11+
'^.+\\.vue$': 'vue-jest',
12+
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
13+
'^.+\\.tsx?$': 'ts-jest',
14+
},
15+
transformIgnorePatterns: [
16+
'/node_modules/',
17+
],
18+
moduleNameMapper: {
19+
'^@/(.*)$': '<rootDir>/src/$1',
20+
},
21+
snapshotSerializers: [
22+
'jest-serializer-vue',
23+
],
24+
testMatch: [
25+
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)',
26+
],
27+
testURL: 'http://localhost/',
28+
watchPlugins: [
29+
'jest-watch-typeahead/filename',
30+
'jest-watch-typeahead/testname',
31+
],
32+
globals: {
33+
'ts-jest': {
34+
babelConfig: true,
35+
},
36+
},
37+
};

package.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "repro",
3+
"scripts": {
4+
"build": "vue-cli-service build"
5+
},
6+
"dependencies": {
7+
"core-js": "^2.6.5",
8+
"vue": "^2.5.21"
9+
},
10+
"devDependencies": {
11+
"@typescript-eslint/eslint-plugin": "^2.0.0",
12+
"@typescript-eslint/parser": "^2.0.0",
13+
"@vue/cli-plugin-babel": "^3.2.0",
14+
"@vue/cli-plugin-eslint": "^3.2.0",
15+
"@vue/cli-plugin-typescript": "^3.2.0",
16+
"@vue/cli-service": "^3.2.0",
17+
"@vue/eslint-config-standard": "^4.0.0",
18+
"@vue/eslint-config-typescript": "^4.0.0",
19+
"@vue/test-utils": "^1.0.0-beta.20",
20+
"babel-core": "7.0.0-bridge.0",
21+
"babel-eslint": "^10.0.1",
22+
"deepmerge": "^4.0.0",
23+
"eslint": "^6.0.1",
24+
"eslint-config-standard": "^14.0.0",
25+
"eslint-plugin-import": "^2.18.1",
26+
"eslint-plugin-node": "^9.0.1",
27+
"eslint-plugin-promise": "^4.0.1",
28+
"eslint-plugin-standard": "^4.0.0",
29+
"eslint-plugin-vue": "^5.0.0",
30+
"eslint-plugin-vuetify": "^1.0.0-beta.1",
31+
"fibers": "^4.0.1",
32+
"sass": "^1.22.7",
33+
"sass-loader": "^8.0.0",
34+
"typescript": "~3.5.0",
35+
"vue-template-compiler": "^2.5.21",
36+
"webpack": "^4.36.1"
37+
}
38+
}

postcss.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
plugins: {
3+
autoprefixer: {},
4+
},
5+
};

public/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
</head>
8+
<body>
9+
<noscript>
10+
<strong>We're sorry but web doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
11+
</noscript>
12+
<div id="app"></div>
13+
<!-- built files will be auto injected -->
14+
</body>
15+
</html>

src/App.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<template>
2+
<div />
3+
</template>
4+
5+
<script>
6+
export default {
7+
};
8+
</script>
9+
10+
<style lang="sass">
11+
.foo { display: none }
12+
</style>

src/main.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Vue from 'vue';
2+
import App from './App.vue';
3+
4+
Vue.config.productionTip = false;
5+
6+
new Vue({
7+
el: '#app',
8+
render: h => h(App),
9+
});

src/shims-tsx.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Vue, { VNode } from 'vue';
2+
3+
declare global {
4+
namespace JSX {
5+
// tslint:disable no-empty-interface
6+
interface Element extends VNode {}
7+
// tslint:disable no-empty-interface
8+
interface ElementClass extends Vue {}
9+
interface IntrinsicElements {
10+
[elem: string]: any;
11+
}
12+
}
13+
}

src/shims-vue.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
declare module '*.vue' {
2+
import Vue from 'vue';
3+
4+
export default Vue;
5+
}

tsconfig.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"compilerOptions": {
3+
"target": "esnext",
4+
"module": "esnext",
5+
"strict": true,
6+
"jsx": "preserve",
7+
"importHelpers": true,
8+
"moduleResolution": "node",
9+
"experimentalDecorators": true,
10+
"esModuleInterop": true,
11+
"allowSyntheticDefaultImports": true,
12+
"sourceMap": true,
13+
"baseUrl": ".",
14+
"types": [
15+
"webpack-env",
16+
"jest",
17+
"vuetify",
18+
"node"
19+
],
20+
"paths": {
21+
"@/*": [
22+
"src/*"
23+
]
24+
},
25+
"lib": [
26+
"esnext",
27+
"dom",
28+
"dom.iterable",
29+
"scripthost"
30+
]
31+
},
32+
"include": [
33+
"src/**/*.ts",
34+
"src/**/*.tsx",
35+
"src/**/*.vue",
36+
"tests/**/*.ts",
37+
"tests/**/*.tsx"
38+
],
39+
"exclude": [
40+
"node_modules"
41+
]
42+
}

0 commit comments

Comments
 (0)