Skip to content

Commit

Permalink
Add no-floating-promises (#113)
Browse files Browse the repository at this point in the history
Add no-floating-promises
  • Loading branch information
yamadayuki committed Jul 4, 2019
2 parents d850b28 + e4fd4c6 commit a5427fb
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,9 @@ Object {
"off",
],
"@typescript-eslint/no-extra-parens": "off",
"@typescript-eslint/no-floating-promises": Array [
"error",
],
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,9 @@ Object {
"off",
],
"@typescript-eslint/no-extra-parens": "off",
"@typescript-eslint/no-floating-promises": Array [
"error",
],
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ module.exports = {
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/no-floating-promises": ["error"],
"@typescript-eslint/no-unused-vars": [
"error",
{ varsIgnorePattern: "^_", argsIgnorePattern: "^_", ignoreRestSiblings: true },
Expand Down
7 changes: 7 additions & 0 deletions packages/frolint/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ function getCli(cwd, eslintConfigPackage = "eslint-config-wantedly-typescript",
}
: {};
const cacheLocation = path.resolve(cwd, "node_modules", ".frolintcache");
const parserOptions =
netEslintConfigPackage.indexOf("typescript") > -1
? {
project: eslintConfig.project || path.resolve(cwd, "tsconfig.json"),
}
: undefined;

const cli = new eslint.CLIEngine({
baseConfig: { extends: [netEslintConfigPackage], settings: { ...reactSettings } },
Expand All @@ -54,6 +60,7 @@ function getCli(cwd, eslintConfigPackage = "eslint-config-wantedly-typescript",
ignorePath: eslintConfig.ignorePath,
cache: true,
cacheLocation,
parserOptions,
});

return cli;
Expand Down
11 changes: 11 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"target": "es2017",
"module": "commonjs",
"moduleResolution": "node",
"strict": false,
"allowJs": true,
"noEmit": true
},
"include": ["packages/**/*"]
}

0 comments on commit a5427fb

Please sign in to comment.