Skip to content

Commit

Permalink
feat: ✨ add Next.js support
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-guzman committed Dec 3, 2024
1 parent f443b69 commit 668d049
Show file tree
Hide file tree
Showing 13 changed files with 386 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import eslintConfig from "@jimmy.codes/eslint-config";
export default eslintConfig({
astro: false,
jest: false,
nextjs: false,
playwright: false,
react: false,
storybook: false,
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"dependencies": {
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
"@eslint/js": "^9.16.0",
"@next/eslint-plugin-next": "^15.0.3",
"@tanstack/eslint-plugin-query": "^5.62.1",
"@types/eslint": "9.6.1",
"@typescript-eslint/parser": "^8.17.0",
Expand Down Expand Up @@ -102,6 +103,7 @@
"is-ci": "3.0.1",
"jiti": "2.4.1",
"lefthook": "1.8.5",
"next": "15.0.3",
"pkgroll": "2.5.1",
"prettier": "3.4.1",
"react": "18.3.1",
Expand Down
210 changes: 210 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions src/configs/nextjs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { GLOB_NEXTJS } from "../constants";
import { nextjsRules } from "../rules/nextjs";
import { interopDefault } from "../utils/interop-default";

export const nextjsConfig = async () => {
const nextjsPlugin = await interopDefault(import("@next/eslint-plugin-next"));

return [
{
files: GLOB_NEXTJS,
name: "jimmy.codes/next",
plugins: {
"@next/next": nextjsPlugin,
},
rules: await nextjsRules(),
},
];
};
Loading

0 comments on commit 668d049

Please sign in to comment.