Skip to content

Commit

Permalink
Add ESLint plugin with Tailwind CSS support (#763)
Browse files Browse the repository at this point in the history
Co-authored-by: JongHak Seo <unqocn@gmail.com>
  • Loading branch information
RutamBhagat and Jonghakseo authored Oct 6, 2024
1 parent e0f058e commit 8ae4fea
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 22 deletions.
31 changes: 11 additions & 20 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"env": {
"browser": true,
"es6": true,
"node": true
"node": true,
},
"extends": [
"eslint:recommended",
Expand All @@ -11,39 +11,30 @@
"plugin:react-hooks/recommended",
"plugin:import/recommended",
"plugin:jsx-a11y/recommended",
"prettier"
"plugin:tailwindcss/recommended",
"prettier",
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
"jsx": true,
},
"ecmaVersion": "latest",
"sourceType": "module"
"sourceType": "module",
},
"plugins": [
"react",
"@typescript-eslint",
"react-hooks",
"import",
"jsx-a11y",
"prettier"
],
"plugins": ["react", "@typescript-eslint", "react-hooks", "import", "jsx-a11y", "prettier"],
"settings": {
"react": {
"version": "detect"
}
"version": "detect",
},
},
"rules": {
"react/react-in-jsx-scope": "off",
"import/no-unresolved": "off",
"@typescript-eslint/consistent-type-imports": "error"
"@typescript-eslint/consistent-type-imports": "error",
},
"globals": {
"chrome": "readonly"
"chrome": "readonly",
},
"ignorePatterns": [
"watch.js",
"dist/**"
]
"ignorePatterns": ["watch.js", "dist/**"],
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"update-version": "bash update_version.sh"
},
"dependencies": {
"eslint-plugin-tailwindcss": "^3.17.4",
"react": "18.3.1",
"react-dom": "18.3.1"
},
Expand Down
2 changes: 1 addition & 1 deletion pages/content-ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function App() {
}, []);

return (
<div className="flex items-center justify-between gap-2 bg-blue-100 rounded py-1 px-2">
<div className="flex items-center justify-between gap-2 rounded bg-blue-100 px-2 py-1">
<div className="flex gap-1 text-blue-500">
Edit <strong className="text-blue-700">pages/content-ui/src/app.tsx</strong> and save to reload.
</div>
Expand Down
2 changes: 1 addition & 1 deletion pages/options/src/Options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Options = () => {
chrome.tabs.create({ url: 'https://github.com/Jonghakseo/chrome-extension-boilerplate-react-vite' });

return (
<div className={`App ${isLight ? 'text-gray-900 bg-slate-50' : 'text-gray-100 bg-gray-800'}`}>
<div className={`App ${isLight ? 'bg-slate-50 text-gray-900' : 'bg-gray-800 text-gray-100'}`}>
<button onClick={goGithubSite}>
<img src={chrome.runtime.getURL(logo)} className="App-logo" alt="logo" />
</button>
Expand Down
15 changes: 15 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8ae4fea

Please sign in to comment.