Skip to content

Commit 821de42

Browse files
committed
init
0 parents  commit 821de42

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2484
-0
lines changed

.babelrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"comments": false,
3+
"env": {
4+
"main": {
5+
"presets": ["es2015", "stage-0"]
6+
},
7+
"renderer": {
8+
"presets": [
9+
["es2015", { "modules": false }],
10+
"stage-0"
11+
]
12+
}
13+
},
14+
"plugins": ["transform-runtime"]
15+
}

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
app/node_modules/**
2+
app/dist/**
3+
build/*.js
4+
config/*.js
5+
app/src/renderer/assets

.eslintrc.js

Lines changed: 310 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,310 @@
1+
module.exports = {
2+
root: true,
3+
parser: 'babel-eslint',
4+
parserOptions: {
5+
sourceType: 'module'
6+
},
7+
env: {
8+
browser: true,
9+
node: true
10+
},
11+
extends: 'eslint:recommended',
12+
// required to lint *.vue files
13+
plugins: [
14+
'html'
15+
],
16+
// add your custom rules here
17+
'rules': {
18+
// don't require .vue extension when importing
19+
// 'import/extensions': ['error', 'always', {
20+
// 'js': 'never',
21+
// 'vue': 'never'
22+
// }],
23+
// allow debugger during development
24+
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
25+
/*
26+
* Possible Errors
27+
*/
28+
29+
// disallow unnecessary parentheses
30+
'no-extra-parens': ['error', 'all', {'nestedBinaryExpressions': false}],
31+
32+
// disallow negating the left operand of relational operators
33+
'no-unsafe-negation': 'error',
34+
35+
// enforce valid JSDoc comments
36+
'valid-jsdoc': 'off',
37+
38+
/*
39+
* Best Practices
40+
*/
41+
42+
// enforce return statements in callbacks of array methods
43+
'array-callback-return': 'error',
44+
45+
// enforce consistent brace style for all control statements
46+
curly: ['error', 'multi-line'],
47+
48+
// enforce consistent newlines before and after dots
49+
'dot-location': ['error', 'property'],
50+
51+
// enforce dot notation whenever possible
52+
'dot-notation': 'error',
53+
54+
// require the use of === and !==
55+
'eqeqeq': ['error', 'smart'],
56+
57+
// disallow the use of arguments.caller or arguments.callee
58+
'no-caller': 'error',
59+
60+
// disallow empty functions
61+
'no-empty-function': 'error',
62+
63+
// disallow unnecessary calls to .bind()
64+
'no-extra-bind': 'error',
65+
66+
// disallow unnecessary labels
67+
'no-extra-label': 'error',
68+
69+
// disallow leading or trailing decimal points in numeric literals
70+
'no-floating-decimal': 'error',
71+
72+
// disallow assignments to native objects or read-only global variables
73+
'no-global-assign': 'error',
74+
75+
// disallow the use of eval()-like methods
76+
'no-implied-eval': 'error',
77+
78+
// disallow the use of the __iterator__ property
79+
'no-iterator': 'error',
80+
81+
// disallow unnecessary nested blocks
82+
'no-lone-blocks': 'error',
83+
84+
// disallow multiple spaces
85+
'no-multi-spaces': 'error',
86+
87+
// disallow new operators with the String, Number, and Boolean objects
88+
'no-new-wrappers': 'error',
89+
90+
// disallow octal escape sequences in string literals
91+
'no-octal-escape': 'error',
92+
93+
// disallow the use of the __proto__ property
94+
'no-proto': 'error',
95+
96+
// disallow comparisons where both sides are exactly the same
97+
'no-self-compare': 'error',
98+
99+
// disallow throwing literals as exceptions
100+
'no-throw-literal': 'error',
101+
102+
// disallow unused expressions
103+
'no-unused-expressions': 'error',
104+
105+
// disallow unnecessary calls to .call() and .apply()
106+
'no-useless-call': 'error',
107+
108+
// disallow unnecessary concatenation of literals or template literals
109+
'no-useless-concat': 'error',
110+
111+
// disallow unnecessary escape characters
112+
'no-useless-escape': 'error',
113+
114+
// disallow void operators
115+
'no-void': 'error',
116+
117+
// require parentheses around immediate function invocations
118+
'wrap-iife': 'error',
119+
120+
// require or disallow “Yoda” conditions
121+
yoda: 'error',
122+
123+
/*
124+
* Variables
125+
*/
126+
127+
// disallow labels that share a name with a variable
128+
'no-label-var': 'error',
129+
130+
// disallow initializing variables to undefined
131+
'no-undef-init': 'error',
132+
'no-undef': 'off',
133+
// disallow the use of variables before they are defined
134+
'no-use-before-define': 'error',
135+
136+
/*
137+
* Node.js and CommonJS
138+
*/
139+
140+
// disallow new operators with calls to require
141+
'no-new-require': 'error',
142+
143+
/*
144+
* Stylistic Issues
145+
*/
146+
147+
// enforce consistent spacing inside array brackets
148+
'array-bracket-spacing': 'error',
149+
150+
// enforce consistent spacing inside single-line blocks
151+
'block-spacing': 'error',
152+
153+
// enforce consistent brace style for blocks
154+
'brace-style': ['error', '1tbs', {'allowSingleLine': true}],
155+
156+
// require or disallow trailing commas
157+
'comma-dangle': 'error',
158+
159+
// enforce consistent spacing before and after commas
160+
'comma-spacing': 'error',
161+
162+
// enforce consistent comma style
163+
'comma-style': 'error',
164+
165+
// enforce consistent spacing inside computed property brackets
166+
'computed-property-spacing': 'error',
167+
168+
// require or disallow spacing between function identifiers and their invocations
169+
'func-call-spacing': 'error',
170+
171+
// enforce consistent indentation
172+
indent: ['error', 2, {SwitchCase: 1}],
173+
174+
// enforce the consistent use of either double or single quotes in JSX attributes
175+
'jsx-quotes': 'error',
176+
177+
// enforce consistent spacing between keys and values in object literal properties
178+
'key-spacing': 'error',
179+
180+
// enforce consistent spacing before and after keywords
181+
'keyword-spacing': 'error',
182+
183+
// enforce consistent linebreak style
184+
'linebreak-style': 'error',
185+
186+
// require or disallow newlines around directives
187+
'lines-around-directive': 'error',
188+
189+
// require constructor names to begin with a capital letter
190+
'new-cap': 'off',
191+
192+
// require parentheses when invoking a constructor with no arguments
193+
'new-parens': 'error',
194+
195+
// disallow Array constructors
196+
'no-array-constructor': 'error',
197+
198+
// disallow Object constructors
199+
'no-new-object': 'error',
200+
201+
// disallow trailing whitespace at the end of lines
202+
'no-trailing-spaces': 'error',
203+
204+
// disallow ternary operators when simpler alternatives exist
205+
'no-unneeded-ternary': 'error',
206+
207+
// disallow whitespace before properties
208+
'no-whitespace-before-property': 'error',
209+
210+
// enforce consistent spacing inside braces
211+
'object-curly-spacing': ['error', 'always'],
212+
213+
// require or disallow padding within blocks
214+
'padded-blocks': ['error', 'never'],
215+
216+
// require quotes around object literal property names
217+
'quote-props': ['error', 'as-needed'],
218+
219+
// enforce the consistent use of either backticks, double, or single quotes
220+
quotes: ['error', 'single'],
221+
222+
// enforce consistent spacing before and after semicolons
223+
'semi-spacing': 'error',
224+
225+
// require or disallow semicolons instead of ASI
226+
// semi: ['error', 'never'],
227+
228+
// enforce consistent spacing before blocks
229+
'space-before-blocks': 'error',
230+
231+
'no-console': 'off',
232+
233+
// enforce consistent spacing before function definition opening parenthesis
234+
'space-before-function-paren': ['error', 'never'],
235+
236+
// enforce consistent spacing inside parentheses
237+
'space-in-parens': 'error',
238+
239+
// require spacing around infix operators
240+
'space-infix-ops': 'error',
241+
242+
// enforce consistent spacing before or after unary operators
243+
'space-unary-ops': 'error',
244+
245+
// enforce consistent spacing after the // or /* in a comment
246+
'spaced-comment': 'error',
247+
248+
// require or disallow Unicode byte order mark (BOM)
249+
'unicode-bom': 'error',
250+
251+
252+
/*
253+
* ECMAScript 6
254+
*/
255+
256+
// require braces around arrow function bodies
257+
'arrow-body-style': 'error',
258+
259+
// require parentheses around arrow function arguments
260+
'arrow-parens': ['error', 'as-needed'],
261+
262+
// enforce consistent spacing before and after the arrow in arrow functions
263+
'arrow-spacing': 'error',
264+
265+
// enforce consistent spacing around * operators in generator functions
266+
'generator-star-spacing': ['error', 'after'],
267+
268+
// disallow duplicate module imports
269+
'no-duplicate-imports': 'error',
270+
271+
// disallow unnecessary computed property keys in object literals
272+
'no-useless-computed-key': 'error',
273+
274+
// disallow unnecessary constructors
275+
'no-useless-constructor': 'error',
276+
277+
// disallow renaming import, export, and destructured assignments to the same name
278+
'no-useless-rename': 'error',
279+
280+
// require let or const instead of var
281+
'no-var': 'error',
282+
283+
// require or disallow method and property shorthand syntax for object literals
284+
'object-shorthand': 'error',
285+
286+
// require arrow functions as callbacks
287+
'prefer-arrow-callback': 'error',
288+
289+
// require const declarations for variables that are never reassigned after declared
290+
'prefer-const': 'error',
291+
292+
// disallow parseInt() in favor of binary, octal, and hexadecimal literals
293+
'prefer-numeric-literals': 'error',
294+
295+
// require rest parameters instead of arguments
296+
'prefer-rest-params': 'error',
297+
298+
// require spread operators instead of .apply()
299+
'prefer-spread': 'error',
300+
301+
// enforce spacing between rest and spread operators and their expressions
302+
'rest-spread-spacing': 'error',
303+
304+
// require or disallow spacing around embedded expressions of template strings
305+
'template-curly-spacing': 'error',
306+
307+
// require or disallow spacing around the * in yield* expressions
308+
'yield-star-spacing': 'error'
309+
}
310+
}

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.DS_Store
2+
app/dist/index.html
3+
app/dist/main.js
4+
app/dist/renderer.js
5+
app/dist/styles.css
6+
builds/*
7+
dist/*
8+
node_modules/
9+
npm-debug.log
10+
npm-debug.log.*
11+
thumbs.db
12+
!.gitkeep

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# electron-vue-admin
2+
3+
> An electron-vue project
4+
5+
## Build Setup
6+
7+
``` bash
8+
# install dependencies
9+
npm install
10+
11+
# serve with hot reload at localhost:9080
12+
npm run dev
13+
14+
# build electron app for production
15+
npm run build
16+
17+
# lint all JS/Vue component files in `app/src`
18+
npm run lint
19+
20+
# run webpack in production
21+
npm run pack
22+
```
23+
More information can be found [here](https://simulatedgreg.gitbooks.io/electron-vue/content/en/npm_scripts.html).
24+
25+
---
26+
27+
This project was generated from [electron-vue](https://github.com/SimulatedGREG/electron-vue) using [vue-cli](https://github.com/vuejs/vue-cli). Documentation about this project can be found [here](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html).

app/dist/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)