@atlaskit/eslint-plugin-platform 0.11.0 → 0.13.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.
Files changed (98) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +3 -1
  3. package/afm-cc/tsconfig.json +1 -2
  4. package/afm-jira/tsconfig.json +19 -19
  5. package/dist/cjs/index.js +42 -24
  6. package/dist/cjs/rules/compiled/expand-border-shorthand/index.js +100 -0
  7. package/dist/cjs/rules/{no-alias → feature-gating/no-alias}/index.js +1 -1
  8. package/dist/cjs/rules/{prefer-fg → feature-gating/prefer-fg}/index.js +1 -1
  9. package/dist/cjs/rules/{static-feature-flags → feature-gating/static-feature-flags}/index.js +1 -1
  10. package/dist/cjs/rules/{utils.js → feature-gating/utils.js} +1 -1
  11. package/dist/es2019/index.js +43 -22
  12. package/dist/es2019/rules/compiled/expand-border-shorthand/index.js +92 -0
  13. package/dist/es2019/rules/{no-alias → feature-gating/no-alias}/index.js +1 -1
  14. package/dist/es2019/rules/{prefer-fg → feature-gating/prefer-fg}/index.js +1 -1
  15. package/dist/es2019/rules/{static-feature-flags → feature-gating/static-feature-flags}/index.js +1 -1
  16. package/dist/es2019/rules/{utils.js → feature-gating/utils.js} +1 -1
  17. package/dist/esm/index.js +42 -24
  18. package/dist/esm/rules/compiled/expand-border-shorthand/index.js +94 -0
  19. package/dist/esm/rules/{no-alias → feature-gating/no-alias}/index.js +1 -1
  20. package/dist/esm/rules/{prefer-fg → feature-gating/prefer-fg}/index.js +1 -1
  21. package/dist/esm/rules/{static-feature-flags → feature-gating/static-feature-flags}/index.js +1 -1
  22. package/dist/esm/rules/{utils.js → feature-gating/utils.js} +1 -1
  23. package/dist/types/index.d.ts +31 -7
  24. package/dist/types/rules/compiled/expand-border-shorthand/index.d.ts +3 -0
  25. package/dist/types-ts4.5/index.d.ts +31 -7
  26. package/dist/types-ts4.5/rules/compiled/expand-border-shorthand/index.d.ts +3 -0
  27. package/package.json +2 -2
  28. package/src/index.tsx +47 -22
  29. package/src/rules/compiled/README.md +3 -0
  30. package/src/rules/compiled/expand-border-shorthand/README.md +51 -0
  31. package/src/rules/compiled/expand-border-shorthand/__tests__/rule.test.ts +186 -0
  32. package/src/rules/compiled/expand-border-shorthand/index.ts +109 -0
  33. package/src/rules/{ensure-valid-yarn-protocol-usage → ensure-valid-platform-yarn-protocol-usage}/__tests__/unit/rule.test.ts +1 -1
  34. package/src/rules/feature-gating/README.md +8 -0
  35. package/src/rules/{inline-usage → feature-gating/inline-usage}/__tests__/rule.test.tsx +1 -1
  36. package/src/rules/{no-alias → feature-gating/no-alias}/__tests__/rule.test.tsx +1 -1
  37. package/src/rules/{no-alias → feature-gating/no-alias}/index.tsx +1 -1
  38. package/src/rules/{no-module-level-eval → feature-gating/no-module-level-eval}/__tests__/test.tsx +1 -1
  39. package/src/rules/{no-module-level-eval-nav4 → feature-gating/no-module-level-eval-nav4}/__tests__/test.tsx +1 -1
  40. package/src/rules/{no-preconditioning → feature-gating/no-preconditioning}/__tests__/rule.test.tsx +1 -1
  41. package/src/rules/{prefer-fg → feature-gating/prefer-fg}/__tests__/rule.test.tsx +1 -1
  42. package/src/rules/{prefer-fg → feature-gating/prefer-fg}/index.tsx +1 -1
  43. package/src/rules/{static-feature-flags → feature-gating/static-feature-flags}/__tests__/test.tsx +1 -1
  44. package/src/rules/{static-feature-flags → feature-gating/static-feature-flags}/index.tsx +1 -1
  45. package/src/rules/{use-recommended-utils → feature-gating/use-recommended-utils}/__tests__/rule.test.tsx +1 -1
  46. package/src/rules/{utils.tsx → feature-gating/utils.tsx} +1 -1
  47. /package/dist/cjs/rules/{ensure-valid-yarn-protocol-usage → ensure-valid-platform-yarn-protocol-usage}/index.js +0 -0
  48. /package/dist/cjs/rules/{inline-usage → feature-gating/inline-usage}/index.js +0 -0
  49. /package/dist/cjs/rules/{no-module-level-eval → feature-gating/no-module-level-eval}/index.js +0 -0
  50. /package/dist/cjs/rules/{no-module-level-eval-nav4 → feature-gating/no-module-level-eval-nav4}/index.js +0 -0
  51. /package/dist/cjs/rules/{no-preconditioning → feature-gating/no-preconditioning}/index.js +0 -0
  52. /package/dist/cjs/rules/{use-recommended-utils → feature-gating/use-recommended-utils}/index.js +0 -0
  53. /package/dist/es2019/rules/{ensure-valid-yarn-protocol-usage → ensure-valid-platform-yarn-protocol-usage}/index.js +0 -0
  54. /package/dist/es2019/rules/{inline-usage → feature-gating/inline-usage}/index.js +0 -0
  55. /package/dist/es2019/rules/{no-module-level-eval → feature-gating/no-module-level-eval}/index.js +0 -0
  56. /package/dist/es2019/rules/{no-module-level-eval-nav4 → feature-gating/no-module-level-eval-nav4}/index.js +0 -0
  57. /package/dist/es2019/rules/{no-preconditioning → feature-gating/no-preconditioning}/index.js +0 -0
  58. /package/dist/es2019/rules/{use-recommended-utils → feature-gating/use-recommended-utils}/index.js +0 -0
  59. /package/dist/esm/rules/{ensure-valid-yarn-protocol-usage → ensure-valid-platform-yarn-protocol-usage}/index.js +0 -0
  60. /package/dist/esm/rules/{inline-usage → feature-gating/inline-usage}/index.js +0 -0
  61. /package/dist/esm/rules/{no-module-level-eval → feature-gating/no-module-level-eval}/index.js +0 -0
  62. /package/dist/esm/rules/{no-module-level-eval-nav4 → feature-gating/no-module-level-eval-nav4}/index.js +0 -0
  63. /package/dist/esm/rules/{no-preconditioning → feature-gating/no-preconditioning}/index.js +0 -0
  64. /package/dist/esm/rules/{use-recommended-utils → feature-gating/use-recommended-utils}/index.js +0 -0
  65. /package/dist/types/rules/{ensure-valid-yarn-protocol-usage → ensure-valid-platform-yarn-protocol-usage}/index.d.ts +0 -0
  66. /package/dist/types/rules/{inline-usage → feature-gating/inline-usage}/index.d.ts +0 -0
  67. /package/dist/types/rules/{no-alias → feature-gating/no-alias}/index.d.ts +0 -0
  68. /package/dist/types/rules/{no-module-level-eval → feature-gating/no-module-level-eval}/index.d.ts +0 -0
  69. /package/dist/types/rules/{no-module-level-eval-nav4 → feature-gating/no-module-level-eval-nav4}/index.d.ts +0 -0
  70. /package/dist/types/rules/{no-preconditioning → feature-gating/no-preconditioning}/index.d.ts +0 -0
  71. /package/dist/types/rules/{prefer-fg → feature-gating/prefer-fg}/index.d.ts +0 -0
  72. /package/dist/types/rules/{static-feature-flags → feature-gating/static-feature-flags}/index.d.ts +0 -0
  73. /package/dist/types/rules/{use-recommended-utils → feature-gating/use-recommended-utils}/index.d.ts +0 -0
  74. /package/dist/types/rules/{utils.d.ts → feature-gating/utils.d.ts} +0 -0
  75. /package/dist/types-ts4.5/rules/{ensure-valid-yarn-protocol-usage → ensure-valid-platform-yarn-protocol-usage}/index.d.ts +0 -0
  76. /package/dist/types-ts4.5/rules/{inline-usage → feature-gating/inline-usage}/index.d.ts +0 -0
  77. /package/dist/types-ts4.5/rules/{no-alias → feature-gating/no-alias}/index.d.ts +0 -0
  78. /package/dist/types-ts4.5/rules/{no-module-level-eval → feature-gating/no-module-level-eval}/index.d.ts +0 -0
  79. /package/dist/types-ts4.5/rules/{no-module-level-eval-nav4 → feature-gating/no-module-level-eval-nav4}/index.d.ts +0 -0
  80. /package/dist/types-ts4.5/rules/{no-preconditioning → feature-gating/no-preconditioning}/index.d.ts +0 -0
  81. /package/dist/types-ts4.5/rules/{prefer-fg → feature-gating/prefer-fg}/index.d.ts +0 -0
  82. /package/dist/types-ts4.5/rules/{static-feature-flags → feature-gating/static-feature-flags}/index.d.ts +0 -0
  83. /package/dist/types-ts4.5/rules/{use-recommended-utils → feature-gating/use-recommended-utils}/index.d.ts +0 -0
  84. /package/dist/types-ts4.5/rules/{utils.d.ts → feature-gating/utils.d.ts} +0 -0
  85. /package/src/rules/{ensure-valid-yarn-protocol-usage → ensure-valid-platform-yarn-protocol-usage}/index.ts +0 -0
  86. /package/src/rules/{inline-usage → feature-gating/inline-usage}/README.md +0 -0
  87. /package/src/rules/{inline-usage → feature-gating/inline-usage}/index.tsx +0 -0
  88. /package/src/rules/{no-alias → feature-gating/no-alias}/README.md +0 -0
  89. /package/src/rules/{no-module-level-eval → feature-gating/no-module-level-eval}/README.md +0 -0
  90. /package/src/rules/{no-module-level-eval → feature-gating/no-module-level-eval}/index.tsx +0 -0
  91. /package/src/rules/{no-module-level-eval-nav4 → feature-gating/no-module-level-eval-nav4}/README.md +0 -0
  92. /package/src/rules/{no-module-level-eval-nav4 → feature-gating/no-module-level-eval-nav4}/index.tsx +0 -0
  93. /package/src/rules/{no-preconditioning → feature-gating/no-preconditioning}/README.md +0 -0
  94. /package/src/rules/{no-preconditioning → feature-gating/no-preconditioning}/index.tsx +0 -0
  95. /package/src/rules/{prefer-fg → feature-gating/prefer-fg}/README.md +0 -0
  96. /package/src/rules/{static-feature-flags → feature-gating/static-feature-flags}/README.md +0 -0
  97. /package/src/rules/{use-recommended-utils → feature-gating/use-recommended-utils}/README.md +0 -0
  98. /package/src/rules/{use-recommended-utils → feature-gating/use-recommended-utils}/index.tsx +0 -0
