From 2b7cf18bd15736a125a826e8ac5ac683ec3ed9f6 Mon Sep 17 00:00:00 2001 From: zanminkian Date: Tue, 19 Sep 2023 18:43:54 +0000 Subject: [PATCH] feat(eslint-config): remove `__dirname` and `__filename` in globals --- .changeset/tasty-ghosts-sort.md | 5 +++++ packages/eslint-config/README.md | 1 + packages/eslint-config/src/base.js | 2 -- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changeset/tasty-ghosts-sort.md diff --git a/.changeset/tasty-ghosts-sort.md b/.changeset/tasty-ghosts-sort.md new file mode 100644 index 00000000..aca77f06 --- /dev/null +++ b/.changeset/tasty-ghosts-sort.md @@ -0,0 +1,5 @@ +--- +"@git-validator/eslint-config": patch +--- + +feat(eslint-config): remove `__dirname` and `__filename` in globals diff --git a/packages/eslint-config/README.md b/packages/eslint-config/README.md index 81c28564..f8ebb65c 100644 --- a/packages/eslint-config/README.md +++ b/packages/eslint-config/README.md @@ -14,6 +14,7 @@ A strict eslint config for better code quality. Based on [standard.js](https://g - One-line of config. - Work well with Prettier without conflicts. - Designed to work with TypeScript, NestJS and React out-of-box. +- Modern. ESM first. ## Usage diff --git a/packages/eslint-config/src/base.js b/packages/eslint-config/src/base.js index 26e268b8..5fd8f6d2 100644 --- a/packages/eslint-config/src/base.js +++ b/packages/eslint-config/src/base.js @@ -19,8 +19,6 @@ export default [ globals: { ...globals["shared-node-browser"], ...globals.browser, // TODO Optimize it. Node code should not use browser's objects. - __dirname: false, // TODO Remove it - __filename: false, // TODO Remove it }, }, linterOptions: {