-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(eslint): add rules for async-await (#932)
<!-- For Coveo Employees only. Fill this section. CDX-515 --> ## Proposed changes Add two eslint rules: - https://eslint.org/docs/rules/require-await - async method without any await will be flagged. - https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/await-thenable.md - await on awaitable (aka thenable) will be flagged Also fix eslint for atomic final project (eslint config of the template was not 'standalone') ## Breaking changes <!-- Remove this section if the PR does not include any breaking change If your changes includes some breaking changes in the code, thoroughly explains: - What are the breaking changes programmatically speaking. - What is the impact on the end-user (e.g. user cannot do X anymore). - What motivates those changes. --> ## Testing - [ ] Unit Tests: <!-- Did you write unit tests for your feature? If not, explains why? --> - [ ] Functional Tests: <!-- Did you write functional tests for your feature? If not, explains why? --> - [ ] Manual Tests: <!-- How did you test your changeset? -->
- Loading branch information
1 parent
3dbf3fe
commit 1097f58
Showing
55 changed files
with
354 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,8 @@ | |
}, | ||
"rules": { | ||
"node/no-unpublished-import": ["off"] | ||
}, | ||
"parserOptions": { | ||
"project": "tsconfig.json" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "./node_modules/gts", | ||
"overrides": [ | ||
{ | ||
"files": "stencil.config.ts", | ||
"rules": { | ||
"node/no-unpublished-import": "off" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,8 @@ | |
"node/no-unpublished-import": "off" | ||
} | ||
} | ||
] | ||
], | ||
"parserOptions": { | ||
"project": "tsconfig.donotcopy.json" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"extends": "../../../node_modules/gts/tsconfig-google.json", | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"declaration": false, | ||
"experimentalDecorators": true, | ||
"lib": ["dom", "es2018"], | ||
"moduleResolution": "node", | ||
"module": "esnext", | ||
"target": "es2018", | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"jsx": "react", | ||
"jsxFactory": "h", | ||
"paths": { | ||
"@coveo/headless": ["../../../node_modules/@coveo/atomic/headless"] | ||
} | ||
}, | ||
"include": ["stencil.config.ts", "src"], | ||
"exclude": ["node_modules", "lambda"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,8 @@ | |
"extends": "../../base.eslintrc", | ||
"env": { | ||
"es6": true | ||
}, | ||
"parserOptions": { | ||
"project": "tsconfig.json" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.