@@ -0,0 +1,186 @@
1
+ import { outdent } from 'outdent';
2
+
3
+ import { tester } from '../../../../__tests__/utils/_tester';
4
+ import { expandBorderShorthand } from '../index';
5
+
6
+ const valid_packages_calls_and_imports = [
7
+ ['css', 'css', '@atlaskit/css'],
8
+ ['css', 'css', '@compiled/react'],
9
+ ['styled', 'styled.div', '@compiled/react'],
10
+ ['cssMap', 'cssMap', '@atlaskit/css'],
11
+ ['cssMap', 'cssMap', '@compiled/react'],
12
+ ];
13
+
14
+ const invalid_packages_calls_and_imports = [
15
+ ['css', '@atlaskit/primitives'],
16
+ ['css', '@emotion'],
17
+ ['css', 'styled-components'],
18
+ ];
19
+
20
+ tester.run('expand-border-shorthand', expandBorderShorthand, {
21
+ valid: [
22
+ ...invalid_packages_calls_and_imports.map(([pkg, imp]) => ({
23
+ name: `incorrect packages (${pkg}, ${imp})`,
24
+ code: outdent`
25
+ import {${pkg}} from '${imp}';
26
+
27
+ const styles = ${pkg}({
28
+ border: '1px solid red',
29
+ });
30
+ `,
31
+ })),
32
+ {
33
+ name: 'references correct package',
34
+ code: outdent`
35
+ import {css} from '@compiled/react';
36
+
37
+ const styles = xcss({
38
+ border: '1px solid red',
39
+ });
40
+ `,
41
+ },
42
+ {
43
+ name: 'excluded values',
44
+ code: outdent`
45
+ import {css} from '@compiled/react';
46
+
47
+ const styles = css({
48
+ border: 'none',
49
+ });
50
+ const styles2 = css({
51
+ border: '0',
52
+ });
53
+ const styles3 = css({
54
+ border: 'unset',
55
+ });
56
+ const styles4 = css({
57
+ border: 'none !important',
58
+ });
59
+ const styles5 = css({
60
+ border: \`none\`,
61
+ });
62
+ const styles6 = css({
63
+ border: \`0\`,
64
+ });
65
+ const styles7 = css({
66
+ border: \`unset\`,
67
+ });
68
+ const styles8 = css({
69
+ border: \`none !important\`,
70
+ });
71
+ const styles9 = css({
72
+ border: 0,
73
+ });
74
+ `,
75
+ },
76
+ {
77
+ name: 'not using border shorthand',
78
+ code: outdent`
79
+ import {css} from '@compiled/react';
80
+
81
+ const styles = css({
82
+ borderTop: '2px solid green',
83
+ borderRight: '3px dashed orange',
84
+ borderBottom: '4px double purple',
85
+ borderLeft: '5px groove teal',
86
+ });
87
+ const styles2 = css({
88
+ borderWidth: '1px',
89
+ borderStyle: 'solid',
90
+ borderColor: 'black',
91
+ });
92
+ `,
93
+ },
94
+ ],
95
+ invalid: [
96
+ ...valid_packages_calls_and_imports.map(([pkg, call, imp]) => ({
97
+ name: `simple case (${call}, ${imp})`,
98
+ code: outdent`
99
+ import {${pkg}} from '${imp}';
100
+
101
+ const styles = ${call}({
102
+ border: '1px solid red',
103
+ });
104
+ const styles2 = ${call}({
105
+ border: '1px solid',
106
+ });
107
+ const styles3 = ${call}({
108
+ border: '1px',
109
+ });
110
+ `,
111
+ errors: Array.from(Array(3), () => ({ messageId: 'expandBorderShorthand' })),
112
+ })),
113
+ {
114
+ name: 'nested ObjectExpression',
115
+ code: outdent`
116
+ import {css} from '@compiled/react';
117
+ const styles = {
118
+ inverse: css({
119
+ border: '1px solid red',
120
+ }),
121
+ };
122
+ `,
123
+ errors: [{ messageId: 'expandBorderShorthand' }],
124
+ },
125
+ {
126
+ name: 'pseudo selector',
127
+ code: outdent`
128
+ import {css} from '@compiled/react';
129
+ const styles = css({
130
+ '&:hover': {
131
+ border: '1px solid red',
132
+ '&:hover': {
133
+ border: '1px solid red',
134
+ },
135
+ },
136
+ border: '1px solid red',
137
+ })
138
+ `,
139
+ errors: Array.from(Array(3), () => ({ messageId: 'expandBorderShorthand' })),
140
+ },
141
+ {
142
+ name: 'template string',
143
+ code: outdent`
144
+ import {css} from '@compiled/react';
145
+
146
+ const styles = css({
147
+ border: \`1px solid red\`,
148
+ })
149
+
150
+ const styles2 = css({
151
+ border: \`1px solid \${token('red')}\`,
152
+ })
153
+
154
+ const styles3 = css({
155
+ border: \`1px \${solid} red\`,
156
+ })
157
+
158
+ const styles4 = css({
159
+ border: \`1px red\`,
160
+ })
161
+
162
+ const styles5 = css({
163
+ border: \`1px\`,
164
+ })
165
+
166
+ const styles6 = css({
167
+ border: \` \${token('red')}\`,
168
+ })
169
+ `,
170
+ errors: Array.from(Array(6), () => ({ messageId: 'expandBorderShorthand' })),
171
+ },
172
+ {
173
+ name: 'tokens',
174
+ code: outdent`
175
+ import {css} from '@compiled/react';
176
+ const styles = css({
177
+ border: token('color.border'),
178
+ })
179
+ const styles2 = css({
180
+ border: token('space.025', '2px'),
181
+ })
182
+ `,
183
+ errors: Array.from(Array(2), () => ({ messageId: 'expandBorderShorthand' })),
184
+ },
185
+ ],
186
+ });
@@ -0,0 +1,109 @@
1
+ import type { Rule } from 'eslint';
2
+ import type { Property, Node, ImportDeclaration, CallExpression } from 'estree';
3
+
4
+ const EXCLUDED_VALUES = ['0', 'none', 'unset', 'none !important'];
5
+
6
+ const findCallExpression = (node: Node & { parent?: Node }): CallExpression | null => {
7
+ const parent = node.parent;
8
+ if (!parent) {
9
+ return null;
10
+ }
11
+ if (parent.type === 'CallExpression') {
12
+ return parent;
13
+ }
14
+ return findCallExpression(parent);
15
+ };
16
+
17
+ const separateBorderProperties = (
18
+ borderString: string,
19
+ property: Property,
20
+ context: Rule.RuleContext,
21
+ ) => {
22
+ if (EXCLUDED_VALUES.includes(borderString)) {
23
+ return;
24
+ }
25
+
26
+ context.report({
27
+ node: property,
28
+ messageId: 'expandBorderShorthand',
29
+ });
30
+ };
31
+
32
+ // checks if the function that holds the border property is using an import package that this rule is targeting
33
+ const isCompiledAPI = (importDeclaration: ImportDeclaration, callExpression: CallExpression) => {
34
+ let functionName;
35
+ if (callExpression.callee.type === 'Identifier') {
36
+ functionName = callExpression.callee.name;
37
+ } else if (callExpression.callee.type === 'MemberExpression') {
38
+ if (callExpression.callee.object.type === 'Identifier') {
39
+ functionName = callExpression.callee.object.name;
40
+ }
41
+ }
42
+ if (!functionName) {
43
+ return;
44
+ }
45
+
46
+ return importDeclaration.specifiers.some(
47
+ (specifier) => specifier.type === 'ImportSpecifier' && specifier.imported.name === functionName,
48
+ );
49
+ };
50
+
51
+ export const expandBorderShorthand: Rule.RuleModule = {
52
+ meta: {
53
+ docs: {
54
+ url: 'https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/platform/eslint-plugin/src/rules/compiled/expand-border-shorthand',
55
+ },
56
+ messages: {
57
+ expandBorderShorthand:
58
+ 'Use borderColor, borderStyle, and borderWidth instead of border shorthand',
59
+ },
60
+ type: 'problem',
61
+ },
62
+ create(context) {
63
+ let importDeclaration: ImportDeclaration;
64
+ return {
65
+ 'ImportDeclaration[source.value="@compiled/react"], ImportDeclaration[source.value="@atlaskit/css"]':
66
+ function (node: ImportDeclaration) {
67
+ importDeclaration = node;
68
+ },
69
+ 'Property[key.name="border"]': function (node: Property) {
70
+ const callExpression = findCallExpression(node);
71
+ if (!callExpression) {
72
+ return;
73
+ }
74
+ if (importDeclaration) {
75
+ if (isCompiledAPI(importDeclaration, callExpression)) {
76
+ if (node.value.type === 'Literal' && node.value.value !== null) {
77
+ if (typeof node.value.value === 'string') {
78
+ const borderString = node.value.value;
79
+ separateBorderProperties(borderString, node, context);
80
+ } else if (node.value.raw) {
81
+ const borderString = node.value.raw;
82
+ separateBorderProperties(borderString, node, context);
83
+ }
84
+ } else if (node.value.type === 'TemplateLiteral') {
85
+ if (node.value.quasis.length > 1 || node.value.expressions.length > 0) {
86
+ context.report({
87
+ node,
88
+ messageId: 'expandBorderShorthand',
89
+ });
90
+ return;
91
+ }
92
+ if (node.value.quasis.length === 1 && node.value.quasis[0].value.cooked) {
93
+ const borderQuasis: string = node.value.quasis[0].value.cooked;
94
+ separateBorderProperties(borderQuasis, node, context);
95
+ }
96
+ } else if (node.value.type === 'CallExpression') {
97
+ context.report({
98
+ node,
99
+ messageId: 'expandBorderShorthand',
100
+ });
101
+ }
102
+ }
103
+ }
104
+ },
105
+ };
106
+ },
107
+ };
108
+
109
+ export default expandBorderShorthand;
@@ -3,7 +3,7 @@ import rule from '../../index';
3
3
 
