Skip to content

Commit

Permalink
fix: add missing strict mode directives (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Jul 8, 2023
1 parent 76f52a7 commit c91d11b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use strict";

module.exports = {
env: {
es2019: true,
Expand Down Expand Up @@ -34,6 +36,8 @@ module.exports = {
],
parserOptions: {
ecmaVersion: 2019,
// Explicitly tell ESLint to parse JavaScript as CommonJS, as airbnb-base sets this to "modules" for ECMAScript
sourceType: "script",
},
plugins: [
"import",
Expand All @@ -51,5 +55,6 @@ module.exports = {
"prefer-destructuring": ["error", { object: true, array: false }],
"promise/prefer-await-to-callbacks": "warn",
"promise/prefer-await-to-then": "warn",
strict: ["error", "global"],
},
};
2 changes: 2 additions & 0 deletions scripts/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use strict";

module.exports = {
rules: {
"import/no-extraneous-dependencies": [
Expand Down
3 changes: 3 additions & 0 deletions scripts/license-checker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/* eslint-disable security/detect-object-injection */
/* eslint-disable security-node/detect-crlf */

"use strict";

const checker = require("license-checker");
const copyLeftLicenses = require("spdx-copyleft");
const { promisify } = require("util");
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use strict";

const fp = require("fastify-plugin");
/**
* @author Frazer Smith
Expand Down
2 changes: 2 additions & 0 deletions src/index.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use strict";

const Fastify = require("fastify");
const plugin = require(".");

Expand Down

0 comments on commit c91d11b

Please sign in to comment.