Skip to content

Commit

Permalink
Merge pull request #49 from etchteam/feat/open-source-cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
JoshTheWanderer authored Nov 21, 2023
2 parents adb0183 + 57d981c commit 2b5505d
Show file tree
Hide file tree
Showing 32 changed files with 20,764 additions and 14,391 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
27 changes: 8 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: ["airbnb-typescript", "plugin:storybook/recommended"],
parserOptions: {
project: './tsconfig.json'
},
rules: {
"import/no-extraneous-dependencies": ["error", {
"devDependencies": true
}],
"react/jsx-props-no-spreading": "off"
}
}
]
};
extends: ['@etchteam'],
rules: {
'@next/next/no-html-link-for-pages': 'off',
},
settings: {
'import/ignore': ['query-string'],
},
};
27 changes: 27 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
pull_request_rules:
- name: Merge dependabot PRs when all checks pass
conditions:
- and:
- author~=^dependabot(|-preview)\[bot\]$
- 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=lint
- check-success=build
- check-success=SonarCloud Code Analysis
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
actions:
merge:
method: merge
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
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
- name: Lint JS
run: npx --no -- eslint .
- name: Lint CSS
run: npx --no -- stylelint .
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-storybook
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ typings/
.nuxt
dist

# Storybook build outputs
storybook-static

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
Expand Down
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
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
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.18.1
20.9.0
4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

7 changes: 7 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
LICENSE
dist/
*.js*
*.ts*
*.md*
*.gif
*.svg
12 changes: 10 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
},
"sonarlint.connectedMode.project": {
"connectionId": "etchteam",
"projectKey": "etchteam_storybook-addon-css-variables-theme"
}
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Etch
Copyright (c) 2021 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
Expand Down
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
};
4 changes: 4 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
'*.{ts,tsx,js,jsx}': 'eslint --fix',
'*.{css,scss}': 'stylelint --fix',
};
Loading

0 comments on commit 2b5505d

Please sign in to comment.