File tree Expand file tree Collapse file tree 3 files changed +11
-15
lines changed Expand file tree Collapse file tree 3 files changed +11
-15
lines changed Original file line number Diff line number Diff line change 22 "presets" : [
33 " es2015"
44 ],
5- "plugins" : [
6- " add-module-exports"
7- ],
85 "env" : {
96 "development" : {
107 "presets" : [
Original file line number Diff line number Diff line change 3434 "dependencies" : {
3535 "prh" : " ^1.0.1" ,
3636 "structured-source" : " ^3.0.2" ,
37- "textlint-rule-helper" : " ^1.1.3 " ,
38- "untildify" : " ^2 .0.0 "
37+ "textlint-rule-helper" : " ^2.0.0 " ,
38+ "untildify" : " ^3 .0.2 "
3939 },
4040 "devDependencies" : {
4141 "babel-cli" : " ^6.7.5" ,
42- "babel-plugin-add-module-exports" : " ^0.2.1" ,
4342 "babel-preset-es2015" : " ^6.6.0" ,
44- "babel-preset-jsdoc-to-assert" : " ^2 .0.1 " ,
43+ "babel-preset-jsdoc-to-assert" : " ^4 .0.0 " ,
4544 "babel-preset-power-assert" : " ^1.0.0" ,
4645 "babel-register" : " ^6.7.2" ,
47- "mocha" : " ^2.3 .2" ,
46+ "mocha" : " ^3.1 .2" ,
4847 "power-assert" : " ^1.3.1" ,
49- "textlint" : " ^6.0 .1" ,
50- "textlint-tester" : " ^1.2 .0"
48+ "textlint" : " ^7.1 .1" ,
49+ "textlint-tester" : " ^2.0 .0"
5150 },
5251 "peerDependencies" : {
5352 "textlint" : " >= 5.5.0"
Original file line number Diff line number Diff line change 22"use strict" ;
33import { RuleHelper } from "textlint-rule-helper" ;
44import StructuredSource from "structured-source" ;
5- import prh from "prh" ;
6- import path from "path" ;
5+ const prh = require ( "prh" ) ;
6+ const path = require ( "path" ) ;
77const untildify = require ( 'untildify' ) ;
88function createPrhEngine ( rulePaths , baseDir ) {
99 if ( rulePaths . length === 0 ) {
@@ -73,7 +73,7 @@ function reporter(context, options = {}) {
7373 // to get position from index
7474 let src = new StructuredSource ( text ) ;
7575 let makeChangeSet = prhEngine . makeChangeSet ( null , text ) ;
76- makeChangeSet . diffs . forEach ( function ( changeSet ) {
76+ makeChangeSet . diffs . forEach ( function ( changeSet ) {
7777 // | ----[match]------
7878 var slicedText = text . slice ( changeSet . index ) ;
7979 // | ----[match------|
@@ -101,7 +101,7 @@ function reporter(context, options = {}) {
101101 }
102102 }
103103}
104- export default {
104+ module . exports = {
105105 linter : reporter ,
106106 fixer : reporter
107- }
107+ } ;
You can’t perform that action at this time.
0 commit comments