Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Commit

Permalink
Replace Prettier with eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 committed Mar 1, 2024
1 parent ae2b115 commit 432b999
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 17 deletions.
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Build
/vendor/
/coverage/
# Language files written automatically by TranslateWiki
/i18n/**/*.json
!/i18n/**/en.json
!/i18n/**/qqq.json
7 changes: 7 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"root": true,
"extends": [
"wikimedia/server",
"wikimedia/mediawiki"
]
}
8 changes: 0 additions & 8 deletions .prettierignore

This file was deleted.

3 changes: 0 additions & 3 deletions .prettierrc

This file was deleted.

26 changes: 26 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
'use strict';
module.exports = function ( grunt ) {
const conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
options: {
cache: true,
fix: grunt.option( 'fix' )
},
all: '.'
},
stylelint: {
all: [
'**/*.{css,less}',
'!node_modules/**',
'!vendor/**'
]
},
banana: conf.MessagesDirs
} );
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,19 @@
"description": "Let users handle sanctions.",
"private": true,
"scripts": {
"test": "npm -s run lint",
"lint": "npm -s run lint:prettier && npm -s run lint:i18n",
"lint:prettier": "prettier '**/*.{js,json,css,less,md,yml}' --check",
"test": "grunt test",
"lint:i18n": "banana-checker --requireLowerCase=0 i18n/",
"fix": "prettier '**/*.{js,json,css,less,md,yml}' --write",
"minify-svg": "svgo --config=.svgo.config.js -q -r -f modules/visualeditor/ui/images/",
"selenium-daily": "npm run selenium-test",
"selenium-test": "wdio tests/selenium/wdio.conf.js"
},
"devDependencies": {
"@prettier/plugin-xml": "^2.2.0",
"@wdio/cli": "^7.29.1",
"@wdio/dot-reporter": "^7.25.1",
"@wdio/junit-reporter": "^7.26.0",
"@wdio/local-runner": "^7.20.9",
"@wdio/mocha-framework": "^7.24.1",
"grunt-banana-checker": "^0.10.0",
"prettier": "^2.8.1",
"svgo": "^2.3.1",
"wdio-mediawiki": "^2.2.0"
}
Expand Down

0 comments on commit 432b999

Please sign in to comment.