build: Use wikimedia/server for root folder eslint config

Change-Id: I8b6938f2ac935724cf80e01096591e6a4c0cbbe0
This commit is contained in:
Ed Sanders 2023-09-04 18:13:32 +01:00
parent 2286a896bb
commit 1aec6764ad
6 changed files with 51 additions and 40 deletions

View file

@ -1,42 +1,6 @@
{ {
"root": true, "root": true,
"plugins": [
"no-jquery"
],
"extends": [ "extends": [
"plugin:no-jquery/all", "wikimedia/server"
"wikimedia/client-es6", ]
"wikimedia/jquery",
"wikimedia/mediawiki"
],
"env": {
"browser": true
},
"globals": {
"exports": true
},
"parserOptions": {
"sourceType": "module"
},
"settings": {},
"rules": {
"no-jquery/no-other-utils": "error",
"no-jquery/no-trigger": "error",
"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",
"mediawiki/no-nodelist-unsupported-methods": "off",
"jsdoc/no-undefined-types": "off",
"compat/compat": "off",
"mediawiki/class-doc": "off"
}
} }

View file

@ -1,3 +1,5 @@
'use strict';
/** /**
* SVGO Configuration * SVGO Configuration
* Compatible to v3.0.0+ * Compatible to v3.0.0+

View file

@ -1,3 +1,5 @@
'use strict';
// For a detailed explanation regarding each configuration property, visit: // For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html // https://jestjs.io/docs/en/configuration.html

View file

@ -1,4 +1,5 @@
/* global global */ 'use strict';
const mockMediaWiki = require( '@wikimedia/mw-node-qunit/src/mockMediaWiki.js' ); const mockMediaWiki = require( '@wikimedia/mw-node-qunit/src/mockMediaWiki.js' );
global.mw = mockMediaWiki(); global.mw = mockMediaWiki();
global.$ = require( 'jquery' ); global.$ = require( 'jquery' );

42
resources/.eslintrc.json Normal file
View file

@ -0,0 +1,42 @@
{
"root": true,
"plugins": [
"no-jquery"
],
"extends": [
"plugin:no-jquery/all",
"wikimedia/client-es6",
"wikimedia/jquery",
"wikimedia/mediawiki"
],
"env": {
"browser": true
},
"globals": {
"exports": true
},
"parserOptions": {
"sourceType": "module"
},
"settings": {},
"rules": {
"no-jquery/no-other-utils": "error",
"no-jquery/no-trigger": "error",
"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",
"mediawiki/no-nodelist-unsupported-methods": "off",
"jsdoc/no-undefined-types": "off",
"compat/compat": "off",
"mediawiki/class-doc": "off"
}
}

View file

@ -1,7 +1,7 @@
{ {
"root": true, "root": true,
"extends": [ "extends": [
"../.eslintrc.json" "../resources/.eslintrc"
], ],
"parserOptions": { "parserOptions": {
"ecmaVersion": 2018 "ecmaVersion": 2018