Skip to content

Commit cec3fb2

Browse files
authored
enable unicorn/prefer-export-from rule (#2964)
1 parent f9aa87d commit cec3fb2

4 files changed

Lines changed: 18 additions & 16 deletions

File tree

.changeset/fluffy-gifts-relate.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'graphiql': patch
3+
'@graphiql/react': patch
4+
---
5+
6+
enable `unicorn/prefer-export-from` rule

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ module.exports = {
263263
'promise/no-multiple-resolved': 'error',
264264
'sonarjs/no-redundant-jump': 'error',
265265
'unicorn/prefer-logical-operator-over-ternary': 'error',
266+
'unicorn/prefer-export-from': ['error', { ignoreUsedVariables: true }],
266267
'unicorn/throw-new-error': 'error',
267268
'unicorn/prefer-includes': 'error',
268269
'no-lonely-if': 'error',
Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
import { HeaderEditor } from './header-editor';
2-
import { ImagePreview } from './image-preview';
3-
import { QueryEditor } from './query-editor';
4-
import { ResponseEditor } from './response-editor';
5-
import { VariableEditor } from './variable-editor';
6-
7-
export {
8-
HeaderEditor,
9-
ImagePreview,
10-
QueryEditor,
11-
ResponseEditor,
12-
VariableEditor,
13-
};
1+
export { HeaderEditor } from './header-editor';
2+
export { ImagePreview } from './image-preview';
3+
export { QueryEditor } from './query-editor';
4+
export { ResponseEditor } from './response-editor';
5+
export { VariableEditor } from './variable-editor';

packages/graphiql/src/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
* GraphiQL
1010
*/
1111

12-
import { GraphiQL, GraphiQLInterface } from './components/GraphiQL';
13-
export { GraphiQL, GraphiQLInterface };
1412
export { GraphiQLProvider } from '@graphiql/react';
15-
export default GraphiQL;
1613

1714
/**
1815
* Definitions
@@ -22,3 +19,9 @@ export type {
2219
GraphiQLInterfaceProps,
2320
} from './components/GraphiQL';
2421
export type { GraphiQLProviderProps } from '@graphiql/react';
22+
23+
export {
24+
GraphiQLInterface,
25+
GraphiQL,
26+
GraphiQL as default,
27+
} from './components/GraphiQL';

0 commit comments

Comments
 (0)