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

Use Mega-Linter locally #14

Open
wants to merge 15 commits into
base: main
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
10 changes: 8 additions & 2 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
Hinton marked this conversation as resolved.
Show resolved Hide resolved
"words": ["Bitwarden"],
"flagWords": [],
"dictionaryDefinitions": [
{
"name": "project-words",
"path": "./project-words.txt",
"addWords": true
}
],
"dictionaries": ["project-words"],
"ignorePaths": [
".vscode",
"**/.cspell.json",
Expand Down
14 changes: 14 additions & 0 deletions .git-hooks/pre-commit
withinfocus marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
[ -z "$FILES" ] && exit 0

if npx mega-linter-runner --containername "megalinter-incremental" \
--flavor formatters --remove-container --fix --env "'APPLY_FIXES=all'" \
--env "'CLEAR_REPORT_FOLDER=true'" --env "'LOG_LEVEL=warning'" \
--filesonly $FILES; then
echo "$FILES" | xargs git add
exit 0
fi

exit 1
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ Thumbs.db
!.vscode/extensions.json
.history/*

# Node
node_modules
npm-debug.log
# Lint
megalinter-reports/
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

15 changes: 15 additions & 0 deletions .jscpd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"threshold": 0,
"reporters": ["html", "markdown"],
"ignore": [
"**/node_modules/**",
"**/.git/**",
"**/.rbenv/**",
"**/.venv/**",
"**/*cache*/**",
"**/.github/**",
"**/.idea/**",
"**/report/**",
"**/*.svg"
]
}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Template Repository

This repository serves as a template for others and establishes very basic structure and tooling setup for later customization.

## Hooks

To gain enhanced functionality such as local linting, install the hooks for this repository:

```bash
git config core.hooksPath .git-hooks
```
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ While researching, we'd like to ask you to refrain from:
- Social engineering (including phishing) of Bitwarden staff or contractors
- Any physical attempts against Bitwarden property or data centers

# We want to help you!
# We want to help you

If you have something that you feel is close to exploitation, or if you'd like some information
regarding the internal API, or generally have any questions regarding the app that would help in
your efforts, please email us at https://bitwarden.com/contact and ask for that information. As
your efforts, please email us at <https://bitwarden.com/contact> and ask for that information. As
stated above, Bitwarden wants to help you find issues, and is more than willing to help.

Thank you for helping keep Bitwarden and our users safe!
Loading