chore: add prettier and format all files

- Install prettier ^3.6.2
- Add .prettierrc with project formatting rules
- Add .prettierignore to exclude generated files and dependencies
- Add npm scripts: format and format:check
- Format all files with prettier
This commit is contained in:
2025-11-25 23:59:44 +02:00
parent dcad1573a8
commit 41b3c5d345
10 changed files with 76 additions and 29 deletions

View File

@@ -30,20 +30,20 @@ module.exports = grammar(bashGrammar, {
[$.pipeline],
// 2 essential ShellSpec conflicts
[$.command_name, $.shellspec_data_block],
[$.shellspec_hook_block]
[$.shellspec_hook_block],
],
rules: {
// 8 ShellSpec rule extensions
shellspec_describe_block, // Describe/fDescribe/xDescribe
shellspec_context_block, // Context/ExampleGroup variants
shellspec_it_block, // It/Example/Specify variants
shellspec_hook_block, // BeforeEach/AfterEach/etc blocks
shellspec_utility_block, // Parameters/Skip/Pending/Todo
shellspec_data_block, // Data blocks with statements/arguments
shellspec_hook_statement, // Before/After statements
shellspec_directive_statement // Include/Skip if
}
})
shellspec_describe_block, // Describe/fDescribe/xDescribe
shellspec_context_block, // Context/ExampleGroup variants
shellspec_it_block, // It/Example/Specify variants
shellspec_hook_block, // BeforeEach/AfterEach/etc blocks
shellspec_utility_block, // Parameters/Skip/Pending/Todo
shellspec_data_block, // Data blocks with statements/arguments
shellspec_hook_statement, // Before/After statements
shellspec_directive_statement, // Include/Skip if
},
});
```
### Supported ShellSpec Constructs

View File

@@ -139,7 +139,7 @@ check-ci:
### 2. Release Workflow (`release.yml`)
- **Triggers**: tags (v*.*.*), manual dispatch
- **Triggers**: tags (v*.*.\*), manual dispatch
- **Jobs**: validate, check-ci, security, release
- **Purpose**: Streamlined release process with CI dependency

View File

@@ -1,6 +1,6 @@
ignore_all_files_in_gitignore: true
ignored_paths:
- megalinter-reports
- megalinter-reports
read_only: false
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
@@ -46,8 +46,8 @@ excluded_tools: []
initial_prompt: ""
project_name: "tree-sitter-shellspec"
languages:
- cpp
- typescript
- bash
- cpp
- typescript
- bash
included_optional_tools: []
encoding: utf-8