build: add the npm toolchain with ESLint, JSDoc and node --test

@tauri-apps/cli is a local devDependency. ESLint runs the recommended
and JSDoc rules, with browser globals for ui/ and node globals for tests
and scripts. npm test runs node --test over tests/js.
This commit is contained in:
tiennm99 committed 2026-10-21 11:45:20 +07:00
1 parent f64d81e6a1
commit 2adbeeb613
4 files changed
+1830

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
import js from '@eslint/js';
import jsdoc from 'eslint-plugin-jsdoc';
import globals from 'globals';
export default [
{
ignores: ['target/', 'gen/', 'node_modules/'],
},
js.configs.recommended,
jsdoc.configs['flat/recommended-error'],
{
files: ['ui/**/*.js'],
languageOptions: {
globals: {
...globals.browser,
__TAURI__: 'readonly',
},
},
},
{
files: ['tests/**/*.js', 'scripts/**/*.js', 'eslint.config.js'],
languageOptions: {
globals: globals.node,
},
},
];
+1785
View File
File diff suppressed because it is too large. Load diff
+19
View File
@@ -0,0 +1,19 @@
{
"name": "claude-code-usage-bubble",
"private": true,
"description": "Floating bubble showing Claude Code and Codex usage",
"license": "Apache-2.0",
"type": "module",
"scripts": {
"tauri": "tauri",
"lint": "eslint .",
"test": "node --test \"tests/js/**/*.test.js\""
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@tauri-apps/cli": "^2.12.3",
"eslint": "^10.13.0",
"eslint-plugin-jsdoc": "^65.4.0",
"globals": "^17.13.0"
}
}
View File
Whitespace-only changes.