Skip to content

Commit a937737

Browse files
committed
first release
1 parent 90db7d8 commit a937737

File tree

7 files changed

+248
-306
lines changed

7 files changed

+248
-306
lines changed

.eslintrc.json

+36-189
Original file line numberDiff line numberDiff line change
@@ -3,105 +3,39 @@
33
"modules": true,
44
"experimentalObjectRestSpread": true
55
},
6+
67
"env": {
78
"browser": false,
89
"es6": true,
910
"node": true,
1011
"mocha": true
1112
},
13+
1214
"globals": {
1315
"document": false,
1416
"navigator": false,
1517
"window": false
1618
},
19+
1720
"rules": {
1821
"accessor-pairs": 2,
19-
"arrow-spacing": [
20-
2,
21-
{
22-
"before": true,
23-
"after": true
24-
}
25-
],
26-
"block-spacing": [
27-
2,
28-
"always"
29-
],
30-
"brace-style": [
31-
2,
32-
"1tbs",
33-
{
34-
"allowSingleLine": true
35-
}
36-
],
37-
"comma-dangle": [
38-
2,
39-
"never"
40-
],
41-
"comma-spacing": [
42-
2,
43-
{
44-
"before": false,
45-
"after": true
46-
}
47-
],
48-
"comma-style": [
49-
2,
50-
"last"
51-
],
22+
"arrow-spacing": [2, { "before": true, "after": true }],
23+
"block-spacing": [2, "always"],
24+
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
25+
"comma-dangle": [2, "never"],
26+
"comma-spacing": [2, { "before": false, "after": true }],
27+
"comma-style": [2, "last"],
5228
"constructor-super": 2,
53-
"curly": [
54-
2,
55-
"multi-line"
56-
],
57-
"dot-location": [
58-
2,
59-
"property"
60-
],
29+
"curly": [2, "multi-line"],
30+
"dot-location": [2, "property"],
6131
"eol-last": 2,
62-
"eqeqeq": [
63-
2,
64-
"allow-null"
65-
],
66-
"generator-star-spacing": [
67-
2,
68-
{
69-
"before": true,
70-
"after": true
71-
}
72-
],
73-
"handle-callback-err": [
74-
2,
75-
"^(err|error)$"
76-
],
77-
"indent": [
78-
2,
79-
2,
80-
{
81-
"SwitchCase": 1
82-
}
83-
],
84-
"key-spacing": [
85-
2,
86-
{
87-
"beforeColon": false,
88-
"afterColon": true
89-
}
90-
],
91-
"keyword-spacing": [
92-
2,
93-
{
94-
"before": true,
95-
"after": true
96-
}
97-
],
98-
"new-cap": [
99-
2,
100-
{
101-
"newIsCap": true,
102-
"capIsNew": false
103-
}
104-
],
32+
"eqeqeq": [2, "allow-null"],
33+
"generator-star-spacing": [2, { "before": true, "after": true }],
34+
"handle-callback-err": [2, "^(err|error)$" ],
35+
"indent": [2, 2, { "SwitchCase": 1 }],
36+
"key-spacing": [2, { "beforeColon": false, "afterColon": true }],
37+
"keyword-spacing": [2, { "before": true, "after": true }],
38+
"new-cap": [2, { "newIsCap": true, "capIsNew": false }],
10539
"new-parens": 2,
10640
"no-array-constructor": 2,
10741
"no-caller": 2,
@@ -121,18 +55,12 @@
12155
"no-extend-native": 2,
12256
"no-extra-bind": 2,
12357
"no-extra-boolean-cast": 2,
124-
"no-extra-parens": [
125-
2,
126-
"functions"
127-
],
58+
"no-extra-parens": [2, "functions"],
12859
"no-fallthrough": 2,
12960
"no-floating-decimal": 2,
13061
"no-func-assign": 2,
13162
"no-implied-eval": 2,
132-
"no-inner-declarations": [
133-
2,
134-
"functions"
135-
],
63+
"no-inner-declarations": [2, "functions"],
13664
"no-invalid-regexp": 2,
13765
"no-irregular-whitespace": 2,
13866
"no-iterator": 2,
@@ -142,12 +70,7 @@
14270
"no-mixed-spaces-and-tabs": 2,
14371
"no-multi-spaces": 2,
14472
"no-multi-str": 2,
145-
"no-multiple-empty-lines": [
146-
2,
147-
{
148-
"max": 1
149-
}
150-
],
73+
"no-multiple-empty-lines": [2, { "max": 1 }],
15174
"no-native-reassign": 0,
15275
"no-negated-in-lhs": 2,
15376
"no-new": 2,
@@ -173,103 +96,27 @@
17396
"no-undef": 2,
17497
"no-undef-init": 2,
17598
"no-unexpected-multiline": 2,
176-
"no-unneeded-ternary": [
177-
2,
178-
{
179-
"defaultAssignment": false
180-
}
181-
],
99+
"no-unneeded-ternary": [2, { "defaultAssignment": false }],
182100
"no-unreachable": 2,
183-
"no-unused-vars": [
184-
2,
185-
{
186-
"vars": "all",
187-
"args": "none"
188-
}
189-
],
101+
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
190102
"no-useless-call": 0,
191103
"no-with": 2,
192-
"one-var": [
193-
0,
194-
{
195-
"initialized": "never"
196-
}
197-
],
198-
"operator-linebreak": [
199-
0,
200-
"after",
201-
{
202-
"overrides": {
203-
"?": "before",
204-
":": "before"
205-
}
206-
}
207-
],
208-
"padded-blocks": [
209-
0,
210-
"never"
211-
],
212-
"quotes": [
213-
2,
214-
"single",
215-
"avoid-escape"
216-
],
104+
"one-var": [0, { "initialized": "never" }],
105+
"operator-linebreak": [0, "after", { "overrides": { "?": "before", ":": "before" } }],
106+
"padded-blocks": [0, "never"],
107+
"quotes": [2, "single", "avoid-escape"],
217108
"radix": 2,
218-
"semi": [
219-
2,
220-
"always"
221-
],
222-
"semi-spacing": [
223-
2,
224-
{
225-
"before": false,
226-
"after": true
227-
}
228-
],
229-
"space-before-blocks": [
230-
2,
231-
"always"
232-
],
233-
"space-before-function-paren": [
234-
2,
235-
"never"
236-
],
237-
"space-in-parens": [
238-
2,
239-
"never"
240-
],
109+
"semi": [2, "always"],
110+
"semi-spacing": [2, { "before": false, "after": true }],
111+
"space-before-blocks": [2, "always"],
112+
"space-before-function-paren": [2, "never"],
113+
"space-in-parens": [2, "never"],
241114
"space-infix-ops": 2,
242-
"space-unary-ops": [
243-
2,
244-
{
245-
"words": true,
246-
"nonwords": false
247-
}
248-
],
249-
"spaced-comment": [
250-
0,
251-
"always",
252-
{
253-
"markers": [
254-
"global",
255-
"globals",
256-
"eslint",
257-
"eslint-disable",
258-
"*package",
259-
"!",
260-
","
261-
]
262-
}
263-
],
115+
"space-unary-ops": [2, { "words": true, "nonwords": false }],
116+
"spaced-comment": [0, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }],
264117
"use-isnan": 2,
265118
"valid-typeof": 2,
266-
"wrap-iife": [
267-
2,
268-
"any"
269-
],
270-
"yoda": [
271-
2,
272-
"never"
273-
]
119+
"wrap-iife": [2, "any"],
120+
"yoda": [2, "never"]
274121
}
275122
}

.verb.md

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1-
## Usage
1+
## Quickstart
2+
3+
Use as a plugin, to extend your own generator with this generator:
4+
5+
```js
6+
module.exports = function(app) {
7+
app.use(require('{%= name %}'));
8+
};
9+
```
10+
11+
Register as a sub-generator, to add this generator to a namespace in your generator:
212

313
```js
4-
var eslint = require('{%= name %}');
14+
module.exports = function(app) {
15+
// you can use any arbitrary name to register the generator
16+
app.register('{%= alias %}', require('{%= name %}'));
17+
};
518
```
619

7-
## API
8-
{%= apidocs("index.js") %}
20+
See the [API docs](#api) for more detailed examples and descriptions.
21+
22+
{{#block "tasks"}}
23+
{%= headings(apidocs("generator.js")) %}
24+
{{/block}}

0 commit comments

Comments
 (0)