From 54c68df1e8c61ea9683ead833cc8de1ddd8a4f0e Mon Sep 17 00:00:00 2001 From: alok Date: Sat, 8 Jun 2019 10:15:35 +0530 Subject: [PATCH 1/2] removed '>' prefix from from docs/working-with-rules --- docs/developer-guide/working-with-rules.md | 25 +++++++++------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/docs/developer-guide/working-with-rules.md b/docs/developer-guide/working-with-rules.md index 806cce53026..5514f18eba1 100644 --- a/docs/developer-guide/working-with-rules.md +++ b/docs/developer-guide/working-with-rules.md @@ -412,21 +412,16 @@ Once you have an instance of `SourceCode`, you can use the methods on it to work * `getIndexFromLoc(loc)` - returns the index of a given location in the source code, where `loc` is an object with a 1-based `line` key and a 0-based `column` key. * `commentsExistBetween(nodeOrToken1, nodeOrToken2)` - returns `true` if comments exist between two nodes. -> `skipOptions` is an object which has 3 properties; `skip`, `includeComments`, and `filter`. Default is `{skip: 0, includeComments: false, filter: null}`. -> -> * `skip` is a positive integer, the number of skipping tokens. If `filter` option is given at the same time, it doesn't count filtered tokens as skipped. -> * `includeComments` is a boolean value, the flag to include comment tokens into the result. -> * `filter` is a function which gets a token as the first argument, if the function returns `false` then the result excludes the token. -> -> `countOptions` is an object which has 3 properties; `count`, `includeComments`, and `filter`. Default is `{count: 0, includeComments: false, filter: null}`. -> -> * `count` is a positive integer, the maximum number of returning tokens. -> * `includeComments` is a boolean value, the flag to include comment tokens into the result. -> * `filter` is a function which gets a token as the first argument, if the function returns `false` then the result excludes the token. -> -> `rangeOptions` is an object which has 1 property: `includeComments`. -> -> * `includeComments` is a boolean value, the flag to include comment tokens into the result. +`skipOptions` is an object which has 3 properties; `skip`, `includeComments`, and `filter`. Default is `{skip: 0, includeComments: false, filter: null}`. +* `skip` is a positive integer, the number of skipping tokens. If `filter` option is given at the same time, it doesn't count filtered tokens as skipped. +* `includeComments` is a boolean value, the flag to include comment tokens into the result. +* `filter` is a function which gets a token as the first argument, if the function returns `false` then the result excludes the token. +`countOptions` is an object which has 3 properties; `count`, `includeComments`, and `filter`. Default is `{count: 0, includeComments: false, filter: null}`. +* `count` is a positive integer, the maximum number of returning tokens. +* `includeComments` is a boolean value, the flag to include comment tokens into the result. +* `filter` is a function which gets a token as the first argument, if the function returns `false` then the result excludes the token. +`rangeOptions` is an object which has 1 property: `includeComments`. +* `includeComments` is a boolean value, the flag to include comment tokens into the result. There are also some properties you can access: From 0b3c60a89e27aa80ad69d4a13c86286168963581 Mon Sep 17 00:00:00 2001 From: alok Date: Sat, 8 Jun 2019 10:30:00 +0530 Subject: [PATCH 2/2] retained the line space --- docs/developer-guide/working-with-rules.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/developer-guide/working-with-rules.md b/docs/developer-guide/working-with-rules.md index 5514f18eba1..2a9f1b9d342 100644 --- a/docs/developer-guide/working-with-rules.md +++ b/docs/developer-guide/working-with-rules.md @@ -413,14 +413,19 @@ Once you have an instance of `SourceCode`, you can use the methods on it to work * `commentsExistBetween(nodeOrToken1, nodeOrToken2)` - returns `true` if comments exist between two nodes. `skipOptions` is an object which has 3 properties; `skip`, `includeComments`, and `filter`. Default is `{skip: 0, includeComments: false, filter: null}`. + * `skip` is a positive integer, the number of skipping tokens. If `filter` option is given at the same time, it doesn't count filtered tokens as skipped. * `includeComments` is a boolean value, the flag to include comment tokens into the result. * `filter` is a function which gets a token as the first argument, if the function returns `false` then the result excludes the token. + `countOptions` is an object which has 3 properties; `count`, `includeComments`, and `filter`. Default is `{count: 0, includeComments: false, filter: null}`. + * `count` is a positive integer, the maximum number of returning tokens. * `includeComments` is a boolean value, the flag to include comment tokens into the result. * `filter` is a function which gets a token as the first argument, if the function returns `false` then the result excludes the token. + `rangeOptions` is an object which has 1 property: `includeComments`. + * `includeComments` is a boolean value, the flag to include comment tokens into the result. There are also some properties you can access: