eslint-plugin-gamut 3.0.3-alpha.3ce5c8.0 → 3.0.3-alpha.5fde3b.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.
@@ -1,4 +1,4 @@
1
- eslint-plugin-gamut:build: cache hit, replaying output e6a5ae231de00b5e
1
+ eslint-plugin-gamut:build: cache hit, replaying output 86a50c0c91ae0946
2
2
  eslint-plugin-gamut:build: $ yarn build:clean && yarn build:compile
3
3
  eslint-plugin-gamut:build: $ rm -rf dist
4
4
  eslint-plugin-gamut:build: $ tsc
package/CHANGELOG.md CHANGED
@@ -3,6 +3,6 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ### 3.0.3-alpha.3ce5c8.0 (2022-03-17)
6
+ ### 3.0.3-alpha.5fde3b.0 (2022-03-21)
7
7
 
8
8
  **Note:** Version bump only for package eslint-plugin-gamut
@@ -1,14 +1,2 @@
1
- export declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleListener = import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleListener>({ name, meta, defaultOptions, create, }: Readonly<{
2
- name: string;
3
- meta: {
4
- docs: {
5
- description: string;
6
- recommended: false | "error" | "warn";
7
- suggestion?: boolean | undefined;
8
- requiresTypeChecking?: boolean | undefined;
9
- extendsBaseRule?: string | boolean | undefined;
10
- };
11
- } & Omit<import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleMetaData<TMessageIds>, "docs">;
12
- defaultOptions: Readonly<TOptions>;
13
- create: (context: Readonly<import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleContext<TMessageIds, TOptions>>, optionsWithDefault: Readonly<TOptions>) => TRuleListener;
14
- }>) => import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleModule<TMessageIds, TOptions, TRuleListener>;
1
+ import { ESLintUtils } from '@typescript-eslint/utils';
2
+ export declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener = import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<TOptions, TMessageIds, TRuleListener>>) => import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<TMessageIds, TOptions, TRuleListener>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createRule = void 0;
4
- const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
5
- exports.createRule = experimental_utils_1.ESLintUtils.RuleCreator((name) => `https://example.com/rule/${name}`);
4
+ const utils_1 = require("@typescript-eslint/utils");
5
+ exports.createRule = utils_1.ESLintUtils.RuleCreator((name) => `https://example.com/rule/${name}`);
6
6
  //# sourceMappingURL=createRule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createRule.js","sourceRoot":"","sources":["../src/createRule.ts"],"names":[],"mappings":";;;AAAA,8EAAoE;AAEvD,QAAA,UAAU,GAAG,gCAAW,CAAC,WAAW,CAC/C,CAAC,IAAI,EAAE,EAAE,CAAC,4BAA4B,IAAI,EAAE,CAC7C,CAAC"}
1
+ {"version":3,"file":"createRule.js","sourceRoot":"","sources":["../src/createRule.ts"],"names":[],"mappings":";;;AAAA,oDAAuD;AAE1C,QAAA,UAAU,GAAG,mBAAW,CAAC,WAAW,CAC/C,CAAC,IAAI,EAAE,EAAE,CAAC,4BAA4B,IAAI,EAAE,CAC7C,CAAC"}
@@ -1,5 +1,5 @@
1
- import { TSESTree } from '@typescript-eslint/experimental-utils';
2
- declare const _default: import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleModule<"removeDist" | "removeSrc" | "useRelativeImport", never[], {
1
+ import { TSESTree } from '@typescript-eslint/utils';
2
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"removeDist" | "removeSrc" | "useRelativeImport", never[], {
3
3
  'ImportDeclaration[source.value=/(^@)codecademy(\\u002F)gamut/]': (node: TSESTree.ImportDeclaration) => void;
4
4
  }>;
5
5
  export default _default;
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import recommended from './recommended';
2
2
  declare const rules: {
3
- 'import-paths': import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleModule<"removeDist" | "removeSrc" | "useRelativeImport", never[], {
4
- 'ImportDeclaration[source.value=/(^@)codecademy(\\u002F)gamut/]': (node: import("@typescript-eslint/types/dist/ast-spec").ImportDeclaration) => void;
3
+ 'import-paths': import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"removeDist" | "removeSrc" | "useRelativeImport", never[], {
4
+ 'ImportDeclaration[source.value=/(^@)codecademy(\\u002F)gamut/]': (node: import("@typescript-eslint/types/dist/generated/ast-spec").ImportDeclaration) => void;
5
5
  }>;
6
- 'no-css-standalone': import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleModule<"noCssStandalone", never[], {
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
- 'prefer-themed': import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleModule<"preferThemed", never[], {
10
- TaggedTemplateExpression(node: import("@typescript-eslint/types/dist/ast-spec").TaggedTemplateExpression): void;
9
+ 'prefer-themed': import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"preferThemed", never[], {
10
+ TaggedTemplateExpression(node: import("@typescript-eslint/types/dist/generated/ast-spec").TaggedTemplateExpression): void;
11
11
  }>;
12
12
  };
13
13
  export { rules, recommended };
@@ -1,4 +1,4 @@
1
- declare const _default: import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleModule<"noCssStandalone", never[], {
1
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"noCssStandalone", never[], {
2
2
  'ImportDeclaration[source.value=/.*\\.s?css/]': (node: never) => void;
3
3
  }>;
4
4
  export default _default;
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
6
+ const utils_1 = require("@typescript-eslint/utils");
7
7
  const no_css_standalone_1 = __importDefault(require("./no-css-standalone"));
8
- const ruleTester = new experimental_utils_1.ESLintUtils.RuleTester({
8
+ const ruleTester = new utils_1.ESLintUtils.RuleTester({
9
9
  parser: '@typescript-eslint/parser',
10
10
  });
11
11
  ruleTester.run('no-css-standalone', no_css_standalone_1.default, {
@@ -1 +1 @@
1
- {"version":3,"file":"no-css-standalone.test.js","sourceRoot":"","sources":["../src/no-css-standalone.test.ts"],"names":[],"mappings":";;;;;AAAA,8EAAoE;AAEpE,4EAAuC;AAEvC,MAAM,UAAU,GAAG,IAAI,gCAAW,CAAC,UAAU,CAAC;IAC5C,MAAM,EAAE,2BAA2B;CACpC,CAAC,CAAC;AAEH,UAAU,CAAC,GAAG,CAAC,mBAAmB,EAAE,2BAAI,EAAE;IACxC,KAAK,EAAE;QACL,EAAE;QACF,0CAA0C;QAC1C,yCAAyC;QACzC,yCAAyC;QACzC,0CAA0C;QAC1C,2CAA2C;QAC3C,yCAAyC;QACzC,0CAA0C;QAC1C,0CAA0C;QAC1C,yCAAyC;QACzC,0CAA0C;QAC1C,yCAAyC;QACzC,0CAA0C;QAC1C,2CAA2C;QAC3C,yCAAyC;QACzC,0CAA0C;QAC1C,0CAA0C;KAC3C;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,0CAA0C;YAChD,MAAM,EAAE;gBACN;oBACE,SAAS,EAAE,iBAAiB;iBAC7B;aACF;SACF;QACD;YACE,IAAI,EAAE,2CAA2C;YACjD,MAAM,EAAE;gBACN;oBACE,SAAS,EAAE,iBAAiB;iBAC7B;aACF;SACF;QACD;YACE,IAAI,EAAE,wCAAwC;YAC9C,MAAM,EAAE;gBACN;oBACE,SAAS,EAAE,iBAAiB;iBAC7B;aACF;SACF;QACD;YACE,IAAI,EAAE,yCAAyC;YAC/C,MAAM,EAAE;gBACN;oBACE,SAAS,EAAE,iBAAiB;iBAC7B;aACF;SACF;KACF;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"no-css-standalone.test.js","sourceRoot":"","sources":["../src/no-css-standalone.test.ts"],"names":[],"mappings":";;;;;AAAA,oDAAuD;AAEvD,4EAAuC;AAEvC,MAAM,UAAU,GAAG,IAAI,mBAAW,CAAC,UAAU,CAAC;IAC5C,MAAM,EAAE,2BAA2B;CACpC,CAAC,CAAC;AAEH,UAAU,CAAC,GAAG,CAAC,mBAAmB,EAAE,2BAAI,EAAE;IACxC,KAAK,EAAE;QACL,EAAE;QACF,0CAA0C;QAC1C,yCAAyC;QACzC,yCAAyC;QACzC,0CAA0C;QAC1C,2CAA2C;QAC3C,yCAAyC;QACzC,0CAA0C;QAC1C,0CAA0C;QAC1C,yCAAyC;QACzC,0CAA0C;QAC1C,yCAAyC;QACzC,0CAA0C;QAC1C,2CAA2C;QAC3C,yCAAyC;QACzC,0CAA0C;QAC1C,0CAA0C;KAC3C;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,0CAA0C;YAChD,MAAM,EAAE;gBACN;oBACE,SAAS,EAAE,iBAAiB;iBAC7B;aACF;SACF;QACD;YACE,IAAI,EAAE,2CAA2C;YACjD,MAAM,EAAE;gBACN;oBACE,SAAS,EAAE,iBAAiB;iBAC7B;aACF;SACF;QACD;YACE,IAAI,EAAE,wCAAwC;YAC9C,MAAM,EAAE;gBACN;oBACE,SAAS,EAAE,iBAAiB;iBAC7B;aACF;SACF;QACD;YACE,IAAI,EAAE,yCAAyC;YAC/C,MAAM,EAAE;gBACN;oBACE,SAAS,EAAE,iBAAiB;iBAC7B;aACF;SACF;KACF;CACF,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- declare const _default: import("@typescript-eslint/experimental-utils/dist/ts-eslint/Rule").RuleModule<"preferThemed", never[], {
2
- TaggedTemplateExpression(node: import("@typescript-eslint/types/dist/ast-spec").TaggedTemplateExpression): void;
1
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"preferThemed", never[], {
2
+ TaggedTemplateExpression(node: import("@typescript-eslint/types/dist/generated/ast-spec").TaggedTemplateExpression): void;
3
3
  }>;
4
4
  export default _default;
@@ -1,24 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
3
+ const utils_1 = require("@typescript-eslint/utils");
4
4
  const createRule_1 = require("./createRule");
5
- const utils_1 = require("./utils");
5
+ const utils_2 = require("./utils");
6
6
  exports.default = (0, createRule_1.createRule)({
7
- // @to-do: create helper function to get node
8
7
  create(context) {
9
8
  return {
10
9
  TaggedTemplateExpression(node) {
11
- if (node.tag.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression) {
10
+ if (node.tag.type === utils_1.AST_NODE_TYPES.MemberExpression) {
12
11
  if (node.tag.object.type !== 'Identifier')
13
12
  return;
14
13
  const expressionVariable = node.tag.object.name;
15
14
  const arrowFuncExpression = node.quasi.expressions[0];
16
- if (arrowFuncExpression?.type !== experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression)
15
+ if (arrowFuncExpression?.type !== utils_1.AST_NODE_TYPES.ArrowFunctionExpression)
17
16
  return;
18
- if (!(0, utils_1.isNamedVariableTheme)(arrowFuncExpression))
17
+ if (!(0, utils_2.isNamedVariableTheme)(arrowFuncExpression))
19
18
  return;
20
19
  if (expressionVariable === 'styled') {
21
- const { themeValueKey, themeCategory } = (0, utils_1.checkArrowFuncBodyTypesAndReturnThemeVars)(arrowFuncExpression) ||
20
+ const { themeValueKey, themeCategory } = (0, utils_2.checkArrowFuncBodyTypesAndReturnThemeVars)(arrowFuncExpression) ||
22
21
  {};
23
22
  if (!themeValueKey)
24
23
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"prefer-themed.js","sourceRoot":"","sources":["../src/prefer-themed.ts"],"names":[],"mappings":";;AAAA,8EAAuE;AAEvE,6CAA0C;AAC1C,mCAGiB;AAEjB,kBAAe,IAAA,uBAAU,EAAC;IACxB,6CAA6C;IAE7C,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,wBAAwB,CAAC,IAAI;gBAC3B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,mCAAc,CAAC,gBAAgB,EAAE;oBACrD,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,YAAY;wBAAE,OAAO;oBAClD,MAAM,kBAAkB,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;oBAChD,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;oBAEtD,IACE,mBAAmB,EAAE,IAAI,KAAK,mCAAc,CAAC,uBAAuB;wBAEpE,OAAO;oBAET,IAAI,CAAC,IAAA,4BAAoB,EAAC,mBAAmB,CAAC;wBAAE,OAAO;oBAEvD,IAAI,kBAAkB,KAAK,QAAQ,EAAE;wBACnC,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,GACpC,IAAA,iDAAyC,EAAC,mBAAmB,CAAC;4BAC9D,EAAE,CAAC;wBAEL,IAAI,CAAC,aAAa;4BAAE,OAAO;wBAE3B,OAAO,CAAC,MAAM,CAAC;4BACb,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE;gCACb,OAAO,KAAK,CAAC,WAAW,CACtB,mBAAmB,EACnB,WAAW,aAAa,IAAI,aAAa,IAAI,CAC9C,CAAC;4BACJ,CAAC;4BACD,SAAS,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wBAE3B,OAAO,CAAC,MAAM,CAAC;4BACb,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE;gCACb,OAAO,KAAK,CAAC,WAAW,CACtB,mBAAmB,EACnB,WAAW,aAAa,IAAI,aAAa,IAAI,CAC9C,CAAC;4BACJ,CAAC;4BACD,SAAS,EAAE,cAAc;4BACzB,IAAI;yBACL,CAAC,CAAC;qBACJ;iBACF;YACH,CAAC;SACF,CAAC;IACJ,CAAC;IACD,cAAc,EAAE,EAAE;IAClB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EAAE,6BAA6B;YAC1C,WAAW,EAAE,OAAO;SACrB;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,YAAY,EACV,iEAAiE;SACpE;QACD,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,EAAE;KACX;IACD,IAAI,EAAE,eAAe;CACtB,CAAC,CAAC"}
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
6
+ const utils_1 = require("@typescript-eslint/utils");
7
7
  const prefer_themed_1 = __importDefault(require("./prefer-themed"));
8
- const ruleTester = new experimental_utils_1.ESLintUtils.RuleTester({
8
+ const ruleTester = new utils_1.ESLintUtils.RuleTester({
9
9
  parser: '@typescript-eslint/parser',
10
10
  });
11
11
  ruleTester.run('prefer-themed', prefer_themed_1.default, {
@@ -1 +1 @@
1
- {"version":3,"file":"prefer-themed.test.js","sourceRoot":"","sources":["../src/prefer-themed.test.ts"],"names":[],"mappings":";;;;;AAAA,8EAAoE;AAEpE,oEAAmC;AAEnC,MAAM,UAAU,GAAG,IAAI,gCAAW,CAAC,UAAU,CAAC;IAC5C,MAAM,EAAE,2BAA2B;CACpC,CAAC,CAAC;AAEH,UAAU,CAAC,GAAG,CAAC,eAAe,EAAE,uBAAI,EAAE;IACpC,KAAK,EAAE;QACL,EAAE;QACF;;GAED;QACC;;GAED;QACC;;;;;CAKH;KACE;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE;;GAET;YACG,MAAM,EAAE;gBACN;oBACE,SAAS,EAAE,cAAc;iBAC1B;aACF;YACD,MAAM,EAAE;;GAEX;SACE;KACF;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"prefer-themed.test.js","sourceRoot":"","sources":["../src/prefer-themed.test.ts"],"names":[],"mappings":";;;;;AAAA,oDAAuD;AAEvD,oEAAmC;AAEnC,MAAM,UAAU,GAAG,IAAI,mBAAW,CAAC,UAAU,CAAC;IAC5C,MAAM,EAAE,2BAA2B;CACpC,CAAC,CAAC;AAEH,UAAU,CAAC,GAAG,CAAC,eAAe,EAAE,uBAAI,EAAE;IACpC,KAAK,EAAE;QACL,EAAE;QACF;;GAED;QACC;;GAED;QACC;;;;;CAKH;KACE;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE;;GAET;YACG,MAAM,EAAE;gBACN;oBACE,SAAS,EAAE,cAAc;iBAC1B;aACF;YACD,MAAM,EAAE;;GAEX;SACE;KACF;CACF,CAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  declare const _default: {
2
2
  rules: {
3
- 'eslint-plugin-gamut/no-css-standalone': string;
4
- 'eslint-plugin-gamut/prefer-themed': string;
5
- 'eslint-plugin-gamut/gamut-import-paths': string;
3
+ 'gamut/no-css-standalone': string;
4
+ 'gamut/prefer-themed': string;
5
+ 'gamut/gamut-import-paths': string;
6
6
  };
7
7
  };
8
- export = _default;
8
+ export default _default;
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
- module.exports = {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
3
4
  rules: {
4
- 'eslint-plugin-gamut/no-css-standalone': 'off',
5
- 'eslint-plugin-gamut/prefer-themed': 'off',
6
- 'eslint-plugin-gamut/gamut-import-paths': 'error',
5
+ 'gamut/no-css-standalone': 'error',
6
+ 'gamut/prefer-themed': 'off',
7
+ 'gamut/gamut-import-paths': 'error',
7
8
  },
8
9
  };
9
10
  //# sourceMappingURL=recommended.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recommended.js","sourceRoot":"","sources":["../src/recommended.ts"],"names":[],"mappings":";AAAA,iBAAS;IACP,KAAK,EAAE;QACL,uCAAuC,EAAE,KAAK;QAC9C,mCAAmC,EAAE,KAAK;QAC1C,wCAAwC,EAAE,OAAO;KAClD;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,qBAAqB,EAAE,KAAK;QAC5B,0BAA0B,EAAE,OAAO;KACpC;CACF,CAAC"}
package/dist/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { TSESTree } from '@typescript-eslint/experimental-utils';
1
+ import { TSESTree } from '@typescript-eslint/utils';
2
2
  export declare const isNamedVariableTheme: (arrowExpression: TSESTree.ArrowFunctionExpression) => boolean;
3
3
  export declare const checkArrowFuncBodyTypesAndReturnThemeVars: (arrowFuncExpression: TSESTree.ArrowFunctionExpression) => false | {
4
4
  themeValueKey: string;
package/dist/utils.js CHANGED
@@ -1,23 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkArrowFuncBodyTypesAndReturnThemeVars = exports.isNamedVariableTheme = void 0;
4
- const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
4
+ const utils_1 = require("@typescript-eslint/utils");
5
5
  const isNamedVariableTheme = (arrowExpression) => {
6
6
  const argObject = arrowExpression.params[0];
7
- if (argObject?.type !== experimental_utils_1.AST_NODE_TYPES.ObjectPattern)
7
+ if (argObject?.type !== utils_1.AST_NODE_TYPES.ObjectPattern)
8
8
  return false;
9
9
  const argumentVariable = argObject.properties[0].value;
10
- if (argumentVariable?.type !== experimental_utils_1.AST_NODE_TYPES.Identifier)
10
+ if (argumentVariable?.type !== utils_1.AST_NODE_TYPES.Identifier)
11
11
  return false;
12
12
  const namedArgumentVariable = argumentVariable.name;
13
13
  return namedArgumentVariable === 'theme';
14
14
  };
15
15
  exports.isNamedVariableTheme = isNamedVariableTheme;
16
16
  const checkArrowFuncBodyTypesAndReturnThemeVars = (arrowFuncExpression) => {
17
- if (arrowFuncExpression.body.type !== experimental_utils_1.AST_NODE_TYPES.MemberExpression ||
18
- arrowFuncExpression.body.object.type !== experimental_utils_1.AST_NODE_TYPES.MemberExpression ||
19
- arrowFuncExpression.body.property.type !== experimental_utils_1.AST_NODE_TYPES.Identifier ||
20
- arrowFuncExpression.body.object.property.type !== experimental_utils_1.AST_NODE_TYPES.Identifier)
17
+ if (arrowFuncExpression.body.type !== utils_1.AST_NODE_TYPES.MemberExpression ||
18
+ arrowFuncExpression.body.object.type !== utils_1.AST_NODE_TYPES.MemberExpression ||
19
+ arrowFuncExpression.body.property.type !== utils_1.AST_NODE_TYPES.Identifier ||
20
+ arrowFuncExpression.body.object.property.type !== utils_1.AST_NODE_TYPES.Identifier)
21
21
  return false;
22
22
  const themeValueKey = arrowFuncExpression.body.property.name;
23
23
  const themeCategory = arrowFuncExpression.body.object.property.name;
package/dist/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAA,8EAG+C;AAExC,MAAM,oBAAoB,GAAG,CAClC,eAAiD,EACjD,EAAE;IACF,MAAM,SAAS,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAE5C,IAAI,SAAS,EAAE,IAAI,KAAK,mCAAc,CAAC,aAAa;QAAE,OAAO,KAAK,CAAC;IACnE,MAAM,gBAAgB,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAEvD,IAAI,gBAAgB,EAAE,IAAI,KAAK,mCAAc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,sBAAc,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC;IACvE,MAAM,qBAAqB,GAAG,gBAAgB,CAAC,IAAI,CAAC;IAEpD,OAAO,qBAAqB,KAAK,OAAO,CAAC;AAC3C,CAAC,CAAC;AAZW,QAAA,oBAAoB,wBAY/B;AAEK,MAAM,yCAAyC,GAAG,CACvD,mBAAqD,EACrD,EAAE;IACF,IACE,mBAAmB,CAAC,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QACjE,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QACxE,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,sBAAc,CAAC,UAAU;QACpE,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,sBAAc,CAAC,UAAU;QAE3E,OAAO,KAAK,CAAC;IAEf,MAAM,aAAa,GAAG,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC7D,MAAM,aAAa,GAAG,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;IAEpE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC;AAC1C,CAAC,CAAC;AAfW,QAAA,yCAAyC,6CAepD"}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "gamut-styles"
9
9
  ],
10
10
  "name": "eslint-plugin-gamut",
11
- "version": "3.0.3-alpha.3ce5c8.0",
11
+ "version": "3.0.3-alpha.5fde3b.0",
12
12
  "license": "MIT",
13
13
  "main": "./dist/index.js",
14
14
  "module": "dist/index.js",
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "types": "./dist/index.d.ts",
30
30
  "dependencies": {
31
- "@typescript-eslint/experimental-utils": "^5.7.0",
32
- "eslint": "^8.4.1"
31
+ "@typescript-eslint/utils": "^5.15.0"
33
32
  },
34
33
  "devDependencies": {
35
- "@types/eslint": "^8.2.1"
34
+ "@types/eslint": "^8.4.1",
35
+ "eslint": "^8.11.0"
36
36
  },
37
- "gitHead": "264aac0874888638657bd4890b89b47b9f90aa87"
37
+ "gitHead": "51fd27b6eed76080dbbe6a219b22448649b70a91"
38
38
  }