Skip to content

Latest commit

 

History

History
97 lines (59 loc) · 3.29 KB

CONTRIBUTING.md

File metadata and controls

97 lines (59 loc) · 3.29 KB

How to contribute

Thank you very much for your interest in contributing to these userscripts!

Code style

Before you start coding, please read the simple code style:

  • Indent with tabs
  • Use English words

Testing

Interesting MB test pages

Here are some interesting special releases or release groups, for which the web site and/or the web services do special treatments like pagination, data filtering or data limiting:

ESLint

ESLint is a kind of code checker. This section is mostly for me to remember how to use it.

I have set up an .eslintrc.yaml ESLint ruleset in this repo.

Install (nodejs, npm, eslint) on your PC

You must first install some big heavy packages on your PC. Install the so called npm package, that might install something called nodejs:

Linux

sudo apt install npm

Windows

  1. Unzip Windows Binary in %LocalAppData%\Programs\node-…
  2. Add %LocalAppData%\Programs\node-… to your PATH

Install eslint in each repo

Now eslint can be called from anywhere, but it installs each time, therefore it is very sluggish to run.

Go into repo to install (copy?) eslint locally:

npm install --save-dev

It will add many files to the repo but don’t worry, it’s all in /konami-command/.gitignore. No problemo.

Ignore the weirdo warnings, like:

npm does not support Node.js v10.23.1

The thing stills works good.

Use eslint to scan userscript files

You can run either one of the following commands:

npx eslint modified.user.js

You can replace modified.user.js by . to scan all files.

I have added the following to my Geany editor build command (F8):

npx eslint --format compact "%f"