mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-20 03:38:06 +02:00
Enable eslint & typescript for intellisense
This commit is contained in:
parent
f91ebfabb3
commit
2f99849adf
2
.gitignore
vendored
2
.gitignore
vendored
@ -12,7 +12,9 @@
|
|||||||
.env
|
.env
|
||||||
.env.backup
|
.env.backup
|
||||||
.env.production
|
.env.production
|
||||||
|
.eslintrc-auto-import.mjs
|
||||||
.phpunit.result.cache
|
.phpunit.result.cache
|
||||||
|
auto-imports.d.ts
|
||||||
Homestead.json
|
Homestead.json
|
||||||
Homestead.yaml
|
Homestead.yaml
|
||||||
auth.json
|
auth.json
|
||||||
|
28
eslint.config.js
vendored
Normal file
28
eslint.config.js
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import js from '@eslint/js'
|
||||||
|
import eslintPluginVue from 'eslint-plugin-vue'
|
||||||
|
import globals from 'globals'
|
||||||
|
import autoImports from './.eslintrc-auto-import.mjs'
|
||||||
|
import { defineConfig } from "eslint/config";
|
||||||
|
|
||||||
|
// const compat = new FlatCompat()
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
// autoImports,
|
||||||
|
js.configs.recommended,
|
||||||
|
...eslintPluginVue.configs['flat/essential'],
|
||||||
|
{
|
||||||
|
name: 'app/files-to-lint',
|
||||||
|
files: ['resources/js/**/*.{js,mjs,jsx,vue}'],
|
||||||
|
rules: {
|
||||||
|
'vue/multi-word-component-names': 'off',
|
||||||
|
'no-unused-vars': 'off',
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.node,
|
||||||
|
...globals.browser,
|
||||||
|
...autoImports.globals
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
])
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"include": [
|
|
||||||
"./resources/js/*"
|
|
||||||
]
|
|
||||||
}
|
|
1782
package-lock.json
generated
1782
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -7,6 +7,7 @@
|
|||||||
"rebuild": "vite build --watch"
|
"rebuild": "vite build --watch"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.23.0",
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.4.2",
|
"@fortawesome/fontawesome-svg-core": "^6.4.2",
|
||||||
"@fortawesome/free-brands-svg-icons": "^6.4.2",
|
"@fortawesome/free-brands-svg-icons": "^6.4.2",
|
||||||
"@fortawesome/free-regular-svg-icons": "^6.4.2",
|
"@fortawesome/free-regular-svg-icons": "^6.4.2",
|
||||||
@ -20,6 +21,7 @@
|
|||||||
"axios": "^1.1.2",
|
"axios": "^1.1.2",
|
||||||
"bulma": "^0.9.4",
|
"bulma": "^0.9.4",
|
||||||
"bulma-checkradio": "^2.1.3",
|
"bulma-checkradio": "^2.1.3",
|
||||||
|
"eslint-plugin-vue": "^10.0.0",
|
||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
"laravel-vite-plugin": "^1.0.2",
|
"laravel-vite-plugin": "^1.0.2",
|
||||||
"laravel-vue-i18n": "^2.7.1",
|
"laravel-vue-i18n": "^2.7.1",
|
||||||
@ -27,7 +29,8 @@
|
|||||||
"pinia": "^2.1.6",
|
"pinia": "^2.1.6",
|
||||||
"sass": "^1.67.0",
|
"sass": "^1.67.0",
|
||||||
"sortablejs": "^1.15.0",
|
"sortablejs": "^1.15.0",
|
||||||
"unplugin-auto-import": "^0.16.6",
|
"typescript": "^5.8.2",
|
||||||
|
"unplugin-auto-import": "^19.1.2",
|
||||||
"vite": "^5.2.7",
|
"vite": "^5.2.7",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
"vue-qrcode-reader": "^5.4.0",
|
"vue-qrcode-reader": "^5.4.0",
|
||||||
|
14
tsconfig.json
Normal file
14
tsconfig.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"include": [
|
||||||
|
"./resources/js/**/*",
|
||||||
|
"./auto-imports.d.ts"
|
||||||
|
],
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowJs": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./resources/js/*"]
|
||||||
|
},
|
||||||
|
"noEmit": true,
|
||||||
|
},
|
||||||
|
}
|
21
vite.config.js
vendored
21
vite.config.js
vendored
@ -34,6 +34,11 @@ export default defineConfig({
|
|||||||
i18n('resources/lang'),
|
i18n('resources/lang'),
|
||||||
AutoImport({
|
AutoImport({
|
||||||
// https://github.com/unplugin/unplugin-auto-import?tab=readme-ov-file#configuration
|
// https://github.com/unplugin/unplugin-auto-import?tab=readme-ov-file#configuration
|
||||||
|
// include: [
|
||||||
|
// /\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
|
||||||
|
// /\.vue$/,
|
||||||
|
// /\.vue\?vue/, // .vue
|
||||||
|
// ],
|
||||||
imports: [
|
imports: [
|
||||||
'vue',
|
'vue',
|
||||||
'vue-router',
|
'vue-router',
|
||||||
@ -61,9 +66,21 @@ export default defineConfig({
|
|||||||
// ElementPlusResolver(),
|
// ElementPlusResolver(),
|
||||||
// ],
|
// ],
|
||||||
dirs: [
|
dirs: [
|
||||||
'@/composables/**',
|
'./resources/js/components/**',
|
||||||
|
'./resources/js/composables/**',
|
||||||
|
'./resources/js/layouts/**',
|
||||||
|
'./resources/js/router/**',
|
||||||
|
'./resources/js/services/**',
|
||||||
|
'./resources/js/stores/**',
|
||||||
],
|
],
|
||||||
vueTemplate: true,
|
vueTemplate: true,
|
||||||
|
vueDirectives: true,
|
||||||
|
dts: './auto-imports.d.ts',
|
||||||
|
eslintrc: {
|
||||||
|
enabled: true,
|
||||||
|
filepath: './.eslintrc-auto-import.mjs',
|
||||||
|
globalsPropValue: true, // 'readonly',
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
@ -75,7 +92,7 @@ export default defineConfig({
|
|||||||
// sourcemap: true,
|
// sourcemap: true,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
banner: '/*! 2FAuth version ' + version + ' - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */',
|
banner: '/*! 2FAuth version ' + version + ' - Copyright (c) 2025 Bubka - https://github.com/Bubka/2FAuth */',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user