Skip to content
Merged
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
112 changes: 112 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.11
default_install_hook_types:
- pre-commit
- commit-msg
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.0.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: no-commit-to-branch
- id: check-executables-have-shebangs
- id: check-ast
- id: check-toml
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args:
- --maxkb=999
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: pretty-format-json
args:
- --autofix
exclude: ^rmcryptpad/ui/
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
language_version: python3.11
files: ^rmcryptpad/
types: [python]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
hooks:
- id: mypy
language: system
args: ["--strict"]
files: ^rmcryptpad/
types: [python]
- repo: https://github.com/pycqa/pylint
rev: v3.3.6
hooks:
- id: pylint
language: system
files: ^rmcryptpad/
types: [python]
args: ["--rcfile=rmcryptpad/pyproject.toml", "--source-roots=rmcryptpad/src"]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
- id: remove-tabs
- repo: https://github.com/PyCQA/bandit
rev: 1.8.3
hooks:
- id: bandit
args: ["--skip=B101"]
files: ^rmcryptpad/
types: [python]
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: v1.0.1
hooks:
- id: rst-linter
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
language: system
exclude: "poetry\\.lock|tests/data/.*|rmcryptpad/ui/pnpm-lock\\.yaml"
# args: ['--baseline', '.secrets.baseline']
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: ["--external-sources"]
- repo: https://github.com/python-poetry/poetry
rev: '2.1.1'
hooks:
- id: poetry-check
args: ["-C", "rmcryptpad"]
- id: poetry-lock
args: ["-C", "rmcryptpad"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
files: ^rmcryptpad/ui/
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.50.0
hooks:
- id: eslint
files: ^rmcryptpad/ui/
types_or: [javascript, jsx, ts, tsx]
additional_dependencies:
- "eslint@8.50.0"
- "@typescript-eslint/parser"
- "@typescript-eslint/eslint-plugin"
- "eslint-plugin-react-hooks"
- "eslint-plugin-react-refresh"
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ services:
- ./volumes/cryptpad/data:/cryptpad/data
- ./volumes/cryptpad/files:/cryptpad/datastore
- ./config/config.js:/cryptpad/config/config.js:ro
- ./customize/application_config.js:/cryptpad/customize/application_config.js:ro
- ./customize:/cryptpad/customize.local:ro
expose:
- "3000"
- "3003"
Expand Down
1 change: 0 additions & 1 deletion config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ module.exports = {
logToStdout: true,
installMethod: 'docker',
};

1 change: 1 addition & 0 deletions customize/CryptPad_logo_hero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions customize/application_config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
(() => {
const factory = (AppConfig) => {
AppConfig.loginSalt = 'ac73deb9ef8944e51b2d4feafc2d5713764c26911aa12fd70168cc8be2754a33';
AppConfig.loginSalt = '__LOGIN_SALT__'; // replaced at container startup
AppConfig.minimumPasswordLength = 8;
AppConfig.defaultDarkTheme = 'true';

// Hide donation/crowdfunding prompts
AppConfig.disableFeedback = true;

// Hide footer links that don't apply to a private deployment
AppConfig.source = false;
AppConfig.roadmap = false;

return AppConfig;
};

Expand All @@ -11,4 +20,3 @@
define(['/common/application_config_internal.js'], factory);
}
})();

Loading
Loading