diff --git a/package.json b/package.json index acdd8d9b39..335c30544b 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ }, "devDependencies": { "@ava/babel": "^1.0.1", - "@babel/code-frame": "7.12.11", + "@babel/code-frame": "7.12.13", "@babel/core": "7.12.10", "@babel/eslint-parser": "7.12.1", "@lubien/fixture-beta-package": "^1.0.0-beta.1", diff --git a/test/snapshots/no-instanceof-array.js.md b/test/snapshots/no-instanceof-array.js.md index 4e3f712456..600fa4e9ea 100644 --- a/test/snapshots/no-instanceof-array.js.md +++ b/test/snapshots/no-instanceof-array.js.md @@ -132,24 +132,24 @@ Generated by [AVA](https://avajs.dev). 13 | ) 14 | // comment before instanceof 15 | instanceof - 16 | + 16 | 17 | // comment after instanceof - 18 | + 18 | 19 | ( 20 | // comment - 21 | + 21 | 22 | ( - 23 | + 23 | 24 | // comment - 25 | + 25 | 26 | Array - 27 | + 27 | 28 | // comment 29 | ) - 30 | + 30 | 31 | // comment 32 | ) - 33 | + 33 | 34 | // comment > Output @@ -169,21 +169,21 @@ Generated by [AVA](https://avajs.dev). 12 | // comment␊ 13 | )␊ 14 | // comment before instanceof␊ - 15 | ␊ + 15 |␊ 16 | // comment after instanceof␊ - 17 | ␊ + 17 |␊ 18 | // comment␊ - 19 | ␊ - 20 | ␊ + 19 |␊ + 20 |␊ 21 | // comment␊ - 22 | ␊ - 23 | ␊ + 22 |␊ + 23 |␊ 24 | // comment␊ - 25 | ␊ - 26 | ␊ + 25 |␊ + 26 |␊ 27 | // comment␊ - 28 | ␊ - 29 | ␊ + 28 |␊ + 29 |␊ 30 | // comment␊ ` @@ -220,40 +220,40 @@ Generated by [AVA](https://avajs.dev). | ^^^^^^^^^^^␊ > 15 | instanceof␊ | ^^^^^^^^^^^␊ - > 16 | ␊ + > 16 |␊ | ^^^^^^^^^^^␊ > 17 | // comment after instanceof␊ | ^^^^^^^^^^^␊ - > 18 | ␊ + > 18 |␊ | ^^^^^^^^^^^␊ > 19 | (␊ | ^^^^^^^^^^^␊ > 20 | // comment␊ | ^^^^^^^^^^^␊ - > 21 | ␊ + > 21 |␊ | ^^^^^^^^^^^␊ > 22 | (␊ | ^^^^^^^^^^^␊ - > 23 | ␊ + > 23 |␊ | ^^^^^^^^^^^␊ > 24 | // comment␊ | ^^^^^^^^^^^␊ - > 25 | ␊ + > 25 |␊ | ^^^^^^^^^^^␊ > 26 | Array␊ | ^^^^^^^^^^^␊ - > 27 | ␊ + > 27 |␊ | ^^^^^^^^^^^␊ > 28 | // comment␊ | ^^^^^^^^^^^␊ > 29 | )␊ | ^^^^^^^^^^^␊ - > 30 | ␊ + > 30 |␊ | ^^^^^^^^^^^␊ > 31 | // comment␊ | ^^^^^^^^^^^␊ > 32 | )␊ | ^^ Use `Array.isArray()` instead of `instanceof Array`.␊ - 33 | ␊ + 33 |␊ 34 | // comment␊ ` diff --git a/test/snapshots/no-instanceof-array.js.snap b/test/snapshots/no-instanceof-array.js.snap index 059f6eea18..c03bd94eec 100644 Binary files a/test/snapshots/no-instanceof-array.js.snap and b/test/snapshots/no-instanceof-array.js.snap differ diff --git a/test/snapshots/prefer-add-event-listener.js.md b/test/snapshots/prefer-add-event-listener.js.md index fcb697cf92..cf98208d8a 100644 --- a/test/snapshots/prefer-add-event-listener.js.md +++ b/test/snapshots/prefer-add-event-listener.js.md @@ -284,14 +284,14 @@ Generated by [AVA](https://avajs.dev). ## Invalid #19 1 | const foo = require('foo'); - 2 | + 2 | 3 | foo.onerror = () => {}; > Output `␊ 1 | const foo = require('foo');␊ - 2 | ␊ + 2 |␊ 3 | foo.addEventListener('error', () => {});␊ ` @@ -299,21 +299,21 @@ Generated by [AVA](https://avajs.dev). `␊ 1 | const foo = require('foo');␊ - 2 | ␊ + 2 |␊ > 3 | foo.onerror = () => {};␊ | ^^^^^^^ Prefer `addEventListener` over `onerror`.␊ ` ## Invalid #20 1 | import foo from 'foo'; - 2 | + 2 | 3 | foo.onerror = () => {}; > Output `␊ 1 | import foo from 'foo';␊ - 2 | ␊ + 2 |␊ 3 | foo.addEventListener('error', () => {});␊ ` @@ -321,17 +321,17 @@ Generated by [AVA](https://avajs.dev). `␊ 1 | import foo from 'foo';␊ - 2 | ␊ + 2 |␊ > 3 | foo.onerror = () => {};␊ | ^^^^^^^ Prefer `addEventListener` over `onerror`.␊ ` ## Invalid #21 1 | foo.onerror = () => {}; - 2 | + 2 | 3 | function bar() { 4 | const koa = require('koa'); - 5 | + 5 | 6 | koa.onerror = () => {}; 7 | } @@ -339,10 +339,10 @@ Generated by [AVA](https://avajs.dev). `␊ 1 | foo.addEventListener('error', () => {});␊ - 2 | ␊ + 2 |␊ 3 | function bar() {␊ 4 | const koa = require('koa');␊ - 5 | ␊ + 5 |␊ 6 | koa.onerror = () => {};␊ 7 | }␊ ` @@ -352,10 +352,10 @@ Generated by [AVA](https://avajs.dev). `␊ > 1 | foo.onerror = () => {};␊ | ^^^^^^^ Prefer `addEventListener` over `onerror`.␊ - 2 | ␊ + 2 |␊ 3 | function bar() {␊ 4 | const koa = require('koa');␊ - 5 | ␊ + 5 |␊ 6 | koa.onerror = () => {};␊ 7 | }␊ ` @@ -363,7 +363,7 @@ Generated by [AVA](https://avajs.dev). ## Invalid #22 1 | const Koa = require('koa'); 2 | const app = new Koa(); - 3 | + 3 | 4 | app.onerror = () => {}; > Options @@ -383,7 +383,7 @@ Generated by [AVA](https://avajs.dev). `␊ 1 | const Koa = require('koa');␊ 2 | const app = new Koa();␊ - 3 | ␊ + 3 |␊ 4 | app.addEventListener('error', () => {});␊ ` @@ -392,7 +392,7 @@ Generated by [AVA](https://avajs.dev). `␊ 1 | const Koa = require('koa');␊ 2 | const app = new Koa();␊ - 3 | ␊ + 3 |␊ > 4 | app.onerror = () => {};␊ | ^^^^^^^ Prefer `addEventListener` over `onerror`.␊ ` @@ -400,7 +400,7 @@ Generated by [AVA](https://avajs.dev). ## Invalid #23 1 | import {Koa as Foo} from 'koa'; 2 | const app = new Foo(); - 3 | + 3 | 4 | app.onerror = () => {}; > Options @@ -420,7 +420,7 @@ Generated by [AVA](https://avajs.dev). `␊ 1 | import {Koa as Foo} from 'koa';␊ 2 | const app = new Foo();␊ - 3 | ␊ + 3 |␊ 4 | app.addEventListener('error', () => {});␊ ` @@ -429,7 +429,7 @@ Generated by [AVA](https://avajs.dev). `␊ 1 | import {Koa as Foo} from 'koa';␊ 2 | const app = new Foo();␊ - 3 | ␊ + 3 |␊ > 4 | app.onerror = () => {};␊ | ^^^^^^^ Prefer `addEventListener` over `onerror`.␊ ` @@ -437,7 +437,7 @@ Generated by [AVA](https://avajs.dev). ## Invalid #24 1 | const sax = require('sax'); 2 | const parser = sax.parser(); - 3 | + 3 | 4 | parser.onerror = () => {}; > Options @@ -457,7 +457,7 @@ Generated by [AVA](https://avajs.dev). `␊ 1 | const sax = require('sax');␊ 2 | const parser = sax.parser();␊ - 3 | ␊ + 3 |␊ 4 | parser.addEventListener('error', () => {});␊ ` @@ -466,7 +466,7 @@ Generated by [AVA](https://avajs.dev). `␊ 1 | const sax = require('sax');␊ 2 | const parser = sax.parser();␊ - 3 | ␊ + 3 |␊ > 4 | parser.onerror = () => {};␊ | ^^^^^^^ Prefer `addEventListener` over `onerror`.␊ ` diff --git a/test/snapshots/prefer-add-event-listener.js.snap b/test/snapshots/prefer-add-event-listener.js.snap index df6568e3c5..a9e445b1bb 100644 Binary files a/test/snapshots/prefer-add-event-listener.js.snap and b/test/snapshots/prefer-add-event-listener.js.snap differ