File tree Expand file tree Collapse file tree 1 file changed +29
-9
lines changed Expand file tree Collapse file tree 1 file changed +29
-9
lines changed Original file line number Diff line number Diff line change @@ -53,21 +53,41 @@ src(['scripts/*.js']) // Read files.
53
53
Or use the plugin API to do things like:
54
54
55
55
``` javascript
56
- gulp .src ([' **/*.js' , ' !node_modules/**' ])
56
+ // gulpfile.mjs
57
+ import js from ' @eslint/js' ;
58
+ import jquery from ' eslint-plugin-jquery' ;
59
+ import globals from ' globals' ;
60
+ import gulp from ' gulp' ;
61
+ import gulpESLintNew from ' gulp-eslint-new' ;
62
+
63
+ export default
64
+ () =>
65
+ gulp .src ([' **/*.{js,mjs}' , ' !node_modules/**' ])
57
66
.pipe
58
67
(
59
68
gulpESLintNew
60
69
(
61
70
{
71
+ configType: ' flat' ,
62
72
overrideConfig:
63
- {
64
- env: { browser: true , commonjs: true , jquery: true },
65
- extends: [' eslint:recommended' , ' plugin:jquery/slim' ],
66
- globals: { chrome: ' readonly' },
67
- plugins: [' jquery' ],
68
- rules: { ' strict' : ' error' },
69
- },
70
- warnIgnored: true ,
73
+ [
74
+ js .configs .recommended ,
75
+ jquery .configs .slim ,
76
+ {
77
+ languageOptions:
78
+ {
79
+ globals:
80
+ {
81
+ ... globals .browser ,
82
+ ... globals .jquery ,
83
+ chrome: ' readonly' ,
84
+ },
85
+ },
86
+ rules: { ' strict' : ' error' },
87
+ },
88
+ ],
89
+ plugins: { jquery },
90
+ warnIgnored: true ,
71
91
},
72
92
),
73
93
)
You can’t perform that action at this time.
0 commit comments