forked from valkey-io/valkey-glide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request valkey-io#490 from shachlanAmazon/ts-import-lint
add import sort and warnings as errors to TS lint.
- Loading branch information
Showing
5 changed files
with
59 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
module.exports = { | ||
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:import/errors", | ||
"plugin:import/warnings", | ||
], | ||
parser: "@typescript-eslint/parser", | ||
plugins: ["@typescript-eslint", 'eslint-plugin-tsdoc'], | ||
plugins: ["@typescript-eslint", "eslint-plugin-tsdoc", "import"], | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
jest: true, | ||
}, | ||
rules: { | ||
'tsdoc/syntax': 'error' | ||
} | ||
"tsdoc/syntax": "error", | ||
"import/no-unresolved": "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Lint TypeScript | ||
|
||
inputs: | ||
package-folder: | ||
description: "folder that contains the target Cargo.toml file" | ||
required: true | ||
type: string | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: cp .eslintrc.cjs ${{ inputs.package-folder }} | ||
shell: bash | ||
|
||
- run: | | ||
npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-tsdoc eslint typescript eslint-plugin-import@latest eslint-config-prettier | ||
npm i | ||
npx eslint . --max-warnings=0 | ||
working-directory: ${{ inputs.package-folder }} | ||
shell: bash |
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