mirror of
https://github.com/ajurna/cbwebreader.git
synced 2026-11-02 10:36:55 +00:00
- Introduced a continuous reading mode ("scroll"), allowing users to read without pagination.
- Implemented a toggle in the UI to switch between "paged" and "continuous" modes, with preferences saved in `localStorage`.
- Enhanced keyboard navigation by throttling repeated actions and ignoring irrelevant keypresses during form interactions.
- Integrated `IntersectionObserver` to handle lazy-loading of images and dynamically extending rendered content in continuous mode.
- Updated tests to validate both reading modes, ensuring proper state management and observer handling.
- Adjusted animations and transitions for smoother visual feedback in both modes, respecting users' motion-reduction preferences.
62 lines
1.4 KiB
JavaScript
62 lines
1.4 KiB
JavaScript
import js from '@eslint/js'
|
|
import pluginVue from 'eslint-plugin-vue'
|
|
|
|
export default [
|
|
{ ignores: ['dist/**', 'node_modules/**', 'public/**'] },
|
|
js.configs.recommended,
|
|
...pluginVue.configs['flat/essential'],
|
|
|
|
// Build scripts (webpack.*.js) run in Node, so they use CommonJS globals.
|
|
{
|
|
files: ['**/*.js'],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'commonjs',
|
|
globals: {
|
|
require: 'readonly',
|
|
module: 'readonly',
|
|
__dirname: 'readonly',
|
|
process: 'readonly',
|
|
console: 'readonly',
|
|
},
|
|
},
|
|
},
|
|
|
|
// Tests run under Vitest with a jsdom environment.
|
|
{
|
|
files: ['test/**'],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
globals: {
|
|
document: 'readonly',
|
|
localStorage: 'readonly',
|
|
console: 'readonly',
|
|
window: 'readonly',
|
|
HTMLElement: 'readonly',
|
|
KeyboardEvent: 'readonly',
|
|
},
|
|
},
|
|
},
|
|
|
|
// Application code is browser code bundled by webpack.
|
|
{
|
|
files: ['src/**'],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
globals: {
|
|
window: 'readonly',
|
|
document: 'readonly',
|
|
localStorage: 'readonly',
|
|
console: 'readonly',
|
|
setTimeout: 'readonly',
|
|
clearTimeout: 'readonly',
|
|
IntersectionObserver: 'readonly',
|
|
process: 'readonly',
|
|
},
|
|
},
|
|
rules: {},
|
|
},
|
|
]
|