Skip to content

Commit 71e617a

Browse files
committed
fix(rules): update remaining v2 syntax
1 parent 1fc3832 commit 71e617a

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

rules/best-practices.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ module.exports = {
293293

294294
// require using Error objects as Promise rejection reasons
295295
// http://eslint.org/docs/rules/prefer-promise-reject-errors
296-
'prefer-promise-reject-errors': ['on', { allowEmptyReject: true }],
296+
'prefer-promise-reject-errors': ['error', { allowEmptyReject: true }],
297297

298298
// enforce the consistent use of the radix argument when using parseInt()
299299
// http://eslint.org/docs/rules/radix

rules/es2015.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ module.exports = {
119119

120120
// require destructuring from arrays and/or objects
121121
// http://eslint.org/docs/rules/prefer-destructuring
122-
'prefer-destructuring': ['on', {
122+
'prefer-destructuring': ['error', {
123123
array: true,
124124
object: true,
125125
}, {

rules/imports.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ module.exports = {
121121

122122
// disallow namespace imports
123123
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md
124-
'import/no-namespace': 'on',
124+
'import/no-namespace': 'error',
125125

126126
// Ensure consistent use of file extension within the import path
127127
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md
@@ -132,7 +132,7 @@ module.exports = {
132132

133133
// Enforce a convention in module import order
134134
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md
135-
'import/order': ['on', {
135+
'import/order': ['error', {
136136
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
137137
'newlines-between': 'never',
138138
}],

rules/stylistic-issues.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ module.exports = {
7777

7878
// enforce the consistent use of either function declarations or expressions
7979
// http://eslint.org/docs/rules/func-style
80-
'func-style': ['on', 'expression'],
80+
'func-style': ['error', 'expression'],
8181

8282
// disallow specified identifiers
8383
// http://eslint.org/docs/rules/id-blacklist
@@ -129,7 +129,7 @@ module.exports = {
129129

130130
// enforce position of line comments
131131
// http://eslint.org/docs/rules/line-comment-position
132-
'line-comment-position': ['on', {
132+
'line-comment-position': ['error', {
133133
position: 'above',
134134
ignorePattern: '',
135135
applyDefaultPatterns: true,
@@ -190,7 +190,7 @@ module.exports = {
190190

191191
// enforce newlines between operands of ternary expressions
192192
// http://eslint.org/docs/rules/multiline-ternary
193-
'multiline-ternary': ['on', 'never'],
193+
'multiline-ternary': ['error', 'never'],
194194

195195
// require constructor names to begin with a capital letter
196196
// http://eslint.org/docs/rules/new-cap

rules/variables.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module.exports = {
3838

3939
// disallow the use of undefined as an identifier
4040
// http://eslint.org/docs/rules/no-undefined
41-
'no-undefined': 'on',
41+
'no-undefined': 'error',
4242

4343
// disallow unused variables
4444
// http://eslint.org/docs/rules/no-unused-vars

0 commit comments

Comments
 (0)