diff --git a/site/_themes/.eslintrc.cjs b/site/_themes/.eslintrc.cjs deleted file mode 100644 index cf3238f0e0..0000000000 --- a/site/_themes/.eslintrc.cjs +++ /dev/null @@ -1,75 +0,0 @@ -module.exports = { - root: true, - env: { - node: true - }, - extends: [ - 'plugin:vue/recommended', - 'eslint:recommended' - ], - rules: { - 'indent': ['error', - 2, - { - 'SwitchCase': 1, - 'MemberExpression': 1, - 'ArrayExpression': 1, - 'FunctionDeclaration': { 'parameters': 'first' }, - 'CallExpression': { 'arguments': 1 }, - 'ImportDeclaration': 'first', - 'ObjectExpression': 1 - } - ], - 'no-sequences': 'error', - 'linebreak-style': 'off', - 'quotes': ['error', 'single'], - 'semi': ['error', 'never'], - 'semi-style': ['error', 'last'], - 'semi-spacing': ['error', { 'before': false, 'after': true }], - 'camelcase': 'off', - 'default-case': 'error', - 'no-new-func': 'error', - 'no-void': 'error', - 'array-bracket-spacing': ['error', 'never'], - 'no-tabs': 'error', - 'no-var': 'error', - 'one-var': ['error', 'never'], - 'prefer-const': 'error', - 'no-trailing-spaces': 'error', - 'operator-assignment': ['error', 'always'], - 'dot-location': ['error', 'property'], - 'no-alert': 'error', - 'no-else-return': ['error', { allowElseIf: false }], - 'no-case-declarations': 'off', - 'no-unused-vars': 'error', - 'no-multi-spaces': 'error', - 'valid-jsdoc': 'warn', - 'eqeqeq': 'error', - 'guard-for-in': 'warn', - 'no-multi-str': 'error', - 'no-return-await': 'error', - 'no-return-assign': 'error', - 'no-throw-literal': 'error', - 'no-undef-init': 'error', - 'no-use-before-define': 'warn', - 'key-spacing': ['error', { 'beforeColon': false, 'afterColon': true, 'mode': 'strict' }], - 'keyword-spacing': ['error', { 'before': true, 'after': true }], - 'space-before-blocks': ['error', { 'functions': 'always', 'keywords': 'always', 'classes': 'always' }], - 'spaced-comment': ['error', 'always'], - 'space-infix-ops': 'error', - 'arrow-spacing': ['error', { 'before': true, 'after': true }], - 'no-useless-constructor': 'warn', - 'comma-dangle': ['error', 'never'], - 'space-before-function-paren': ['error', 'always'], - 'no-param-reassign': 'off', - 'object-curly-spacing': ['error', 'always'], - 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' - }, - parserOptions: { - parser: 'babel-eslint' - }, - globals: { - '$': true - } -} diff --git a/site/_themes/eslint.config.base.js b/site/_themes/eslint.config.base.js new file mode 120000 index 0000000000..35dedbe5a4 --- /dev/null +++ b/site/_themes/eslint.config.base.js @@ -0,0 +1 @@ +../../eslint.config.js \ No newline at end of file diff --git a/site/_themes/eslint.config.js b/site/_themes/eslint.config.js new file mode 100644 index 0000000000..5a1921559a --- /dev/null +++ b/site/_themes/eslint.config.js @@ -0,0 +1,17 @@ +import base from './eslint.config.base.js' +import pluginVue from 'eslint-plugin-vue' + +export default [ + { + ignores: [ + 'dist/' + ] + }, + ...base, + ...pluginVue.configs['flat/recommended'], + { + rules: { + 'vue/multi-word-component-names': 'off' + } + } +] diff --git a/site/_themes/package.json b/site/_themes/package.json index 8f4d8368fc..4e7983fc4c 100644 --- a/site/_themes/package.json +++ b/site/_themes/package.json @@ -2,34 +2,20 @@ "name": "themes", "version": "1.0.0", "private": true, - "module": "type", + "type": "module", "scripts": { "serve": "vite", "build": "vite build", "lint": "eslint ." }, "dependencies": { - "vue": "^3.4.31" + "vue": "^3.5.13" }, "devDependencies": { - "@vitejs/plugin-vue": "^5.0.5", - "eslint": "^8.49.0", - "eslint-plugin-vue": "^9.27.0", - "vite": "^5.3.3" - }, - "eslintConfig": { - "root": true, - "env": { - "node": true - }, - "extends": [ - "plugin:vue/vue3-essential", - "eslint:recommended" - ], - "rules": {}, - "parserOptions": { - "ecmaVersion": "latest" - } + "@vitejs/plugin-vue": "^5.2.1", + "eslint": "^9.16.0", + "eslint-plugin-vue": "^9.32.0", + "vite": "^6.0.3" }, "browserslist": [ "> 1%", diff --git a/site/_themes/vite.config.js b/site/_themes/vite.config.js index b3095119c2..e03632327b 100644 --- a/site/_themes/vite.config.js +++ b/site/_themes/vite.config.js @@ -16,7 +16,7 @@ export default defineConfig({ }, build: { rollupOptions: { - input: process.env.NODE_ENV === 'production' ? 'themes.html' : 'index.html', + input: process.env.NODE_ENV === 'production' ? 'themes.html' : 'index.html' } }, server: {