From a86bc7c29844998cae8c6e26af8ed775b1f5d778 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Thu, 17 Nov 2022 16:59:32 +0800 Subject: [PATCH] Remove outdated snapshots (#1968) --- .github/workflows/main.yml | 1 + test/snapshots/prefer-object-has-own.mjs.md | 213 ------------------ test/snapshots/prefer-object-has-own.mjs.snap | Bin 752 -> 0 bytes 3 files changed, 1 insertion(+), 213 deletions(-) delete mode 100644 test/snapshots/prefer-object-has-own.mjs.md delete mode 100644 test/snapshots/prefer-object-has-own.mjs.snap diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cf1730dfb5..4f1ef52f04 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,6 +33,7 @@ jobs: - uses: actions/setup-node@v3 - run: npm install - run: npm run lint + - run: rm -rf test/snapshots # Force update snapshots, https://github.com/avajs/ava/discussions/2754 - run: npx c8 ava --update-snapshots env: diff --git a/test/snapshots/prefer-object-has-own.mjs.md b/test/snapshots/prefer-object-has-own.mjs.md deleted file mode 100644 index 2807808694..0000000000 --- a/test/snapshots/prefer-object-has-own.mjs.md +++ /dev/null @@ -1,213 +0,0 @@ -# Snapshot report for `test/prefer-object-has-own.mjs` - -The actual snapshot is saved in `prefer-object-has-own.mjs.snap`. - -Generated by [AVA](https://avajs.dev). - -## Invalid #1 - 1 | const hasProperty = Object.prototype.hasOwnProperty.call(object, property); - -> Output - - `␊ - 1 | const hasProperty = Object.hasOwn(object, property);␊ - ` - -> Error 1/1 - - `␊ - > 1 | const hasProperty = Object.prototype.hasOwnProperty.call(object, property);␊ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.␊ - ` - -## Invalid #2 - 1 | const hasProperty = Object.prototype.hasOwnProperty.call(object, property,); - -> Output - - `␊ - 1 | const hasProperty = Object.hasOwn(object, property,);␊ - ` - -> Error 1/1 - - `␊ - > 1 | const hasProperty = Object.prototype.hasOwnProperty.call(object, property,);␊ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.␊ - ` - -## Invalid #3 - 1 | const hasProperty = (( Object.prototype.hasOwnProperty.call(object, property) )); - -> Output - - `␊ - 1 | const hasProperty = (( Object.hasOwn(object, property) ));␊ - ` - -> Error 1/1 - - `␊ - > 1 | const hasProperty = (( Object.prototype.hasOwnProperty.call(object, property) ));␊ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.␊ - ` - -## Invalid #4 - 1 | const hasProperty = (( Object.prototype.hasOwnProperty.call ))(object, property); - -> Output - - `␊ - 1 | const hasProperty = (( Object.hasOwn ))(object, property);␊ - ` - -> Error 1/1 - - `␊ - > 1 | const hasProperty = (( Object.prototype.hasOwnProperty.call ))(object, property);␊ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.␊ - ` - -## Invalid #5 - 1 | const hasProperty = (( Object.prototype.hasOwnProperty )).call(object, property); - -> Output - - `␊ - 1 | const hasProperty = Object.hasOwn(object, property);␊ - ` - -> Error 1/1 - - `␊ - > 1 | const hasProperty = (( Object.prototype.hasOwnProperty )).call(object, property);␊ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.␊ - ` - -## Invalid #6 - 1 | const hasProperty = (( Object.prototype )).hasOwnProperty.call(object, property); - -> Output - - `␊ - 1 | const hasProperty = Object.hasOwn(object, property);␊ - ` - -> Error 1/1 - - `␊ - > 1 | const hasProperty = (( Object.prototype )).hasOwnProperty.call(object, property);␊ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.␊ - ` - -## Invalid #7 - 1 | const hasProperty = (( Object )).prototype.hasOwnProperty.call(object, property); - -> Output - - `␊ - 1 | const hasProperty = Object.hasOwn(object, property);␊ - ` - -> Error 1/1 - - `␊ - > 1 | const hasProperty = (( Object )).prototype.hasOwnProperty.call(object, property);␊ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.␊ - ` - -## Invalid #8 - 1 | const hasProperty = {}.hasOwnProperty.call(object, property); - -> Output - - `␊ - 1 | const hasProperty = Object.hasOwn(object, property);␊ - ` - -> Error 1/1 - - `␊ - > 1 | const hasProperty = {}.hasOwnProperty.call(object, property);␊ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.␊ - ` - -## Invalid #9 - 1 | const hasProperty = (( {}.hasOwnProperty.call(object, property) )); - -> Output - - `␊ - 1 | const hasProperty = (( Object.hasOwn(object, property) ));␊ - ` - -> Error 1/1 - - `␊ - > 1 | const hasProperty = (( {}.hasOwnProperty.call(object, property) ));␊ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.␊ - ` - -## Invalid #10 - 1 | const hasProperty = (( {}.hasOwnProperty.call ))(object, property); - -> Output - - `␊ - 1 | const hasProperty = (( Object.hasOwn ))(object, property);␊ - ` - -> Error 1/1 - - `␊ - > 1 | const hasProperty = (( {}.hasOwnProperty.call ))(object, property);␊ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.␊ - ` - -## Invalid #11 - 1 | const hasProperty = (( {}.hasOwnProperty )).call(object, property); - -> Output - - `␊ - 1 | const hasProperty = Object.hasOwn(object, property);␊ - ` - -> Error 1/1 - - `␊ - > 1 | const hasProperty = (( {}.hasOwnProperty )).call(object, property);␊ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.␊ - ` - -## Invalid #12 - 1 | const hasProperty = (( {} )).hasOwnProperty.call(object, property); - -> Output - - `␊ - 1 | const hasProperty = Object.hasOwn(object, property);␊ - ` - -> Error 1/1 - - `␊ - > 1 | const hasProperty = (( {} )).hasOwnProperty.call(object, property);␊ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.␊ - ` - -## Invalid #13 - 1 | function foo(){return{}.hasOwnProperty.call(object, property)} - -> Output - - `␊ - 1 | function foo(){return Object.hasOwn(object, property)}␊ - ` - -> Error 1/1 - - `␊ - > 1 | function foo(){return{}.hasOwnProperty.call(object, property)}␊ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.␊ - ` diff --git a/test/snapshots/prefer-object-has-own.mjs.snap b/test/snapshots/prefer-object-has-own.mjs.snap deleted file mode 100644 index 369b0621df7d8401f4447705833628cb65675534..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 752 zcmVY000000009! zz{tSB%OD$~v8Q{V&vc*6qn{6T@^*mYSwsVr=jQt!>nZTk; zptv8XAuC(1nU%1S2`rin#aV0&43nj+?UxH_*2J2N{7~uQRAK^) zZh_)y>C6rbZ@V7Sbb=$Njpvx8qEz&+9T;x8t! zs2nE*Yj80zT-7++AO1u7gj2VUOlf82awf271r(=oGcde~d+@1;RVC|gY4u#?OQ(Qd z1&MBiVIBsCcg0gb-h4ZqX<6NGPU&A|aZF&*-%!lT$H4H3|IX1fbMM)D9SHLEh?#0uvPF+%1TWx(E|$lm*;8ZgLyg%1yBW=)?COYG5u!X zvcqYVh6c`?%M8U<`1jsl<%TAZq&j_OHGb%jiz z>r)d`6!O#HlDOOqaj>Sk9!f|sI^hXZL_pvQR$xG&h3p*yAzNLG)m_+4#vPU<1Sidc zZs3w5DE$!?ibF0r+CjrKtu!yWBr`uxAuT^&L$kUlwWPEtk5H)AqK4{KSg2w(jM#)& zi!T)pcz97e`~IM;V5E6wrc