vue-dev-tools-accessibility
Advanced tools
Comparing version
@@ -27,2 +27,3 @@ /* eslint-disable import/no-extraneous-dependencies */ | ||
languageOptions: { | ||
ecmaVersion: 2025, | ||
globals: { | ||
@@ -35,4 +36,2 @@ ...globals.browser, | ||
'import/no-anonymous-default-export': 'off', | ||
'import/no-namespace': 'off', | ||
'import/no-unresolved': 'off', | ||
'import/no-unused-modules': 'off', | ||
@@ -39,0 +38,0 @@ |
25
index.js
@@ -0,2 +1,16 @@ | ||
/** | ||
* Vite plugin that sets up an accessibility tab in the Vite Vue-DevTools. | ||
* | ||
* @return {object} A Vite Plugin object | ||
*/ | ||
export default function vueDevToolsAccessibility () { | ||
/** | ||
* @typedef {object} CONTEXT | ||
* @param {string} path The path of the current HTML file. | ||
* @param {string} filename The filename of the current HTML file. | ||
* @param {import('vite').ViteDevServer} [server] Optional Vite development server instance. | ||
* @param {import('rollup').OutputBundle} [bundle] Optional Rollup output bundle. | ||
* @param {import('rollup').OutputChunk} [chunk] Optional Rollup output chunk. | ||
*/ | ||
return { | ||
@@ -8,10 +22,5 @@ name: 'vue-dev-tools-accessibility', | ||
* | ||
* @param {string} html The HTML string to transform. | ||
* @param {object} context Context object containing information about the current build. | ||
* @param {string} context.path The path of the current HTML file. | ||
* @param {string} context.filename The filename of the current HTML file. | ||
* @param {import('vite').ViteDevServer} [context.server] Optional Vite development server instance. | ||
* @param {import('rollup').OutputBundle} [context.bundle] Optional Rollup output bundle. | ||
* @param {import('rollup').OutputChunk} [context.chunk] Optional Rollup output chunk. | ||
* @return {string} String of HTML. | ||
* @param {string} html The HTML string to transform. | ||
* @param {CONTEXT} context Context object containing information about the current build. | ||
* @return {string} String of HTML. | ||
*/ | ||
@@ -18,0 +27,0 @@ transformIndexHtml: function (html, context) { |
{ | ||
"name": "vue-dev-tools-accessibility", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "scripts": { |
import plugin from '../../index.js'; | ||
describe('Library', () => { | ||
test('Has Vue Plugin shape', () => { | ||
expect(Object.keys(plugin)) | ||
.toEqual(['install']); | ||
test('Has Vite Plugin shape', () => { | ||
const Plugin = plugin(); | ||
expect(typeof(plugin.install)) | ||
expect(Object.keys(Plugin)) | ||
.toEqual(['name', 'transformIndexHtml']); | ||
expect(typeof(Plugin.transformIndexHtml)) | ||
.toEqual('function'); | ||
}); | ||
}); |
@@ -1,2 +0,1 @@ | ||
/* eslint-disable-next-line import/namespace,import/no-deprecated */ | ||
import { setupDevtools } from '@/devtools.js'; | ||
@@ -3,0 +2,0 @@ |
@@ -5,5 +5,3 @@ /* eslint-disable import/no-extraneous-dependencies */ | ||
/* eslint-disable-next-line */ | ||
import { defineConfig } from 'vite'; | ||
/* eslint-disable-next-line import/named */ | ||
import { configDefaults } from 'vitest/dist/config.js'; | ||
@@ -10,0 +8,0 @@ |
336
1.51%18739
-0.48%