Gathering detailed insights and metrics for eslint-config-wikimedia
Gathering detailed insights and metrics for eslint-config-wikimedia
Gathering detailed insights and metrics for eslint-config-wikimedia
Gathering detailed insights and metrics for eslint-config-wikimedia
npm install eslint-config-wikimedia
0.28.2 / 2024-06-12
Published on 12 Jun 2024
0.28.1 / 2024-06-10
Published on 10 Jun 2024
0.28.0 / 2024-06-03
Published on 03 Jun 2024
0.27.0 / 2024-03-29
Published on 02 Apr 2024
0.26.0 / 2023-11-14
Published on 22 Nov 2023
0.25.1 / 2023-05-24
Published on 24 May 2023
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
29 Stars
496 Commits
20 Forks
10 Watching
7 Branches
38 Contributors
Updated on 08 Nov 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-28.6%
1,687
Compared to previous day
Last week
57%
21,915
Compared to previous week
Last month
112.6%
63,515
Compared to previous month
Last year
99.7%
722,576
Compared to previous year
17
3
1npm install --save-dev eslint-config-wikimedia
Then, configure ESLint with one or more .eslintrc.json
files as appropriate.
Below are some potential recommended uses:
This config allows ES6 code and browser native functions. It will complain about ES2016+ code and language features.
It also automatically applies the Vue plugin and Vue-specific rules to .vue
files.
.eslintrc.json
:
1{ 2 "extends": "wikimedia/client/es6" 3}
If you want to only allow ES5 code and browser native functions, you can use wikimedia/client/es5
instead.
This config adds the jQuery $
global, and additional rules preventing the use of jQuery features which are deprecated, have performance issues, or have simple ES6 alternatives.
.eslintrc.json
:
1{ 2 "extends": [ 3 "wikimedia/client/es6", 4 "wikimedia/jquery" 5 ] 6}
Code that runs in MediaWiki can use this config. It enforces rules that are specific to the MediaWiki codebase (core and extensions), such as correct documentation of mw.message
usage, and prohibiting self-closing tags in Vue templates.
.eslintrc.json
:
1{ 2 "extends": [ 3 "wikimedia/client/es6", 4 "wikimedia/mediawiki" 5 ] 6}
You can extend the above config by also adding a second .eslintrc.json
file in your tests directory:
tests/qunit/.eslintrc.json
:
1{ 2 "extends": [ 3 "wikimedia/mediawiki/qunit" 4 ] 5}
Or for standalone JavaScript libraries and Node.js projects:
tests/.eslintrc.json
:
1{ 2 "extends": [ 3 "wikimedia/qunit" 4 ] 5}
The following config will the Mocha environment and some Mocha related rules:
tests/mocha/.eslintrc.json
:
1{ 2 "root": true, 3 "extends": [ 4 "wikimedia/server", 5 "wikimedia/mocha" 6 ] 7}
The following config will enable WDIO globals, as well as the Mocha and server configs:
tests/selenium/.eslintrc.json
:
1{ 2 "root": true, 3 "extends": [ 4 "wikimedia/selenium" 5 ] 6}
This config allows ES2018 code and Node native functions (i.e., Node 10.x). It will complain about ES2019+ code and language features.
.eslintrc.json
:
1{ 2 "extends": "wikimedia/server" 3}
The wikimedia/server
config consists of wikimedia
, wikimedia/node
and wikimedia/language/es2018
. To use later versions of ES, for example ES2019, you can use the following config:
.eslintrc.json
:
1{ 2 "extends": [ 3 "wikimedia", 4 "wikimedia/node", 5 "wikimedia/language/es2019" 6 ] 7}
Please note that the basic project configuration does not specify any language or environmental defaults, and is unlikely to be suitable. However, if you wish to target clients with ES3 language support, or earlier versions of Node, this is a good place from which to start.
.eslintrc.json
:
1{ 2 "extends": "wikimedia" 3}
Major changes should be discussed on mediawiki.org or on the Wikitech mailing list beforehand.
Same approach as in ESLint, see https://github.com/eslint/eslint#user-content-semantic-versioning-policy.
No vulnerabilities found.
Reason
all changesets reviewed
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
2 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More