Skip to content

Commit

Permalink
Fix codeaudicy (#7)
Browse files Browse the repository at this point in the history
* cheking audicy

* add eslintrc

* add ruleset

* add folder exception

* try

* update actions sha

* Try 1

* exception folder node_module

* add jshintrc

* fix semicolon

* fix semicolon

* prepare workflow flow

* add semantic release drafter config

* fix release drafter config

* upgrade dependabot fixes prs

* upgrade dotenv node_module

* add markdownlint.json
  • Loading branch information
JaSiLez authored Feb 25, 2022
1 parent 148facb commit cac4931
Show file tree
Hide file tree
Showing 29 changed files with 1,126 additions and 529 deletions.
24 changes: 24 additions & 0 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
engines:
rubocop:
exclude_paths:
- "config/test.yml"
base_sub_dir: "test/baseDir"
duplication:
exclude_paths:
- "config/test.yml"
config:
languages:
- "ruby"
- "javascript"
languages:
css:
extensions:
- "-css.resource"
exclude_paths:
- ".bundle/**"
- "spec/**/*"
- "benchmarks/**/*"
- "**.min.js"
- "tests/**/*"
- "node_modules/**/*"
30 changes: 30 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
parser: "babel-eslint",
env: {
browser: true,
node: true,
es6: true,
jest: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended"
],
plugins: [
"react",
"react-hooks",
"jsx-a11y",
],
rules: {
semi: [2, "never"],
strict: 0,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
},
settings: {
react: {
version: "detect"
}
}
}
114 changes: 114 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name-template: 'v$RESOLVED_VERSION 🌈'

tag-template: 'v$RESOLVED_VERSION'

template: |
## Changes
$CHANGES
$CONTRIBUTORS
categories:
- title: '💣 Breaking Change'
labels:
- "change"
- "breaking"
- title: '🚀 Features'
labels:
- 'feature'
- 'improvement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'refactor'
- 'security'
- title: '📗 Docs'
labels:
- 'documentation'
- title: '🧪 Tests'
labels:
- "tests"
- title: '🧰 Maintenance'
labels:
- 'maintenance'
- 'chore'
- title: '⬆️ Dependencies'
labels:
- 'dependencies'

change-template: '- $TITLE @$AUTHOR (#$NUMBER)'

change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.

version-resolver:
major:
labels:
- 'major'
- 'change'
- 'breaking'
minor:
labels:
- 'minor'
- 'feature'
patch:
labels:
- 'patch'
- 'fix'
- 'chore'
- 'dependencies'
- 'documentation'
- 'maintenance'
- 'refactor'
- 'tests'
default: patch

exclude-labels:
- 'skip-changelog'

autolabeler:
- label: 'breaking'
branch:
- '/break.*/'
- '/breaking.*/'
- label: 'documentation'
files:
- '**/*.md'
branch:
- '/docs{0,1}\/.+/'
- '/docs\/.+/'
- '/docs.*/'
- label: 'tests'
branch:
- '/tests\/.+/'
- '/tests.*/'
- label: 'chore'
branch:
- '/chore\/.+/'
- 'chore.*'
- label: 'fix'
branch:
- '/fix\/.+/'
- '/fix.*/'
- '/bugfix.*/'
- '/bug.*/'
- '/hot.*/'
- '/hotfix.*/'
- '/sec.*/'
- '/security.*/'
title:
- '/fix/i'
- label: 'feature'
branch:
- '/enh\/.+/'
- '/enhancement\/.+/'
- '/feature.*/'
- '/feat.*/'
- '/improvement.*/'
title:
- '/feat/i'
- label: 'dependencies'
#files:
#- 'go.mod'
#- 'go.sum'
#- 'vendor*'
branch:
- '/deps\/.+/'
- '/dependabot.*/'
17 changes: 7 additions & 10 deletions .github/workflows/action-analyser.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Action security analysis

on:
push:
branches: [master, main]
pull_request:
branches: [ main ]
paths-ignore:
- README.md
schedule:
- cron: '15 7 * * 2'

Expand All @@ -21,23 +23,18 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
uses: codacy/codacy-analysis-cli-action@0de770495bd94bdac1ba7d5043a72b252ddbeec3
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
verbose: true
# Adjust severity of non-security issues
gh-code-scanning-compat: true
gh-code-scanning-compat: false
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647


# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/action-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand Down
4 changes: 4 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"esversion": 6,
"asi": true
}
8 changes: 8 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"line-length": false,
"no-inline-html": {
"allowed_elements": [
"a"
]
}
}
11 changes: 7 additions & 4 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions node_modules/dotenv/.editorconfig

This file was deleted.

12 changes: 0 additions & 12 deletions node_modules/dotenv/.npmignore

This file was deleted.

6 changes: 0 additions & 6 deletions node_modules/dotenv/.travis.yml

This file was deleted.

Loading

0 comments on commit cac4931

Please sign in to comment.