Skip to content

Commit

Permalink
chore: eslint updates to the tailwind example (#6377)
Browse files Browse the repository at this point in the history
minor updates to eslint rules in tailwind example
  • Loading branch information
paulpopus authored May 16, 2024
1 parent d053778 commit 3456b5f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
22 changes: 22 additions & 0 deletions examples/tailwind-shadcn-ui/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -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,
}
6 changes: 4 additions & 2 deletions examples/tailwind-shadcn-ui/src/app/(app)/layout.tsx
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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>
Expand Down
4 changes: 3 additions & 1 deletion examples/tailwind-shadcn-ui/src/app/(app)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { NextPage } from 'next'
import type { NextPage } from 'next'

import React from 'react'

const Page: NextPage = () => {
return (
Expand Down

0 comments on commit 3456b5f

Please sign in to comment.