chore: Miscellaneous
parent
86b6c8e70f
commit
f771baf2c0
|
@ -1,7 +1,12 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = false
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = LF
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
|
@ -0,0 +1,6 @@
|
|||
**/node_modules
|
||||
**/public
|
||||
**/build
|
||||
**/config
|
||||
**/scripts
|
||||
**/xsl
|
|
@ -0,0 +1,503 @@
|
|||
{
|
||||
"root": true,
|
||||
"extends": ["react-app", "airbnb"],
|
||||
"parser": "babel-eslint",
|
||||
"plugins": [
|
||||
"babel",
|
||||
"react",
|
||||
"jsx-a11y",
|
||||
"import",
|
||||
"react-hooks"
|
||||
],
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"commonjs": true,
|
||||
"node": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
},
|
||||
"ecmaVersion": 12,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"globals": {
|
||||
"strapi": true
|
||||
},
|
||||
"rules": {
|
||||
"template-curly-spacing" : "off",
|
||||
|
||||
"indent" : "off",
|
||||
|
||||
"react/jsx-props-no-spreading": "off",
|
||||
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
|
||||
"react/no-unused-prop-types": "warn",
|
||||
|
||||
"react/jsx-no-target-blank": "error",
|
||||
|
||||
"no-invalid-this": "off",
|
||||
|
||||
"babel/no-invalid-this": "error",
|
||||
|
||||
"arrow-spacing": "warn",
|
||||
|
||||
"implicit-arrow-linebreak": "warn",
|
||||
|
||||
"react/no-unused-state": "warn",
|
||||
|
||||
"react/boolean-prop-naming": "off",
|
||||
|
||||
"react/destructuring-assignment": ["warn", "always", { "ignoreClassFields": true }],
|
||||
|
||||
"react/no-access-state-in-setstate": "warn",
|
||||
|
||||
"operator-linebreak": "warn",
|
||||
|
||||
"no-useless-constructor": "warn",
|
||||
|
||||
"react/no-danger": "off",
|
||||
|
||||
"react/jsx-indent-props": "warn",
|
||||
|
||||
"react/jsx-curly-brace-presence": "warn",
|
||||
|
||||
"react/jsx-key": "error",
|
||||
|
||||
"react/jsx-boolean-value": "warn",
|
||||
|
||||
"react/jsx-closing-tag-location": "warn",
|
||||
|
||||
"import/extensions": "error",
|
||||
|
||||
"newline-per-chained-call": "warn",
|
||||
|
||||
"prefer-arrow-callback": "warn",
|
||||
|
||||
"block-spacing": "warn",
|
||||
|
||||
"one-var-declaration-per-line": "warn",
|
||||
|
||||
"prefer-const": "warn",
|
||||
|
||||
"import/first": "off",
|
||||
|
||||
"react/jsx-max-props-per-line": 1,
|
||||
|
||||
"react/jsx-first-prop-new-line": "warn",
|
||||
|
||||
"react/jsx-equals-spacing": "warn",
|
||||
|
||||
"react/jsx-indent": "warn",
|
||||
|
||||
"react/jsx-closing-bracket-location": "off",
|
||||
|
||||
"import/no-mutable-exports": "error",
|
||||
|
||||
"import/no-extraneous-dependencies": "off",
|
||||
|
||||
"object-shorthand": ["off", "never"],
|
||||
|
||||
"object-curly-newline": "off",
|
||||
|
||||
"arrow-body-style": "off",
|
||||
|
||||
"comma-dangle": ["warn", "always-multiline"],
|
||||
|
||||
"import/prefer-default-export": "off",
|
||||
|
||||
"no-cond-assign": "warn",
|
||||
|
||||
"no-console": "off",
|
||||
|
||||
"no-constant-condition": "warn",
|
||||
|
||||
"no-control-regex": "warn",
|
||||
|
||||
"no-continue": "warn",
|
||||
|
||||
"react/forbid-prop-types": "warn",
|
||||
|
||||
"no-debugger": "warn",
|
||||
|
||||
"no-dupe-args": "error",
|
||||
|
||||
"no-dupe-keys": "error",
|
||||
|
||||
"no-duplicate-case": "error",
|
||||
|
||||
"no-empty": "warn",
|
||||
|
||||
"no-empty-character-class": "error",
|
||||
|
||||
"no-ex-assign": "error",
|
||||
|
||||
"no-extra-boolean-cast": "warn",
|
||||
|
||||
"no-extra-semi": "warn",
|
||||
|
||||
"no-func-assign": "error",
|
||||
|
||||
"no-inner-declarations": "error",
|
||||
|
||||
"no-invalid-regexp": "error",
|
||||
|
||||
"no-mixed-operators": "off",
|
||||
|
||||
"no-irregular-whitespace": "error",
|
||||
|
||||
"no-negated-in-lhs": "error",
|
||||
|
||||
"no-obj-calls": "error",
|
||||
|
||||
"no-regex-spaces": "warn",
|
||||
|
||||
"no-sparse-arrays": "error",
|
||||
|
||||
"no-unreachable": "warn",
|
||||
|
||||
"use-isnan": "error",
|
||||
|
||||
"valid-jsdoc": "warn",
|
||||
|
||||
"valid-typeof": "error",
|
||||
|
||||
"array-callback-return": "off",
|
||||
|
||||
"block-scoped-var": "off",
|
||||
|
||||
"prefer-destructuring": "warn",
|
||||
|
||||
"complexity": "off",
|
||||
|
||||
"consistent-return": "off",
|
||||
|
||||
"curly": "warn",
|
||||
|
||||
"default-case": "warn",
|
||||
|
||||
"dot-notation": "off",
|
||||
|
||||
"eqeqeq": "warn",
|
||||
|
||||
"guard-for-in": "off",
|
||||
|
||||
"no-alert": "warn",
|
||||
|
||||
"no-caller": "error",
|
||||
|
||||
"no-div-regex": "off",
|
||||
|
||||
"no-else-return": "off",
|
||||
|
||||
"no-eq-null": "error",
|
||||
|
||||
"no-eval": "error",
|
||||
|
||||
"no-extend-native": "error",
|
||||
|
||||
"no-extra-bind": "error",
|
||||
|
||||
"no-fallthrough": "error",
|
||||
|
||||
"no-floating-decimal": "error",
|
||||
|
||||
"no-implied-eval": "error",
|
||||
|
||||
"no-iterator": "error",
|
||||
|
||||
"no-labels": "off",
|
||||
|
||||
"no-lone-blocks": "warn",
|
||||
|
||||
"no-loop-func": "error",
|
||||
|
||||
"no-multi-spaces": "warn",
|
||||
|
||||
"no-multi-str": "error",
|
||||
|
||||
"no-native-reassign": "error",
|
||||
|
||||
"no-new": "warn",
|
||||
|
||||
"no-new-func": "error",
|
||||
|
||||
"no-new-wrappers": "error",
|
||||
|
||||
"no-octal": "error",
|
||||
|
||||
"no-octal-escape": "error",
|
||||
|
||||
"no-param-reassign": "off",
|
||||
|
||||
"no-process-env": "off",
|
||||
|
||||
"no-proto": "error",
|
||||
|
||||
"no-redeclare": "error",
|
||||
|
||||
"no-return-assign": "off",
|
||||
|
||||
"arrow-parens": ["warn", "always", { "requireForBlockBody": false }],
|
||||
|
||||
"no-script-url": "error",
|
||||
|
||||
"no-self-compare": "error",
|
||||
|
||||
"no-sequences": "error",
|
||||
|
||||
"no-throw-literal": "error",
|
||||
|
||||
"no-unused-expressions": "warn",
|
||||
|
||||
"no-void": "error",
|
||||
|
||||
"no-with": "error",
|
||||
|
||||
"radix": "off",
|
||||
|
||||
"vars-on-top": "off",
|
||||
|
||||
"wrap-iife": "error",
|
||||
|
||||
"yoda": "warn",
|
||||
|
||||
"strict": "off",
|
||||
|
||||
"no-catch-shadow": "error",
|
||||
|
||||
"no-delete-var": "error",
|
||||
|
||||
"no-label-var": "error",
|
||||
|
||||
"no-shadow": "warn",
|
||||
|
||||
"no-shadow-restricted-names": "error",
|
||||
|
||||
"no-undef": "error",
|
||||
|
||||
"no-undef-init": "error",
|
||||
|
||||
"no-multi-assign": "warn",
|
||||
|
||||
"no-undefined": "error",
|
||||
|
||||
"no-unused-vars": ["warn", { "args": "none", "ignoreRestSiblings": true }],
|
||||
|
||||
"no-use-before-define": [
|
||||
"error",
|
||||
{ "functions": false, "classes": true, "variables": true }
|
||||
],
|
||||
|
||||
"no-restricted-properties": "warn",
|
||||
|
||||
"no-restricted-syntax": "warn",
|
||||
|
||||
"brace-style": "off",
|
||||
|
||||
"camelcase": "warn",
|
||||
|
||||
"comma-spacing": ["warn", { "before": false, "after": true }],
|
||||
|
||||
"comma-style": ["warn", "last"],
|
||||
|
||||
"consistent-this": ["off", "_this"],
|
||||
|
||||
"eol-last": "warn",
|
||||
|
||||
"func-names": "off",
|
||||
|
||||
"func-style": ["warn", "declaration", { "allowArrowFunctions": true }],
|
||||
|
||||
"key-spacing": ["warn", { "beforeColon": false, "afterColon": true }],
|
||||
|
||||
"max-nested-callbacks": ["warn", 5],
|
||||
|
||||
"new-cap": ["warn", { "newIsCap": true, "capIsNew": false }],
|
||||
|
||||
"new-parens": "warn",
|
||||
|
||||
"newline-after-var": "off",
|
||||
|
||||
"no-array-constructor": "off",
|
||||
|
||||
"no-inline-comments": "off",
|
||||
|
||||
"no-lonely-if": "warn",
|
||||
|
||||
"no-mixed-spaces-and-tabs": "warn",
|
||||
|
||||
"no-multiple-empty-lines": ["warn", { "max": 2 }],
|
||||
|
||||
"no-nested-ternary": "warn",
|
||||
|
||||
"no-new-object": "off",
|
||||
|
||||
"no-spaced-func": "warn",
|
||||
|
||||
"no-ternary": "off",
|
||||
|
||||
"no-trailing-spaces": "warn",
|
||||
|
||||
"no-underscore-dangle": "off",
|
||||
|
||||
"no-extra-parens": "off",
|
||||
|
||||
"padding-line-between-statements": "off",
|
||||
|
||||
"one-var": ["warn", "never"],
|
||||
|
||||
"operator-assignment": ["off", "never"],
|
||||
|
||||
"class-methods-use-this": "off",
|
||||
|
||||
"padded-blocks": ["off", "never"],
|
||||
|
||||
"lines-between-class-members": ["warn", "always"],
|
||||
|
||||
"quote-props": ["warn", "as-needed"],
|
||||
|
||||
"quotes": ["off", "single"],
|
||||
|
||||
"semi": ["warn", "always"],
|
||||
|
||||
"semi-spacing": ["warn", { "before": false, "after": true }],
|
||||
|
||||
"sort-vars": "off",
|
||||
|
||||
"keyword-spacing": ["warn", { "before": true, "after": true }],
|
||||
|
||||
"space-before-blocks": ["warn", "always"],
|
||||
|
||||
"function-paren-newline": "off",
|
||||
|
||||
"space-before-function-paren": ["warn", { "anonymous": "never", "named": "never" }],
|
||||
|
||||
"object-curly-spacing": ["warn", "always"],
|
||||
|
||||
"array-bracket-spacing": ["warn", "never"],
|
||||
|
||||
"computed-property-spacing": ["warn", "never"],
|
||||
|
||||
"space-in-parens": ["warn", "never"],
|
||||
|
||||
"space-infix-ops": "warn",
|
||||
|
||||
"space-unary-ops": ["warn", { "words": true, "nonwords": false }],
|
||||
|
||||
"spaced-comment": ["warn", "always"],
|
||||
|
||||
"wrap-regex": "off",
|
||||
|
||||
"no-var": "error",
|
||||
|
||||
"generator-star-spacing": ["error", "before"],
|
||||
|
||||
"max-depth": ["warn", 4],
|
||||
|
||||
"max-len": ["off", 80, 2],
|
||||
|
||||
"max-params": ["off", 99],
|
||||
|
||||
"max-statements": "off",
|
||||
|
||||
"no-bitwise": "off",
|
||||
|
||||
"no-plusplus": "off",
|
||||
|
||||
"react/display-name": "off",
|
||||
|
||||
"react/jsx-tag-spacing": "warn",
|
||||
|
||||
"jsx-quotes": ["warn", "prefer-double"],
|
||||
|
||||
"react/jsx-no-undef": "error",
|
||||
|
||||
"react/jsx-sort-props": "off",
|
||||
|
||||
"react/jsx-uses-react": "error",
|
||||
|
||||
"react/prefer-stateless-function": "warn",
|
||||
|
||||
"react/jsx-uses-vars": "error",
|
||||
|
||||
"react/jsx-no-bind": "error",
|
||||
|
||||
"react/no-did-mount-set-state": "warn",
|
||||
|
||||
"react/no-will-update-set-state": "warn",
|
||||
|
||||
"react/no-did-update-set-state": "warn",
|
||||
|
||||
"react/no-multi-comp": "off",
|
||||
|
||||
"react/no-unknown-property": "warn",
|
||||
|
||||
"react/prop-types": "off",
|
||||
|
||||
"react/react-in-jsx-scope": "error",
|
||||
|
||||
"react/self-closing-comp": "warn",
|
||||
|
||||
"react/jsx-wrap-multilines": "warn",
|
||||
|
||||
"react/no-array-index-key": "warn",
|
||||
|
||||
"react/no-unescaped-entities": "warn",
|
||||
|
||||
"react/sort-comp": "off",
|
||||
|
||||
"jsx-a11y/no-static-element-interactions": "off",
|
||||
|
||||
"jsx-a11y/click-events-have-key-events": "off",
|
||||
|
||||
"jsx-a11y/no-noninteractive-element-interactions": "off",
|
||||
|
||||
"react/jsx-one-expression-per-line": "off",
|
||||
|
||||
"jsx-a11y/anchor-is-valid": "off",
|
||||
|
||||
"jsx-a11y/alt-text": "warn",
|
||||
|
||||
"jsx-a11y/label-has-for": [
|
||||
"warn",
|
||||
{
|
||||
"required": {
|
||||
"some": ["nesting", "id"]
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"jsx-a11y/img-redundant-alt": "warn",
|
||||
|
||||
"jsx-a11y/no-autofocus": "off",
|
||||
|
||||
"jsx-a11y/iframe-has-title": "warn",
|
||||
|
||||
"jsx-a11y/anchor-has-content": "off",
|
||||
|
||||
"jsx-a11y/label-has-associated-control": "warn",
|
||||
|
||||
"jsx-a11y/mouse-events-have-key-events": "off",
|
||||
|
||||
"jsx-a11y/interactive-supports-focus": "off",
|
||||
|
||||
"jsx-a11y/no-distracting-elements": "warn",
|
||||
|
||||
"jsx-a11y/heading-has-content": "warn",
|
||||
|
||||
"jsx-a11y/html-has-lang": "warn",
|
||||
|
||||
"jsx-a11y/href-no-hash": "off",
|
||||
|
||||
"react/jsx-filename-extension": "off",
|
||||
|
||||
"jsx-a11y/no-noninteractive-tabindex": "warn",
|
||||
|
||||
"jsx-a11y/media-has-caption": "off"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
name: 🐛 Bug Report
|
||||
about: Create a report to help improve this plugin
|
||||
---
|
||||
|
||||
<!--
|
||||
Hello 👋 Thank you for submitting an issue.
|
||||
-->
|
||||
|
||||
## Bug report
|
||||
|
||||
### Describe the bug
|
||||
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
### Steps to reproduce the behavior
|
||||
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
### Expected behavior
|
||||
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
### Screenshots
|
||||
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
### Code snippets
|
||||
|
||||
If applicable, add code samples to help explain your problem.
|
||||
|
||||
### System
|
||||
|
||||
- Node.js version: <!-- Please ensure you are using the Node LTS version (v12 / v14) -->
|
||||
- NPM version:
|
||||
- Strapi version:
|
||||
- Plugin version:
|
||||
- Database:
|
||||
- Operating system:
|
||||
|
||||
### Additional context
|
||||
|
||||
Add any other context about the problem here.
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
name: 🚀 Feature Request
|
||||
about: Suggest an idea to help make this plugin even better!
|
||||
---
|
||||
|
||||
<!--
|
||||
Hello 👋 Thank you for submitting a feature request.
|
||||
-->
|
||||
|
||||
## Feature request
|
||||
|
||||
### Summary
|
||||
|
||||
Quick summary what's this feature request about.
|
||||
|
||||
### Why is it needed?
|
||||
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
### Suggested solution(s)
|
||||
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
### Related issue(s)/PR(s)
|
||||
|
||||
Let us know if this is related to any issue/pull request.
|
|
@ -0,0 +1,26 @@
|
|||
<!--
|
||||
Hello 👋 Thank you for submitting a pull request.
|
||||
|
||||
To help us merge your PR, make sure to follow the instructions below:
|
||||
|
||||
- Create or update the documentation.
|
||||
- Create or update the tests.
|
||||
- Refer to the issue you are closing in the PR description - fix #issue
|
||||
- Specify if the PR is in WIP (work in progress) state or ready to be merged
|
||||
-->
|
||||
|
||||
### What does it do?
|
||||
|
||||
Describe the technical changes you did.
|
||||
|
||||
### Why is it needed?
|
||||
|
||||
Describe the issue you are solving.
|
||||
|
||||
### How to test it?
|
||||
|
||||
Provide information about the environment and the path to verify the behaviour.
|
||||
|
||||
### Related issue(s)/PR(s)
|
||||
|
||||
Let us know if this is related to any issue/pull request
|
|
@ -0,0 +1,37 @@
|
|||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: 'lint'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: 'yarn'
|
||||
- name: Install dependencies
|
||||
run: yarn --frozen-lockfile
|
||||
- name: Run eslint
|
||||
run: yarn run eslint
|
||||
unit:
|
||||
name: 'unit'
|
||||
needs: [lint]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: 'yarn'
|
||||
- name: Install dependencies
|
||||
run: yarn --frozen-lockfile
|
||||
- name: Run test
|
||||
run: yarn run -s test:unit
|
|
@ -3,7 +3,6 @@ coverage
|
|||
node_modules
|
||||
stats.json
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
files
|
||||
|
||||
# Cruft
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
_
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
Color_Off='\033[0m'
|
||||
BRed="\033[1;31m" # Red
|
||||
BGreen="\033[1;32m" # Green
|
||||
BYellow="\033[1;33m" # Yellow
|
||||
BBlue="\033[1;34m" # Blue
|
||||
|
||||
MSG_FILE=$1
|
||||
FILE_CONTENT="$(cat $MSG_FILE)"
|
||||
REGEX='(feat: |fix: |docs: |style: |refactor: |test: |chore: )'
|
||||
ERROR_MSG="Commit message format must match regex \"${REGEX}\""
|
||||
|
||||
if [[ $FILE_CONTENT =~ $REGEX ]]; then
|
||||
if [[ $FILE_CONTENT =~ (feat: ) ]]; then
|
||||
printf '%s %s' ":sparkles:" "$(cat $MSG_FILE)" >$MSG_FILE
|
||||
elif [[ $FILE_CONTENT =~ (fix: ) ]]; then
|
||||
printf '%s %s' ":bug:" "$(cat $MSG_FILE)" >$MSG_FILE
|
||||
elif [[ $FILE_CONTENT =~ (docs: ) ]]; then
|
||||
printf '%s %s' ":memo:" "$(cat $MSG_FILE)" >$MSG_FILE
|
||||
elif [[ $FILE_CONTENT =~ (style: ) ]]; then
|
||||
printf '%s %s' ":art:" "$(cat $MSG_FILE)" >$MSG_FILE
|
||||
elif [[ $FILE_CONTENT =~ (refactor: ) ]]; then
|
||||
printf '%s %s' ":recycle:" "$(cat $MSG_FILE)" >$MSG_FILE
|
||||
elif [[ $FILE_CONTENT =~ (test: ) ]]; then
|
||||
printf '%s %s' ":white_check_mark:" "$(cat $MSG_FILE)" >$MSG_FILE
|
||||
elif [[ $FILE_CONTENT =~ (chore: ) ]]; then
|
||||
printf '%s %s' ":wrench:" "$(cat $MSG_FILE)" >$MSG_FILE
|
||||
fi
|
||||
printf "${BGreen}Good commit!${Color_Off}"
|
||||
else
|
||||
printf "${BRed}Bad commit ${BBlue}\"$FILE_CONTENT\"\n"
|
||||
printf "${BYellow}$ERROR_MSG\n"
|
||||
printf "The semantic git commit patten is expected, for details see https://gist.github.com/boazpoolman/42629d941b5f747734d296e02ecf737d\n"
|
||||
printf "commit-msg hook failed (add --no-verify to bypass)\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -1,21 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
Color_Off='\033[0m'
|
||||
BRed="\033[1;31m" # Red
|
||||
BGreen="\033[1;32m" # Green
|
||||
BYellow="\033[1;33m" # Yellow
|
||||
BBlue="\033[1;34m" # Blue
|
||||
|
||||
LOCAL_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||
REGEX="^(main|master|develop)|(hotfix|release|feature|test|fix|chore|docs|refactor)\/[a-z0-9._-]+$"
|
||||
ERROR_MSG="Branch name must match regex \"${REGEX}\""
|
||||
|
||||
if [[ ! $LOCAL_BRANCH =~ $REGEX ]]; then
|
||||
printf "${BRed}Bad branch name ${BBlue}\"$LOCAL_BRANCH\"\n"
|
||||
printf "${BYellow}$ERROR_MSG\n"
|
||||
printf "The git-flow branch patten is expected, for details see https://gist.github.com/boazpoolman/42629d941b5f747734d296e02ecf737d\n"
|
||||
printf "pre-commit hook failed (add --no-verify to bypass)\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,128 @@
|
|||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
[@boazpoolman](https://twitter.com/boazpoolman) on twitter.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
|
@ -0,0 +1,83 @@
|
|||
# Contributing
|
||||
|
||||
We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project.
|
||||
|
||||
## Development Workflow
|
||||
|
||||
To get started with the project, make sure you have a local instance of Strapi running.
|
||||
See the [Strapi docs](https://github.com/strapi/strapi#getting-started) on how to setup a Strapi project.
|
||||
|
||||
#### 1. Fork the [repository](https://github.com/boazpoolman/strapi-plugin-config-sync)
|
||||
|
||||
[Go to the repository](https://github.com/boazpoolman/strapi-plugin-config-sync) and fork it to your own GitHub account.
|
||||
|
||||
#### 2. Clone from your repository into the plugins folder
|
||||
|
||||
```bash
|
||||
cd YOUR_STRAPI_PROJECT/src/plugins
|
||||
git clone git@github.com:YOUR_USERNAME/strapi-plugin-config-sync.git config-sync
|
||||
```
|
||||
|
||||
#### 3. Install the dependencies
|
||||
|
||||
Go to the plugin and install it's dependencies.
|
||||
|
||||
```bash
|
||||
cd YOUR_STRAPI_PROJECT/src/plugins/config-sync/ && yarn install
|
||||
```
|
||||
|
||||
#### 4. Rebuild your Strapi project
|
||||
|
||||
Rebuild your strapi project to build the admin part of the plugin.
|
||||
|
||||
```bash
|
||||
cd YOUR_STRAPI_PROJECT && yarn build --clean
|
||||
```
|
||||
|
||||
#### 5. Running the administration panel in development mode
|
||||
|
||||
**Start the administration panel server for development**
|
||||
|
||||
```bash
|
||||
cd YOUR_STRAPI_PROJECT && yarn develop --watch-admin
|
||||
```
|
||||
|
||||
The administration panel will be available at http://localhost:8000/admin
|
||||
|
||||
### Commit message convention
|
||||
|
||||
We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages:
|
||||
|
||||
- `fix`: bug fixes, e.g. fix crash due to deprecated method.
|
||||
- `feat`: new features, e.g. add new method to the module.
|
||||
- `refactor`: code refactor, e.g. migrate from class components to hooks.
|
||||
- `docs`: changes into documentation, e.g. add usage example for the module..
|
||||
- `test`: adding or updating tests, eg add integration tests using detox.
|
||||
- `chore`: tooling changes, e.g. change CI config.
|
||||
|
||||
### Linting and tests
|
||||
|
||||
[ESLint](https://eslint.org/)
|
||||
|
||||
We use [ESLint](https://eslint.org/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing.
|
||||
|
||||
### Scripts
|
||||
|
||||
The `package.json` file contains various scripts for common tasks:
|
||||
|
||||
- `yarn eslint`: lint files with ESLint.
|
||||
- `yarn eslint:fix`: auto-fix ESLint issues.
|
||||
- `yarn test:unit`: run unit tests with Jest.
|
||||
|
||||
### Sending a pull request
|
||||
|
||||
> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
|
||||
|
||||
When you're sending a pull request:
|
||||
|
||||
- Preferably create the pull request to merge in to the `develop` branch
|
||||
- Prefer small pull requests focused on one change.
|
||||
- Verify that linters and tests are passing.
|
||||
- Review the documentation to make sure it looks good.
|
||||
- Follow the pull request template when opening a pull request.
|
||||
- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
|
|
@ -0,0 +1,4 @@
|
|||
comment:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
|
@ -0,0 +1,7 @@
|
|||
module.exports = {
|
||||
name: 'Unit test',
|
||||
testMatch: ['**/__tests__/?(*.)+(spec|test).js'],
|
||||
transform: {},
|
||||
coverageDirectory: "./coverage/",
|
||||
collectCoverage: true,
|
||||
};
|
70
package.json
70
package.json
|
@ -1,22 +1,23 @@
|
|||
{
|
||||
"name": "strapi-plugin-config-sync",
|
||||
"version": "0.1.6",
|
||||
"description": "Manage your Strapi database configuration as partial json files which can be imported/exported across environments. ",
|
||||
"description": "Enables a development workflow in Strapi for easy migration of config data across environments.",
|
||||
"strapi": {
|
||||
"displayName": "Config Sync",
|
||||
"name": "config-sync",
|
||||
"icon": "sync",
|
||||
"description": "Manage your Strapi database configuration as partial json files which can be imported/exported across environments. "
|
||||
"description": "sitemap.plugin.description",
|
||||
"required": false,
|
||||
"kind": "plugin"
|
||||
},
|
||||
"scripts": {
|
||||
"eslint": "eslint --max-warnings=0 './**/*.{js,jsx}'",
|
||||
"eslint:fix": "eslint --fix './**/*.{js,jsx}'",
|
||||
"test:unit": "jest --verbose"
|
||||
},
|
||||
"dependencies": {
|
||||
"immutable": "^4.0.0-rc.12",
|
||||
"react": "^16.13.1",
|
||||
"react-diff-viewer": "^3.1.1",
|
||||
"react-dom": "^16.9.0",
|
||||
"react-redux": "^7.2.2",
|
||||
"redux": "^4.0.5",
|
||||
"redux-immutable": "^4.0.0",
|
||||
"redux-logger": "^3.0.6",
|
||||
"redux-thunk": "^2.3.0"
|
||||
"redux-thunk": "^2.3.0",
|
||||
"react-diff-viewer": "^3.1.1"
|
||||
},
|
||||
"author": {
|
||||
"name": "Boaz Poolman",
|
||||
|
@ -30,19 +31,50 @@
|
|||
"url": "https://github.com/boazpoolman"
|
||||
}
|
||||
],
|
||||
"files": [
|
||||
"admin",
|
||||
"server",
|
||||
"public",
|
||||
"strapi-admin.js",
|
||||
"strapi-server.js"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@strapi/helper-plugin": "4.0.0-beta.2",
|
||||
"@strapi/icons": "^0.0.1-alpha.42",
|
||||
"@strapi/parts": "^0.0.1-alpha.42",
|
||||
"@strapi/utils": "4.0.0-beta.2",
|
||||
"babel-eslint": "9.0.0",
|
||||
"codecov": "^3.8.3",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-airbnb": "^18.2.1",
|
||||
"eslint-config-react-app": "^3.0.7",
|
||||
"eslint-import-resolver-webpack": "^0.11.0",
|
||||
"eslint-loader": "2.1.1",
|
||||
"eslint-plugin-babel": "^5.3.0",
|
||||
"eslint-plugin-flowtype": "2.50.1",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-jsx-a11y": "^6.4.1",
|
||||
"eslint-plugin-react": "^7.21.5",
|
||||
"eslint-plugin-react-hooks": "^2.3.0",
|
||||
"immutable": "^4.0.0-rc.14",
|
||||
"jest": "^26.0.1",
|
||||
"jest-cli": "^26.0.1",
|
||||
"jest-styled-components": "^7.0.2",
|
||||
"lodash": "^4.17.11",
|
||||
"react": "^16.8.6",
|
||||
"react-intl": "^5.20.12",
|
||||
"react-redux": "^7.2.2",
|
||||
"redux": "^4.0.5",
|
||||
"redux-immutable": "^4.0.0",
|
||||
"styled-components": "^5.2.3"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/boazpoolman/strapi-plugin-config-sync/issues"
|
||||
},
|
||||
"homepage": "https://github.com/boazpoolman/strapi-plugin-config-sync#readme",
|
||||
"engines": {
|
||||
"node": ">=10.16.0 <=14.x.x",
|
||||
"node": ">=10.0.0",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"husky": "^6.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "husky install"
|
||||
}
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue