eslint-plugin-gamut 2.4.1-alpha.db5e20.0 → 2.4.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/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/no-kbd-element.d.ts +4 -0
- package/dist/no-kbd-element.js +31 -0
- package/dist/no-kbd-element.js.map +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ declare const rules: {
|
|
|
9
9
|
'no-inline-style': import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"noInlineStyle", never[], {
|
|
10
10
|
JSXAttribute(node: import("@typescript-eslint/types/dist/generated/ast-spec").JSXAttribute): void;
|
|
11
11
|
}>;
|
|
12
|
+
'no-kbd-element': import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"noKbdElement", never[], {
|
|
13
|
+
JSXOpeningElement(node: import("@typescript-eslint/types/dist/generated/ast-spec").JSXOpeningElement): void;
|
|
14
|
+
}>;
|
|
12
15
|
'prefer-themed': import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"preferThemed", never[], {
|
|
13
16
|
TaggedTemplateExpression(node: import("@typescript-eslint/types/dist/generated/ast-spec").TaggedTemplateExpression): void;
|
|
14
17
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.recommended = exports.rules = void 0;
|
|
|
7
7
|
const gamut_import_paths_1 = __importDefault(require("./gamut-import-paths"));
|
|
8
8
|
const no_css_standalone_1 = __importDefault(require("./no-css-standalone"));
|
|
9
9
|
const no_inline_style_1 = __importDefault(require("./no-inline-style"));
|
|
10
|
+
const no_kbd_element_1 = __importDefault(require("./no-kbd-element"));
|
|
10
11
|
const prefer_themed_1 = __importDefault(require("./prefer-themed"));
|
|
11
12
|
const recommended_1 = __importDefault(require("./recommended"));
|
|
12
13
|
exports.recommended = recommended_1.default;
|
|
@@ -14,6 +15,7 @@ const rules = {
|
|
|
14
15
|
'import-paths': gamut_import_paths_1.default,
|
|
15
16
|
'no-css-standalone': no_css_standalone_1.default,
|
|
16
17
|
'no-inline-style': no_inline_style_1.default,
|
|
18
|
+
'no-kbd-element': no_kbd_element_1.default,
|
|
17
19
|
'prefer-themed': prefer_themed_1.default,
|
|
18
20
|
};
|
|
19
21
|
exports.rules = rules;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;;;AAAA,8EAAoD;AACpD,4EAAkD;AAClD,wEAA8C;AAC9C,oEAA2C;AAC3C,gEAAwC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;;;AAAA,8EAAoD;AACpD,4EAAkD;AAClD,wEAA8C;AAC9C,sEAA4C;AAC5C,oEAA2C;AAC3C,gEAAwC;AAUxB,sBAVT,qBAAW,CAUS;AAR3B,MAAM,KAAK,GAAG;IACZ,cAAc,EAAE,4BAAgB;IAChC,mBAAmB,EAAE,2BAAe;IACpC,iBAAiB,EAAE,yBAAa;IAChC,gBAAgB,EAAE,wBAAY;IAC9B,eAAe,EAAE,uBAAY;CAC9B,CAAC;AAEO,sBAAK"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const createRule_1 = require("./createRule");
|
|
4
|
+
exports.default = (0, createRule_1.createRule)({
|
|
5
|
+
create(context) {
|
|
6
|
+
return {
|
|
7
|
+
JSXOpeningElement(node) {
|
|
8
|
+
if (node.name.type === 'JSXIdentifier' && node.name.name === 'kbd') {
|
|
9
|
+
context.report({
|
|
10
|
+
messageId: 'noKbdElement',
|
|
11
|
+
node,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
defaultOptions: [],
|
|
18
|
+
meta: {
|
|
19
|
+
docs: {
|
|
20
|
+
description: 'Intended to be used in Storybook docs to disallow use of the `kbd` HTML element in favor of the `KeyboardKey` component for styling purposes.',
|
|
21
|
+
recommended: 'error',
|
|
22
|
+
},
|
|
23
|
+
messages: {
|
|
24
|
+
noKbdElement: 'Please use the `KeyboardKey` component instead.',
|
|
25
|
+
},
|
|
26
|
+
type: 'suggestion',
|
|
27
|
+
schema: [],
|
|
28
|
+
},
|
|
29
|
+
name: 'no-kbd-element',
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=no-kbd-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-kbd-element.js","sourceRoot":"","sources":["../src/no-kbd-element.ts"],"names":[],"mappings":";;AAAA,6CAA0C;AAE1C,kBAAe,IAAA,uBAAU,EAAC;IACxB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,iBAAiB,CAAC,IAAI;gBACpB,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,eAAe,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,EAAE;oBAClE,OAAO,CAAC,MAAM,CAAC;wBACb,SAAS,EAAE,cAAc;wBACzB,IAAI;qBACL,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;IACD,cAAc,EAAE,EAAE;IAClB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EACT,+IAA+I;YACjJ,WAAW,EAAE,OAAO;SACrB;QACD,QAAQ,EAAE;YACR,YAAY,EAAE,iDAAiD;SAChE;QACD,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,EAAE;KACX;IACD,IAAI,EAAE,gBAAgB;CACvB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-gamut",
|
|
3
3
|
"description": "Shared eslint plugin for Gamut applications",
|
|
4
|
-
"version": "2.4.1
|
|
4
|
+
"version": "2.4.1",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@typescript-eslint/utils": "^5.15.0"
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"verify": "tsc --noEmit"
|
|
28
28
|
},
|
|
29
29
|
"types": "./dist/index.d.ts",
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "2434f4c9b000f1952a8a234749e999ac19295882"
|
|
31
31
|
}
|