eslint-plugin-gamut 2.3.2 → 2.3.3-alpha.171bfb.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 CHANGED
@@ -16,6 +16,7 @@ module.exports = {
16
16
  'gamut/prefer-themed': 'error',
17
17
  'gamut/no-css-standalone': 'error',
18
18
  'gamut/import-paths': 'error',
19
+ 'gamut/no-inline-style': 'error',
19
20
  },
20
21
  };
21
22
  ```
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;AAQxB,sBART,qBAAW,CAQS;AAN3B,MAAM,KAAK,GAAG;IACZ,cAAc,EAAE,4BAAgB;IAChC,mBAAmB,EAAE,2BAAe;IACpC,eAAe,EAAE,uBAAY;CAC9B,CAAC;AAEO,sBAAK"}
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"}
@@ -19,7 +19,7 @@ exports.default = (0, createRule_1.createRule)({
19
19
  recommended: 'error',
20
20
  },
21
21
  messages: {
22
- noCssStandalone: "Do not create anymore stylesheets, please see Gamut's Notion page for current best practices.",
22
+ noCssStandalone: "Do not create anymore stylesheets, please see Gamut's Storybook documentation for current best practices.",
23
23
  },
24
24
  type: 'suggestion',
25
25
  schema: [],
@@ -1 +1 @@
1
- {"version":3,"file":"no-css-standalone.js","sourceRoot":"","sources":["../src/no-css-standalone.ts"],"names":[],"mappings":";;AAAA,6CAA0C;AAE1C,kBAAe,IAAA,uBAAU,EAAC;IACxB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,8CAA8C,EAAE,UAAU,IAAI;gBAC5D,OAAO,CAAC,MAAM,CAAC;oBACb,SAAS,EAAE,iBAAiB;oBAC5B,IAAI;iBACL,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;IACD,cAAc,EAAE,EAAE;IAClB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EAAE,2CAA2C;YACxD,WAAW,EAAE,OAAO;SACrB;QACD,QAAQ,EAAE;YACR,eAAe,EACb,+FAA+F;SAClG;QACD,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,EAAE;KACX;IACD,IAAI,EAAE,mBAAmB;CAC1B,CAAC,CAAC"}
1
+ {"version":3,"file":"no-css-standalone.js","sourceRoot":"","sources":["../src/no-css-standalone.ts"],"names":[],"mappings":";;AAAA,6CAA0C;AAE1C,kBAAe,IAAA,uBAAU,EAAC;IACxB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,8CAA8C,EAAE,UAAU,IAAI;gBAC5D,OAAO,CAAC,MAAM,CAAC;oBACb,SAAS,EAAE,iBAAiB;oBAC5B,IAAI;iBACL,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;IACD,cAAc,EAAE,EAAE;IAClB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EAAE,2CAA2C;YACxD,WAAW,EAAE,OAAO;SACrB;QACD,QAAQ,EAAE;YACR,eAAe,EACb,2GAA2G;SAC9G;QACD,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,EAAE;KACX;IACD,IAAI,EAAE,mBAAmB;CAC1B,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"noInlineStyle", never[], {
2
+ JSXAttribute(node: import("@typescript-eslint/types/dist/generated/ast-spec").JSXAttribute): void;
3
+ }>;
4
+ export default _default;
@@ -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: 'Inline styles are not allowed. Use styled components, CSS classes, or design system utilities 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,wGAAwG;SAC3G;QACD,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,EAAE;KACX;IACD,IAAI,EAAE,iBAAiB;CACxB,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  rules: {
3
3
  'gamut/no-css-standalone': string;
4
+ 'gamut/no-inline-style': string;
4
5
  'gamut/prefer-themed': string;
5
6
  'gamut/gamut-import-paths': string;
6
7
  };
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  rules: {
5
5
  'gamut/no-css-standalone': 'error',
6
+ 'gamut/no-inline-style': 'error',
6
7
  'gamut/prefer-themed': 'off',
7
8
  'gamut/gamut-import-paths': 'error',
8
9
  },
@@ -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.3.2",
4
+ "version": "2.3.3-alpha.171bfb.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": "fd6484a68af37fd17a239a70066b4217c456bbf2"
30
+ "gitHead": "df607a7fbcfc5bd3af19612da9f209a1c9b39968"
31
31
  }