Skip to content

Commit

Permalink
Merge pull request #225 from mobeigi/optimise-eslint-config
Browse files Browse the repository at this point in the history
Optimise eslint config, ignore .next folder
  • Loading branch information
mobeigi authored Jan 15, 2025
2 parents 8b7bb7f + cd53c8e commit 50a60fb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions app/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const compat = new FlatCompat({
const globalIgnores = {
ignores: [
'**/node_modules/',
'.next/',
'src/app/(payload)/',
'coverage/',
//TODO: Add supporting for parsing this mjs file
Expand All @@ -23,8 +24,9 @@ const globalIgnores = {
};

// TODO: The Next.js plugin was not detected in your ESLint configuration. See https://nextjs.org/docs/app/api-reference/config/eslint#migrating-existing-config
const nextConfig = [
...compat.extends('next', 'next/core-web-vitals', 'next/typescript'),
const nextConfig = [...compat.extends('next/core-web-vitals', 'next/typescript')];

const typescriptConfig = [
{
rules: {
'@typescript-eslint/ban-ts-comment': 'warn',
Expand Down Expand Up @@ -72,5 +74,6 @@ export default tseslint.config(
tseslint.configs.recommendedTypeChecked,
typedLinting,
...nextConfig,
...typescriptConfig,
...prettierConfig,
);
1 change: 1 addition & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"validator": "^13.12.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.18.0",
"@svgr/webpack": "^8.1.0",
"@testing-library/dom": "^10.4.0",
Expand Down
2 changes: 1 addition & 1 deletion app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
"target": "ES2022"
},
"include": ["svgr.d.ts", "next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "next.config.ts"],
"exclude": ["node_modules", "src/app/(payload)/", "coverage/"]
"exclude": ["**/node_modules/", ".next/", "src/app/(payload)/", "coverage/"]
}
1 change: 1 addition & 0 deletions app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10853,6 +10853,7 @@ __metadata:
resolution: "mobeigi-com-app@workspace:."
dependencies:
"@cedx/akismet": "npm:^17.0.1"
"@eslint/eslintrc": "npm:^3.2.0"
"@eslint/js": "npm:^9.18.0"
"@next/third-parties": "npm:15.1.3"
"@octokit/rest": "npm:^21.1.0"
Expand Down

0 comments on commit 50a60fb

Please sign in to comment.