mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 15:16:50 +00:00
build: Update linters
Also restructure eslint config so that * root files are linted with server rules * src and tests share config Change-Id: Ie4d0731ba9670af7f3e60cdfe3c4e331386b17c6
This commit is contained in:
parent
8cd688cb70
commit
461f949823
|
@ -1,45 +1,11 @@
|
|||
{
|
||||
"root": true,
|
||||
"plugins": [
|
||||
"no-jquery"
|
||||
],
|
||||
"extends": [
|
||||
"wikimedia/common",
|
||||
"wikimedia/language/es6",
|
||||
"wikimedia/jquery",
|
||||
"plugin:no-jquery/all",
|
||||
"wikimedia/mediawiki"
|
||||
"wikimedia/server"
|
||||
],
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"commonjs": true
|
||||
},
|
||||
"rules": {
|
||||
"no-jquery/no-jquery-constructor": "error",
|
||||
"no-jquery/no-find-collection": "error",
|
||||
"no-jquery/no-attr": "error",
|
||||
"no-jquery/no-class": "error",
|
||||
"no-jquery/no-text": "error",
|
||||
"no-jquery/no-css": "error",
|
||||
"no-jquery/no-other-methods": "error",
|
||||
"no-jquery/no-html": "error",
|
||||
"no-jquery/no-class-state": "error",
|
||||
"no-jquery/no-deferred": "error",
|
||||
"no-jquery/no-when": "error",
|
||||
"no-jquery/no-extend": "error",
|
||||
"compat/compat": "off",
|
||||
"no-use-before-define": "off",
|
||||
"jsdoc/no-undefined-types": "off",
|
||||
"no-dupe-keys": "warn",
|
||||
"yml/block-sequence": "warn",
|
||||
"yml/plain-scalar": "warn"
|
||||
},
|
||||
"settings": {
|
||||
"jsdoc": {
|
||||
"mode": "typescript"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
* https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG#Exemplified_safe_configuration
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
{
|
||||
|
|
1088
package-lock.json
generated
1088
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -42,15 +42,14 @@
|
|||
"@wikimedia/codex-icons": "0.14.0",
|
||||
"@wikimedia/mw-node-qunit": "7.0.0",
|
||||
"babel-loader": "8.0.4",
|
||||
"browserslist-config-wikimedia": "0.2.0",
|
||||
"browserslist-config-wikimedia": "0.5.1",
|
||||
"bundlesize": "0.18.1",
|
||||
"clean-webpack-plugin": "3.0.0",
|
||||
"cssjanus": "1.3.1",
|
||||
"eslint": "8.31.0",
|
||||
"eslint-config-wikimedia": "0.25.0",
|
||||
"eslint-config-wikimedia": "0.25.1",
|
||||
"eslint-plugin-no-jquery": "2.7.0",
|
||||
"expose-loader": "0.7.5",
|
||||
"grunt-banana-checker": "0.11.0",
|
||||
"grunt-banana-checker": "0.11.1",
|
||||
"jquery": "3.7.1",
|
||||
"jsdoc": "3.6.10",
|
||||
"less": "3.13.1",
|
||||
|
@ -59,7 +58,7 @@
|
|||
"pre-commit": "1.2.2",
|
||||
"redux": "4.0.1",
|
||||
"redux-thunk": "2.3.0",
|
||||
"stylelint-config-wikimedia": "0.15.0",
|
||||
"stylelint-config-wikimedia": "0.16.1",
|
||||
"svg-inline-loader": "0.8.2",
|
||||
"svgo": "3.0.2",
|
||||
"tap-mocha-reporter": "5.0.1",
|
||||
|
|
24
src/.eslintrc.json
Normal file
24
src/.eslintrc.json
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"root": true,
|
||||
"extends": [
|
||||
"./.eslintrcshared",
|
||||
"plugin:no-jquery/all"
|
||||
],
|
||||
"rules": {
|
||||
"no-jquery/no-jquery-constructor": "error",
|
||||
"no-jquery/no-find-collection": "error",
|
||||
"no-jquery/no-attr": "error",
|
||||
"no-jquery/no-class": "error",
|
||||
"no-jquery/no-text": "error",
|
||||
"no-jquery/no-css": "error",
|
||||
"no-jquery/no-other-methods": "error",
|
||||
"no-jquery/no-html": "error",
|
||||
"no-jquery/no-class-state": "error",
|
||||
"no-jquery/no-deferred": "error",
|
||||
"no-jquery/no-when": "error",
|
||||
"no-jquery/no-extend": "error",
|
||||
"compat/compat": "off",
|
||||
"no-use-before-define": "off",
|
||||
"jsdoc/no-undefined-types": "off"
|
||||
}
|
||||
}
|
20
src/.eslintrcshared.json
Normal file
20
src/.eslintrcshared.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"extends": [
|
||||
"wikimedia/common",
|
||||
"wikimedia/language/es6",
|
||||
"wikimedia/jquery",
|
||||
"wikimedia/mediawiki"
|
||||
],
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"commonjs": true
|
||||
},
|
||||
"settings": {
|
||||
"jsdoc": {
|
||||
"mode": "typescript"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,20 +1,14 @@
|
|||
{
|
||||
"root": true,
|
||||
"extends": [
|
||||
"../../src/.eslintrcshared",
|
||||
"wikimedia/qunit"
|
||||
],
|
||||
"rules": {
|
||||
"no-jquery/no-jquery-constructor": "off",
|
||||
"no-jquery/no-find-collection": "off",
|
||||
"no-jquery/no-attr": "off",
|
||||
"no-jquery/no-class": "off",
|
||||
"no-jquery/no-text": "off",
|
||||
"no-jquery/no-css": "off",
|
||||
"no-jquery/no-other-methods": "off",
|
||||
"no-jquery/no-html": "off",
|
||||
"no-jquery/no-class-state": "off",
|
||||
"no-jquery/no-deferred": "warn",
|
||||
"no-jquery/no-when": "warn",
|
||||
"no-jquery/no-extend": "warn",
|
||||
"no-jquery/no-class-state": "off",
|
||||
"es-x/no-hashbang": "warn"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* eslint-env node */
|
||||
'use strict';
|
||||
|
||||
const { CleanWebpackPlugin } = require( 'clean-webpack-plugin' );
|
||||
const path = require( 'path' );
|
||||
|
||||
|
|
Loading…
Reference in a new issue