diff --git a/.eslintrc.json b/.eslintrc.json index cfae847c..33bdcd55 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -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", @@ -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", { @@ -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", @@ -58,6 +50,7 @@ }, "parserOptions": { "ecmaVersion": 2018, + "project": "./tsconfig.json", "sourceType": "module" } } diff --git a/src/cli.ts b/src/cli.ts index 8ce93753..c8676530 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -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); } -}); +); diff --git a/tsconfig-google.json b/tsconfig-google.json index 392fd1d4..905efe9b 100644 --- a/tsconfig-google.json +++ b/tsconfig-google.json @@ -2,7 +2,7 @@ "compilerOptions": { "allowUnreachableCode": false, "allowUnusedLabels": false, - "declaration": true, + "composite": true, "forceConsistentCasingInFileNames": true, "lib": ["es2018"], "module": "commonjs", diff --git a/tsconfig.json b/tsconfig.json index dfb3be02..1a596a1c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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/**/*.*"] }