mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-12-03 18:26:18 +00:00
Replaced CSSLint with StyleLint
Removed old csslint package and added grunt-stylelint and stylelint config for Wikimedia. Fixed the violations caused by this change. Bug: T206506 Change-Id: Ieb1f087de859f5321c4f1fe65c0e3bf7b655ca15
This commit is contained in:
parent
25d5cccbd3
commit
e0d100ca60
13
.csslintrc
13
.csslintrc
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
"adjoining-classes": false,
|
|
||||||
"box-model": false,
|
|
||||||
"box-sizing": false,
|
|
||||||
"fallback-colors": false,
|
|
||||||
"important": false,
|
|
||||||
"outline-none": false,
|
|
||||||
"qualified-headings": false,
|
|
||||||
"unique-headings": false,
|
|
||||||
"universal-selector": false,
|
|
||||||
"unqualified-attributes": false,
|
|
||||||
"gradients": false
|
|
||||||
}
|
|
3
.stylelintrc
Normal file
3
.stylelintrc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"extends": "stylelint-config-wikimedia"
|
||||||
|
}
|
10
Gruntfile.js
10
Gruntfile.js
|
@ -11,7 +11,7 @@ module.exports = function ( grunt ) {
|
||||||
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
||||||
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
||||||
grunt.loadNpmTasks( 'grunt-eslint' );
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
||||||
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
||||||
|
|
||||||
grunt.initConfig( {
|
grunt.initConfig( {
|
||||||
banana: conf.MessagesDirs,
|
banana: conf.MessagesDirs,
|
||||||
|
@ -29,15 +29,15 @@ module.exports = function ( grunt ) {
|
||||||
'!vendor/**'
|
'!vendor/**'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
csslint: {
|
stylelint: {
|
||||||
options: {
|
options: {
|
||||||
csslintrc: '.csslintrc'
|
syntax: 'less'
|
||||||
},
|
},
|
||||||
all: 'resources/**/*.css'
|
src: [ 'resources/**/*.{css,less}' ]
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
grunt.registerTask( 'lint', [ 'eslint', 'csslint', 'jsonlint', 'banana' ] );
|
grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
|
||||||
grunt.registerTask( 'test', [ 'lint', 'banana' ] );
|
grunt.registerTask( 'test', [ 'lint', 'banana' ] );
|
||||||
grunt.registerTask( 'default', 'test' );
|
grunt.registerTask( 'default', 'test' );
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,10 +8,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint-config-wikimedia": "0.5.0",
|
"eslint-config-wikimedia": "0.5.0",
|
||||||
|
"stylelint-config-wikimedia": "0.4.3",
|
||||||
|
"stylelint": "9.2.0",
|
||||||
"grunt": "1.0.3",
|
"grunt": "1.0.3",
|
||||||
"grunt-banana-checker": "0.4.0",
|
"grunt-banana-checker": "0.4.0",
|
||||||
"grunt-contrib-csslint": "0.5.0",
|
|
||||||
"grunt-eslint": "20.1.0",
|
"grunt-eslint": "20.1.0",
|
||||||
"grunt-jsonlint": "1.0.7"
|
"grunt-jsonlint": "1.0.7",
|
||||||
|
"grunt-stylelint": "0.10.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,15 +22,16 @@
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mw-cookiewarning-dismiss, a {
|
a,
|
||||||
background-color: #3C3C3C;
|
.mw-cookiewarning-dismiss {
|
||||||
|
background-color: #3c3c3c;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
border: none;
|
border: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-decoration: none !important;
|
text-decoration: none !important; /* stylelint-disable-line declaration-no-important */
|
||||||
color: white !important;
|
color: #fff;
|
||||||
margin-right: 0.5em;
|
margin-right: 0.5em;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
@contentPaddingTablet: @iconGutterWidth + @iconGutterWidth + @iconSize;
|
@contentPaddingTablet: @iconGutterWidth + @iconGutterWidth + @iconSize;
|
||||||
|
|
||||||
.mw-cookiewarning-container {
|
.mw-cookiewarning-container {
|
||||||
background-color: #ffffff;
|
background-color: #fff;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
font-size: @cookieWarningFontSize;
|
font-size: @cookieWarningFontSize;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|
Loading…
Reference in a new issue