diff --git a/.bxformat.json b/.bxformat.json index ad1d254..59154e7 100644 --- a/.bxformat.json +++ b/.bxformat.json @@ -1,12 +1,12 @@ { "indentSize" : 4, "tabIndent" : true, - "maxLineLength" : 115, + "maxLineLength" : 120, "newLine" : "\n", "singleQuote" : false, "preserveStringQuotes" : false, "alignConsecutiveAssignments" : true, - "alignConsecutiveProperties" : true, + "alignConsecutiveProperties" : false, "bracketPadding" : true, "parensPadding" : true, "binaryOperatorsPadding" : true, @@ -17,9 +17,9 @@ "padding" : true, "empty_padding" : false, "quote_keys" : false, - "separator" : " : ", + "separator" : ": ", "multiline" : { - "element_count" : 2, + "element_count" : 5, "comma_dangle" : false, "leading_comma" : { "enabled" : false, @@ -30,13 +30,13 @@ }, "property" : { "multiline" : { - "element_count" : 3, + "element_count" : 5, "comma_dangle" : false, "leading_comma" : { "enabled" : false, "padding" : true }, - "min_length" : 30 + "min_length" : 80 }, "key_value" : { "padding" : false @@ -46,13 +46,13 @@ "padding" : true, "empty_padding" : false, "multiline" : { - "element_count" : 2, + "element_count" : 5, "comma_dangle" : false, "leading_comma" : { "enabled" : false, "padding" : true }, - "min_length" : 50 + "min_length" : 60 } }, "for_loop_semicolons" : { @@ -64,7 +64,7 @@ "padding" : true, "empty_padding" : false, "comma_dangle" : false, - "multiline_count" : 3, + "multiline_count" : 5, "multiline_length" : 50 }, "arrow" : { @@ -76,7 +76,7 @@ "empty_padding" : false, "comma_dangle" : false, "multiline_count" : 3, - "multiline_length" : 50 + "multiline_length" : 60 }, "braces" : { "style" : "same-line", @@ -99,12 +99,12 @@ }, "template" : { "component_prefix" : "bx", - "indent_content" : true, + "indent_content" : false, "single_attribute_per_line" : false, "self_closing" : false }, "import" : { - "sort" : false, + "sort" : true, "group" : false }, "comments" : { @@ -116,7 +116,7 @@ "member_spacing" : 1, "property_order" : "preserve", "method_order" : "preserve", - "method_grouping" : false + "method_grouping" : true }, "sql" : { "uppercase_keywords" : true, diff --git a/.bxlint.json b/.bxlint.json new file mode 100644 index 0000000..14b2ed0 --- /dev/null +++ b/.bxlint.json @@ -0,0 +1,68 @@ +{ + "diagnostics": { + "duplicateMethod": { + "enabled": true, + "severity": "error" + }, + "duplicateProperty": { + "enabled": true, + "severity": "error" + }, + "emptyCatchBlock": { + "enabled": true, + "severity": "warning" + }, + "invalidExtends": { + "enabled": false, + "severity": "error" + }, + "invalidImplements": { + "enabled": false, + "severity": "error" + }, + "missingQueryParamCfsqltype": { + "enabled": true, + "severity": "warning" + }, + "missingReturnStatement": { + "enabled": true, + "severity": "warning" + }, + "shadowedVariable": { + "enabled": true, + "severity": "warning" + }, + "unescapedQueryParam": { + "enabled": true, + "severity": "warning" + }, + "unreachableCode": { + "enabled": true, + "severity": "warning" + }, + "unscopedVariable": { + "enabled": true, + "severity": "warning" + }, + "unusedImport": { + "enabled": true, + "severity": "warning" + }, + "unusedPrivateMethod": { + "enabled": true, + "severity": "warning" + }, + "unusedVariable": { + "enabled": true, + "severity": "hint" + } + }, + "include": [], + "exclude": [], + "mappings": {}, + "formatting": { + "experimental": { + "enabled": false + } + } +} \ No newline at end of file diff --git a/.cflintrc b/.cflintrc deleted file mode 100644 index 49615de..0000000 --- a/.cflintrc +++ /dev/null @@ -1,79 +0,0 @@ -{ - "output": [], - "rule": [], - "includes": [ - { - "code": "AVOID_USING_STRUCTNEW" - }, - { - "code": "AVOID_USING_ARRAYNEW" - }, - { - "code": "AVOID_USING_CFINCLUDE_TAG" - }, - { - "code": "AVOID_USING_CFABORT_TAG" - }, - { - "code": "AVOID_USING_ABORT" - }, - { - "code": "ARG_VAR_CONFLICT" - }, - - { - "code": "CFQUERYPARAM_REQ" - }, - { - "code": "COMPARE_INSTEAD_OF_ASSIGN" - }, - { - "code": "COMPONENT_HINT_MISSING" - }, - { - "code": "EXCESSIVE_FUNCTION_LENGTH" - }, - { - "code": "EXCESSIVE_COMPONENT_LENGTH" - }, - { - "code": "EXCESSIVE_ARGUMENTS" - }, - { - "code": "EXCESSIVE_FUNCTIONS" - }, - { - "code": "FUNCTION_TOO_COMPLEX" - }, - { - "code": "FUNCTION_HINT_MISSING" - }, - { - "code": "LOCAL_LITERAL_VALUE_USED_TOO_OFTEN" - }, - { - "code": "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN" - }, - { - "code": "MISSING_VAR" - }, - { - "code": "OUTPUT_ATTR" - }, - { - "code": "UNUSED_LOCAL_VARIABLE" - }, - { - "code": "UNUSED_METHOD_ARGUMENT" - }, - { - "code": "SQL_SELECT_STAR" - }, - { - "code": "VAR_ALLCAPS_NAME" - } - ], - "inheritParent": false, - "inheritPlugins": true, - "parameters": {} -} \ No newline at end of file diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 3f3efef..0d2f4d2 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -5,6 +5,11 @@ on: branches: - 'development' +# Unique group name per workflow-branch/tag combo +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: ########################################################################################## # Tests @@ -16,32 +21,33 @@ jobs: ########################################################################################## # Format Source Code ########################################################################################## - format: - name: Code Auto-Formatting - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Setup CommandBox CLI - uses: Ortus-Solutions/setup-commandbox@v2.0.1 - - - name: Auto-format - run: | - box install commandbox-cfformat - box run-script format - - - name: Commit Format Changes - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Apply cfformat changes - push_options: --force + # Will enable once we have more testing in. + # format: + # name: Code Auto-Formatting + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v6 + + # - name: Setup CommandBox CLI + # uses: Ortus-Solutions/setup-commandbox@v2.0.1 + + # - name: Auto-format + # run: | + # box install commandbox-cfformat + # box run-script format + + # - name: Commit Format Changes + # uses: stefanzweifel/git-auto-commit-action@v4 + # with: + # commit_message: Apply cfformat changes + # push_options: --force ########################################################################################## # Release it ########################################################################################## release: uses: ./.github/workflows/release.yml - needs: [ tests, format ] + needs: [ tests ] secrets: inherit with: snapshot: true diff --git a/.vscode/settings.json b/.vscode/settings.json index 9d74a9b..21679a8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,14 +1,6 @@ { - "boxlang.cfml.mappings": [ - { - "logicalPath": "/coldbox", - "directoryPath": "./coldbox", - "isPhysicalDirectoryPath" :false - }, - { - "logicalPath": "/testbox", - "directoryPath": "./testbox", - "isPhysicalDirectoryPath" :false - } - ] + "boxlang.mappings": { + "coldbox" : "./lib/coldbox", + "testbox" : "./lib/testbox" + } } diff --git a/box.json b/box.json index 5c400cd..664f076 100755 --- a/box.json +++ b/box.json @@ -1,6 +1,6 @@ { "name":"Vite Based ColdBox Template", - "version":"8.3.0", + "version":"8.4.0", "author":"You", "location":"forgeboxStorage", "slug":"cbtemplate-vite", @@ -25,8 +25,7 @@ ".github/PULL_REQUEST_TEMPLATE.md" ], "devDependencies":{ - "testbox":"^6.0.0", - "commandbox-cfformat":"*" + "testbox":"^6.0.0" }, "installPaths":{ "coldbox":"coldbox/", @@ -35,13 +34,12 @@ }, "dependencies":{ "vite-helpers":"^2.0.0", - "coldbox":"^8.0.0" + "coldbox":"^8.2.0" }, "scripts":{ "postInstall":"pathExists .env || cp .env.example .env && package set ignore=[]", - "format":"cfformat run config/,handlers/,interceptors/,models/,modules_app/,tests/specs/,*.cfc ./.cfformat.json --overwrite", - "format:check":"cfformat check config/,handlers/,interceptors/,models/,modules_app/,tests/specs/,*.cfc ./.cfformat.json", - "format:watch":"cfformat watch path='config/,handlers/,interceptors/,models/,modules_app/,tests/specs/,*.cfc' settingsPath='.cfformat.json'", + "format":"!boxlang format --source config/,handlers/,interceptors/,models/,modules_app/,tests/specs/,*.cfc", + "format:check":"!boxlang format --check --source config/,handlers/,interceptors/,models/,modules_app/,tests/specs/,*.cfc", "docker:build":"!docker build --no-cache -t my-coldbox-app -f ./docker/Dockerfile ./", "docker:run":"!docker run -it -p 8080:8080 my-coldbox-app", "docker:bash":"!docker run -it my-coldbox-app /bin/bash", diff --git a/views/main/index.cfm b/views/main/index.cfm index bc93c99..fcb7ccd 100755 --- a/views/main/index.cfm +++ b/views/main/index.cfm @@ -39,7 +39,7 @@ index()