From 4a40f94e0ef087cd254fa4bc9cf3e3943f29a52b Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Fri, 5 Nov 2021 18:24:22 +0800 Subject: [PATCH 1/2] Enforce strict mode --- create-ava-rule.js | 2 ++ index.js | 2 ++ package.json | 4 ++++ rules/assertion-arguments.js | 2 ++ rules/hooks-order.js | 2 ++ rules/max-asserts.js | 2 ++ rules/no-async-fn-without-await.js | 2 ++ rules/no-duplicate-modifiers.js | 2 ++ rules/no-identical-title.js | 2 ++ rules/no-ignored-test-files.js | 2 ++ rules/no-import-test-files.js | 2 ++ rules/no-incorrect-deep-equal.js | 2 ++ rules/no-inline-assertions.js | 2 ++ rules/no-nested-tests.js | 2 ++ rules/no-only-test.js | 2 ++ rules/no-skip-assert.js | 2 ++ rules/no-skip-test.js | 2 ++ rules/no-todo-implementation.js | 2 ++ rules/no-todo-test.js | 2 ++ rules/no-unknown-modifiers.js | 2 ++ rules/prefer-async-await.js | 2 ++ rules/prefer-power-assert.js | 2 ++ rules/prefer-t-regex.js | 2 ++ rules/test-title-format.js | 2 ++ rules/test-title.js | 2 ++ rules/use-t-throws-async-well.js | 2 ++ rules/use-t-well.js | 2 ++ rules/use-t.js | 2 ++ rules/use-test.js | 2 ++ rules/use-true-false.js | 2 ++ test/assertion-arguments.js | 2 ++ test/create-ava-rule.js | 2 ++ test/hooks-order.js | 2 ++ test/integration/eslint-config-ava-tester/index.js | 2 ++ test/integration/test.js | 2 ++ test/max-asserts.js | 2 ++ test/no-async-fn-without-await.js | 2 ++ test/no-duplicate-modifiers.js | 2 ++ test/no-identical-title.js | 2 ++ test/no-ignored-test-files.js | 2 ++ test/no-import-test-files.js | 2 ++ test/no-incorrect-deep-equal.js | 2 ++ test/no-inline-assertions.js | 2 ++ test/no-nested-tests.js | 2 ++ test/no-only-test.js | 2 ++ test/no-skip-assert.js | 2 ++ test/no-skip-test.js | 2 ++ test/no-todo-implementation.js | 2 ++ test/no-todo-test.js | 2 ++ test/no-unknown-modifiers.js | 2 ++ test/package.js | 2 ++ test/prefer-async-await.js | 2 ++ test/prefer-power-assert.js | 2 ++ test/prefer-t-regex.js | 2 ++ test/test-title-format.js | 2 ++ test/test-title.js | 2 ++ test/use-t-throws-async-well.js | 2 ++ test/use-t-well.js | 2 ++ test/use-t.js | 2 ++ test/use-test.js | 2 ++ test/use-true-false.js | 2 ++ test/util.js | 2 ++ util.js | 2 ++ 63 files changed, 128 insertions(+) diff --git a/create-ava-rule.js b/create-ava-rule.js index 44ab3a80..8c039da3 100644 --- a/create-ava-rule.js +++ b/create-ava-rule.js @@ -1,3 +1,5 @@ +'use strict'; + const {isDeepStrictEqual} = require('util'); const espurify = require('espurify'); const enhance = require('enhance-visitors'); diff --git a/index.js b/index.js index 3aef38d5..f671c8ff 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,5 @@ +'use strict'; + const path = require('path'); const importModules = require('import-modules'); diff --git a/package.json b/package.json index 33f470c6..ae414c3e 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,9 @@ "plugins": [ "eslint-plugin" ], + "parserOptions": { + "sourceType": "script" + }, "extends": [ "plugin:eslint-plugin/all" ], @@ -79,6 +82,7 @@ } ], "rules": { + "strict": "error", "ava/no-ignored-test-files": "off", "eslint-plugin/prefer-message-ids": "off", "eslint-plugin/require-meta-docs-description": "off", diff --git a/rules/assertion-arguments.js b/rules/assertion-arguments.js index 7054b94d..c1fb845e 100644 --- a/rules/assertion-arguments.js +++ b/rules/assertion-arguments.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const {getStaticValue, isOpeningParenToken, isCommaToken, findVariable} = require('eslint-utils'); const util = require('../util'); diff --git a/rules/hooks-order.js b/rules/hooks-order.js index 4e4cae97..752ef656 100644 --- a/rules/hooks-order.js +++ b/rules/hooks-order.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const createAvaRule = require('../create-ava-rule'); const util = require('../util'); diff --git a/rules/max-asserts.js b/rules/max-asserts.js index 46b44be7..faa48499 100644 --- a/rules/max-asserts.js +++ b/rules/max-asserts.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const util = require('../util'); const createAvaRule = require('../create-ava-rule'); diff --git a/rules/no-async-fn-without-await.js b/rules/no-async-fn-without-await.js index 29b0c24d..08f1a50a 100644 --- a/rules/no-async-fn-without-await.js +++ b/rules/no-async-fn-without-await.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const createAvaRule = require('../create-ava-rule'); const util = require('../util'); diff --git a/rules/no-duplicate-modifiers.js b/rules/no-duplicate-modifiers.js index bd0f28ea..9cf8063b 100644 --- a/rules/no-duplicate-modifiers.js +++ b/rules/no-duplicate-modifiers.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const util = require('../util'); const createAvaRule = require('../create-ava-rule'); diff --git a/rules/no-identical-title.js b/rules/no-identical-title.js index 82acb6c4..7a2eef61 100644 --- a/rules/no-identical-title.js +++ b/rules/no-identical-title.js @@ -1,3 +1,5 @@ +'use strict'; + const {isDeepStrictEqual} = require('util'); const espurify = require('espurify'); const {visitIf} = require('enhance-visitors'); diff --git a/rules/no-ignored-test-files.js b/rules/no-ignored-test-files.js index e97ca25c..e58a7d04 100644 --- a/rules/no-ignored-test-files.js +++ b/rules/no-ignored-test-files.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const util = require('../util'); const createAvaRule = require('../create-ava-rule'); diff --git a/rules/no-import-test-files.js b/rules/no-import-test-files.js index 9aac59b6..24a22f1f 100644 --- a/rules/no-import-test-files.js +++ b/rules/no-import-test-files.js @@ -1,3 +1,5 @@ +'use strict'; + const path = require('path'); const util = require('../util'); diff --git a/rules/no-incorrect-deep-equal.js b/rules/no-incorrect-deep-equal.js index 6106b40d..e021e81e 100644 --- a/rules/no-incorrect-deep-equal.js +++ b/rules/no-incorrect-deep-equal.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const util = require('../util'); const createAvaRule = require('../create-ava-rule'); diff --git a/rules/no-inline-assertions.js b/rules/no-inline-assertions.js index e16291f0..6bf2bf13 100644 --- a/rules/no-inline-assertions.js +++ b/rules/no-inline-assertions.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const createAvaRule = require('../create-ava-rule'); const util = require('../util'); diff --git a/rules/no-nested-tests.js b/rules/no-nested-tests.js index e3ddbd87..c53d9187 100644 --- a/rules/no-nested-tests.js +++ b/rules/no-nested-tests.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const createAvaRule = require('../create-ava-rule'); const util = require('../util'); diff --git a/rules/no-only-test.js b/rules/no-only-test.js index 1f2615a7..c1babdc5 100644 --- a/rules/no-only-test.js +++ b/rules/no-only-test.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const createAvaRule = require('../create-ava-rule'); const util = require('../util'); diff --git a/rules/no-skip-assert.js b/rules/no-skip-assert.js index a90ff3c2..4dd4411f 100644 --- a/rules/no-skip-assert.js +++ b/rules/no-skip-assert.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const util = require('../util'); const createAvaRule = require('../create-ava-rule'); diff --git a/rules/no-skip-test.js b/rules/no-skip-test.js index 42421e69..079bffa2 100644 --- a/rules/no-skip-test.js +++ b/rules/no-skip-test.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const createAvaRule = require('../create-ava-rule'); const util = require('../util'); diff --git a/rules/no-todo-implementation.js b/rules/no-todo-implementation.js index 5908cc4b..67e8a6da 100644 --- a/rules/no-todo-implementation.js +++ b/rules/no-todo-implementation.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const util = require('../util'); const createAvaRule = require('../create-ava-rule'); diff --git a/rules/no-todo-test.js b/rules/no-todo-test.js index 5a5a89e7..6c033bc8 100644 --- a/rules/no-todo-test.js +++ b/rules/no-todo-test.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const createAvaRule = require('../create-ava-rule'); const util = require('../util'); diff --git a/rules/no-unknown-modifiers.js b/rules/no-unknown-modifiers.js index 32533a99..ea14878d 100644 --- a/rules/no-unknown-modifiers.js +++ b/rules/no-unknown-modifiers.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const util = require('../util'); const createAvaRule = require('../create-ava-rule'); diff --git a/rules/prefer-async-await.js b/rules/prefer-async-await.js index 812733e2..c21c4b3e 100644 --- a/rules/prefer-async-await.js +++ b/rules/prefer-async-await.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const createAvaRule = require('../create-ava-rule'); const util = require('../util'); diff --git a/rules/prefer-power-assert.js b/rules/prefer-power-assert.js index 26cbe9a3..88bb716c 100644 --- a/rules/prefer-power-assert.js +++ b/rules/prefer-power-assert.js @@ -1,3 +1,5 @@ +'use strict'; + const {isDeepStrictEqual} = require('util'); const espurify = require('espurify'); const {visitIf} = require('enhance-visitors'); diff --git a/rules/prefer-t-regex.js b/rules/prefer-t-regex.js index d96cb5ca..0dbaa7fa 100644 --- a/rules/prefer-t-regex.js +++ b/rules/prefer-t-regex.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const createAvaRule = require('../create-ava-rule'); const util = require('../util'); diff --git a/rules/test-title-format.js b/rules/test-title-format.js index fd2b0478..acf3da3c 100644 --- a/rules/test-title-format.js +++ b/rules/test-title-format.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const createAvaRule = require('../create-ava-rule'); const util = require('../util'); diff --git a/rules/test-title.js b/rules/test-title.js index 0349b873..2e8d6703 100644 --- a/rules/test-title.js +++ b/rules/test-title.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const createAvaRule = require('../create-ava-rule'); const util = require('../util'); diff --git a/rules/use-t-throws-async-well.js b/rules/use-t-throws-async-well.js index deb9ba63..4a696b13 100644 --- a/rules/use-t-throws-async-well.js +++ b/rules/use-t-throws-async-well.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const util = require('../util'); const createAvaRule = require('../create-ava-rule'); diff --git a/rules/use-t-well.js b/rules/use-t-well.js index 339329ef..b636ca42 100644 --- a/rules/use-t-well.js +++ b/rules/use-t-well.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const MicroSpellingCorrecter = require('micro-spelling-correcter'); diff --git a/rules/use-t.js b/rules/use-t.js index 04d7e84e..bf0c1ee8 100644 --- a/rules/use-t.js +++ b/rules/use-t.js @@ -1,3 +1,5 @@ +'use strict'; + const {visitIf} = require('enhance-visitors'); const createAvaRule = require('../create-ava-rule'); const util = require('../util'); diff --git a/rules/use-test.js b/rules/use-test.js index a0b37467..4b3a1c48 100644 --- a/rules/use-test.js +++ b/rules/use-test.js @@ -1,3 +1,5 @@ +'use strict'; + const path = require('path'); const {isDeepStrictEqual} = require('util'); const espurify = require('espurify'); diff --git a/rules/use-true-false.js b/rules/use-true-false.js index 1aa06e97..dc52c04c 100644 --- a/rules/use-true-false.js +++ b/rules/use-true-false.js @@ -1,3 +1,5 @@ +'use strict'; + const {isDeepStrictEqual} = require('util'); const espree = require('espree'); const espurify = require('espurify'); diff --git a/test/assertion-arguments.js b/test/assertion-arguments.js index 032513b3..f9443b4b 100644 --- a/test/assertion-arguments.js +++ b/test/assertion-arguments.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/assertion-arguments'); diff --git a/test/create-ava-rule.js b/test/create-ava-rule.js index a93b2524..fe5bb229 100644 --- a/test/create-ava-rule.js +++ b/test/create-ava-rule.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const createAvaRule = require('../create-ava-rule'); diff --git a/test/hooks-order.js b/test/hooks-order.js index 3194827a..8853b14e 100644 --- a/test/hooks-order.js +++ b/test/hooks-order.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const {outdent} = require('outdent'); diff --git a/test/integration/eslint-config-ava-tester/index.js b/test/integration/eslint-config-ava-tester/index.js index 72a4d2b2..7f859050 100644 --- a/test/integration/eslint-config-ava-tester/index.js +++ b/test/integration/eslint-config-ava-tester/index.js @@ -1,3 +1,5 @@ +'use strict'; + module.exports = { parser: '@babel/eslint-parser', parserOptions: { diff --git a/test/integration/test.js b/test/integration/test.js index 3dc19a96..62604b7f 100644 --- a/test/integration/test.js +++ b/test/integration/test.js @@ -1,4 +1,6 @@ #!/usr/bin/env node +'use strict'; + const path = require('path'); const process = require('process'); const Listr = require('listr'); diff --git a/test/max-asserts.js b/test/max-asserts.js index 3f91e37d..94df6255 100644 --- a/test/max-asserts.js +++ b/test/max-asserts.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/max-asserts'); diff --git a/test/no-async-fn-without-await.js b/test/no-async-fn-without-await.js index cfeee1c4..d5741cf9 100644 --- a/test/no-async-fn-without-await.js +++ b/test/no-async-fn-without-await.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/no-async-fn-without-await'); diff --git a/test/no-duplicate-modifiers.js b/test/no-duplicate-modifiers.js index 3110fd88..739db83f 100644 --- a/test/no-duplicate-modifiers.js +++ b/test/no-duplicate-modifiers.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/no-duplicate-modifiers'); diff --git a/test/no-identical-title.js b/test/no-identical-title.js index 3f6091cb..fe08b0a5 100644 --- a/test/no-identical-title.js +++ b/test/no-identical-title.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/no-identical-title'); diff --git a/test/no-ignored-test-files.js b/test/no-ignored-test-files.js index 5d2adbd5..d5c9141b 100644 --- a/test/no-ignored-test-files.js +++ b/test/no-ignored-test-files.js @@ -1,3 +1,5 @@ +'use strict'; + const path = require('path'); const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); diff --git a/test/no-import-test-files.js b/test/no-import-test-files.js index 150f52c7..0699ed80 100644 --- a/test/no-import-test-files.js +++ b/test/no-import-test-files.js @@ -1,3 +1,5 @@ +'use strict'; + const path = require('path'); const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); diff --git a/test/no-incorrect-deep-equal.js b/test/no-incorrect-deep-equal.js index 80aa34f2..becbbc62 100644 --- a/test/no-incorrect-deep-equal.js +++ b/test/no-incorrect-deep-equal.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/no-incorrect-deep-equal'); diff --git a/test/no-inline-assertions.js b/test/no-inline-assertions.js index aeeb3f4e..f5fe5ff2 100644 --- a/test/no-inline-assertions.js +++ b/test/no-inline-assertions.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/no-inline-assertions'); diff --git a/test/no-nested-tests.js b/test/no-nested-tests.js index 79d202f1..d1aa5a4d 100644 --- a/test/no-nested-tests.js +++ b/test/no-nested-tests.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/no-nested-tests'); diff --git a/test/no-only-test.js b/test/no-only-test.js index bcca949d..6efe5c98 100644 --- a/test/no-only-test.js +++ b/test/no-only-test.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/no-only-test'); diff --git a/test/no-skip-assert.js b/test/no-skip-assert.js index 9f3834e4..5ee7d7f7 100644 --- a/test/no-skip-assert.js +++ b/test/no-skip-assert.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/no-skip-assert'); diff --git a/test/no-skip-test.js b/test/no-skip-test.js index 636a3dda..01957dff 100644 --- a/test/no-skip-test.js +++ b/test/no-skip-test.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/no-skip-test'); diff --git a/test/no-todo-implementation.js b/test/no-todo-implementation.js index 6761d7c9..7c9d7b32 100644 --- a/test/no-todo-implementation.js +++ b/test/no-todo-implementation.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/no-todo-implementation'); diff --git a/test/no-todo-test.js b/test/no-todo-test.js index 640586f3..b4191770 100644 --- a/test/no-todo-test.js +++ b/test/no-todo-test.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/no-todo-test'); diff --git a/test/no-unknown-modifiers.js b/test/no-unknown-modifiers.js index b3ab236c..ff5dbe83 100644 --- a/test/no-unknown-modifiers.js +++ b/test/no-unknown-modifiers.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/no-unknown-modifiers'); diff --git a/test/package.js b/test/package.js index 24520ee6..c93acebf 100644 --- a/test/package.js +++ b/test/package.js @@ -1,3 +1,5 @@ +'use strict'; + const fs = require('fs'); const path = require('path'); const test = require('ava'); diff --git a/test/prefer-async-await.js b/test/prefer-async-await.js index 9d1eb732..5c14a69c 100644 --- a/test/prefer-async-await.js +++ b/test/prefer-async-await.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/prefer-async-await'); diff --git a/test/prefer-power-assert.js b/test/prefer-power-assert.js index 60709e36..1b09798c 100644 --- a/test/prefer-power-assert.js +++ b/test/prefer-power-assert.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/prefer-power-assert'); diff --git a/test/prefer-t-regex.js b/test/prefer-t-regex.js index 2f36af15..f1cc44c6 100644 --- a/test/prefer-t-regex.js +++ b/test/prefer-t-regex.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/prefer-t-regex'); diff --git a/test/test-title-format.js b/test/test-title-format.js index dce851cc..e15c24ca 100644 --- a/test/test-title-format.js +++ b/test/test-title-format.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/test-title-format'); diff --git a/test/test-title.js b/test/test-title.js index 54a16181..106938b6 100644 --- a/test/test-title.js +++ b/test/test-title.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/test-title'); diff --git a/test/use-t-throws-async-well.js b/test/use-t-throws-async-well.js index f2df9125..4d1e4b91 100644 --- a/test/use-t-throws-async-well.js +++ b/test/use-t-throws-async-well.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/use-t-throws-async-well'); diff --git a/test/use-t-well.js b/test/use-t-well.js index abbb9ff2..fede5a50 100644 --- a/test/use-t-well.js +++ b/test/use-t-well.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/use-t-well'); diff --git a/test/use-t.js b/test/use-t.js index b18bcf14..7655e2c6 100644 --- a/test/use-t.js +++ b/test/use-t.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/use-t'); diff --git a/test/use-test.js b/test/use-test.js index 71f15596..2a300c46 100644 --- a/test/use-test.js +++ b/test/use-test.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/use-test'); diff --git a/test/use-true-false.js b/test/use-true-false.js index ba327a89..be177bb9 100644 --- a/test/use-true-false.js +++ b/test/use-true-false.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const avaRuleTester = require('eslint-ava-rule-tester'); const rule = require('../rules/use-true-false'); diff --git a/test/util.js b/test/util.js index 6e5ea265..93cd4921 100644 --- a/test/util.js +++ b/test/util.js @@ -1,3 +1,5 @@ +'use strict'; + const test = require('ava'); const util = require('../util'); const packageJson = require('../package'); diff --git a/util.js b/util.js index e251f944..b36932dd 100644 --- a/util.js +++ b/util.js @@ -1,3 +1,5 @@ +'use strict'; + const path = require('path'); const pkgDir = require('pkg-dir'); const resolveFrom = require('resolve-from'); From 46ef01c4ea8e95edb8f7c81005765a8cb1a4e1ed Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Fri, 5 Nov 2021 19:14:41 +0800 Subject: [PATCH 2/2] Disable `eslint-plugin/prefer-placeholders` --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index ae414c3e..64d5825d 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "eslint-plugin/prefer-message-ids": "off", "eslint-plugin/require-meta-docs-description": "off", "eslint-plugin/require-meta-has-suggestions": "off", + "eslint-plugin/prefer-placeholders": "off", "import/extensions": "off", "unicorn/prefer-module": "off" }