Skip to content

Commit 968a171

Browse files
Update Deps and add FS example
2 parents 2a102c7 + b192c65 commit 968a171

12 files changed

+3622
-4555
lines changed

.browserslistrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
chrome 77
1+
chrome 78

.eslintrc.js

+6-155
Original file line numberDiff line numberDiff line change
@@ -21,167 +21,18 @@ module.exports = {
2121
},
2222
plugins: [
2323
'jest',
24-
// required to lint *.vue files
2524
'vue'
2625
],
2726
extends: [
2827
'eslint:recommended',
29-
'plugin:vue/recommended',
30-
'plugin:jest/recommended'
28+
'plugin:jest/recommended',
29+
'tjw-base',
30+
'tjw-vue'
3131
],
3232
rules: {
33-
'arrow-parens': ['off'],
34-
'brace-style': [
33+
'no-restricted-syntax': [
3534
'error',
36-
'1tbs',
37-
{
38-
'allowSingleLine': true
39-
}
40-
],
41-
'comma-dangle': ['error', 'never'],
42-
'comma-spacing': [
43-
'error',
44-
{
45-
'before': false,
46-
'after': true
47-
}
48-
],
49-
'comma-style': ['error', 'last'],
50-
'curly': ['error'],
51-
// allow async-await
52-
'generator-star-spacing': ['off'],
53-
// 2 space indentation to match .editorconfig
54-
'indent': [
55-
'error',
56-
2,
57-
{
58-
'SwitchCase': 1
59-
}
60-
],
61-
'keyword-spacing': [
62-
'error',
63-
{
64-
'before': true,
65-
'after': true
66-
}
67-
],
68-
// allow debugger during development
69-
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
70-
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
71-
'no-multi-spaces': ['error'],
72-
'no-restricted-syntax': ['error', 'Property[method="true"]'],
73-
'no-unused-vars': ['error'],
74-
'no-undef': ['error'],
75-
// Only allow let and const, no var
76-
'no-var': ['error'],
77-
'object-curly-spacing': ['error', 'always'],
78-
'one-var': ['error', 'never'],
79-
'quotes': ['error', 'single'],
80-
'semi': ['error', 'always'],
81-
'space-before-blocks': ['error', 'always'],
82-
'space-before-function-paren': ['error', 'always'],
83-
'space-in-parens': ['error', 'never'],
84-
'space-infix-ops': ['error'],
85-
'spaced-comment': ['error', 'always'],
86-
// Vue Linter Options
87-
'vue/attribute-hyphenation': ['error', 'never'],
88-
'vue/attributes-order': [
89-
'error',
90-
{
91-
'order': [
92-
// 'v-for item in items'
93-
'LIST_RENDERING',
94-
// 'v-if', 'v-else-if', 'v-else', 'v-show', 'v-cloak'
95-
'CONDITIONALS',
96-
// 'v-once', 'v-pre'
97-
'RENDER_MODIFIERS',
98-
// 'v-model', 'v-bind', ':property="foo"'
99-
'BINDING',
100-
// 'v-text', 'v-html'
101-
'CONTENT',
102-
// 'is'
103-
'DEFINITION',
104-
// 'id'
105-
'GLOBAL',
106-
// 'customProp="foo"', 'class', 'type', 'value' etc
107-
'OTHER_ATTR',
108-
// '@click="functionCall"', 'v-on="event"'
109-
'EVENTS',
110-
// 'slot', 'key', 'ref'
111-
'UNIQUE'
112-
]
113-
}
114-
],
115-
'vue/html-closing-bracket-newline': [
116-
'error',
117-
{
118-
'singleline': 'never',
119-
'multiline': 'always'
120-
}
121-
],
122-
'vue/html-closing-bracket-spacing': [
123-
'error',
124-
{
125-
'startTag': 'never',
126-
'endTag': 'never',
127-
'selfClosingTag': 'always'
128-
}
129-
],
130-
'vue/html-indent': [
131-
'error',
132-
2,
133-
{
134-
'attribute': 1,
135-
'closeBracket': 0
136-
}
137-
],
138-
'vue/html-self-closing': [
139-
'error',
140-
{
141-
'html': {
142-
'void': 'always',
143-
'normal': 'never',
144-
'component': 'always'
145-
}
146-
}
147-
],
148-
'vue/max-attributes-per-line': [
149-
'error',
150-
{
151-
'singleline': 3,
152-
'multiline': {
153-
'max': 1,
154-
'allowFirstLine': false
155-
}
156-
}
157-
],
158-
'vue/name-property-casing': ['error', 'PascalCase'],
159-
'vue/order-in-components': [
160-
'error',
161-
{
162-
'order': [
163-
'el',
164-
'name',
165-
['template', 'render'],
166-
'parent',
167-
'functional',
168-
['delimiters', 'comments'],
169-
['components', 'directives'],
170-
'extends',
171-
'mixins',
172-
'inheritAttrs',
173-
'model',
174-
['props', 'propsData'],
175-
'data',
176-
'methods',
177-
'computed',
178-
'filters',
179-
'watch',
180-
'LIFECYCLE_HOOKS',
181-
'renderError'
182-
]
183-
}
184-
],
185-
'vue/prop-name-casing': ['error', 'camelCase']
35+
'Property[method="true"]'
36+
]
18637
}
18738
};

.travis.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
sudo: required
2+
dist: trusty
3+
language: node_js
4+
node_js:
5+
- "10"
6+
install:
7+
- npm install
8+
script:
9+
- npm run validate

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# nw-vue-cli-example
22

3-
NW.js + Vue-CLI 3 example
3+
[![Build Status](https://travis-ci.org/nwutils/nw-vue-cli-example.svg?branch=master)](https://travis-ci.org/nwutils/nw-vue-cli-example)
4+
5+
NW.js + Vue-CLI 4 example
46

57
![A screenshot of the default app running on Windows](screenshot.png)
68

79
* NW.js
8-
* Vue-CLI 3
10+
* Vue-CLI 4
911
* Vue 2
10-
* Vue-DevTools
12+
* Vue-DevTools (latest)
1113
* Babel
1214
* ESLint
1315
* Jest (100% test coverage)

0 commit comments

Comments
 (0)