4
4
  const cwd = process.cwd();
5
5
 
6
- describe('test ensure-valid-yarn-protocol-usage rule', () => {
6
+ describe('test ensure-valid-platform-yarn-protocol-usage rule', () => {
7
7
  tester.run('workspace protocol', rule, {
8
8
  valid: [
9
9
  // Workspace protocol is allowed in private packages as dependencies
@@ -0,0 +1,8 @@
1
+ ### Notes
2
+
3
+ - feature-gating/\* rules are copied from
4
+ [eslint-plugin-jira/rules/ff](https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/browse/jira/build-tools/eslint-plugin-jira/rules/ff)
5
+ with small variations as mentioned in this
6
+ [PR](https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/115546/overview)
7
+ - these rules could be a WIP since they are still targeting JFE libraries- see
8
+ [discussion](https://atlassian.slack.com/archives/C026LTWFZ47/p1730776455371799?thread_ts=1730715221.742919&cid=C026LTWFZ47)
@@ -1,5 +1,5 @@
1
1
  import outdent from 'outdent';
2
- import { tester } from '../../../__tests__/utils/_tester';
2
+ import { tester } from '../../../../__tests__/utils/_tester';
3
3
  import rule from '../index';
4
4
 
5
5
  const options = ['ssOnly'];
@@ -1,5 +1,5 @@
1
1
  import outdent from 'outdent';
2
- import { tester } from '../../../__tests__/utils/_tester';
2
+ import { tester } from '../../../../__tests__/utils/_tester';
3
3
  import rule from '../index';
4
4
 
5
5
  tester.run('feature-flags/no-alias', rule, {
@@ -3,7 +3,7 @@ import {
3
3
  FEATURE_API_IMPORT_SOURCES,
4
4
  FEATURE_MOCKS_IMPORT_SOURCES,
5
5
  FEATURE_UTILS_IMPORT_SOURCES,
6
- } from '../constants';
6
+ } from '../../constants';
7
7
  import { isIdentifierImportedFrom, type Node } from '../utils';
8
8
 
9
9
  const IMPORT_SOURCES = new Set([
@@ -1,5 +1,5 @@
1
1
  import outdent from 'outdent';
2
- import { tester } from '../../../__tests__/utils/_tester';
2
+ import { tester } from '../../../../__tests__/utils/_tester';
3
3
  import rule from '../index';
4
4
 
5
5
  tester.run('feature-flags/no-module-level-eval', rule, {
@@ -1,5 +1,5 @@
1
1
  import outdent from 'outdent';
2
- import { tester } from '../../../__tests__/utils/_tester';
2
+ import { tester } from '../../../../__tests__/utils/_tester';
3
3
  import rule from '../index';
4
4
 
5
5
  tester.run('feature-flags/no-module-level-eval', rule, {
@@ -1,5 +1,5 @@
1
1
  import outdent from 'outdent';
2
- import { tester } from '../../../__tests__/utils/_tester';
2
+ import { tester } from '../../../../__tests__/utils/_tester';
3
3
  import rule from '../index';
4
4
 
5
5
  tester.run('feature-flags/no-preconditioning', rule, {
@@ -1,5 +1,5 @@
1
1
  import outdent from 'outdent';
2
- import { tester } from '../../../__tests__/utils/_tester';
2
+ import { tester } from '../../../../__tests__/utils/_tester';
3
3
  import rule from '../index';
4
4
 
5
5
  const errors = [{ messageId: 'autoFixImports' }, { messageId: 'preferFG' }];
@@ -1,6 +1,6 @@
1
1
  import type { Rule } from 'eslint';
2
2
 
3
- import { FEATURE_API_IMPORT_SOURCES } from '../constants';
3
+ import { FEATURE_API_IMPORT_SOURCES } from '../../constants';
4
4
  import { type Node } from '../utils';
5
5
 
6
6
  const validateUsage = (
@@ -1,5 +1,5 @@
1
1
  import outdent from 'outdent';
2
- import { tester } from '../../../__tests__/utils/_tester';
2
+ import { tester } from '../../../../__tests__/utils/_tester';
3
3
  import rule from '../index';
4
4
 
5
5
  const errors = [{ messageId: 'FFLiteral' }];
@@ -1,5 +1,5 @@
1
1
  import type { Rule } from 'eslint';
2
- import { FEATURE_API_IMPORT_SOURCES } from '../constants';
2
+ import { FEATURE_API_IMPORT_SOURCES } from '../../constants';
3
3
  import { getDef, isIdentifierImportedFrom, type Node } from '../utils';
4
4
 
5
5
  const IMPORT_SOURCES = new Set([
@@ -1,5 +1,5 @@
1
1
  import outdent from 'outdent';
2
- import { tester } from '../../../__tests__/utils/_tester';
2
+ import { tester } from '../../../../__tests__/utils/_tester';
3
3
  import rule from '../index';
4
4
 
5
5
  tester.run('feature-flags/use-recommended-utils', rule, {
@@ -1,4 +1,4 @@
1
- import { FEATURE_API_IMPORT_SOURCES } from './constants';
1
+ import { FEATURE_API_IMPORT_SOURCES } from '../constants';
2
2
  import type { Rule, Scope } from 'eslint';
3
3
 
4
4
  export function isIdentifierImportedFrom(