Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn committed Jan 23, 2025
1 parent 2decc36 commit d19a63b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ export async function generateMetadata(
};
}

export default async function LocaleLayout(props: Props) {
const params = await props.params;
const {locale} = params;
const {children} = props;
export default async function LocaleLayout({params, children}: Props) {
const {locale} = await params;

// Ensure that the incoming `locale` is valid
if (!routing.locales.includes(locale as any)) {
Expand Down
13 changes: 3 additions & 10 deletions examples/example-app-router-single-locale/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@ const compat = new FlatCompat({
baseDirectory: __dirname
});

export default [
{
ignores: ['**/node_modules/*', '.next/*', 'dist/*']
},
...compat.extends('next/core-web-vitals'),
{
rules: {
// Add any custom rules here
}
}
const eslintConfig = [
...compat.extends('next/core-web-vitals', 'next/typescript')
];
export default eslintConfig;
20 changes: 1 addition & 19 deletions examples/example-pages-router-legacy/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
import path from 'path';
import {fileURLToPath} from 'url';
import {FlatCompat} from '@eslint/eslintrc';
import js from '@eslint/js';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const compat = new FlatCompat({
baseDirectory: __dirname
});

const eslintConfig = [
js.configs.recommended,
...compat.extends('next/core-web-vitals'),
{
rules: {
'react/prop-types': 'off'
}
}
];

export default eslintConfig;
export default [js.configs.recommended];
1 change: 0 additions & 1 deletion examples/example-pages-router-legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"eslint": "^9.11.1",
"eslint-config-next": "15.1.6",
"prettier": "^3.3.3"
},
"prettier": {
Expand Down

0 comments on commit d19a63b

Please sign in to comment.