Eslint updates

pull/3441/head
Bahadır Sofuoğlu 2022-12-22 16:20:07 +03:00
parent 215110c659
commit f781c2c44f
7 changed files with 28125 additions and 25956 deletions

View File

@ -4,17 +4,20 @@ module.exports = {
node: true, node: true,
jest: true jest: true
}, },
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', 'prettier'], extends: ['plugin:nuxt/recommended', 'plugin:vue/vue3-essential', 'prettier'],
parserOptions: { parserOptions: {
parser: '@babel/eslint-parser', parser: '@babel/eslint-parser',
requireConfigFile: false requireConfigFile: false
}, },
plugins: ['prettier'], plugins: ['prettier'],
ignorePatterns: ['**/public/**', '/layouts/AppDocumentation.vue'],
rules: { rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-fallthrough': 'off', 'no-fallthrough': 'off',
'vue/this-in-template': ['error', 'never'], 'vue/this-in-template': ['error', 'never'],
'vue/multi-word-component-names': 'off',
'vue/no-reserved-component-names': 'off',
'vue/component-tags-order': [ 'vue/component-tags-order': [
'error', 'error',
{ {

View File

@ -1,6 +1,6 @@
<template> <template>
<div :class="containerClass"> <div :class="containerClass">
<template v-for="(panel, i) of panels" :key="i" class="p-splitter-panel"> <template v-for="(panel, i) of panels" :key="i">
<component :is="panel" tabindex="-1"></component> <component :is="panel" tabindex="-1"></component>
<div <div
v-if="i !== panels.length - 1" v-if="i !== panels.length - 1"

View File

@ -24,6 +24,7 @@ export default {
this.viewGithubListener = () => { this.viewGithubListener = () => {
window.open('https://github.com/primefaces/primevue/blob/master/pages/' + this.name.toLowerCase().replaceAll('demo', '/') + this.github, '_blank'); window.open('https://github.com/primefaces/primevue/blob/master/pages/' + this.name.toLowerCase().replaceAll('demo', '/') + this.github, '_blank');
}; };
EventBus.on('view-github', this.viewGithubListener); EventBus.on('view-github', this.viewGithubListener);
}, },
beforeUnmount() { beforeUnmount() {

View File

@ -1,5 +1,6 @@
import vueJsx from '@vitejs/plugin-vue-jsx'; import vueJsx from '@vitejs/plugin-vue-jsx';
const path = require('path');
import path from 'path';
const baseUrl = process.env.NODE_ENV === 'production' ? '/primevue-nuxt/' : '/'; const baseUrl = process.env.NODE_ENV === 'production' ? '/primevue-nuxt/' : '/';
// https://v3.nuxtjs.org/api/configuration/nuxt.config // https://v3.nuxtjs.org/api/configuration/nuxt.config

2277
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -20,9 +20,12 @@
"format": "prettier --write \"**/*.{js,vue,d.ts}\"", "format": "prettier --write \"**/*.{js,vue,d.ts}\"",
"format:check": "prettier --check \"**/*.{js,vue,d.ts}\"", "format:check": "prettier --check \"**/*.{js,vue,d.ts}\"",
"test:unit": "vitest", "test:unit": "vitest",
"test:build": "NODE_ENV=production rollup -c" "test:build": "NODE_ENV=production rollup -c",
"lint": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
"lint:fix": "eslint --fix --ext \".js,.vue\" --ignore-path .gitignore ."
}, },
"devDependencies": { "devDependencies": {
"@babel/eslint-parser": "^7.18.9",
"@fullcalendar/core": "^5.11.0", "@fullcalendar/core": "^5.11.0",
"@fullcalendar/daygrid": "^5.11.0", "@fullcalendar/daygrid": "^5.11.0",
"@fullcalendar/interaction": "^5.11.0", "@fullcalendar/interaction": "^5.11.0",
@ -33,6 +36,11 @@
"@vuelidate/core": "^2.0.0-alpha.14", "@vuelidate/core": "^2.0.0-alpha.14",
"@vuelidate/validators": "^2.0.0-alpha.12", "@vuelidate/validators": "^2.0.0-alpha.12",
"chart.js": "3.3.2", "chart.js": "3.3.2",
"eslint": "^8.30.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-nuxt": "^4.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.4.0",
"gulp": "^4.0.2", "gulp": "^4.0.2",
"gulp-concat": "^2.6.0", "gulp-concat": "^2.6.0",
"gulp-flatten": "^0.4.0", "gulp-flatten": "^0.4.0",
@ -41,6 +49,7 @@
"gulp-uglifycss": "^1.0.6", "gulp-uglifycss": "^1.0.6",
"jsdom": "^19.0.0", "jsdom": "^19.0.0",
"nuxt": "^3.0.0", "nuxt": "^3.0.0",
"prettier": "2.7.1",
"primeflex": "^3.3.0", "primeflex": "^3.3.0",
"primeicons": "^6.0.1", "primeicons": "^6.0.1",
"quill": "^1.3.7", "quill": "^1.3.7",
@ -49,10 +58,6 @@
"rollup-plugin-vue": "^6.0.0-beta.9", "rollup-plugin-vue": "^6.0.0-beta.9",
"sass": "^1.45.0", "sass": "^1.45.0",
"sass-loader": "^8.0.2", "sass-loader": "^8.0.2",
"vitest": "^0.23.2", "vitest": "^0.23.2"
"prettier": "2.7.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-vue": "^9.4.0",
"@babel/eslint-parser": "^7.18.9"
} }
} }

View File

@ -1,6 +1,6 @@
export default defineNuxtPlugin((nuxtApp) => { export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.$router.options.scrollBehavior = (to, from, savedPosition) => { nuxtApp.$router.options.scrollBehavior = () => {
return new Promise((resolve, reject) => { return new Promise((resolve) => {
setTimeout(() => { setTimeout(() => {
resolve({ left: 0, top: 0, behaviour: 'smooth' }); resolve({ left: 0, top: 0, behaviour: 'smooth' });
}, 100); }, 100);