@khanacademy/perseus-linter 0.0.0-PR443-20230328215601
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/.eslintrc.js +12 -0
- package/CHANGELOG.md +68 -0
- package/dist/es/index.js +1841 -0
- package/dist/es/index.js.map +1 -0
- package/dist/index.js +1835 -0
- package/dist/index.js.map +1 -0
- package/package.json +34 -0
- package/src/README.md +41 -0
- package/src/__tests__/matcher.test.ts +498 -0
- package/src/__tests__/rule.test.ts +110 -0
- package/src/__tests__/rules.test.ts +548 -0
- package/src/__tests__/selector-parser.test.ts +51 -0
- package/src/__tests__/tree-transformer.test.ts +444 -0
- package/src/index.ts +279 -0
- package/src/proptypes.ts +19 -0
- package/src/rule.ts +419 -0
- package/src/rules/absolute-url.ts +23 -0
- package/src/rules/all-rules.ts +71 -0
- package/src/rules/blockquoted-math.ts +9 -0
- package/src/rules/blockquoted-widget.ts +9 -0
- package/src/rules/double-spacing-after-terminal.ts +11 -0
- package/src/rules/extra-content-spacing.ts +11 -0
- package/src/rules/heading-level-1.ts +13 -0
- package/src/rules/heading-level-skip.ts +19 -0
- package/src/rules/heading-sentence-case.ts +10 -0
- package/src/rules/heading-title-case.ts +68 -0
- package/src/rules/image-alt-text.ts +20 -0
- package/src/rules/image-in-table.ts +9 -0
- package/src/rules/image-spaces-around-urls.ts +34 -0
- package/src/rules/image-widget.ts +49 -0
- package/src/rules/link-click-here.ts +10 -0
- package/src/rules/lint-utils.ts +47 -0
- package/src/rules/long-paragraph.ts +13 -0
- package/src/rules/math-adjacent.ts +9 -0
- package/src/rules/math-align-extra-break.ts +10 -0
- package/src/rules/math-align-linebreaks.ts +42 -0
- package/src/rules/math-empty.ts +9 -0
- package/src/rules/math-font-size.ts +11 -0
- package/src/rules/math-frac.ts +9 -0
- package/src/rules/math-nested.ts +10 -0
- package/src/rules/math-starts-with-space.ts +11 -0
- package/src/rules/math-text-empty.ts +9 -0
- package/src/rules/math-without-dollars.ts +13 -0
- package/src/rules/nested-lists.ts +10 -0
- package/src/rules/profanity.ts +9 -0
- package/src/rules/table-missing-cells.ts +19 -0
- package/src/rules/unbalanced-code-delimiters.ts +13 -0
- package/src/rules/unescaped-dollar.ts +9 -0
- package/src/rules/widget-in-table.ts +9 -0
- package/src/selector.ts +504 -0
- package/src/tree-transformer.ts +587 -0
- package/src/types.ts +7 -0
- package/tsconfig.json +12 -0
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
+
/* eslint-disable import/no-commonjs */
|
|
3
|
+
const path = require("path");
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
rules: {
|
|
7
|
+
"import/no-extraneous-dependencies": [
|
|
8
|
+
"error",
|
|
9
|
+
{packageDir: [__dirname, path.join(__dirname, "../../")]},
|
|
10
|
+
],
|
|
11
|
+
},
|
|
12
|
+
};
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# @khanacademy/perseus-linter
|
|
2
|
+
|
|
3
|
+
## 0.0.0-PR443-20230328215601
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4ef5607d: Migrate source code to TypeScript
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [4ef5607d]
|
|
12
|
+
- @khanacademy/perseus-error@0.0.0-PR443-20230328215601
|
|
13
|
+
|
|
14
|
+
## 0.2.5
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [a1b4ab3c]
|
|
19
|
+
- @khanacademy/perseus-error@0.1.5
|
|
20
|
+
|
|
21
|
+
## 0.2.4
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [6a7f36be]
|
|
26
|
+
- @khanacademy/perseus-error@0.1.4
|
|
27
|
+
|
|
28
|
+
## 0.2.3
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- f567f660: Update the eslint config to look at both the package.json for the package and the one from the root
|
|
33
|
+
- Updated dependencies [f567f660]
|
|
34
|
+
- @khanacademy/perseus-error@0.1.3
|
|
35
|
+
|
|
36
|
+
## 0.2.2
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- bf180fe1: Fix our use of import/no-extraneous-dependencies
|
|
41
|
+
- Updated dependencies [bf180fe1]
|
|
42
|
+
- @khanacademy/perseus-error@0.1.2
|
|
43
|
+
|
|
44
|
+
## 0.2.1
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- 98d283ff: Fix storybook
|
|
49
|
+
- Updated dependencies [98d283ff]
|
|
50
|
+
- @khanacademy/perseus-error@0.1.1
|
|
51
|
+
|
|
52
|
+
## 0.2.0
|
|
53
|
+
|
|
54
|
+
### Minor Changes
|
|
55
|
+
|
|
56
|
+
- 2578bd16: Rename NotGorgon to TranslationLinter
|
|
57
|
+
- 2578bd16: Rename Gorgon to PerseusLinter
|
|
58
|
+
|
|
59
|
+
## 0.1.0
|
|
60
|
+
|
|
61
|
+
### Minor Changes
|
|
62
|
+
|
|
63
|
+
- a4f10ace: Move Gorgon, PerseusError, PureMarkdown into their own packages
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- Updated dependencies [a4f10ace]
|
|
68
|
+
- @khanacademy/perseus-error@0.1.0
|