Skip to content

Commit 04cd479

Browse files
committed
chore: add linter and fix all files
1 parent cec6e50 commit 04cd479

5,634 files changed

Lines changed: 280671 additions & 4385 deletions

File tree

Some content is hidden

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

.eslintrc.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"plugins": [
4+
"@typescript-eslint",
5+
"jest"
6+
],
7+
"env": {
8+
"jest/globals": true,
9+
"node": true
10+
},
11+
"extends": [
12+
"eslint:recommended",
13+
"plugin:@typescript-eslint/recommended"
14+
],
15+
"rules": {
16+
"@typescript-eslint/explicit-function-return-type": "off",
17+
"@typescript-eslint/explicit-member-accessibility": [
18+
"error",
19+
{
20+
"accessibility": "no-public"
21+
}
22+
],
23+
"@typescript-eslint/indent": ["error", "tab"],
24+
"@typescript-eslint/no-non-null-assertion": "off",
25+
"@typescript-eslint/no-use-before-define": "off"
26+
}
27+
}

build/expo.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
"use strict";
2-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4-
return new (P || (P = Promise))(function (resolve, reject) {
5-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8-
step((generator = generator.apply(thisArg, _arguments || [])).next());
9-
});
2+
const __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4+
return new (P || (P = Promise))(function (resolve, reject) {
5+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8+
step((generator = generator.apply(thisArg, _arguments || [])).next());
9+
});
1010
};
11-
var __importStar = (this && this.__importStar) || function (mod) {
12-
if (mod && mod.__esModule) return mod;
13-
var result = {};
14-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15-
result["default"] = mod;
16-
return result;
11+
const __importStar = (this && this.__importStar) || function (mod) {
12+
if (mod && mod.__esModule) return mod;
13+
const result = {};
14+
if (mod != null) for (const k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15+
result["default"] = mod;
16+
return result;
1717
};
1818
Object.defineProperty(exports, "__esModule", { value: true });
1919
const core = __importStar(require("@actions/core"));
@@ -24,13 +24,13 @@ const cli = __importStar(require("@actions/exec"));
2424
* It uses the `EXPO_CLI_PASSWORD` environment variable for improved security.
2525
*/
2626
function authenticate(username, password) {
27-
return __awaiter(this, void 0, void 0, function* () {
28-
if (!username || !password) {
29-
return core.debug('Skipping authentication, `expo-username` and/or `expo-password` not set...');
30-
}
31-
yield cli.exec('expo', ['login', `--username=${username}`], {
32-
env: Object.assign(Object.assign({}, process.env), { EXPO_CLI_PASSWORD: password }),
33-
});
34-
});
27+
return __awaiter(this, void 0, void 0, function* () {
28+
if (!username || !password) {
29+
return core.debug('Skipping authentication, `expo-username` and/or `expo-password` not set...');
30+
}
31+
yield cli.exec('expo', ['login', `--username=${username}`], {
32+
env: Object.assign(Object.assign({}, process.env), { EXPO_CLI_PASSWORD: password }),
33+
});
34+
});
3535
}
3636
exports.authenticate = authenticate;

build/index.js

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
11
"use strict";
2-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4-
return new (P || (P = Promise))(function (resolve, reject) {
5-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8-
step((generator = generator.apply(thisArg, _arguments || [])).next());
9-
});
10-
};
11-
var __importStar = (this && this.__importStar) || function (mod) {
12-
if (mod && mod.__esModule) return mod;
13-
var result = {};
14-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15-
result["default"] = mod;
16-
return result;
2+
const __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4+
return new (P || (P = Promise))(function (resolve, reject) {
5+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8+
step((generator = generator.apply(thisArg, _arguments || [])).next());
9+
});
1710
};
1811
Object.defineProperty(exports, "__esModule", { value: true });
19-
const core = __importStar(require("@actions/core"));
12+
const core_1 = require("@actions/core");
2013
const expo_1 = require("./expo");
2114
const install_1 = require("./install");
2215
function run() {
23-
return __awaiter(this, void 0, void 0, function* () {
24-
const path = yield install_1.install(core.getInput('expo-version') || 'latest', core.getInput('expo-packager') || 'npm');
25-
core.addPath(path);
26-
yield expo_1.authenticate(core.getInput('expo-username'), core.getInput('expo-password'));
27-
});
16+
return __awaiter(this, void 0, void 0, function* () {
17+
const path = yield install_1.install(core_1.getInput('expo-version') || 'latest', core_1.getInput('expo-packager') || 'npm');
18+
core_1.addPath(path);
19+
yield expo_1.authenticate(core_1.getInput('expo-username'), core_1.getInput('expo-password'));
20+
});
2821
}
22+
exports.run = run;
2923
run();

build/install.js

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
"use strict";
2-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4-
return new (P || (P = Promise))(function (resolve, reject) {
5-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8-
step((generator = generator.apply(thisArg, _arguments || [])).next());
9-
});
2+
const __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4+
return new (P || (P = Promise))(function (resolve, reject) {
5+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8+
step((generator = generator.apply(thisArg, _arguments || [])).next());
9+
});
1010
};
11-
var __importStar = (this && this.__importStar) || function (mod) {
12-
if (mod && mod.__esModule) return mod;
13-
var result = {};
14-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15-
result["default"] = mod;
16-
return result;
11+
const __importStar = (this && this.__importStar) || function (mod) {
12+
if (mod && mod.__esModule) return mod;
13+
const result = {};
14+
if (mod != null) for (const k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15+
result["default"] = mod;
16+
return result;
1717
};
1818
Object.defineProperty(exports, "__esModule", { value: true });
19+
const cache = __importStar(require("@actions/tool-cache"));
1920
const cli = __importStar(require("@actions/exec"));
2021
const io = __importStar(require("@actions/io"));
21-
const cache = __importStar(require("@actions/tool-cache"));
2222
const path = __importStar(require("path"));
2323
const registry = require('libnpm');
2424
/**
@@ -27,9 +27,9 @@ const registry = require('libnpm');
2727
* It's used to determine the cached version of `expo-cli`.
2828
*/
2929
function resolve(version) {
30-
return __awaiter(this, void 0, void 0, function* () {
31-
return (yield registry.manifest(`expo-cli@${version}`)).version;
32-
});
30+
return __awaiter(this, void 0, void 0, function* () {
31+
return (yield registry.manifest(`expo-cli@${version}`)).version;
32+
});
3333
}
3434
exports.resolve = resolve;
3535
/**
@@ -38,29 +38,29 @@ exports.resolve = resolve;
3838
* It returns the path where Expo is installed.
3939
*/
4040
function install(version, packager) {
41-
return __awaiter(this, void 0, void 0, function* () {
42-
const exact = yield resolve(version);
43-
let root = yield fromCache(exact);
44-
if (!root) {
45-
root = yield fromPackager(exact, packager);
46-
yield toCache(exact, root);
47-
}
48-
return path.join(root, 'node_modules', '.bin');
49-
});
41+
return __awaiter(this, void 0, void 0, function* () {
42+
const exact = yield resolve(version);
43+
let root = yield fromCache(exact);
44+
if (!root) {
45+
root = yield fromPackager(exact, packager);
46+
root = yield toCache(exact, root);
47+
}
48+
return path.join(root, 'node_modules', '.bin');
49+
});
5050
}
5151
exports.install = install;
5252
/**
5353
* Install `expo-cli`, by version, using npm or yarn.
5454
* It creates a temporary directory to store all required files.
5555
*/
5656
function fromPackager(version, packager) {
57-
return __awaiter(this, void 0, void 0, function* () {
58-
const root = process.env['RUNNER_TEMP'] || '';
59-
const tool = yield io.which(packager);
60-
yield io.mkdirP(root);
61-
yield cli.exec(tool, ['add', `expo-cli@${version}`], { cwd: root });
62-
return root;
63-
});
57+
return __awaiter(this, void 0, void 0, function* () {
58+
const root = process.env['RUNNER_TEMP'] || '';
59+
const tool = yield io.which(packager);
60+
yield io.mkdirP(root);
61+
yield cli.exec(tool, ['add', `expo-cli@${version}`], { cwd: root });
62+
return root;
63+
});
6464
}
6565
exports.fromPackager = fromPackager;
6666
/**
@@ -70,9 +70,9 @@ exports.fromPackager = fromPackager;
7070
* @see https://github.com/actions/toolkit/issues/47
7171
*/
7272
function fromCache(version) {
73-
return __awaiter(this, void 0, void 0, function* () {
74-
return cache.find('expo-cli', version);
75-
});
73+
return __awaiter(this, void 0, void 0, function* () {
74+
return cache.find('expo-cli', version);
75+
});
7676
}
7777
exports.fromCache = fromCache;
7878
/**
@@ -82,8 +82,8 @@ exports.fromCache = fromCache;
8282
* @see https://github.com/actions/toolkit/issues/47
8383
*/
8484
function toCache(version, root) {
85-
return __awaiter(this, void 0, void 0, function* () {
86-
return cache.cacheDir(root, 'expo-cli', version);
87-
});
85+
return __awaiter(this, void 0, void 0, function* () {
86+
return cache.cacheDir(root, 'expo-cli', version);
87+
});
8888
}
8989
exports.toCache = toCache;

node_modules/.bin/eslint

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@babel/code-frame/package.json

Lines changed: 15 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@babel/core/node_modules/debug/package.json

Lines changed: 14 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)