mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-12-14 04:09:28 +03:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41dd83f27a |
@@ -232,9 +232,9 @@
|
||||
"fuzz": "jazzer ./test/fuzz/redos.js --sync",
|
||||
"test": "./script/test-all.sh",
|
||||
"test:dts-lint": "tsd --typings src/main/ua-parser.d.ts --files test/static/dts-lint.ts",
|
||||
"test:eslint": "eslint src && eslint script",
|
||||
"test:eslint": "eslint --no-config-lookup src",
|
||||
"test:jshint": "jshint src/main",
|
||||
"test:lockfile-lint": "npx lockfile-lint -p package-lock.json",
|
||||
"test:lockfile-lint": "lockfile-lint -p package-lock.json",
|
||||
"test:mocha": "mocha --recursive test/unit",
|
||||
"test:playwright": "npx playwright install && playwright test test/e2e --browser all"
|
||||
},
|
||||
@@ -247,7 +247,9 @@
|
||||
"@babel/parser": "7.15.8",
|
||||
"@babel/traverse": "7.23.2",
|
||||
"@playwright/test": "^1.57.0",
|
||||
"eslint": "^9.39.1",
|
||||
"jshint": "~2.13.6",
|
||||
"lockfile-lint": "^4.14.1",
|
||||
"mocha": "~8.2.0",
|
||||
"requirejs": "2.3.2",
|
||||
"safe-regex": "^2.1.1",
|
||||
|
||||
@@ -4,6 +4,7 @@ const fs = require('fs');
|
||||
|
||||
const defaultReplacements = {
|
||||
mjs: [
|
||||
[/(?<=const.+)(:)(?=.+require)/ig, ' as'],
|
||||
[/const (.+?)\s*=\s*require\(\'\.(.+)\'\)/ig, 'import $1 from \'\.$2.mjs\''],
|
||||
[/const (.+?)\s*=\s*require\(\'(.+)\'\)/ig, 'import $1 from \'$2\''],
|
||||
[/module\.exports =/ig, 'export']
|
||||
|
||||
@@ -9,7 +9,7 @@ echo '
|
||||
- lint js code
|
||||
'
|
||||
npm run test:jshint || exit 1
|
||||
#npm run test:eslint || exit 1
|
||||
npm run test:eslint || exit 1
|
||||
|
||||
echo '
|
||||
- test using mocha
|
||||
|
||||
Reference in New Issue
Block a user