Skip to content

Commit

Permalink
feat: add react tailwind config
Browse files Browse the repository at this point in the history
Release-As: 1.0.13
  • Loading branch information
mayconfsousa committed Dec 27, 2024
1 parent dbf26ea commit b47d314
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ export default [
]
```

### React + Tailwind

```js
// eslint.config.mjs

import reactTailwind from 'eslint-config-nebula/react-tailwind'

export default [
...reactTailwind,
// Override any settings from the "eslint-config-nebula" config here
]
```

### VS Code

```jsonc
Expand Down
5 changes: 5 additions & 0 deletions src/react-tailwind.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { Linter } from 'eslint'

declare const reactTailwind: Linter.Config[]

export = reactTailwind
5 changes: 5 additions & 0 deletions src/react-tailwind.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import tailwind from 'eslint-plugin-tailwindcss'

import react from './react.mjs'

export default [...react, ...tailwind.configs['flat/recommended']]
2 changes: 0 additions & 2 deletions src/react.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tailwind from 'eslint-plugin-tailwindcss'
import globals from 'globals'

import node from './node.mjs'
Expand All @@ -15,7 +14,6 @@ export default [
},
react.configs.flat.recommended,
react.configs.flat['jsx-runtime'],
...tailwind.configs['flat/recommended'],
{
plugins: {
'react-hooks': reactHooks,
Expand Down

0 comments on commit b47d314

Please sign in to comment.