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
26 changes: 17 additions & 9 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
# Root editor config file
# frappe-nix:managed — generated by frappe-nix (`frappe-init --sync`); edit only inside the frappe-nix:local region.
root = true

# Common settings
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# python, js indentation settings
[{*.py,*.js,*.vue,*.css,*.scss,*.html}]
[*.{py,js,mjs,cjs,ts,mts,vue,css,scss,html,jinja,toml,json,jsonc,sh}]
indent_style = tab
indent_size = 4
max_line_length = 99
max_line_length = 110

# JSON files - mostly doctype schema files
[{*.json}]
insert_final_newline = false
[*.{yml,yaml,nix}]
indent_style = space
indent_size = 2

# frappe's exporter: 1-space JSON, no final newline, for everything under the package
[esign/**.json]
indent_style = space
indent_size = 1
insert_final_newline = false

[*.md]
trim_trailing_whitespace = false

# frappe-nix:local-begin editorconfig
# frappe-nix:local-end editorconfig
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# frappe-nix:managed — generated by frappe-nix (`frappe-init --sync`); edit only inside the frappe-nix:local region.
use flake . --no-pure-eval
# frappe-nix:local-begin envrc
# frappe-nix:local-end envrc
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Mass reformats (style: PRs), one squash SHA per line with its subject as a comment.
# GitHub reads this file; locally the dev shell sets blame.ignoreRevsFile.
15 changes: 15 additions & 0 deletions .github/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# zizmor: static analysis of the workflows and dependabot.yml, run by the managed prek hook.
# App-owned until frappe-nix's CI module renders this file; then sync takes it over.
# Third-party actions must be hash-pinned (dependabot keeps the hashes moving); GitHub's own
# may ride a major tag.
rules:
unpinned-uses:
config:
policies:
"actions/*": ref-pin
"github/*": ref-pin
"*": hash-pin
# The profile's dependabot cooldown (dependabot.cooldown-days) is 3 days.
dependabot-cooldown:
config:
days: 3
41 changes: 40 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,43 @@ __pycache__
*.swp
dist
node_modules
tags
tags
# >>> frappe-nix >>> (managed block — edits here are overwritten)
# The materialized dev bench: frappe copied out of the store, sites/, logs/,
# config/pids, the env symlink. Runtime state, never source — deleting it costs
# a re-copy of the apps, not the database, which lives in .devenv/state.
#
# NOT the whole of any directory that also holds nix/uv.lock: a flake's source
# tree is exactly its tracked files, so an ignored lock is invisible to the build
# and reads as missing.
/.frappe-nix/

# `bench build` compiles this app's bundles into its own public/dist — through
# the symlink, so they land here rather than in the generated bench. They are a
# build output, and leaving them tracked would dirty the flake's source tree on
# every build and re-assemble the workspace on every evaluation.
*/public/dist/
node_modules

# nix / direnv / devenv
/.devenv/
/.direnv/
/result

# The Nix-built dev virtualenv is symlinked into the bench, not here, but a
# stray one from a classic `bench init` would shadow it.
env

# devenv reads .env (dotenv.enable) at eval time from this directory.
.env
.env.*
!.env.example

# The app standards: pinned trees and reports, the tsc --build cache, tool
# caches, and the extra links `nix build` leaves for several outputs.
/.dev-dist/
*.tsbuildinfo
.ruff_cache/
__pycache__/
/result-*
# <<< frappe-nix <<<
21 changes: 21 additions & 0 deletions .oxfmtrc.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// frappe-nix:managed — generated by frappe-nix (`frappe-init --sync`); do not edit. Customise via [tool.frappe-nix.js.oxfmt].
// Tabs and 110 columns (js.format-tabs, js.format-width) are frappe's convention.
// Anything .gitignore'd is skipped without being listed.
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"useTabs": true,
"printWidth": 110,
"ignorePatterns": [
// frappe's exporter writes every JSON under the package and rewrites it on export
"esign/**/*.json",
"nix/**",
"docs-site/**",
"docs/screenshots/**",
// written by release-please
"CHANGELOG.md",
".release-please-manifest.json",
// generated by frappe-types gen-doctypes
"types/doctypes.d.ts",
"esign/**/*.html",
],
}
78 changes: 78 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "unicorn", "oxc", "import"],
"categories": {
"correctness": "error",
"suspicious": "error",
"perf": "warn",
"pedantic": "off"
},
"env": {
"builtin": true,
"es2024": true,
"browser": true
},
"rules": {
"typescript/no-explicit-any": "error",
"typescript/ban-ts-comment": "error",
"typescript/consistent-type-imports": "error",
"no-console": [
"warn",
{
"allow": ["error", "warn"]
}
],
"import/no-cycle": "off",
"no-underscore-dangle": "off",
"unicorn/consistent-function-scoping": "off",
"unicorn/no-array-sort": "off"
},
"ignorePatterns": [
"esign/public/dist/**",
".frappe-nix/**",
".dev-dist/**",
"nix/**",
"docs-site/**",
"types/doctypes.d.ts"
],
"overrides": [
{
"files": ["scripts/**", "marketplace/**", "ci/**", "test/**"],
"env": {
"node": true
},
"rules": {
"no-console": "off",
"no-await-in-loop": "off",
"import/no-unassigned-import": "off"
}
},
{
"files": ["esign/public/js/*.bundle.ts", "esign/public/js/*.bundle.js"],
"rules": {
"import/no-unassigned-import": "off"
}
},
{
"files": [
"esign/public/js/controls/font_select.js",
"esign/public/js/controls/signature.js",
"esign/public/js/controls/upload.js",
"esign/public/js/controls/utils.js",
"esign/public/js/fonts.js",
"esign/public/js/web/esign_webform_script.js",
"esign/public/js/web_form.js"
],
"globals": {
"frappe": "readonly",
"__": "readonly",
"cur_frm": "readonly",
"cur_list": "readonly",
"locals": "readonly",
"$": "readonly",
"jQuery": "readonly",
"moment": "readonly"
}
}
]
}
Loading
Loading