Skip to content

Files

Latest commit

 

History

History
77 lines (56 loc) · 2.35 KB

CONTRIBUTING.md

File metadata and controls

77 lines (56 loc) · 2.35 KB

Contributing

Thank you for your interest in contributing to this project! Here's what you need to know to get started.

  1. Maintainers
  2. Order of Operations
  3. Getting Started
    1. Initial Setup
    2. Testing the Plugin
      1. gulp
      2. unit tests
  4. Changelog Guideline
  5. Commit Guideline

Maintainers

This project is currently being maintained by:

However, the project is being developed by the community. You're encouraged to create issues and to submit pull requests for bugfixes and features.

Order of Operations

  1. Create an issue
  2. Fork the repo
  3. Write code and unit tests
  4. Run tests and maintain coverage at 100%
  5. Submit a pull request
  6. Communicate in a timely manner while the PR is open

Getting Started

Initial Setup

  1. Make sure that you have the latest version of node installed (node -v); tested using v8.11.x
  2. Clone this repo git clone [email protected]:ilyakam/gulp-pug-linter.git
  3. cd gulp-pug-linter
  4. npm install

Testing the Plugin

gulp

  1. Pick a rule that you'd like to test
  2. Create a .pug-lint.json file with the rule in place, e.g.:
    {
      "disallowIdLiterals": true
    }
  3. Create a folder with one or more .pug files that violate the rule
  4. Create a gulpfile.js at the root of the repo, with the following code:
    // gulpfile.js
    const gulp = require('gulp');
    const pugLinter = require('gulp-pug-linter');
    
    gulp.task('lint:template', () => (
      gulp
        .src('./*.pug')
        .pipe(pugLinter({ reporter: 'default' }))
    ));
  5. Run npm run dev

unit tests

  1. Run npm run test -- --watch and it will automatically rerun the tests on change

Changelog Guideline

This project adheres to the keep a changelog guideline.

Commit Guideline

This project adheres to the Conventional Commits guideline along with the Angular convention commit types.