Skip to content

Commit

Permalink
Merge branch 'main' into update-typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycoco authored Oct 10, 2024
2 parents 8ad4d16 + 1d28f92 commit 3bc84d3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 25 deletions.
19 changes: 6 additions & 13 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{
"extends": [
"eslint:recommended",
"plugin:n/recommended",
"prettier"
],
"plugins": [
"n",
"prettier"
],
"extends": ["eslint:recommended", "plugin:n/recommended", "prettier"],
"plugins": ["n", "prettier"],
"rules": {
"prettier/prettier": "error",
"block-scoped-var": "error",
Expand All @@ -17,7 +10,7 @@
"eol-last": "error",
"prefer-arrow-callback": "error",
"no-trailing-spaces": "error",
"quotes": ["warn", "single", { "avoidEscape": true }],
"quotes": ["warn", "single", {"avoidEscape": true}],
"no-restricted-properties": [
"error",
{
Expand All @@ -34,11 +27,10 @@
{
"files": ["**/*.ts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended"
],
"extends": ["plugin:@typescript-eslint/recommended"],
"rules": {
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-warning-comments": "off",
Expand All @@ -58,6 +50,7 @@
},
"parserOptions": {
"ecmaVersion": 2018,
"project": "./tsconfig.json",
"sourceType": "module"
}
}
Expand Down
13 changes: 10 additions & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,16 @@ if (cli.input.length < 1) {
usage();
}

run(cli.input[0], cli.input.slice(1)).then(success => {
if (!success) {
run(cli.input[0], cli.input.slice(1)).then(
success => {
if (!success) {
// eslint-disable-next-line n/no-process-exit
process.exit(1);
}
},
e => {
console.error(e);
// eslint-disable-next-line n/no-process-exit
process.exit(1);
}
});
);
2 changes: 1 addition & 1 deletion tsconfig-google.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"declaration": true,
"composite": true,
"forceConsistentCasingInFileNames": true,
"lib": ["es2018"],
"module": "commonjs",
Expand Down
10 changes: 2 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
"outDir": "build",
"resolveJsonModule": true
},
"include": [
"src/**/*.ts",
"test/**/*.ts"
],
"exclude": [
"test/fixtures/**/*.*",
"template/**/*.*",
]
"include": [".eslintrc.json", "src/**/*.ts", "test/**/*.ts"],
"exclude": ["test/fixtures/**/*.*", "template/**/*.*"]
}

0 comments on commit 3bc84d3

Please sign in to comment.