Umherirrender has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/348776 )
Change subject: Migrate csslint to stylelint
......................................................................
Migrate csslint to stylelint
stylelint is used on all other wmf deployed extension for linting css or
less
Change-Id: I7bbebaeef59807101233f6784114549615ad5afd
---
D .csslintrc
A .stylelintrc
M Gruntfile.js
M package.json
4 files changed, 16 insertions(+), 25 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage
refs/changes/76/348776/1
diff --git a/.csslintrc b/.csslintrc
deleted file mode 100644
index 9bc8498..0000000
--- a/.csslintrc
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "adjoining-classes": false,
- "box-model": false,
- "box-sizing": false,
- "fallback-colors": false,
- "important": false,
- "outline-none": false,
- "qualified-headings": false,
- "universal-selector": false,
- "overqualified-elements": false,
- "unqualified-attributes": false,
- "ids": false
-}
diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 0000000..2c90730
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,3 @@
+{
+ "extends": "stylelint-config-wikimedia"
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index e9f0dfa..b8a50b0 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -7,7 +7,7 @@
/*jshint node:true */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
- grunt.loadNpmTasks( 'grunt-contrib-csslint' );
+ grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-jscs' );
@@ -27,33 +27,33 @@
jscs: {
src: '<%= jshint.all %>'
},
- csslint: {
- options: {
- csslintrc: '.csslintrc'
- },
- all: 'modules/**/*.css'
+ stylelint: {
+ all: [
+ '**/*.css',
+ '!node_modules/**'
+ ]
},
banana: {
all: 'i18n/'
},
watch: {
files: [
- '.{csslintrc,jscsrc,jshintignore,jshintrc}',
+ '.{jscsrc,jshintignore,jshintrc}',
'<%= jshint.all %>',
- '<%= jsonlint.all %>',
- '<%= csslint.all %>'
+ '<%= jsonlint.all %>'
],
tasks: 'test'
},
jsonlint: {
all: [
'**/*.json',
+ '.stylelintrc',
'!node_modules/**'
]
}
} );
- grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'csslint', 'jsonlint',
'banana' ] );
+ grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'stylelint',
'jsonlint', 'banana' ] );
grunt.registerTask( 'test', 'lint' );
grunt.registerTask( 'default', 'test' );
};
diff --git a/package.json b/package.json
index 4bffece..9ac33a5 100644
--- a/package.json
+++ b/package.json
@@ -10,11 +10,12 @@
"devDependencies": {
"grunt": "0.4.5",
"grunt-cli": "0.1.13",
- "grunt-contrib-csslint": "0.4.0",
"grunt-contrib-jshint": "0.11.3",
"grunt-contrib-watch": "0.6.1",
"grunt-banana-checker": "0.4.0",
"grunt-jscs": "2.6.0",
- "grunt-jsonlint": "1.0.7"
+ "grunt-jsonlint": "1.0.7",
+ "grunt-stylelint": "0.6.0",
+ "stylelint-config-wikimedia": "0.4.1"
}
}
--
To view, visit https://gerrit.wikimedia.org/r/348776
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7bbebaeef59807101233f6784114549615ad5afd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits