Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: workflow automation + CodeLint #15

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
end_of_line = lf
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
29 changes: 29 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"env": {
"es6": true
},
"extends": [
"plugin:react/recommended",
"airbnb",
"plugin:prettier/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["react", "prettier", "react-hooks"],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exaustive-deps": "warn",
"prettier/prettier": "error",
"react/jsx-filename-extension": ["warn", { "extensions": [".jsx", ".js"] }],
"import/prefer-default-export": "off"
}
}
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release App Version

on:
push:
branches:
- master

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true"
}
}
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {extends: ['@commitlint/config-conventional']}
37 changes: 36 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
"@semantic-release/github"
]
},
"dependencies": {
"@react-native-community/art": "^1.2.0",
"prop-types": "^15.7.2"
Expand Down Expand Up @@ -45,5 +58,27 @@
"bugs": {
"url": "https://github.com/tokkozhin/react-native-neomorph-shadows/issues"
},
"homepage": "https://github.com/tokkozhin/react-native-neomorph-shadows#readme"
"homepage": "https://github.com/tokkozhin/react-native-neomorph-shadows#readme",
"devDependencies": {
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"commitizen": "^4.0.5",
"cz-conventional-changelog": "^3.2.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^2.5.0",
"husky": "^4.2.5",
"prettier": "^2.0.5",
"semantic-release": "^17.0.7"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
5 changes: 5 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
singleQuote: true,
trailingComma: 'all',
allowParens: 'avoid',
};
2 changes: 1 addition & 1 deletion src/InnerShadow.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { transformStyleProps } from './helpers';
export default class InnerShadow extends React.PureComponent {
render() {
const { style, children, ...containerProps } = this.props;
let {
const {
outsideViewStyle,
insideViewStyle,
allShadowProps,
Expand Down
2 changes: 1 addition & 1 deletion src/OuterShadow.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class OuterShadow extends React.PureComponent {

renderArt() {
const { style, children, ...containerProps } = this.props;
let {
const {
outsideViewStyle,
insideViewStyle,
allShadowProps,
Expand Down
Loading