Skip to content

Commit 97d8638

Browse files
committed
Remove invalid options in example code
CLIEngine doesn’t support `extends` and `ecmaFeatures`.
1 parent 505779d commit 97d8638

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

example/config.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,7 @@ gulp.task('basic', () => {
2626
gulp.task('inline-config', () => {
2727
return gulp.src('../test/fixtures/**/*.js')
2828
.pipe(eslint({
29-
// gulp-eslint's config works much like .eslintrc with a dash of ESLint's CLI
30-
31-
'extends': 'eslint:recommended',
32-
33-
'ecmaFeatures': {
34-
'modules': true
35-
},
36-
37-
'rules': {
29+
rules: {
3830
'no-alert': 0,
3931
'no-bitwise': 0,
4032
'camelcase': 1,
@@ -61,11 +53,9 @@ gulp.task('inline-config', () => {
6153
'no-unreachable': 2
6254
},
6355

64-
'globals': {
65-
'$': false
66-
},
56+
globals: ['$'],
6757

68-
'envs': {
58+
envs: {
6959
'node': true
7060
}
7161

example/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"globals": {
1414
"$": false
1515
},
16-
"env":{
16+
"env": {
1717
"browser": true,
1818
"node": true
1919
}

example/format.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ gulp.task('eslint-formatter', () => {
1717
.pipe(eslint.format('compact'));
1818
});
1919

20-
2120
gulp.task('custom-formatter', () => {
2221
function embolden(text) {
2322
return `\u001b[1m${text}\u001b[22m `;

0 commit comments

Comments
 (0)