Skip to content

Commit

Permalink
chore: eslint, turbo and various configs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessioGr committed Sep 1, 2023
1 parent 7b72f88 commit 373e89a
Show file tree
Hide file tree
Showing 46 changed files with 393 additions and 1,712 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ indent_size = 2
[*.mdx]
indent_style = space
indent_size = 2

[*.json]
indent_style = space
indent_size = 2
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.tmp
**/.git
**/.hg
**/.pnp.*
**/.svn
**/.yarn/**
**/build
**/dist/**
**/node_modules
**/temp
16 changes: 16 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
extends: ['@payloadcms'],
overrides: [
{
extends: ['plugin:@typescript-eslint/disable-type-checked'],
files: ['*.js', '*.cjs'],
},
{
files: ['packages/eslint-config-payload/**'],
rules: {
'perfectionist/sort-objects': 'off',
},
},
],
root: true,
}
104 changes: 0 additions & 104 deletions .eslintrc.js

This file was deleted.

53 changes: 13 additions & 40 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: ["master"]
branches: ['master', '2.0']

jobs:
build_pnpm:
install_and_build_pnpm:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -20,7 +20,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
scope: "@payloadcms"
scope: '@payloadcms'
always-auth: true
- uses: pnpm/action-setup@v2
name: Install pnpm
Expand All @@ -47,55 +47,28 @@ jobs:
run: pnpm install
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm build
- run: pnpm --filter payload build

- name: Component Tests
run: pnpm test:components
run: pnpm --filter payload run test:components

- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: E2E Tests
run: pnpm --filter payload test:e2e --bail

- name: Integration Tests
run: pnpm test:int
run: pnpm --filter payload run test:int

- name: Generate Payload Types
run: pnpm dev:generate-types fields

- name: Generate GraphQL schema file
run: pnpm dev:generate-graphql-schema graphql-schema-gen

- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: E2E Tests
run: pnpm test:e2e --bail

- uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
path: test-results/
retention-days: 30

install_npm:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
scope: "@payloadcms"
always-auth: true
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-${{ env.cache-name }}-
${{ runner.os }}-npm-
${{ runner.os }}-
- run: npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.14.2
v18.17.1
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.14.2
v18.17.1
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.tmp
**/.git
**/.hg
**/.pnp.*
**/.svn
**/.yarn/**
**/build
**/dist/**
**/node_modules
**/temp
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"semi": false
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}
17 changes: 0 additions & 17 deletions eslint-config/configs/base/index.js

This file was deleted.

Loading

0 comments on commit 373e89a

Please sign in to comment.