Skip to content

Commit

Permalink
Merge pull request #4 from gynzy/update-actions/upload-artifact
Browse files Browse the repository at this point in the history
chore: update actions/upload-artifact to v4
  • Loading branch information
fhp authored Nov 25, 2024
2 parents b8c86be + 659f960 commit e7900cc
Show file tree
Hide file tree
Showing 12 changed files with 1,427 additions and 879 deletions.
120 changes: 120 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
module.exports = {
root: true,
env: {
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
tsconfigRootDir: __dirname, // prevents eslint error "Cannot read file 'tsconfig.json'" in workspaces
},
ignorePatterns: ['.eslintrc.js', 'schematics/*'],
plugins: ['@typescript-eslint/eslint-plugin', 'import', 'prettier', 'jest'],
extends: ['airbnb-base', 'airbnb-typescript/base', 'prettier'],
rules: {
'import/extensions': 'off',
'@typescript-eslint/indent': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'none',
vars: 'all',
},
],
'@typescript-eslint/no-use-before-define': 'warn',
'@typescript-eslint/no-useless-constructor': 'off',
'class-methods-use-this': 'off',
'consistent-return': 'error',
'import/first': 'off',
'import/no-cycle': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'apps/**/test/**',
'libs/**/test/**',
'**/*e2e-spec.ts',
'**/*int-spec.ts',
'**/*.spec.ts',
'**/test-utils.ts',
'integration-tests/**',
'infrastructure/**',
],
},
],
'import/prefer-default-export': 'off',
'import/no-import-module-exports': 'off',
'max-len': [
'error',
{
code: 120,
ignorePattern: 'import |export |`.*`|\'.*\'|".*"|// .*|\\* .*',
},
],
'max-classes-per-file': 'off',
'no-await-in-loop': 'off',
'no-continue': 'off',
'no-else-return': 'off',
'no-minmin': 'off',
'no-multi-str': 'off',
'no-param-reassign': [
'warn',
{
props: false,
},
],
'no-plusplus': 'off',
'no-prototype-builtins': 'off',
'no-restricted-syntax': 'off',
'object-curly-newline': 'off',
'no-underscore-dangle': 'off', // conflicts with @typescript-eslint/naming-convention
'prettier/prettier': 'error',
'default-param-last': 'off',
'@typescript-eslint/default-param-last': ['error'],
'prefer-const': ['error', { destructuring: 'all' }],
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'no-void': [
'error',
{
allowAsStatement: true,
},
],
'no-constant-condition': ['error', { checkLoops: false }],
'new-cap': 'off',
'jest/no-focused-tests': 'error',
'prefer-destructuring': 'off',
'no-console': 'off',
},
overrides: [
{
files: ['*spec.ts', '*spec-data.ts', 'test/**/*.ts', 'libs/test-utils/**/*.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'no-console': 'off',
'prettier/prettier': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'import/first': 'off',
'arrow-body-style': 'off',
'@typescript-eslint/dot-notation': 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
},
},
{
files: ['main.ts'],
rules: {
'import/first': 'off',
'global-require': 'off',
'@typescript-eslint/no-floating-promises': 'off',
},
},
],
};
55 changes: 0 additions & 55 deletions .eslintrc.json

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set Node.js 16.x
uses: actions/setup-node@v2.5.1
- name: Set Node.js 20
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20

- name: Install dependencies
run: yarn ci
run: yarn install

- name: Rebuild the dist/ directory
run: |
Expand All @@ -46,7 +46,7 @@ jobs:
id: diff

# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ jobs:
- uses: actions/checkout@v2
- uses: ./
with:
milliseconds: 1000
url: https://github.com/status
attempts: 10
interval: 1000
11 changes: 4 additions & 7 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid"
"trailingComma": "all",
"tabWidth": 4,
"useTabs": false,
"printWidth": 120
}
29 changes: 0 additions & 29 deletions __tests__/main.test.ts

This file was deleted.

Loading

0 comments on commit e7900cc

Please sign in to comment.