build: Update linters

Change-Id: I66509997c334d9bf56ecd76ec238fc87672a7a3d
This commit is contained in:
Ed Sanders 2023-09-04 18:05:31 +01:00
parent 4bc2b9d806
commit ea7349cfee
7 changed files with 1194 additions and 661 deletions

1
.eslintignore Normal file
View file

@ -0,0 +1 @@
/vendor/

View file

@ -1,6 +1,10 @@
{ {
"extends": "stylelint-config-wikimedia", "extends": [
"stylelint-config-wikimedia/support-basic",
"stylelint-config-wikimedia/mediawiki"
],
"rules": { "rules": {
"selector-class-pattern": null,
"selector-max-id": null, "selector-max-id": null,
"no-descending-specificity": null "no-descending-specificity": null
} }

View file

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

View file

@ -13,12 +13,7 @@ module.exports = function ( grunt ) {
cache: true, cache: true,
fix: grunt.option( 'fix' ) fix: grunt.option( 'fix' )
}, },
all: [ all: [ '.' ]
'*.{js,json}',
'**/*.{js,json}',
'!node_modules/**',
'!vendor/**'
]
}, },
banana: conf.MessagesDirs, banana: conf.MessagesDirs,
stylelint: { stylelint: {

1827
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -6,12 +6,12 @@
"test": "grunt test" "test": "grunt test"
}, },
"devDependencies": { "devDependencies": {
"eslint-config-wikimedia": "0.25.0", "eslint-config-wikimedia": "0.25.1",
"grunt": "1.6.1", "grunt": "1.6.1",
"grunt-banana-checker": "0.11.0", "grunt-banana-checker": "0.11.0",
"grunt-eslint": "24.0.1", "grunt-eslint": "24.3.0",
"grunt-stylelint": "0.18.0", "grunt-stylelint": "0.19.0",
"stylelint-config-wikimedia": "0.15.0", "stylelint-config-wikimedia": "0.16.1",
"svgo": "3.0.2" "svgo": "3.0.2"
} }
} }

View file

@ -52,11 +52,11 @@
body { body {
font-family: sans-serif; font-family: sans-serif;
font-size: x-small; // Typical: 16px * 0.625 == 10px. font-size: x-small; // Typical: 16px * 0.625 == 10px.
// stylelint-disable value-list-comma-newline-after /* stylelint-disable stylistic/value-list-comma-newline-after, stylistic/declaration-colon-newline-after */
/* @embed */ /* @embed */
background: url( images/headbg.svg ) 0 0 no-repeat, background: url( images/headbg.svg ) 0 0 no-repeat,
@background url( images/headbg-gradient.svg ) 0 0 repeat-x; @background url( images/headbg-gradient.svg ) 0 0 repeat-x;
// stylelint-enable value-list-comma-newline-after /* stylelint-enable stylistic/value-list-comma-newline-after, stylistic/declaration-colon-newline-after */
color: @color-base; color: @color-base;
direction: ltr; /* Needed for RTL flipping */ direction: ltr; /* Needed for RTL flipping */
unicode-bidi: embed; unicode-bidi: embed;