@khanacademy/perseus-linter 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/es/index.js +3 -3
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/proptypes.js +2 -2
- package/src/tree-transformer.js +3 -3
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Linter engine for Perseus",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "0.2.
|
|
6
|
+
"version": "0.2.1",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@khanacademy/perseus-error": "^0.1.
|
|
24
|
+
"@khanacademy/perseus-error": "^0.1.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@khanacademy/pure-markdown": "^0.1.
|
|
27
|
+
"@khanacademy/pure-markdown": "^0.1.1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {},
|
|
30
30
|
"keywords": []
|
package/src/proptypes.js
CHANGED
|
@@ -9,9 +9,9 @@ import type {LinterContextProps} from "./types.js";
|
|
|
9
9
|
export const linterContextProps: React$PropType$Primitive<{
|
|
10
10
|
contentType?: string,
|
|
11
11
|
highlightLint?: boolean,
|
|
12
|
-
// eslint-disable-next-line
|
|
12
|
+
// eslint-disable-next-line ft-flow/no-mutable-array
|
|
13
13
|
paths?: Array<string>,
|
|
14
|
-
// eslint-disable-next-line
|
|
14
|
+
// eslint-disable-next-line ft-flow/no-mutable-array
|
|
15
15
|
stack?: Array<string>,
|
|
16
16
|
...
|
|
17
17
|
}> = PropTypes.shape({
|
package/src/tree-transformer.js
CHANGED
|
@@ -117,7 +117,7 @@ export default class TreeTransformer {
|
|
|
117
117
|
// details. Note that this method uses the TraversalState object to store
|
|
118
118
|
// information about the structure of the tree.
|
|
119
119
|
_traverse(
|
|
120
|
-
// eslint-disable-next-line
|
|
120
|
+
// eslint-disable-next-line ft-flow/no-mutable-array
|
|
121
121
|
n: TreeNode | Array<TreeNode>,
|
|
122
122
|
state: TraversalState,
|
|
123
123
|
f: TraversalCallback,
|
|
@@ -243,7 +243,7 @@ export class TraversalState {
|
|
|
243
243
|
// node. This is hard for Flow to deal with, so you'll see a number of
|
|
244
244
|
// Flow casts through the any type when working with these two properties.
|
|
245
245
|
_currentNode: ?TreeNode;
|
|
246
|
-
// eslint-disable-next-line
|
|
246
|
+
// eslint-disable-next-line ft-flow/no-mutable-array
|
|
247
247
|
_containers: Stack<TreeNode | Array<TreeNode>>;
|
|
248
248
|
_indexes: Stack<string | number>;
|
|
249
249
|
_ancestors: Stack<TreeNode>;
|
|
@@ -527,7 +527,7 @@ export class TraversalState {
|
|
|
527
527
|
* the TraversalState class simpler in a number of places.
|
|
528
528
|
*/
|
|
529
529
|
class Stack<T> {
|
|
530
|
-
// eslint-disable-next-line
|
|
530
|
+
// eslint-disable-next-line ft-flow/no-mutable-array
|
|
531
531
|
stack: Array<T>;
|
|
532
532
|
|
|
533
533
|
constructor(array: ?$ReadOnlyArray<T>) {
|