Skip to content

Commit

Permalink
fix: rename next to nextjs
Browse files Browse the repository at this point in the history
  • Loading branch information
mfeltscher committed Dec 6, 2024
1 parent 9adebc0 commit 4e54a29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default configs.typescript;
export default configs.react;

// .. or Next.js applications
export default configs.next;
export default configs.nextjs;
```

### Legacy Config (`.eslintrc`)
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@ const flatConfigNext = () =>
return config;
});

const flatConfigReact = (includeNextConfig = false) =>
const flatConfigReact = (includeNextJsConfig = false) =>
tsEslint.config(
flatConfigTypescript,
reactPlugin.configs.flat!.recommended as unknown as Linter.Config,
reactPlugin.configs.flat!['jsx-runtime'] as unknown as Linter.Config,
...(includeNextConfig ? flatConfigNext() : []),
...(includeNextJsConfig ? flatConfigNext() : []),
{ rules: reactRules },
);

export const configs = {
typescript: flatConfigTypescript,
react: flatConfigReact(),
next: flatConfigReact(true),
nextjs: flatConfigReact(true),
};

export const generateLegacyConfig = (react: boolean): Linter.LegacyConfig => ({
Expand Down

0 comments on commit 4e54a29

Please sign in to comment.