mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-12-18 09:11:42 +00:00
build: Simplify linter configs
* eslint: Already excludes node_modules by default.
https://eslint.org/docs/user-guide/configuring#ignoring
* eslint: Expands directories by default, much faster to
let ESLint crawl the directories while knowing what to exclude,
then to let Grunt expand **/** recursively run each file
individually.
This makes Grunt run ESLint the same way as one normally
would from the command line: `eslint .`, except without
the eslint CLI sub-process.
* eslint: Preserve the exclude for vendor via eslint config
so that it also works when running ESLint outside Grunt,
e.g. in IDEs or from the command line with extra options.
* stylelint: Ignores node_modules by default.
https://stylelint.io/user-guide/node-api/#files
Change-Id: I1a78e9d93e7666c1539bcf4a3bc50306cecf89ba
(cherry picked from commit 20f34321f4
)
This commit is contained in:
parent
6d983b645e
commit
7726ed6a5e
|
@ -9,11 +9,7 @@ module.exports = function ( grunt ) {
|
|||
|
||||
grunt.initConfig( {
|
||||
eslint: {
|
||||
all: [
|
||||
'**/*.js',
|
||||
'!node_modules/**',
|
||||
'!vendor/**'
|
||||
]
|
||||
all: '.'
|
||||
},
|
||||
stylelint: {
|
||||
options: {
|
||||
|
@ -21,7 +17,6 @@ module.exports = function ( grunt ) {
|
|||
},
|
||||
all: [
|
||||
'**/*.{css,less}',
|
||||
'!node_modules/**',
|
||||
'!vendor/**'
|
||||
]
|
||||
},
|
||||
|
|
|
@ -12,5 +12,8 @@
|
|||
"grunt-stylelint": "0.9.0",
|
||||
"stylelint": "8.2.0",
|
||||
"stylelint-config-wikimedia": "0.4.2"
|
||||
}
|
||||
},
|
||||
"eslintIgnore": [
|
||||
"vendor/**"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue