build: Convert resources/.eslintrc.js to json file

No javascript code in the file

Follow-Up: If778a8176b8a18cc9a5501f7147cc39fc0a48d45
Change-Id: I556d34a0f9e880cd4a0b97d7ef3e0831e2fef5eb
This commit is contained in:
Umherirrender 2023-04-11 19:06:04 +02:00
parent 5a1b568e58
commit 69dd6f1c5b
4 changed files with 55 additions and 55 deletions

View file

@ -1,4 +1,4 @@
{
"root": true,
"extends": "../../../resources/.eslintrc.js"
"extends": "../../../resources/.eslintrc.json"
}

View file

@ -1,53 +0,0 @@
'use strict';
module.exports = {
root: true,
extends: [
'wikimedia/client',
'wikimedia/jquery',
'wikimedia/mediawiki'
],
env: {
commonjs: true
},
globals: {
require: 'readonly'
},
rules: {
'no-restricted-properties': [
'error',
{
property: 'mobileFrontend',
message: 'Minerva should only make use of core code. Any code using mobileFrontend should be placed inside the MobileFrontend extension'
},
{
property: 'define',
message: 'The method `define` if used with mw.mobileFrontend is deprecated. Please use `module.exports`.'
},
{
property: 'done',
message: 'The method `done` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`.'
},
{
property: 'fail',
message: 'The method `fail` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`.'
},
{
property: 'always',
message: 'The method `always` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`.'
}
],
'object-property-newline': 'error',
'mediawiki/class-doc': 'off',
'no-use-before-define': 'off',
'no-underscore-dangle': 'off',
'jsdoc/no-undefined-types': 'off'
},
overrides: [ {
files: [ '.eslintrc.js' ],
extends: 'wikimedia/server',
rules: {
'compat/compat': 'off'
}
} ]
};

53
resources/.eslintrc.json Normal file
View file

@ -0,0 +1,53 @@
{
"root": true,
"extends": [
"wikimedia/client",
"wikimedia/jquery",
"wikimedia/mediawiki"
],
"env": {
"commonjs": true
},
"globals": {
"require": "readonly"
},
"rules": {
"no-restricted-properties": [
"error",
{
"property": "mobileFrontend",
"message": "Minerva should only make use of core code. Any code using mobileFrontend should be placed inside the MobileFrontend extension"
},
{
"property": "define",
"message": "The method `define` if used with mw.mobileFrontend is deprecated. Please use `module.exports`."
},
{
"property": "done",
"message": "The method `done` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`."
},
{
"property": "fail",
"message": "The method `fail` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`."
},
{
"property": "always",
"message": "The method `always` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`."
}
],
"object-property-newline": "error",
"mediawiki/class-doc": "off",
"no-use-before-define": "off",
"no-underscore-dangle": "off",
"jsdoc/no-undefined-types": "off"
},
"overrides": [
{
"files": [ ".eslintrc.json" ],
"extends": "wikimedia/server",
"rules": {
"compat/compat": "off"
}
}
]
}

View file

@ -1,7 +1,7 @@
{
"root": true,
"extends": [
"../../resources/.eslintrc.js",
"../../resources/.eslintrc.json",
"wikimedia/qunit"
],
"rules": {