Skip to content

Commit

Permalink
Merge pull request #18 from etchteam/feat/open-source-cleanup
Browse files Browse the repository at this point in the history
Open source cleanup
  • Loading branch information
JoshTheWanderer authored Nov 21, 2023
2 parents d4bcaf0 + a6a91a4 commit cfed882
Show file tree
Hide file tree
Showing 21 changed files with 4,197 additions and 1,074 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: ['@etchteam'],
rules: {
'@next/next/no-html-link-for-pages': 'off',
},
};
33 changes: 7 additions & 26 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,24 @@ pull_request_rules:
conditions:
- and:
- author~=^dependabot(|-preview)\[bot\]$
- check-success=SonarCloud Code Analysis
- check-success~=^security/snyk
- label!=wontfix
actions:
merge:
method: merge
- name: Merge Snyk PRs when all checks pass
conditions:
- and:
- title~=^\[Snyk\]
- head~=^snyk-fix
- check-success~=^security/snyk
- check-success=lint
- check-success=build
- check-success=SonarCloud Code Analysis
- label!=wontfix
actions:
review:
type: APPROVE
message: 🤖 automatically approving dependabot
merge:
method: merge
- name: Merge when all checks pass and the PR has been approved
conditions:
- and:
- check-success~=^security/snyk
- check-success=lint
- check-success=build
- check-success=SonarCloud Code Analysis
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
actions:
merge:
method: merge
- name: Ask for reviews
conditions:
- -closed
- -draft
actions:
request_reviews:
users:
- JoshTheWanderer
- DanWebb
- gavmck
- ella-etch
- Carl-J-M
random_count: 2
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: 👮 CI
on:
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npx --no -- eslint .
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm run build
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- lint-staged
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"sonarlint.connectedMode.project": {
"connectionId": "etchteam",
"projectKey": "etchteam_contentful"
}
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Etch Software Limited

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
'*.{ts,tsx,js,jsx}': 'eslint --fix',
};
Loading

0 comments on commit cfed882

Please sign in to comment.