forked from wikimedia-gadgets/afc-helper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:wikimedia-gadgets/afc-helper
- Loading branch information
Showing
24 changed files
with
8,672 additions
and
676 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,31 @@ | ||
{ | ||
"extends": "wikimedia", | ||
"plugins": [ | ||
"jsdoc" | ||
], | ||
"env": { | ||
"browser": true, | ||
"jquery": true | ||
}, | ||
"globals": { | ||
"AFCH": true, | ||
"Hogan": false, | ||
"importScript": false, | ||
"mediaWiki": true, | ||
"mw": true, | ||
"OO": false | ||
"AFCH": "writable", | ||
"Hogan": "readonly", | ||
"importScript": "readonly", | ||
"mediaWiki": "writable", | ||
"mw": "writable", | ||
"OO": "readonly" | ||
}, | ||
"rules": { | ||
"camelcase": 0, | ||
"eqeqeq": 0, | ||
"jsdoc/check-param-names": 0, | ||
"jsdoc/check-tag-names": 0, | ||
"jsdoc/no-undefined-types": 0, | ||
"jsdoc/require-param-type": 0, | ||
"jsdoc/require-returns": 0, | ||
"jsdoc/require-returns-check": 0, | ||
"jsdoc/valid-types": 0, | ||
"max-len": 0, | ||
"max-statements-per-line": 0, | ||
"no-console": 0, | ||
"no-global-assign": 0, | ||
"no-implicit-globals": 0, | ||
"no-new": 0, | ||
"no-prototype-builtins": 0, | ||
"no-shadow": 0, | ||
"no-undef": 0, | ||
"no-underscore-dangle": 0, | ||
"no-unused-vars": 0, | ||
"no-use-before-define": 0, | ||
"no-useless-concat": 0, | ||
"no-useless-escape": 0, | ||
"one-var": 0, | ||
"spaced-comment": 0, | ||
"vars-on-top": 0 | ||
}, | ||
"settings": { | ||
"jsdoc": { | ||
"ignoreInternal": true | ||
} | ||
}, | ||
"ignorePatterns": [ | ||
"scripts/generate-certificates.js" | ||
] | ||
"camelcase": "off", | ||
"eqeqeq": "warn", | ||
"max-len": "off", | ||
"no-console": "off", | ||
"no-global-assign": "warn", | ||
"no-implicit-globals": "warn", | ||
"no-new": "warn", | ||
"no-prototype-builtins": "off", | ||
"no-shadow": "off", | ||
"no-undef": "warn", | ||
"no-underscore-dangle": "off", | ||
"security/detect-non-literal-regexp": "off", | ||
"security/detect-unsafe-regex": "off", | ||
"unicorn/prefer-string-slice": "off" | ||
} | ||
} |
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,12 @@ | ||
name: Linter | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npm run lint | ||
name: AFCH linter |
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 |
---|---|---|
@@ -1,50 +1,43 @@ | ||
afch-rewrite [![Unit Tests](https://github.com/ptsgrn/afch-rewrite/actions/workflows/unit_tests.yml/badge.svg?branch=master)](https://github.com/ptsgrn/afch-rewrite/actions/workflows/unit_tests.yml) ![Release](https://img.shields.io/github/v/release/ptsgrn/afch-rewrite) | ||
afc-helper [![Build Status](https://github.com/ptsgrn/afch-rewrite/actions/workflows/unit_tests.yml/badge.svg)] | ||
============ | ||
|
||
**v0.9.3 Imperial Kane** | ||
|
||
A tool for reviewing Articles for Creation submissions on the English Wikipedia, rewritten using clear, object-oriented JavaScript with a focus on killing bloat while adding value. | ||
|
||
### Using | ||
The script can be installed on the English Wikipedia by following the instructions at [WP:AFCH](https://en.wikipedia.org/wiki/WP:AFCH). | ||
|
||
### Contributing | ||
*Looking for detailed instructions about how to contribute to afch-rewrite? Check out the [Contributing](https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Articles_for_creation/Helper_script/Contributing) page on Wikipedia!* | ||
*Looking for detailed instructions about how to contribute to afc-helper? Check out the [Contributing](https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Articles_for_creation/Helper_script/Contributing) page on Wikipedia!* | ||
|
||
Your contributions are welcome! Please add feature requests and bug reports to [WT:AFCH](https://en.wikipedia.org/wiki/WT:AFCH) on enwiki to keep discussions centralized; GitHub also works. | ||
|
||
If you'd like to contribute directly to the code, that's great too! In order to maintain great code quality, please submit significant changes using pull requests so that a consistent code style can be maintained throughout the project. | ||
|
||
To serve the script locally for development, use `npm start` and follow the instructions. The [Contributing](https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Articles_for_creation/Helper_script/Contributing) page has more details if you get stuck. | ||
|
||
**Protip for developers**: if you set `AFCH.consts.mockItUp = false;` using your browser console or in src/afch.js, instead of logging API requests in the console, the script will actually make page edits. (It used to default to making the page edits, but that wasn't very useful.) | ||
**Protip for developers**: AFCH running using `npm start` will run in silent mode by default. That is, it will not edit any pages, but instead will output API queries to your browser console. To turn this off, add `window.afchSuppressDevEdits = false;` to your common.js file, or open a browser console and type `AFCH.consts.mockItUp = false;` | ||
|
||
### Testing | ||
We have unit tests! `afch-rewrite` uses [Jest](https://github.com/facebook/jest) for testing, a framework built on top of Jasmine that offers dead-simple mocking, built-in simulated DOM manipulation using [jsdom](https://github.com/tmpvar/jsdom), and more. | ||
We have unit tests! `afc-helper` uses [Jest](https://github.com/facebook/jest) for testing, a framework built on top of Jasmine that offers dead-simple mocking, built-in simulated DOM manipulation using [jsdom](https://github.com/tmpvar/jsdom), and more. | ||
|
||
Tests are stored in the `__tests__` directory and are run automatically on new commits via GitHub Actions. | ||
Tests are stored in the `tests` directory and are run automatically on new commits via GitHub Actions. | ||
|
||
### Uploading and releasing the script | ||
To upload the script to a wiki, use `scripts/upload.py`. Detailed instructions are included at the top of the file. | ||
### Deploying | ||
Interface administrators can [click here](https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Articles_for_creation/Helper_script/Deploying) for a detailed work instruction of how to deploy to English Wikipedia. | ||
|
||
New versions of the script can be released through `scripts/release.py`, which automatically updates version history, inline version constants, `package.json`, etc. | ||
To deploy AFC Helper to a wiki, use `scripts/upload.py`. | ||
|
||
### Version history | ||
### Dependencies | ||
Below is a list of dependencies and what they are involved with, so you know what to test when updating dependencies. | ||
|
||
* 0.9.3 Imperial Kane (13 Octuber 2022) | ||
* 0.9.3-beta Imperial Kane (21 November 2021) | ||
* 0.9.3-alpha Imperial Kane (13 November 2021) | ||
* 0.9.1 Imperial Ibex (05 December 2018) | ||
* 0.9 Hatted Hamster (8 November 2014) | ||
* 0.8 Wandering Walrus (18 May 2014) | ||
* 0.7 Less is More (13 April 2014) | ||
* 0.6 Dancing Turtle (27 March 2014) | ||
* 0.5 Cold Moose (21 March 2014) | ||
* 0.4 Rewired Robot (14 March 2014) | ||
* 0.3 Excited Murmur (12 March 2014) | ||
* 0.2 Egalitarian Elephant (27 February 2014) | ||
* 0.1 Exploding Fireball (4 January 2014) | ||
* Regular | ||
* hogan.js - HTML template framework. Creates code that ends up on-wiki. | ||
* Dev Only | ||
* eslint - Used by CI and code editor | ||
* grunt - Used by CI and `npm start` | ||
* jest-cli - Used by CI and unit tests | ||
* jquery - Used by CI and unit tests | ||
|
||
### License | ||
|
||
`afch-rewrite` is licensed under the GNU General Public License version 3; see LICENSE for more information. | ||
`afc-helper` is licensed under the GNU General Public License version 3; see LICENSE for more information. |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.