Skip to content

Commit 900a909

Browse files
authored
config
1 parent 369bbc2 commit 900a909

File tree

5 files changed

+48
-38
lines changed

5 files changed

+48
-38
lines changed

eslint.config.js

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,57 @@
1-
import prettier from 'eslint-config-prettier';
21
import vue from 'eslint-plugin-vue';
3-
42
import {
53
defineConfigWithVueTs,
64
vueTsConfigs,
75
} from '@vue/eslint-config-typescript';
6+
import eslint from '@eslint/js';
7+
import globals from 'globals';
88

9-
export default defineConfigWithVueTs(
10-
vue.configs['flat/recommended'],
11-
vueTsConfigs.recommended,
9+
export default [
10+
// Global ignores
1211
{
1312
ignores: [
14-
'vendor',
1513
'node_modules',
14+
'vendor',
15+
'dist',
1616
'public',
1717
'bootstrap/ssr',
1818
],
1919
},
20+
// JavaScript files
2021
{
21-
rules: {
22-
'vue/require-default-prop': 'off',
23-
'vue/attribute-hyphenation': 'off',
24-
'vue/v-on-event-hyphenation': 'off',
25-
'vue/multi-word-component-names': 'off',
26-
'vue/block-lang': 'off',
27-
'@typescript-eslint/no-explicit-any': 'off',
22+
files: ['**/*.js'],
23+
...eslint.configs.recommended,
24+
languageOptions: {
25+
ecmaVersion: 'latest',
26+
sourceType: 'module',
27+
globals: {
28+
...globals.browser,
29+
...globals.node,
30+
process: 'readonly',
31+
module: 'readonly',
32+
require: 'readonly',
33+
window: 'readonly',
34+
},
2835
},
2936
},
30-
prettier
31-
);
37+
// Vue and TypeScript files
38+
...defineConfigWithVueTs(
39+
vue.configs['flat/recommended'],
40+
vueTsConfigs.recommended,
41+
{
42+
rules: {
43+
'vue/require-default-prop': 'off',
44+
'vue/attribute-hyphenation': 'off',
45+
'vue/v-on-event-hyphenation': 'off',
46+
'vue/multi-word-component-names': 'off',
47+
'vue/block-lang': 'off',
48+
'vue/no-v-html': 'off',
49+
'vue/html-indent': ['error', 4],
50+
'@typescript-eslint/no-explicit-any': 'off',
51+
indent: ['error', 4],
52+
semi: ['error', 'always'],
53+
'linebreak-style': ['error', 'unix'],
54+
},
55+
}
56+
),
57+
];

jsconfig.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"dev": "vite",
66
"build": "vite build",
7-
"lint": "eslint ."
7+
"lint": "eslint . --fix"
88
},
99
"devDependencies": {
1010
"@eslint/js": "^9.18.0",
@@ -28,7 +28,6 @@
2828
"@vueuse/core": "^13.0.0",
2929
"globals": "^16.0.0",
3030
"laravel-vite-plugin": "^1.2.0",
31-
"lodash": "^4.17.21",
3231
"lodash-es": "^4.17.21",
3332
"lucide-vue-next": "^0.485.0",
3433
"primevue": "^4.3.3",

resources/js/app.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ import PageTitleSection from '@/components/PageTitleSection.vue';
1515
import customThemePreset from '@/theme/noir-preset';
1616
import { useColorMode } from '@vueuse/core';
1717

18+
/* global Ziggy */
1819
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
19-
20-
// Set Light/Dark Color Mode
21-
const colorMode = useColorMode({ emitAuto: true });
20+
const colorMode = useColorMode({ emitAuto: true }); // Set Light/Dark Color Mode
2221

2322
createInertiaApp({
2423
title: (title) => `${title} - ${appName}`,

tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"allowImportingTsExtensions": true,
55
"module": "ESNext",
66
"moduleResolution": "bundler",
7-
"jsx": "preserve",
87
"strict": true,
98
"isolatedModules": true,
109
"target": "ESNext",
@@ -25,5 +24,9 @@
2524
"resources/js/**/*.ts",
2625
"resources/js/**/*.d.ts",
2726
"resources/js/**/*.vue"
27+
],
28+
"exclude": [
29+
"node_modules",
30+
"public"
2831
]
2932
}

0 commit comments

Comments
 (0)