Skip to content

Commit

Permalink
Initialize ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed May 31, 2024
1 parent 7c57677 commit 4bd0d8a
Show file tree
Hide file tree
Showing 7 changed files with 619 additions and 102 deletions.
83 changes: 45 additions & 38 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,41 +1,48 @@
{
"env": {
"browser": true,
"es2020": true,
"jest": true,
"node": true
},
"settings": {
"react": {
"version": "detect"
}
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:tailwindcss/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
"env": {
"browser": true,
"es2020": true,
"jest": true,
"node": true
},
"settings": {
"react": {
"version": "detect"
}
},
"ecmaVersion": 11,
"sourceType": "module"
},
"plugins": ["react", "react-hooks", "@typescript-eslint", "tailwindcss"],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"tailwindcss/classnames-order": "warn",
"tailwindcss/no-custom-classname": "warn",
"tailwindcss/no-contradicting-classname": "error"
}
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:tailwindcss/recommended",
"plugin:v3xlabs/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 11,
"sourceType": "module"
},
"plugins": [
"react",
"react-hooks",
"@typescript-eslint",
"tailwindcss",
"v3xlabs"
],
"rules": {
"quotes": ["error", "double"],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"tailwindcss/classnames-order": "warn",
"tailwindcss/no-custom-classname": "warn",
"tailwindcss/no-contradicting-classname": "error"
}
}
8 changes: 5 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"trailingComma": "none",
"semi": false,
"singleQuote": true
"trailingComma": "none",
"semi": true,
"singleQuote": false,
"tabWidth": 4,
"useTabs": false
}
107 changes: 54 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,55 @@
{
"name": "reactjs-vite-tailwindcss-boilerplate",
"description": "This is a boilerplate build with Vite, React 18, TypeScript, Vitest, Testing Library, TailwindCSS 3, Eslint and Prettier.",
"version": "0.1.0",
"private": true,
"author": {
"name": "João Paulo Moraes",
"email": "[email protected]",
"url": "https://github.com/joaopaulomoraes"
},
"bugs": {
"url": "https://github.com/joaopaulomoraes/reactjs-vite-tailwindcss-boilerplate/issues",
"email": "[email protected]"
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"serve": "vite preview",
"test": "vitest",
"test:ui": "vitest --ui",
"lint": "eslint src --max-warnings=0",
"typecheck": "tsc --project tsconfig.json --noEmit"
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.4.5",
"@testing-library/react": "^14.3.1",
"@types/node": "^20.12.12",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"@vitest/ui": "^1.6.0",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-tailwindcss": "^3.17.0",
"happy-dom": "^12.10.3",
"postcss": "^8.4.38",
"prettier": "3.1.1",
"tailwindcss": "^3.4.3",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.6.0"
}
}
"name": "reactjs-vite-tailwindcss-boilerplate",
"description": "This is a boilerplate build with Vite, React 18, TypeScript, Vitest, Testing Library, TailwindCSS 3, Eslint and Prettier.",
"version": "0.1.0",
"private": true,
"author": {
"name": "João Paulo Moraes",
"email": "[email protected]",
"url": "https://github.com/joaopaulomoraes"
},
"bugs": {
"url": "https://github.com/joaopaulomoraes/reactjs-vite-tailwindcss-boilerplate/issues",
"email": "[email protected]"
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"serve": "vite preview",
"test": "vitest",
"test:ui": "vitest --ui",
"lint": "eslint -c .eslintrc --ext .ts ./src",
"typecheck": "tsc --project tsconfig.json --noEmit"
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.4.5",
"@testing-library/react": "^14.3.1",
"@types/node": "^20.12.12",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"@vitest/ui": "^1.6.0",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-tailwindcss": "^3.17.0",
"eslint-plugin-v3xlabs": "^1.6.5",
"happy-dom": "^12.10.3",
"postcss": "^8.4.38",
"prettier": "3.1.1",
"tailwindcss": "^3.4.3",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.6.0"
}
}
Loading

0 comments on commit 4bd0d8a

Please sign in to comment.