chore: eslint updates to the tailwind example (#6377)
minor updates to eslint rules in tailwind example
This commit is contained in:
@@ -1,7 +1,29 @@
|
|||||||
/** @type {import('eslint').Linter.Config} */
|
/** @type {import('eslint').Linter.Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
extends: ['plugin:@next/next/core-web-vitals', '@payloadcms'],
|
||||||
|
ignorePatterns: ['**/payload-types.ts'],
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
extends: ['plugin:@typescript-eslint/disable-type-checked'],
|
||||||
|
files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['./src/**/*.ts', './src/**/*.tsx'],
|
||||||
|
rules: {
|
||||||
|
'no-restricted-exports': 'off',
|
||||||
|
'perfectionist/sort-jsx-props': 'warn',
|
||||||
|
'perfectionist/sort-objects': 'warn',
|
||||||
|
'perfectionist/sort-named-exports': 'warn',
|
||||||
|
'jsx-a11y/heading-has-content': 'warn',
|
||||||
|
'jsx-a11y/html-has-lang': 'warn',
|
||||||
|
'perfectionist/sort-imports': 'warn',
|
||||||
|
'perfectionist/sort-named-imports': 'warn',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
project: ['./tsconfig.json'],
|
project: ['./tsconfig.json'],
|
||||||
tsconfigRootDir: __dirname,
|
tsconfigRootDir: __dirname,
|
||||||
},
|
},
|
||||||
|
root: true,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { ReactNode } from 'react'
|
import type { ReactNode } from 'react'
|
||||||
|
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
import { Inter as FontSans } from 'next/font/google'
|
import { Inter as FontSans } from 'next/font/google'
|
||||||
|
import React from 'react'
|
||||||
|
|
||||||
type LayoutProps = {
|
type LayoutProps = {
|
||||||
children: ReactNode
|
children: ReactNode
|
||||||
@@ -15,7 +17,7 @@ const fontSans = FontSans({
|
|||||||
|
|
||||||
const Layout = ({ children }: LayoutProps) => {
|
const Layout = ({ children }: LayoutProps) => {
|
||||||
return (
|
return (
|
||||||
<html>
|
<html lang="en">
|
||||||
<body className={cn('min-h-screen bg-background font-sans antialiased', fontSans.variable)}>
|
<body className={cn('min-h-screen bg-background font-sans antialiased', fontSans.variable)}>
|
||||||
{children}
|
{children}
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import { NextPage } from 'next'
|
import type { NextPage } from 'next'
|
||||||
|
|
||||||
|
import React from 'react'
|
||||||
|
|
||||||
const Page: NextPage = () => {
|
const Page: NextPage = () => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user