Skip to content

Commit

Permalink
applied some eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
d0wnpour committed Jan 29, 2024
1 parent 1e6cc4a commit 94eb7b1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ module.exports = {
'airbnb/hooks',
'airbnb-typescript',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
ignorePatterns: ['dist', '.eslintrc.cjs','!src/**', 'vite.config.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
tsx: true,
jsx: true,

This comment has been minimized.

Copy link
@gordoney

gordoney Jan 30, 2024

Collaborator

@d0wnpour
Are you sure we need here "jsx", not "tsx"?

This comment has been minimized.

Copy link
@d0wnpour

d0wnpour Jan 30, 2024

Author Contributor

@gordoney Resolved it in this commit

},
project: './tsconfig.json',
},
Expand All @@ -25,5 +25,6 @@ module.exports = {
'warn',
{ allowConstantExport: true },
],
'react/jsx-uses-react': 'off'
},
}
23 changes: 11 additions & 12 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
import { useState } from 'react';
import React, { useState } from 'react';
import reactLogo from './assets/react.svg';
import viteLogo from '/vite.svg';
import './App.css';

function App() {
const [count, setCount] = useState(0)
const [count, setCount] = useState(0);

return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<a href="https://react.dev">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
<button type="button" onClick={() => setCount((pervCount) => pervCount + 1)}>
count is:
{count}
</button>
<p>
Edit <code>src/App.tsx</code> and save to test HMR
Edit
<code>src/App.tsx</code>
and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
</>
)
);
}

export default App
export default App;
6 changes: 3 additions & 3 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App.tsx';
import './index.css'
import App from './App';
import './index.css';

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
</React.StrictMode>,
)
);

0 comments on commit 94eb7b1

Please sign in to comment.