From de4236f3d15ad737d2220a0fc5becf821f2615ea Mon Sep 17 00:00:00 2001 From: Adrian Hopek Date: Thu, 31 Mar 2022 09:09:01 +0200 Subject: [PATCH] #99 - tailwind plugin for eslint --- .eslintrc.js | 6 ++ package-lock.json | 26 ++++++ package.json | 1 + resources/js/Pages/Calendar.vue | 36 ++++---- resources/js/Pages/Error.vue | 12 +-- resources/js/Pages/Holidays/Create.vue | 20 ++-- resources/js/Pages/Holidays/Edit.vue | 20 ++-- resources/js/Pages/Holidays/Index.vue | 36 ++++---- resources/js/Pages/Login.vue | 22 ++--- resources/js/Pages/MonthlyUsage.vue | 20 ++-- resources/js/Pages/Users/Create.vue | 66 ++++++------- resources/js/Pages/Users/Edit.vue | 66 ++++++------- resources/js/Pages/Users/Index.vue | 62 ++++++------- resources/js/Pages/VacationLimits.vue | 44 ++++----- resources/js/Pages/VacationRequest/Create.vue | 92 +++++++++---------- resources/js/Pages/VacationRequest/Index.vue | 54 +++++------ .../VacationRequest/IndexForApprovers.vue | 80 ++++++++-------- resources/js/Pages/VacationRequest/Show.vue | 92 +++++++++---------- resources/js/Shared/Activity.vue | 10 +- resources/js/Shared/Layout/AppLayout.vue | 2 +- resources/js/Shared/Layout/GuestLayout.vue | 2 +- resources/js/Shared/MainMenu.vue | 74 +++++++-------- resources/js/Shared/Pagination.vue | 14 +-- resources/js/Shared/VacationBar.vue | 24 ++--- .../js/Shared/VacationTypeCalendarIcon.vue | 2 +- resources/js/Shared/Widgets/AbsenceList.vue | 8 +- .../Widgets/PendingVacationRequests.vue | 8 +- .../js/Shared/Widgets/UpcomingHolidays.vue | 8 +- .../Shared/Widgets/UserVacationRequests.vue | 6 +- resources/js/Shared/Widgets/VacationStats.vue | 34 +++---- resources/js/Shared/Widgets/Welcome.vue | 12 +-- 31 files changed, 496 insertions(+), 463 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index e8d2e95..ba5b8c0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,5 @@ module.exports = { + plugins: ['tailwindcss'], env: { node: true, 'vue/setup-compiler-macros': true, @@ -15,5 +16,10 @@ module.exports = { 'comma-dangle': ['error', 'always-multiline'], 'object-curly-spacing': ['error', 'always'], 'vue/require-default-prop': 0, + 'tailwindcss/classnames-order': 'error', + 'tailwindcss/enforces-negative-arbitrary-values': 'error', + 'tailwindcss/enforces-shorthand': 'error', + 'tailwindcss/no-arbitrary-value': 'error', + 'tailwindcss/no-contradicting-classname': 'error', }, } diff --git a/package-lock.json b/package-lock.json index b584c84..6e6fd67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,6 +34,7 @@ }, "devDependencies": { "eslint": "^8.11.0", + "eslint-plugin-tailwindcss": "^3.5.0", "eslint-plugin-vue": "^8.5.0" } }, @@ -4344,6 +4345,20 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-plugin-tailwindcss": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.5.0.tgz", + "integrity": "sha512-m1NyKX1qii3arb+zWrsNO5R15b27aaEm6m1ie9JM9a6yBrU9Q8H62obzT/U8PSITIucMY864uxljV8MiP7H6xg==", + "dev": true, + "dependencies": { + "fast-glob": "^3.2.5", + "postcss": "^8.4.4", + "tailwindcss": "^3.0.7" + }, + "engines": { + "node": ">=12.13.0" + } + }, "node_modules/eslint-plugin-vue": { "version": "8.5.0", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.5.0.tgz", @@ -12883,6 +12898,17 @@ "v8-compile-cache": "^2.0.3" } }, + "eslint-plugin-tailwindcss": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.5.0.tgz", + "integrity": "sha512-m1NyKX1qii3arb+zWrsNO5R15b27aaEm6m1ie9JM9a6yBrU9Q8H62obzT/U8PSITIucMY864uxljV8MiP7H6xg==", + "dev": true, + "requires": { + "fast-glob": "^3.2.5", + "postcss": "^8.4.4", + "tailwindcss": "^3.0.7" + } + }, "eslint-plugin-vue": { "version": "8.5.0", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.5.0.tgz", diff --git a/package.json b/package.json index 320b280..decb2c6 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ }, "devDependencies": { "eslint": "^8.11.0", + "eslint-plugin-tailwindcss": "^3.5.0", "eslint-plugin-vue": "^8.5.0" } } diff --git a/resources/js/Pages/Calendar.vue b/resources/js/Pages/Calendar.vue index 9e8dc25..cd68451 100644 --- a/resources/js/Pages/Calendar.vue +++ b/resources/js/Pages/Calendar.vue @@ -3,28 +3,28 @@
-

+

Kalendarz urlopów

-
+
- + - + @@ -32,32 +32,32 @@ v-if="nextMonth" as="button" :href="`/vacation/calendar/${nextMonth.value}`" - class="flex items-center justify-center rounded-r-md border border-l-0 border-gray-300 bg-white py-2 px-2 text-gray-400 hover:text-gray-500 focus:relative md:w-9 md:px-2 md:hover:bg-gray-50" + class="flex focus:relative justify-center items-center p-2 text-gray-400 hover:text-gray-500 bg-white rounded-r-md border border-l-0 border-gray-300 md:px-2 md:w-9 md:hover:bg-gray-50" > - + - +
Pobierz plik Excel
- +
-
+
{{ selectedMonth.name }} {{ years.selected.year }}
@@ -65,13 +65,13 @@
{{ day.dayOfMonth }} -

+

{{ day.dayOfWeek }}

@@ -83,9 +83,9 @@ v-for="user in users.data" :key="user.id" > -
+
- +
diff --git a/resources/js/Pages/Error.vue b/resources/js/Pages/Error.vue index 76bfd45..438ae37 100644 --- a/resources/js/Pages/Error.vue +++ b/resources/js/Pages/Error.vue @@ -1,24 +1,24 @@