Skip to content

🩹 [Patch]: Add linter configurations and update .gitignore for VS Code #15

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

Merged
merged 4 commits into from
Feb 16, 2025

Conversation

MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Feb 16, 2025

Description

This pull request focuses on adding and configuring various linters for the project, as well as making some minor adjustments to PowerShell scripts. The most important changes include adding configuration files for JavaScript Copy/Paste Detector (jscpd), Markdown linter, and PowerShell Script Analyzer, updating the GitHub Actions workflow for the linter, and modifying PowerShell scripts to include necessary module requirements and suppress specific warnings.

Linter Configuration:

  • Added .jscpd.json configuration file to set up JavaScript Copy/Paste Detector with a threshold of 0 and specific reporters and ignore patterns.
  • Added .markdown-lint.yml configuration file to define rules for the Markdown linter, including settings for unordered list style, line length, and other formatting rules.
  • Added .powershell-psscriptanalyzer.psd1 configuration file to enable and configure various rules for PowerShell Script Analyzer, such as consistent indentation and whitespace usage.

GitHub Actions Workflow:

  • Updated .github/workflows/Linter.yml to use the latest version of super-linter/super-linter and adjusted environment variables for validating JSON and Markdown files.

PowerShell Scripts:

  • Modified Build-PSModuleDocumentation.ps1, Import-PSModule.ps1, and Resolve-PSModuleDependency.ps1 to include #Requires statements for necessary modules and added suppression for PSAvoidUsingWriteHost warnings to ensure proper script execution. [1] [2] [3]
  • Adjusted scripts/main.ps1 to suppress PSAvoidUsingWriteHost warnings and added #Requires -Modules Utilities to ensure all required modules are loaded.

Type of change

  • 📖 [Docs]
  • 🪲 [Fix]
  • 🩹 [Patch]
  • ⚠️ [Security fix]
  • 🚀 [Feature]
  • 🌟 [Breaking change]

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@MariusStorhaug MariusStorhaug self-assigned this Feb 16, 2025
@MariusStorhaug MariusStorhaug merged commit a4813bf into main Feb 16, 2025
13 checks passed
@MariusStorhaug MariusStorhaug deleted the fix branch February 16, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant