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} */
|
||||
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: {
|
||||
project: ['./tsconfig.json'],
|
||||
tsconfigRootDir: __dirname,
|
||||
},
|
||||
root: true,
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { ReactNode } from 'react'
|
||||
import type { ReactNode } from 'react'
|
||||
|
||||
import { cn } from '@/lib/utils'
|
||||
import { Inter as FontSans } from 'next/font/google'
|
||||
import React from 'react'
|
||||
|
||||
type LayoutProps = {
|
||||
children: ReactNode
|
||||
@@ -15,7 +17,7 @@ const fontSans = FontSans({
|
||||
|
||||
const Layout = ({ children }: LayoutProps) => {
|
||||
return (
|
||||
<html>
|
||||
<html lang="en">
|
||||
<body className={cn('min-h-screen bg-background font-sans antialiased', fontSans.variable)}>
|
||||
{children}
|
||||
</body>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { NextPage } from 'next'
|
||||
import type { NextPage } from 'next'
|
||||
|
||||
import React from 'react'
|
||||
|
||||
const Page: NextPage = () => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user