eslint-plugin-gamut 2.3.3-alpha.d79ac7.0 → 2.4.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 +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/no-inline-style.d.ts +4 -0
- package/dist/no-inline-style.js +31 -0
- package/dist/no-inline-style.js.map +1 -0
- package/dist/recommended.d.ts +1 -0
- package/dist/recommended.js +1 -0
- package/dist/recommended.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ declare const rules: {
|
|
|
6
6
|
'no-css-standalone': import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"noCssStandalone", never[], {
|
|
7
7
|
'ImportDeclaration[source.value=/.*\\.s?css/]': (node: never) => void;
|
|
8
8
|
}>;
|
|
9
|
+
'no-inline-style': import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"noInlineStyle", never[], {
|
|
10
|
+
JSXAttribute(node: import("@typescript-eslint/types/dist/generated/ast-spec").JSXAttribute): void;
|
|
11
|
+
}>;
|
|
9
12
|
'prefer-themed': import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"preferThemed", never[], {
|
|
10
13
|
TaggedTemplateExpression(node: import("@typescript-eslint/types/dist/generated/ast-spec").TaggedTemplateExpression): void;
|
|
11
14
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -6,12 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
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
|
+
const no_inline_style_1 = __importDefault(require("./no-inline-style"));
|
|
9
10
|
const prefer_themed_1 = __importDefault(require("./prefer-themed"));
|
|
10
11
|
const recommended_1 = __importDefault(require("./recommended"));
|
|
11
12
|
exports.recommended = recommended_1.default;
|
|
12
13
|
const rules = {
|
|
13
14
|
'import-paths': gamut_import_paths_1.default,
|
|
14
15
|
'no-css-standalone': no_css_standalone_1.default,
|
|
16
|
+
'no-inline-style': no_inline_style_1.default,
|
|
15
17
|
'prefer-themed': prefer_themed_1.default,
|
|
16
18
|
};
|
|
17
19
|
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,oEAA2C;AAC3C,gEAAwC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;;;AAAA,8EAAoD;AACpD,4EAAkD;AAClD,wEAA8C;AAC9C,oEAA2C;AAC3C,gEAAwC;AASxB,sBATT,qBAAW,CASS;AAP3B,MAAM,KAAK,GAAG;IACZ,cAAc,EAAE,4BAAgB;IAChC,mBAAmB,EAAE,2BAAe;IACpC,iBAAiB,EAAE,yBAAa;IAChC,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
|
+
JSXAttribute(node) {
|
|
8
|
+
if (node.name.type === 'JSXIdentifier' && node.name.name === 'style') {
|
|
9
|
+
context.report({
|
|
10
|
+
messageId: 'noInlineStyle',
|
|
11
|
+
node,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
defaultOptions: [],
|
|
18
|
+
meta: {
|
|
19
|
+
docs: {
|
|
20
|
+
description: 'Disallow inline style props on JSX elements.',
|
|
21
|
+
recommended: 'error',
|
|
22
|
+
},
|
|
23
|
+
messages: {
|
|
24
|
+
noInlineStyle: 'The use of inline styles is discouraged — consider using styled components, design system utilities, or CSS classes instead.',
|
|
25
|
+
},
|
|
26
|
+
type: 'suggestion',
|
|
27
|
+
schema: [],
|
|
28
|
+
},
|
|
29
|
+
name: 'no-inline-style',
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=no-inline-style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-inline-style.js","sourceRoot":"","sources":["../src/no-inline-style.ts"],"names":[],"mappings":";;AAAA,6CAA0C;AAE1C,kBAAe,IAAA,uBAAU,EAAC;IACxB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,YAAY,CAAC,IAAI;gBACf,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,eAAe,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE;oBACpE,OAAO,CAAC,MAAM,CAAC;wBACb,SAAS,EAAE,eAAe;wBAC1B,IAAI;qBACL,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;IACD,cAAc,EAAE,EAAE;IAClB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EAAE,8CAA8C;YAC3D,WAAW,EAAE,OAAO;SACrB;QACD,QAAQ,EAAE;YACR,aAAa,EACX,8HAA8H;SACjI;QACD,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,EAAE;KACX;IACD,IAAI,EAAE,iBAAiB;CACxB,CAAC,CAAC"}
|
package/dist/recommended.d.ts
CHANGED
package/dist/recommended.js
CHANGED
package/dist/recommended.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommended.js","sourceRoot":"","sources":["../src/recommended.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,KAAK,EAAE;QACL,yBAAyB,EAAE,OAAO;QAClC,qBAAqB,EAAE,KAAK;QAC5B,0BAA0B,EAAE,OAAO;KACpC;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"recommended.js","sourceRoot":"","sources":["../src/recommended.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,KAAK,EAAE;QACL,yBAAyB,EAAE,OAAO;QAClC,uBAAuB,EAAE,OAAO;QAChC,qBAAqB,EAAE,KAAK;QAC5B,0BAA0B,EAAE,OAAO;KACpC;CACF,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
|
+
"version": "2.4.0",
|
|
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": "558c0c28228b11f897420367e30f48f6218171db"
|
|
31
31
|
}
|