eslint-plugin-pug
Advanced tools
Comparing version 1.2.2 to 1.2.3
{ | ||
"name": "eslint-plugin-pug", | ||
"description": "An ESLint plugin for linting inline scripts in Pug files", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"author": "Greg V <greg@unrelenting.technology>", | ||
@@ -28,18 +28,17 @@ "license": "Unlicense", | ||
"dependencies": { | ||
"lodash": "^4.17.15", | ||
"pug-lexer": "^4.1.0", | ||
"pug-parser": "^5.0.1", | ||
"pug-walk": "^1.1.8", | ||
"vfile": "^4.0.2", | ||
"vfile-location": "^3.0.0" | ||
"lodash": "^4.17.20", | ||
"pug-lexer": "^5.0.0", | ||
"pug-parser": "^6.0.0", | ||
"pug-walk": "^2.0.0", | ||
"vfile": "^4.2.1", | ||
"vfile-location": "^3.2.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^6.8.0", | ||
"eslint-config-standard": "^14.1.0", | ||
"eslint-plugin-import": "^2.20.1", | ||
"eslint-plugin-node": "^11.0.0", | ||
"eslint": "^7.16.0", | ||
"eslint-config-standard": "^16.0.2", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"jest": "^25.1.0" | ||
"jest": "^26.6.3" | ||
} | ||
} |
@@ -76,2 +76,3 @@ const _ = require('lodash') | ||
const { origs, text } = exports.nodesToOrigsAndText(ctx, node.block.nodes) | ||
// console.log('preprocess 1', JSON.stringify({ origs, text, nodes: node.block.nodes }, null, 2)) | ||
ctx.blocks.push({ | ||
@@ -88,2 +89,3 @@ column: node.column, | ||
}) | ||
// console.log('preprocess 2', JSON.stringify(ctx.blocks, null, 2)) | ||
return ctx.blocks | ||
@@ -117,4 +119,4 @@ } | ||
// add indent to multiline fix.text | ||
const head = exports.positionToOffset(ctx.vfileLoc, { line: origStart[0], column: origStart[1] }) | ||
const indent = ctx.src.substring(head - origStart[1] + 1, head) | ||
const head = exports.positionToOffset(ctx.vfileLoc, { line: origStart[0], column: origStart[1]+1 }) | ||
const indent = ctx.src.substring(head - origStart[1], head) | ||
fix.text = fix.text.replace(/\n/g, '\n' + fix.text.substring(fix.range[0] - origStart[1], fix.range[0])) | ||
@@ -126,3 +128,3 @@ fix.text = exports.addIndentAfterLf(fix.text, indent) | ||
exports.postprocess = (messages, filename) => { | ||
// console.log(JSON.stringify(ctx, null, 2)) | ||
// console.log('postprocess', JSON.stringify({ messages, ctx }, null, 2)) | ||
@@ -129,0 +131,0 @@ const newMessages = [] |
9188
6
136
+ Addedacorn@7.4.1(transitive)
+ Addedis-expression@4.0.0(transitive)
+ Addedpug-error@2.1.0(transitive)
+ Addedpug-lexer@5.0.1(transitive)
+ Addedpug-parser@6.0.0(transitive)
+ Addedpug-walk@2.0.0(transitive)
+ Addedtoken-stream@1.0.0(transitive)
- Removedacorn@4.0.13(transitive)
- Removedis-expression@3.0.0(transitive)
- Removedpug-error@1.3.3(transitive)
- Removedpug-lexer@4.1.0(transitive)
- Removedpug-parser@5.0.1(transitive)
- Removedpug-walk@1.1.8(transitive)
- Removedtoken-stream@0.0.1(transitive)
Updatedlodash@^4.17.20
Updatedpug-lexer@^5.0.0
Updatedpug-parser@^6.0.0
Updatedpug-walk@^2.0.0
Updatedvfile@^4.2.1
Updatedvfile-location@^3.2.0