From ca7be87f9ed3ef7127b9faaca430afb382d845bb Mon Sep 17 00:00:00 2001 From: ikatyang Date: Sun, 3 Sep 2017 22:06:55 +0800 Subject: [PATCH] test: remove unnecessary `eslint-disable` --- .../__snapshots__/arg-parsing.js.snap | 16 +++------- .../__snapshots__/config-resolution.js.snap | 30 ++----------------- .../__tests__/__snapshots__/write.js.snap | 2 +- tests_integration/cli/arg-parsing/file.js | 2 -- .../cli/config/jest/Component.js | 1 - .../cli/config/jest/Component.test.js | 1 - .../cli/config/jest/__best-tests__/file.js | 1 - tests_integration/cli/config/js/file.js | 2 -- .../cli/config/no-config/file.js | 2 -- tests_integration/cli/config/package/file.js | 2 -- tests_integration/cli/config/rc-json/file.js | 2 -- .../cli/ignore-path/other-regular-modules.js | 1 - .../cli/ignore-path/regular-module.js | 1 - .../cli/multiple-patterns/directory/file.js | 1 - .../nested-directory/nested-directory-file.js | 1 - .../multiple-patterns/other-directory/file.js | 1 - .../nested-directory/nested-directory-file.js | 1 - .../other-regular-modules.js | 1 - .../cli/multiple-patterns/regular-module.js | 1 - .../not_node_modules/file.js | 1 - .../cli/with-node-modules/regular-module.js | 1 - tests_integration/cli/write/formated.js | 2 +- tests_integration/cli/write/unformated.js | 2 +- 23 files changed, 10 insertions(+), 65 deletions(-) diff --git a/tests_integration/__tests__/__snapshots__/arg-parsing.js.snap b/tests_integration/__tests__/__snapshots__/arg-parsing.js.snap index 0d546b34c..88c70b7e4 100644 --- a/tests_integration/__tests__/__snapshots__/arg-parsing.js.snap +++ b/tests_integration/__tests__/__snapshots__/arg-parsing.js.snap @@ -1,27 +1,21 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`boolean flags do not swallow the next argument 1`] = ` -"/* eslint-disable */ - -console.log('could be single quote and without semi'); +"console.log('could be single quote and without semi'); " `; exports[`boolean flags do not swallow the next argument 2`] = `""`; exports[`negated options work 1`] = ` -"/* eslint-disable */ - -console.log(\\"could be single quote and without semi\\") +"console.log(\\"could be single quote and without semi\\") " `; exports[`negated options work 2`] = `""`; exports[`unknown negated options are warned 1`] = ` -"/* eslint-disable */ - -console.log(\\"could be single quote and without semi\\"); +"console.log(\\"could be single quote and without semi\\"); " `; @@ -32,9 +26,7 @@ exports[`unknown negated options are warned 2`] = ` `; exports[`unknown options are warned 1`] = ` -"/* eslint-disable */ - -console.log(\\"could be single quote and without semi\\"); +"console.log(\\"could be single quote and without semi\\"); " `; diff --git a/tests_integration/__tests__/__snapshots__/config-resolution.js.snap b/tests_integration/__tests__/__snapshots__/config-resolution.js.snap index 57d5acb37..da0b82de5 100644 --- a/tests_integration/__tests__/__snapshots__/config-resolution.js.snap +++ b/tests_integration/__tests__/__snapshots__/config-resolution.js.snap @@ -1,20 +1,15 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`CLI overrides take precedence 1`] = ` -"/* eslint-disable */ -console.log( +"console.log( \\"should have semi\\" ); -/* eslint-disable */ console.log( \\"should not have semi\\" ) -/* eslint-disable */ console.log( \\"should have semi\\" ); -/* eslint-disable */ - function f() { console.log( \\"should have tab width 8\\" @@ -25,22 +20,16 @@ function f() { module.exports = { tabWidth: 8 }; -/* eslint-disable */ - function f() { console.log( \\"should have no semicolons\\" ) } -/* eslint-disable */ - function f() { console.log( \\"should have tab width 3\\" ); } -/* eslint-disable */ - function f() { console.log.apply( null, @@ -55,9 +44,7 @@ function f() { `; exports[`accepts configuration from --config 1`] = ` -"/* eslint-disable */ - -function f() { +"function f() { console.log(\\"should have tab width 8\\") } " @@ -69,14 +56,9 @@ exports[`resolves configuration file with --find-config-path file 1`] = ` `; exports[`resolves configuration from external files 1`] = ` -"/* eslint-disable */ -console.log(\\"should have semi\\"); -/* eslint-disable */ +"console.log(\\"should have semi\\"); console.log(\\"should not have semi\\") -/* eslint-disable */ console.log(\\"should have semi\\"); -/* eslint-disable */ - function f() { console.log(\\"should have tab width 8\\"); } @@ -85,18 +67,12 @@ function f() { module.exports = { tabWidth: 8 }; -/* eslint-disable */ - function f() { console.log(\\"should have no semicolons\\") } -/* eslint-disable */ - function f() { console.log(\\"should have tab width 3\\"); } -/* eslint-disable */ - function f() { console.log.apply(null, [ 'this file', diff --git a/tests_integration/__tests__/__snapshots__/write.js.snap b/tests_integration/__tests__/__snapshots__/write.js.snap index b53ff60ff..c4d93e198 100644 --- a/tests_integration/__tests__/__snapshots__/write.js.snap +++ b/tests_integration/__tests__/__snapshots__/write.js.snap @@ -10,7 +10,7 @@ exports[`do not write file with --write + invalid file 1`] = ` exports[`write file with --write + unformated file 1`] = ` Array [ Object { - "content": "var x = 1; // eslint-disable-line + "content": "var x = 1; ", "filename": "unformated.js", }, diff --git a/tests_integration/cli/arg-parsing/file.js b/tests_integration/cli/arg-parsing/file.js index 5a555e494..354349263 100644 --- a/tests_integration/cli/arg-parsing/file.js +++ b/tests_integration/cli/arg-parsing/file.js @@ -1,3 +1 @@ -/* eslint-disable */ - console.log("could be single quote and without semi") diff --git a/tests_integration/cli/config/jest/Component.js b/tests_integration/cli/config/jest/Component.js index a06d12cad..190c83a1c 100644 --- a/tests_integration/cli/config/jest/Component.js +++ b/tests_integration/cli/config/jest/Component.js @@ -1,2 +1 @@ -/* eslint-disable */ console.log("should not have semi") diff --git a/tests_integration/cli/config/jest/Component.test.js b/tests_integration/cli/config/jest/Component.test.js index 018894b0d..c4a064694 100644 --- a/tests_integration/cli/config/jest/Component.test.js +++ b/tests_integration/cli/config/jest/Component.test.js @@ -1,2 +1 @@ -/* eslint-disable */ console.log("should have semi"); diff --git a/tests_integration/cli/config/jest/__best-tests__/file.js b/tests_integration/cli/config/jest/__best-tests__/file.js index 018894b0d..c4a064694 100644 --- a/tests_integration/cli/config/jest/__best-tests__/file.js +++ b/tests_integration/cli/config/jest/__best-tests__/file.js @@ -1,2 +1 @@ -/* eslint-disable */ console.log("should have semi"); diff --git a/tests_integration/cli/config/js/file.js b/tests_integration/cli/config/js/file.js index ded607e0e..2e2b4c359 100644 --- a/tests_integration/cli/config/js/file.js +++ b/tests_integration/cli/config/js/file.js @@ -1,5 +1,3 @@ -/* eslint-disable */ - function f() { console.log("should have tab width 8"); } diff --git a/tests_integration/cli/config/no-config/file.js b/tests_integration/cli/config/no-config/file.js index da197b3c6..e5f18dccc 100644 --- a/tests_integration/cli/config/no-config/file.js +++ b/tests_integration/cli/config/no-config/file.js @@ -1,5 +1,3 @@ -/* eslint-disable */ - function f() { console.log("should have no semicolons"); } diff --git a/tests_integration/cli/config/package/file.js b/tests_integration/cli/config/package/file.js index d0bedd4f8..668d86f50 100644 --- a/tests_integration/cli/config/package/file.js +++ b/tests_integration/cli/config/package/file.js @@ -1,5 +1,3 @@ -/* eslint-disable */ - function f() { console.log("should have tab width 3"); } diff --git a/tests_integration/cli/config/rc-json/file.js b/tests_integration/cli/config/rc-json/file.js index f530b344e..e3340e7e9 100644 --- a/tests_integration/cli/config/rc-json/file.js +++ b/tests_integration/cli/config/rc-json/file.js @@ -1,5 +1,3 @@ -/* eslint-disable */ - function f() { console.log.apply(null, [ "this file", diff --git a/tests_integration/cli/ignore-path/other-regular-modules.js b/tests_integration/cli/ignore-path/other-regular-modules.js index 3d0ca1bd1..ad9a93a7c 100644 --- a/tests_integration/cli/ignore-path/other-regular-modules.js +++ b/tests_integration/cli/ignore-path/other-regular-modules.js @@ -1,2 +1 @@ -/* eslint-disable */ 'use strict'; diff --git a/tests_integration/cli/ignore-path/regular-module.js b/tests_integration/cli/ignore-path/regular-module.js index 3d0ca1bd1..ad9a93a7c 100644 --- a/tests_integration/cli/ignore-path/regular-module.js +++ b/tests_integration/cli/ignore-path/regular-module.js @@ -1,2 +1 @@ -/* eslint-disable */ 'use strict'; diff --git a/tests_integration/cli/multiple-patterns/directory/file.js b/tests_integration/cli/multiple-patterns/directory/file.js index 3d0ca1bd1..ad9a93a7c 100644 --- a/tests_integration/cli/multiple-patterns/directory/file.js +++ b/tests_integration/cli/multiple-patterns/directory/file.js @@ -1,2 +1 @@ -/* eslint-disable */ 'use strict'; diff --git a/tests_integration/cli/multiple-patterns/directory/nested-directory/nested-directory-file.js b/tests_integration/cli/multiple-patterns/directory/nested-directory/nested-directory-file.js index 3d0ca1bd1..ad9a93a7c 100644 --- a/tests_integration/cli/multiple-patterns/directory/nested-directory/nested-directory-file.js +++ b/tests_integration/cli/multiple-patterns/directory/nested-directory/nested-directory-file.js @@ -1,2 +1 @@ -/* eslint-disable */ 'use strict'; diff --git a/tests_integration/cli/multiple-patterns/other-directory/file.js b/tests_integration/cli/multiple-patterns/other-directory/file.js index 3d0ca1bd1..ad9a93a7c 100644 --- a/tests_integration/cli/multiple-patterns/other-directory/file.js +++ b/tests_integration/cli/multiple-patterns/other-directory/file.js @@ -1,2 +1 @@ -/* eslint-disable */ 'use strict'; diff --git a/tests_integration/cli/multiple-patterns/other-directory/nested-directory/nested-directory-file.js b/tests_integration/cli/multiple-patterns/other-directory/nested-directory/nested-directory-file.js index 3d0ca1bd1..ad9a93a7c 100644 --- a/tests_integration/cli/multiple-patterns/other-directory/nested-directory/nested-directory-file.js +++ b/tests_integration/cli/multiple-patterns/other-directory/nested-directory/nested-directory-file.js @@ -1,2 +1 @@ -/* eslint-disable */ 'use strict'; diff --git a/tests_integration/cli/multiple-patterns/other-regular-modules.js b/tests_integration/cli/multiple-patterns/other-regular-modules.js index 3d0ca1bd1..ad9a93a7c 100644 --- a/tests_integration/cli/multiple-patterns/other-regular-modules.js +++ b/tests_integration/cli/multiple-patterns/other-regular-modules.js @@ -1,2 +1 @@ -/* eslint-disable */ 'use strict'; diff --git a/tests_integration/cli/multiple-patterns/regular-module.js b/tests_integration/cli/multiple-patterns/regular-module.js index 3d0ca1bd1..ad9a93a7c 100644 --- a/tests_integration/cli/multiple-patterns/regular-module.js +++ b/tests_integration/cli/multiple-patterns/regular-module.js @@ -1,2 +1 @@ -/* eslint-disable */ 'use strict'; diff --git a/tests_integration/cli/with-node-modules/not_node_modules/file.js b/tests_integration/cli/with-node-modules/not_node_modules/file.js index 3d0ca1bd1..ad9a93a7c 100644 --- a/tests_integration/cli/with-node-modules/not_node_modules/file.js +++ b/tests_integration/cli/with-node-modules/not_node_modules/file.js @@ -1,2 +1 @@ -/* eslint-disable */ 'use strict'; diff --git a/tests_integration/cli/with-node-modules/regular-module.js b/tests_integration/cli/with-node-modules/regular-module.js index 3d0ca1bd1..ad9a93a7c 100644 --- a/tests_integration/cli/with-node-modules/regular-module.js +++ b/tests_integration/cli/with-node-modules/regular-module.js @@ -1,2 +1 @@ -/* eslint-disable */ 'use strict'; diff --git a/tests_integration/cli/write/formated.js b/tests_integration/cli/write/formated.js index f574abb13..b506100a9 100644 --- a/tests_integration/cli/write/formated.js +++ b/tests_integration/cli/write/formated.js @@ -1 +1 @@ -var x = 1; // eslint-disable-line +var x = 1; diff --git a/tests_integration/cli/write/unformated.js b/tests_integration/cli/write/unformated.js index 825b1e313..646611c06 100644 --- a/tests_integration/cli/write/unformated.js +++ b/tests_integration/cli/write/unformated.js @@ -1 +1 @@ -var x = 1; // eslint-disable-line \ No newline at end of file +var x = 1; \ No newline at end of file