Merge pull request #3441 from primefaces/eslint

Eslint updates
pull/3449/head
Bahadır 2022-12-22 16:59:09 +03:00 committed by GitHub
commit 7569018ddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 28125 additions and 25956 deletions

View File

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

View File

@ -1,6 +1,6 @@
<template>
<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>
<div
v-if="i !== panels.length - 1"

View File

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

View File

@ -1,5 +1,6 @@
import vueJsx from '@vitejs/plugin-vue-jsx';
const path = require('path');
import path from 'path';
const baseUrl = process.env.NODE_ENV === 'production' ? '/primevue-nuxt/' : '/';
// 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:check": "prettier --check \"**/*.{js,vue,d.ts}\"",
"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": {
"@babel/eslint-parser": "^7.18.9",
"@fullcalendar/core": "^5.11.0",
"@fullcalendar/daygrid": "^5.11.0",
"@fullcalendar/interaction": "^5.11.0",
@ -33,6 +36,11 @@
"@vuelidate/core": "^2.0.0-alpha.14",
"@vuelidate/validators": "^2.0.0-alpha.12",
"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-concat": "^2.6.0",
"gulp-flatten": "^0.4.0",
@ -41,6 +49,7 @@
"gulp-uglifycss": "^1.0.6",
"jsdom": "^19.0.0",
"nuxt": "^3.0.0",
"prettier": "2.7.1",
"primeflex": "^3.3.0",
"primeicons": "^6.0.1",
"quill": "^1.3.7",
@ -49,10 +58,6 @@
"rollup-plugin-vue": "^6.0.0-beta.9",
"sass": "^1.45.0",
"sass-loader": "^8.0.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"
"vitest": "^0.23.2"
}
}

View File

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