Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #11 from imCorfitz/refactor/plugin-template
Browse files Browse the repository at this point in the history
Refactor/plugin template
  • Loading branch information
imCorfitz authored Oct 15, 2023
2 parents 61cdefa + 4452901 commit 07cc0e0
Show file tree
Hide file tree
Showing 72 changed files with 4,692 additions and 8,905 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-parrots-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@imcorfitz/payload-plugin-oauth-apps": minor
---

Migrating plugin codebase to payload plugin template to meet standards
8 changes: 3 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
node_modules
**/*.d.ts
**/payload-types.ts
.eslintrc.js
demo
# Ignore all test fiels
**/*.spec.*
**/*.test.*
32 changes: 14 additions & 18 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
module.exports = {
extends: ['@payloadcms'],
parserOptions: {
project: ['./tsconfig.json'], // Specify it only for TypeScript files
},
root: true,
extends: ["./eslint-config"],
rules: {
// add specific rules configurations here
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-implicit-any-catch': 'off',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'jsx-a11y/heading-has-content': 'off',
'import/no-default-export': 'off',
"no-underscore-dangle": "off",
},
}
overrides: [
// Temporary overrides
{
files: ["dev/**/*.ts"],
rules: {
"import/no-relative-packages": "off",
"no-process-env": "off",
},
},
],
};
24 changes: 0 additions & 24 deletions .github/workflows/main.yml

This file was deleted.

30 changes: 11 additions & 19 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
name: Publish
name: Publish New Version

on:
workflow_run:
workflows: ["CI"]
types:
- completed
types: [completed]
push:
branches:
- "master"
branches: [master]

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v3
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Install dependencies (with cache)
uses: bahmutov/npm-install@v1

node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: yarn test
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: cd dev && yarn install
- run: yarn test
252 changes: 247 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,249 @@
node_modules
dev/tmp
dev/yarn.lock

# Created by https://www.gitignore.io/api/node,macos,windows,webstorm,sublimetext,visualstudiocode

### macOS ###
*.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# Yarn Berry
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.pnp.*

# dotenv environment variables file
.env
dist


### SublimeText ###
# cache files for sublime text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache

# workspace files are user-specific
*.sublime-workspace

# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# *.sublime-project

# sftp configuration file
sftp-config.json

# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache

# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings

### VisualStudioCode ###
.vscode/*
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history

### WebStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

.idea/*
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/

# Mongo Explorer plugin:
.idea/**/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Ruby plugin and RubyMine
/.rakeTasks

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### WebStorm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
.idea/sonarlint

### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.gitignore.io/api/node,macos,windows,webstorm,sublimetext,visualstudiocode

# Ignore all uploads
demo/upload
demo/media
demo/files

# Ignore build folder
build
.DS_Store
package-lock.json
__tools

# Ignore built components
components/index.js
components/styles.css

# Ignore generated
dev/generated-types.ts
dev/generated-schema.graphql

# Ignore dist, no need for git
dist

dev/src/uploads

__tools__
Loading

0 comments on commit 07cc0e0

Please sign in to comment.