feat(basic): ban deprecated syntax (#194)
This commit is contained in:
parent
0a9c9b0384
commit
0947ddb151
@ -263,21 +263,27 @@ module.exports = {
|
||||
'error',
|
||||
{ name: 'global', message: 'Use `globalThis` instead.' },
|
||||
{ name: 'self', message: 'Use `globalThis` instead.' },
|
||||
{ name: 'isNaN', message: 'Use `Number.isNaN` instead' },
|
||||
{ name: 'isFinite', message: 'Use `Number.isFinite` instead' },
|
||||
{ name: 'parseFloat', message: 'Use `Number.parseFloat` instead' },
|
||||
{ name: 'parseInt', message: 'Use `Number.parseInt` instead' },
|
||||
{ name: 'isNaN', message: 'Use `Number.isNaN` instead.' },
|
||||
{ name: 'isFinite', message: 'Use `Number.isFinite` instead.' },
|
||||
{ name: 'parseFloat', message: 'Use `Number.parseFloat` instead.' },
|
||||
{ name: 'parseInt', message: 'Use `Number.parseInt` instead.' },
|
||||
],
|
||||
'no-restricted-properties': [
|
||||
'error',
|
||||
{ object: 'globalThis', property: 'isNaN', message: 'Use `Number.isNaN` instead' },
|
||||
{ object: 'globalThis', property: 'isFinite', message: 'Use `Number.isFinite` instead' },
|
||||
{ object: 'globalThis', property: 'parseFloat', message: 'Use `Number.parseFloat` instead' },
|
||||
{ object: 'globalThis', property: 'parseInt', message: 'Use `Number.parseInt` instead' },
|
||||
{ object: 'window', property: 'isNaN', message: 'Use `Number.isNaN` instead' },
|
||||
{ object: 'window', property: 'isFinite', message: 'Use `Number.isFinite` instead' },
|
||||
{ object: 'window', property: 'parseFloat', message: 'Use `Number.parseFloat` instead' },
|
||||
{ object: 'window', property: 'parseInt', message: 'Use `Number.parseInt` instead' },
|
||||
{ object: 'globalThis', property: 'isNaN', message: 'Use `Number.isNaN` instead.' },
|
||||
{ object: 'globalThis', property: 'isFinite', message: 'Use `Number.isFinite` instead.' },
|
||||
{ object: 'globalThis', property: 'parseFloat', message: 'Use `Number.parseFloat` instead.' },
|
||||
{ object: 'globalThis', property: 'parseInt', message: 'Use `Number.parseInt` instead.' },
|
||||
{ object: 'window', property: 'isNaN', message: 'Use `Number.isNaN` instead.' },
|
||||
{ object: 'window', property: 'isFinite', message: 'Use `Number.isFinite` instead.' },
|
||||
{ object: 'window', property: 'parseFloat', message: 'Use `Number.parseFloat` instead.' },
|
||||
{ object: 'window', property: 'parseInt', message: 'Use `Number.parseInt` instead.' },
|
||||
{ object: 'Math', property: 'pow', message: 'Use the exponentiation operator (**) instead.' },
|
||||
{ property: '__proto__', message: 'Use `Object.getPrototypeOf` instead.' },
|
||||
{ property: '__defineGetter__', message: 'Use `Object.defineProperty` instead.' },
|
||||
{ property: '__defineSetter__', message: 'Use `Object.defineProperty` instead.' },
|
||||
{ property: '__lookupGetter__', message: 'Use `Object.getOwnPropertyDescriptor` instead.' },
|
||||
{ property: '__lookupSetter__', message: 'Use `Object.getOwnPropertyDescriptor` instead.' },
|
||||
],
|
||||
|
||||
// es6
|
||||
|
Loading…
Reference in New Issue
Block a user