mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-11 16:58:14 +00:00
06ab2d7676
eslint:
* Remove hardcoded glob paths that are (relatively slow) to expand
before linting could start, in favour of specifying directories
which can be iterated while linting happens.
* JSON files in i18n/ were skipped, unlike other repos.
JS code under .storybook/ was skipped.
JS code under resources/ext.popups/ was skipped.
Fix all these by doing what other repos do, which is to let
ESLint iterate the repository and tell it which directories not to
enter. This has the happy side-effect of making IDE integrations
for ESLint work correctly (as customisation in package.json has the
same problems as using Gruntfile, namely that invoking 'eslint'
directly can't be aware of this), as well as allowing things like
`eslint --fix` to be used.
```
/Popups/resources/ext.popups/index.js
4:2 error Unexpected var, use let or const instead no-var
```
nyc:
* Remove SPAWN_WRAP_SHIM_ROOT.
This was a hack for an early CI experiment that hasn't been
needed for several years.
storybook:
* Remove gitignore entries for additional npm and build output in the
storybook subdirectory, which appears to not exist anymore since
189b386a13
.
Doxygen:
* Sync with cookiecutter example from
https://gerrit.wikimedia.org/g/mediawiki/tools/cookiecutter-library/+/HEAD/
- remove redundant stuff,
- enable quiet mode to hide verbose non-warning,
- include CoC.
Change-Id: If8f6b833067192aea96a87f04c7978c9af11f996
75 lines
2.8 KiB
JSON
75 lines
2.8 KiB
JSON
{
|
|
"private": true,
|
|
"scripts": {
|
|
"storybook": "./.storybook/storybook-resources.sh && start-storybook --config-dir=.storybook -p 6006 -s .storybook/static",
|
|
"build-storybook": "./.storybook/storybook-resources.sh && build-storybook --config-dir=.storybook -o docs/ui -s .storybook/static",
|
|
"start": "webpack -w --mode=development",
|
|
"build": "webpack --mode=production",
|
|
"test": "npm -s run check-built-assets && npm run test:lint && bash ./dev-scripts/svg_check.sh && npm -s run coverage && npm -s run doc && bundlesize",
|
|
"test:unit": "mw-node-qunit 'tests/node-qunit/**/*.test.js' --require \"$PWD/tests/node-qunit/run.js\" | tap-mocha-reporter dot",
|
|
"test:lint": "npm -s run test:lint:styles && npm -s run test:lint:js && npm -s run test:lint:i18n",
|
|
"test:lint:js": "npm -s run linter:js",
|
|
"test:lint:styles": "npm -s run linter:styles",
|
|
"test:lint:i18n": "banana-checker --requireLowerCase=0 i18n/",
|
|
"check-built-assets": "echo 'CHECKING BUILD SOURCES ARE COMMITTED OR STAGED' && npm -s run build && git diff --exit-code resources/dist || { npm run node-debug; false; }",
|
|
"coverage": "nyc npm -s run test:unit",
|
|
"doc": "jsdoc -c jsdoc.json && npm run build-storybook",
|
|
"linter:js": "eslint --cache .",
|
|
"linter:styles": "stylelint 'src/**/*.less'",
|
|
"minify-svg": "svgo --config=.svgo.config.js -q -r -f resources/ext.popups.images/",
|
|
"node-debug": "node -v && npm -v && echo 'Please ensure you are running the correct version of nvm before running this command.'",
|
|
"precommit": "npm -s t",
|
|
"selenium-daily": "npm run selenium-test",
|
|
"selenium-test": "wdio tests/selenium/wdio.conf.js"
|
|
},
|
|
"engines": {
|
|
"node": "12.21.0"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "7.2.0",
|
|
"@babel/preset-env": "7.2.0",
|
|
"@babel/register": "7.0.0",
|
|
"@storybook/html": "6.2.9",
|
|
"@types/jquery": "3.3.29",
|
|
"@wdio/cli": "6.3.5",
|
|
"@wdio/junit-reporter": "6.1.5",
|
|
"@wdio/local-runner": "6.3.5",
|
|
"@wdio/mocha-framework": "6.3.0",
|
|
"@wdio/dot-reporter": "6.3.0",
|
|
"@wdio/sync": "6.3.3",
|
|
"@wikimedia/mw-node-qunit": "6.1.0",
|
|
"babel-loader": "8.0.4",
|
|
"browserslist-config-wikimedia": "0.2.0",
|
|
"bundlesize": "0.18.0",
|
|
"clean-webpack-plugin": "3.0.0",
|
|
"cssjanus": "1.3.1",
|
|
"eslint": "7.25.0",
|
|
"eslint-config-wikimedia": "0.20.0",
|
|
"expose-loader": "0.7.5",
|
|
"grunt-banana-checker": "0.9.0",
|
|
"jquery": "3.4.1",
|
|
"jsdoc": "3.6.3",
|
|
"less": "3.8.1",
|
|
"less-loader": "4.1.0",
|
|
"nyc": "15.0.0",
|
|
"pre-commit": "1.2.2",
|
|
"redux": "4.0.1",
|
|
"redux-thunk": "2.3.0",
|
|
"stylelint-config-wikimedia": "0.10.3",
|
|
"svg-inline-loader": "0.8.0",
|
|
"svgo": "2.3.0",
|
|
"tap-mocha-reporter": "5.0.1",
|
|
"url-loader": "1.1.2",
|
|
"wdio-mediawiki": "1.1.1",
|
|
"webdriverio": "6.3.5",
|
|
"webpack": "4.44.2",
|
|
"webpack-cli": "3.1.2"
|
|
},
|
|
"bundlesize": [
|
|
{
|
|
"path": "resources/dist/index.js",
|
|
"maxSize": "12.9kB"
|
|
}
|
|
]
|
|
}
|