Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
import js from '@eslint/js';
import prettierConfig from 'eslint-config-prettier';
import importPlugin from 'eslint-plugin-import';
import prettier from 'eslint-plugin-prettier';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import sortExports from 'eslint-plugin-sort-exports';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config([
{
ignores: ['dist/**/*']
},
js.configs.recommended,
...tseslint.configs.recommended,
prettierConfig,
{
files: ['**/*.{ts,tsx,js,jsx}'],
plugins: {
react: react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
prettier: prettier,
import: importPlugin,
'sort-exports': sortExports
},
languageOptions: {
ecmaVersion: 2021,
sourceType: 'module',
globals: {
...globals.browser,
...globals.node,
...globals.es2021
},
parser: tseslint.parser,
parserOptions: {
ecmaFeatures: {
jsx: true
}
}
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
},
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
moduleDirectory: ['node_modules', 'src/']
},
typescript: {
alwaysTryTypes: true
}
},
react: {
pragma: 'React',
version: 'detect'
}
},
rules: {
// React Hooks rules
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'off',

// Import ordering rules
'sort-imports': 'off',
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
['parent', 'sibling', 'index']
],
pathGroups: [
{
pattern: 'react',
group: 'external',
position: 'before'
}
],
pathGroupsExcludedImportTypes: ['react'],
'newlines-between': 'never',
alphabetize: {
order: 'asc',
caseInsensitive: true
}
}
],

// Custom rules from your configuration
'sort-exports/sort-exports': 'error',
'prettier/prettier': [
'error',
{
singleQuote: true,
jsxSingleQuote: true,
semi: true,
tabWidth: 2,
bracketSpacing: true,
jsxBracketSameLine: false,
arrowParens: 'always',
trailingComma: 'none',
endOfLine: 'lf'
}
],
'@typescript-eslint/indent': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_'
}
],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/prop-types': 'off',
'react/display-name': 'off',
'linebreak-style': 'off', // handled by prettier
quotes: 'off', // handled by prettier
semi: 'off', // handled by prettier
'object-curly-newline': 'off',
'arrow-body-style': 'off',
'react/jsx-props-no-spreading': 'off',
'implicit-arrow-linebreak': 'off',
'func-names': 'off',
'operator-linebreak': 'off',
'function-paren-newline': 'off',
'react/require-default-props': 'off',
'react/jsx-curly-newline': 'off',
'react/jsx-wrap-multilines': 'off',
'react/destructuring-assignment': 'off',
'no-shadow': 'off',
'react/no-array-index-key': 'off'
}
}
]);
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body class="bg-slate-200">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
49 changes: 49 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "temp-project",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint --ext js,ts,tsx src --fix",
"preview": "vite preview",
"format": "prettier --write . --ignore-path .gitignore --ignore-pattern public/** --ignore-pattern node_modules/** --ignore-pattern yarn.lock"
},
"dependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-router-dom": "^7.7.0"
},
"devDependencies": {
"@eslint/js": "^9.31.0",
"@types/node": "^24.1.0",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-basic-ssl": "^2.1.0",
"@vitejs/plugin-react": "^4.6.0",
"autoprefixer": "^10.4.21",
"eslint": "^9.31.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-prettier": "^5.5.3",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"eslint-plugin-sort-exports": "^0.9.1",
"globals": "^16.3.0",
"postcss": "^8.4.21",
"prettier": "^3.6.2",
"@tailwindcss/cli": "4.0.17",
"@tailwindcss/postcss": "4.1.3",
"@tailwindcss/vite": "4.1.11",
"tailwindcss": "4.0.15",
"typescript": "~5.8.3",
"typescript-eslint": "^8.35.1",
"vite": "^7.0.4",
"vite-plugin-node-polyfills": "^0.24.0",
"vite-plugin-svgr": "^4.3.0",
"vite-tsconfig-paths": "^5.1.4"
}
}
6 changes: 6 additions & 0 deletions postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
"@tailwindcss/postcss": {},
autoprefixer: {},
},
};
Loading