-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fix JSDoc annotations - add custom css for JSDoc to match the colors to the XKPasswd app - fix typos in comments - remove duplicate tests - update ESLint configuration - update Jest configuration - initial setup for Puppeteer # Conflicts: # src/web/configcontroller.mjs # src/web/configview.mjs
- Loading branch information
Showing
30 changed files
with
4,303 additions
and
1,278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import globals from 'globals'; | ||
import path from 'node:path'; | ||
import {fileURLToPath} from 'node:url'; | ||
import js from '@eslint/js'; | ||
import {FlatCompat} from '@eslint/eslintrc'; | ||
import jsdoc from 'eslint-plugin-jsdoc'; | ||
import google from 'eslint-config-google'; | ||
import jest from 'eslint-plugin-jest'; | ||
|
||
// const __filename = fileURLToPath(import.meta.url); | ||
// const __dirname = path.dirname(__filename); | ||
// const compat = new FlatCompat({ | ||
// baseDirectory: __dirname, | ||
// recommendedConfig: js.configs.recommended, | ||
// allConfig: js.configs.all, | ||
// }); | ||
|
||
export default [ | ||
// app related javascript files | ||
{ | ||
name: 'app files', | ||
files: ["src/**/*.mjs"], | ||
ignores: ['src/**/*.test.mjs'], | ||
plugins: { | ||
jsdoc, | ||
}, | ||
...js.configs.recommended, | ||
...google, | ||
...jsdoc.configs['flat/recommended'], | ||
settings: { | ||
jsdoc: { | ||
mode: 'jsdoc' | ||
} | ||
}, | ||
languageOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
rules: { | ||
indent: ['error', 2], | ||
'jsdoc/require-description': 'error', | ||
'jsdoc/check-values': 'error', | ||
'jsdoc/informative-docs': 1, | ||
}, | ||
}, | ||
{ | ||
name: 'test files', | ||
files: ["src/**/*.test.mjs"], | ||
plugins: { | ||
jest | ||
}, | ||
languageOptions: { | ||
globals: { | ||
...globals.jest, | ||
}, | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
|
||
// { | ||
// plugins: { | ||
// jest, | ||
// }, | ||
// | ||
// | ||
// languageOptions: { | ||
// globals: { | ||
// ...globals.browser, | ||
// ...globals.jest, | ||
// }, | ||
// | ||
// ecmaVersion: 'latest', | ||
// sourceType: 'module', | ||
// }, | ||
// | ||
}]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"projects": [ | ||
{ | ||
"displayName": "unit", | ||
"testEnvironment": "jest-environment-node", | ||
"transform": {}, | ||
"testPathIgnorePatterns": [ | ||
"/node_modules/", | ||
"/archive/" | ||
], | ||
"testMatch": [ | ||
"<rootDir>/src/lib/**/?*.test.mjs" | ||
] | ||
}, | ||
{ | ||
"displayName": "puppeteer", | ||
"preset": "jest-puppeteer", | ||
"transform": {}, | ||
"testPathIgnorePatterns": [ | ||
"/node_modules/", | ||
"/archive/", | ||
"src/lib/" | ||
], | ||
"testMatch": [ | ||
"**/?*.test.mjs" | ||
], | ||
"globalSetup": "jest-environment-puppeteer/setup", | ||
"globalTeardown": "jest-environment-puppeteer/teardown", | ||
"testEnvironment": "jest-environment-puppeteer" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import $ from 'jquery'; | ||
global.$ = global.jQuery = $; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.