Skip to content

Commit c0ed2a6

Browse files
authored
website: fix build (#4578)
fix regression that landed in #4301 Nextra requires the extensionless version, but we tried to go for the .js extension to satisfy some lint rules. This PR adjusts the lint rules.
1 parent 4c32a02 commit c0ed2a6

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

eslint.config.mjs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,10 +868,26 @@ export default tsConfig(
868868
rules: {
869869
...reactHooksPlugin.configs.recommended.rules,
870870
'no-restricted-exports': 'off',
871+
'import/extensions': [
872+
'error',
873+
'ignorePackages',
874+
{
875+
ts: 'never',
876+
tsx: 'never',
877+
},
878+
],
871879
'import/no-default-export': 'off',
880+
'import/no-extraneous-dependencies': 'off',
872881
'import/no-nodejs-modules': 'off',
873-
'import/unambiguous': 'off',
874882
'n/no-missing-import': 'off', // allows linting from root of project when website packages are not installed
883+
'n/file-extension-in-import': [
884+
'error',
885+
'always',
886+
{
887+
'': 'never',
888+
},
889+
],
890+
'import/unambiguous': 'off',
875891
},
876892
},
877893
);

website/theme.config.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
GraphQLWordmarkLogo,
1212
StackOverflowIcon,
1313
TwitterIcon,
14-
} from './icons/index.js';
14+
} from './icons/index';
1515

1616
const graphQLLogo = (
1717
<GraphQLWordmarkLogo className="h-8 nextra-logo" title="GraphQL" />

0 commit comments

Comments
 (0)