Skip to content

Commit 41cf5e1

Browse files
authored
feat: ease the default no-console severity to warn (#5241)
As ESLint 6 removes this rule from the recommended config https://eslint.org/docs/user-guide/migrating-to-6.0.0#eslint-recommended-has-been-updated
1 parent a1782f9 commit 41cf5e1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/@vue/cli-plugin-eslint/eslintOptions.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ exports.config = (api, preset) => {
77
ecmaVersion: 2020
88
},
99
rules: {
10-
'no-console': makeJSOnlyValue(`process.env.NODE_ENV === 'production' ? 'error' : 'off'`),
11-
'no-debugger': makeJSOnlyValue(`process.env.NODE_ENV === 'production' ? 'error' : 'off'`)
10+
'no-console': makeJSOnlyValue(`process.env.NODE_ENV === 'production' ? 'warn' : 'off'`),
11+
'no-debugger': makeJSOnlyValue(`process.env.NODE_ENV === 'production' ? 'warn' : 'off'`)
1212
}
1313
}
1414

packages/@vue/cli-service-global/lib/globalConfigPlugin.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ module.exports = function createConfigPlugin (context, entry, asLib) {
114114
parser: 'babel-eslint'
115115
},
116116
rules: {
117-
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
118-
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
117+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
118+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
119119
}
120120
}
121121
}))

packages/@vue/cli-ui-addon-widgets/.eslintrc.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module.exports = {
88
'@vue/standard'
99
],
1010
rules: {
11-
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
12-
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
11+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
12+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
1313
},
1414
parserOptions: {
1515
parser: 'babel-eslint'

0 commit comments

Comments
 (0)