Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pugjs/pug-lint
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.6.0
Choose a base ref
...
head repository: pugjs/pug-lint
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.7.0
Choose a head ref
  • 6 commits
  • 5 files changed
  • 3 contributors

Commits on Jun 24, 2019

  1. Verified

    This commit was signed with the committer’s verified signature.
    davidboden David Boden
    Copy the full SHA
    8e9f613 View commit details
  2. Fully qualifying URL

    pykong authored and adrienverge committed Jun 24, 2019
    Copy the full SHA
    de14b7f View commit details

Commits on Aug 27, 2019

  1. Copy the full SHA
    340fec7 View commit details
  2. Copy the full SHA
    c42970c View commit details

Commits on Mar 21, 2023

  1. Remove dependency semver-regex

    This npm package has 2 vulnerabilities: CVE-2021-3795 + CVE-2021-43307.
    It was imported just to use a regex. The present commit makes use of a
    much simpler regex, without any extra package requirement.
    
    I tested that `npm run changelog` still works fine when creationg a new
    version.
    adrienverge committed Mar 21, 2023
    Copy the full SHA
    3fae152 View commit details
  2. v2.7.0

    adrienverge committed Mar 21, 2023
    Copy the full SHA
    fc0eb49 View commit details
Showing with 35 additions and 8 deletions.
  1. +12 −0 CHANGELOG.md
  2. +1 −1 README.md
  3. +4 −5 package.json
  4. +1 −2 pliers/build-changelog.js
  5. +17 −0 test/rules/validate-attribute-separator.test.js
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## v2.7.0 / 2023-03-21

### Highlights
* Remove dependency semver-regex
* Upgrade pug-lexer to allow ellipsis in attributes
* Add failed test case when using ellipsis in attribute names
* Fully qualifying URL
* Changed URL SublimeLinter/SublimeLinter-pug-lint

### Changes
[v2.6.0...v2.7.0](https://github.com/pugjs/pug-lint/compare/v2.6.0...v2.7.0)

## v2.6.0 / 2019-06-24

### Highlights
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ $ pug-lint [options] <file ...>
### Sublime Text 3

If you use SublimeLinter 3 with Sublime Text 3, you can install the
[SublimeLinter-pug-lint](https://github.com/benedfit/SublimeLinter-contrib-pug-lint)
[SublimeLinter-pug-lint](https://github.com/SublimeLinter/SublimeLinter-pug-lint)
plugin using [Package Control](https://packagecontrol.io/).

### Atom
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pug-lint",
"version": "2.6.0",
"version": "2.7.0",
"description": "An unopinionated and configurable linter and style checker for Pug (formerly Jade)",
"author": "Ben Edwards <hello@benedfit.com>",
"license": "ISC",
@@ -88,9 +88,9 @@
"glob": "^7.0.3",
"minimatch": "^3.0.3",
"path-is-absolute": "^1.0.0",
"pug-attrs": "^2.0.3",
"pug-error": "^1.3.2",
"pug-lexer": "^4.0.0",
"pug-attrs": "^2.0.4",
"pug-error": "^1.3.3",
"pug-lexer": "^4.1.0",
"resolve": "^1.1.7",
"strip-json-comments": "^2.0.1",
"void-elements": "^2.0.1"
@@ -108,7 +108,6 @@
"pliers": "^1.2.1",
"pug-lint-config-clock": "^1.1.0",
"rimraf": "^2.5.2",
"semver-regex": "^1.0.0",
"sinon": "^1.17.2",
"xo": "^0.15.1",
"yeoman-generator": "^0.23.3",
3 changes: 1 addition & 2 deletions pliers/build-changelog.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@ var fs = require('fs');
var path = require('path');
var changelog = require('changelog');
var moment = require('moment');
var semverRegex = require('semver-regex');
var packageDetails = require('../package.json');

function createTask(pliers) {
@@ -37,7 +36,7 @@ function createTask(pliers) {
var message = change.message.split('\n')[0];

if (message) {
if (semverRegex().test(message)) {
if (/^(.*\s)?v?[0-9]+\.[0-9]+\.[0-9]+(\s.*)?$/.test(message)) {
previousVersion = message;

if (previousVersion.length) {
17 changes: 17 additions & 0 deletions test/rules/validate-attribute-separator.test.js
Original file line number Diff line number Diff line change
@@ -35,6 +35,23 @@ function createTest(linter, fixturesPath) {
linter.checkString('input(*ngIf=\'editing\' type=\'text\' name=\'name\' value=\'value\')');
}, /Invalid regular expression/);
});

describe('with ellipsis mark in name', () => {
it('reports invalid attribute separator', () => {
const result = linter.checkString('input(type=\'text\' ...props name=\'name\')');

assert.equal(result.length, 1);
assert.equal(result[0].code, 'PUG:LINT_VALIDATEATTRIBUTESEPARATOR');
assert.equal(result[0].line, 1);
assert.equal(result[0].column, 18);
});

it('does not report with valid separator', function () {
const result = linter.checkString('input(...props type=\'text\' ...props name=\'name\' value=\'value\' ...props)');

assert.equal(result.length, 0);
});
});
});

describe('comma', function () {