-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[migrate] upgrade to ESLint 9 & other latest Upstream packages
[optimize] some detail configuration
- Loading branch information
Showing
10 changed files
with
995 additions
and
718 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -44,7 +44,7 @@ jobs: | |
- name: Pick Docker Compose | ||
run: | | ||
mkdir ./build | ||
mv ${{ env.ARTIFACT_PATH }} ./docker-compose.yml ./start.sh ./build | ||
mv ${{ env.ARTIFACT_PATH }} ./.env ./docker-compose.yml ./start.sh ./build | ||
- name: Transport Image | ||
uses: appleboy/[email protected] | ||
|
@@ -65,9 +65,9 @@ jobs: | |
username: ${{ secrets.USER }} | ||
password: ${{ secrets.SSH_KEY }} | ||
command: | | ||
mkdir -p ~/${{ env.BOX_NAME }} | ||
cd /tmp/${{ env.BOX_NAME }} | ||
mv docker-compose.yml start.sh ~/${{ env.BOX_NAME }} | ||
mkdir -p ~/${{ env.BOX_NAME }} | ||
mv .env docker-compose.yml start.sh ~/${{ env.BOX_NAME }} | ||
cd ~/${{ env.BOX_NAME }} | ||
chmod +x start.sh | ||
echo '${{ secrets.SSH_KEY }}' | sudo -S ./start.sh /tmp/${{ env.BOX_NAME }}/${{ env.ARTIFACT_PATH }} |
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,56 @@ | ||
// @ts-check | ||
import eslint from '@eslint/js'; | ||
import { currentModulePath } from '@tech_query/node-toolkit'; | ||
import eslintConfigPrettier from 'eslint-config-prettier'; | ||
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort'; | ||
import globals from 'globals'; | ||
import tsEslint from 'typescript-eslint'; | ||
|
||
const tsconfigRootDir = currentModulePath(); | ||
|
||
export default tsEslint.config( | ||
// register all of the plugins up-front | ||
{ | ||
plugins: { | ||
'@typescript-eslint': tsEslint.plugin, | ||
'simple-import-sort': simpleImportSortPlugin | ||
} | ||
}, | ||
// config with just ignores is the replacement for `.eslintignore` | ||
{ ignores: ['**/node_modules/**', '**/dist/**', 'type/**', '*.mjs'] }, | ||
|
||
// extends ... | ||
eslint.configs.recommended, | ||
...tsEslint.configs.recommended, | ||
|
||
// base config | ||
{ | ||
languageOptions: { | ||
globals: { ...globals.es2022, ...globals.node }, | ||
parserOptions: { | ||
projectService: true, | ||
tsconfigRootDir, | ||
warnOnUnsupportedTypeScriptVersion: false | ||
} | ||
}, | ||
rules: { | ||
'simple-import-sort/exports': 'error', | ||
'simple-import-sort/imports': 'error', | ||
'@typescript-eslint/no-unused-vars': 'warn', | ||
'@typescript-eslint/no-empty-object-type': 'off', | ||
'@typescript-eslint/no-unsafe-declaration-merging': 'warn' | ||
} | ||
}, | ||
{ | ||
files: ['**/*.js'], | ||
extends: [tsEslint.configs.disableTypeChecked], | ||
rules: { | ||
// turn off other type-aware rules | ||
'@typescript-eslint/internal/no-poorly-typed-ts-props': 'off', | ||
|
||
// turn off rules that don't apply to JS code | ||
'@typescript-eslint/explicit-function-return-type': 'off' | ||
} | ||
}, | ||
eslintConfigPrettier | ||
); |
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.