@foray1010/eslint-config 7.7.1 → 7.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [7.7.3](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@7.7.2...@foray1010/eslint-config@7.7.3) (2022-10-02)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **eslint-config:** prefer isomorphic global variables ([fa098bc](https://github.com/foray1010/common-presets/commit/fa098bc9890d86facd9c592f1ed42515bc94d2af))
11
+
12
+ ## [7.7.2](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@7.7.1...@foray1010/eslint-config@7.7.2) (2022-10-01)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **eslint-config:** allow **dirname and **filename in node.js ([14bf0bd](https://github.com/foray1010/common-presets/commit/14bf0bdbc29e20de085ea772529a415633980f22))
17
+
6
18
  ## [7.7.1](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@7.7.0...@foray1010/eslint-config@7.7.1) (2022-10-01)
7
19
 
8
20
  ### Bug Fixes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@foray1010/eslint-config",
4
- "version": "7.7.1",
4
+ "version": "7.7.3",
5
5
  "homepage": "https://github.com/foray1010/common-presets/tree/master/packages/eslint-config#readme",
6
6
  "bugs": "https://github.com/foray1010/common-presets/issues",
7
7
  "repository": {
@@ -56,5 +56,5 @@
56
56
  "publishConfig": {
57
57
  "access": "public"
58
58
  },
59
- "gitHead": "ecc4d8bbdfe9a51e4c6214723f029978a777a37e"
59
+ "gitHead": "959a348ec7c5c2373efed4523f1da2193142f071"
60
60
  }
package/presets/node.js CHANGED
@@ -4,6 +4,10 @@
4
4
  module.exports = {
5
5
  plugins: ['eslint-plugin-n'],
6
6
  globals: {
7
+ // used in commonjs and typescript
8
+ __dirname: 'readonly',
9
+ // used in commonjs and typescript
10
+ __filename: 'readonly',
7
11
  // hack to mute no-undef error, and show n/prefer-global/buffer error instead
8
12
  Buffer: 'readonly',
9
13
  // hack to mute no-undef error, and show n/prefer-global/process error instead
@@ -18,10 +22,20 @@ module.exports = {
18
22
  'n/no-unpublished-bin': 'error',
19
23
  // disallow unsupported Node.js built-in APIs on the specified version
20
24
  'n/no-unsupported-features/node-builtins': 'error',
21
- // prefer `import { Buffer } from 'node:buffer'`
25
+ // prefer `import { Buffer } from 'node:buffer'` as it is not isomorphic
22
26
  'n/prefer-global/buffer': ['error', 'never'],
23
- // prefer `import process from 'node:process'`
27
+ // prefer global `console` to be isomorphic
28
+ 'n/prefer-global/console': ['error', 'always'],
29
+ // prefer `import process from 'node:process'` as it is not isomorphic
24
30
  'n/prefer-global/process': ['error', 'never'],
31
+ // prefer global `TextDecoder` to be isomorphic
32
+ 'n/prefer-global/text-decoder': ['error', 'always'],
33
+ // prefer global `TextEncoder` to be isomorphic
34
+ 'n/prefer-global/text-encoder': ['error', 'always'],
35
+ // prefer global `URLSearchParams` to be isomorphic
36
+ 'n/prefer-global/url-search-params': ['error', 'always'],
37
+ // prefer global `URL` to be isomorphic
38
+ 'n/prefer-global/url': ['error', 'always'],
25
39
  // make `process.exit()` expressions the same code path as `throw`
26
40
  'n/process-exit-as-throw': 'error',
27
41
  // enforce shebang on the entry bin file