@khanacademy/perseus-linter 0.3.12 → 1.0.0
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/README.md +7 -0
- package/dist/es/index.js +3 -12
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +31 -26
- package/dist/index.js.map +1 -1
- package/package.json +5 -6
- package/dist/rules/profanity.d.ts +0 -3
package/README.md
ADDED
package/dist/es/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { PerseusError, Errors } from '@khanacademy/perseus-
|
|
2
|
-
import { addLibraryVersionToPerseusDebug } from '@khanacademy/perseus-core';
|
|
1
|
+
import { PerseusError, Errors, addLibraryVersionToPerseusDebug } from '@khanacademy/perseus-core';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
|
|
5
4
|
function _extends() {
|
|
@@ -1172,14 +1171,6 @@ nested lists are hard to read on mobile devices;
|
|
|
1172
1171
|
do not use additional indentation.`
|
|
1173
1172
|
});
|
|
1174
1173
|
|
|
1175
|
-
var Profanity = Rule.makeRule({
|
|
1176
|
-
name: "profanity",
|
|
1177
|
-
// This list could obviously be expanded a lot, but I figured we
|
|
1178
|
-
// could start with https://en.wikipedia.org/wiki/Seven_dirty_words
|
|
1179
|
-
pattern: /\b(shit|piss|fuck|cunt|cocksucker|motherfucker|tits)\b/i,
|
|
1180
|
-
message: "Avoid profanity"
|
|
1181
|
-
});
|
|
1182
|
-
|
|
1183
1174
|
var TableMissingCells = Rule.makeRule({
|
|
1184
1175
|
name: "table-missing-cells",
|
|
1185
1176
|
severity: Rule.Severity.WARNING,
|
|
@@ -1227,7 +1218,7 @@ do not put widgets inside of tables.`
|
|
|
1227
1218
|
});
|
|
1228
1219
|
|
|
1229
1220
|
// TODO(davidflanagan):
|
|
1230
|
-
var AllRules = [AbsoluteUrl, BlockquotedMath, BlockquotedWidget, DoubleSpacingAfterTerminal, ExtraContentSpacing, HeadingLevel1, HeadingLevelSkip, HeadingSentenceCase, HeadingTitleCase, ImageAltText, ImageInTable, LinkClickHere, LongParagraph, MathAdjacent, MathAlignExtraBreak, MathAlignLinebreaks, MathEmpty, MathFontSize, MathFrac, MathNested, MathStartsWithSpace, MathTextEmpty, NestedLists, TableMissingCells, UnescapedDollar, WidgetInTable,
|
|
1221
|
+
var AllRules = [AbsoluteUrl, BlockquotedMath, BlockquotedWidget, DoubleSpacingAfterTerminal, ExtraContentSpacing, HeadingLevel1, HeadingLevelSkip, HeadingSentenceCase, HeadingTitleCase, ImageAltText, ImageInTable, LinkClickHere, LongParagraph, MathAdjacent, MathAlignExtraBreak, MathAlignLinebreaks, MathEmpty, MathFontSize, MathFrac, MathNested, MathStartsWithSpace, MathTextEmpty, NestedLists, TableMissingCells, UnescapedDollar, WidgetInTable, MathWithoutDollars, UnbalancedCodeDelimiters, ImageSpacesAroundUrls, ImageWidget];
|
|
1231
1222
|
|
|
1232
1223
|
/**
|
|
1233
1224
|
* TreeTransformer is a class for traversing and transforming trees. Create a
|
|
@@ -1768,7 +1759,7 @@ class Stack {
|
|
|
1768
1759
|
|
|
1769
1760
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
1770
1761
|
const libName = "@khanacademy/perseus-linter";
|
|
1771
|
-
const libVersion = "0.
|
|
1762
|
+
const libVersion = "1.0.0";
|
|
1772
1763
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
1773
1764
|
|
|
1774
1765
|
// Define the shape of the linter context object that is passed through the
|