@wistia/oxlint-config 1.1.0 → 1.1.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/rules/node.mjs +10 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/oxlint-config",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Wistia's Oxlint configurations",
5
5
  "packageManager": "yarn@4.17.0",
6
6
  "type": "module",
package/rules/node.mjs CHANGED
@@ -4,6 +4,10 @@ export const nodeRules = {
4
4
  plugins: ['node'],
5
5
  jsPlugins: [{ name: 'n', specifier: 'eslint-plugin-n' }],
6
6
  rules: {
7
+ // Require return statements after callbacks
8
+ // https://oxc.rs/docs/guide/usage/linter/rules/node/callback-return.html
9
+ 'node/callback-return': 'error',
10
+
7
11
  // Require error handling in callbacks
8
12
  // https://oxc.rs/docs/guide/usage/linter/rules/node/handle-callback-err.html
9
13
  'node/handle-callback-err': 'error',
@@ -22,13 +26,12 @@ export const nodeRules = {
22
26
 
23
27
  // Disallow the use of process.env
24
28
  // https://oxc.rs/docs/guide/usage/linter/rules/node/no-process-env.html
25
- // Decision: too opinionated for general use
29
+ // Decision: too opinionated for general use; individual projects can enable this rule if desired
26
30
  'node/no-process-env': 'off',
27
31
 
28
32
  // Require require() to be called in the top-level module scope
29
33
  // https://oxc.rs/docs/guide/usage/linter/rules/node/global-require.html
30
- // Decision: restricts valid language feature
31
- 'node/global-require': 'off',
34
+ 'node/global-require': 'error',
32
35
 
33
36
  //eslint-plugin-n rules via jsPlugins
34
37
 
@@ -70,7 +73,8 @@ export const nodeRules = {
70
73
 
71
74
  // Require return statements after callbacks
72
75
  // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/callback-return.md
73
- 'n/callback-return': 'error',
76
+ // Decision: handled by native node/callback-return
77
+ 'n/callback-return': 'off',
74
78
 
75
79
  // Enforce either module.exports or exports
76
80
  // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/exports-style.md
@@ -78,7 +82,8 @@ export const nodeRules = {
78
82
 
79
83
  // Require require() to be called in the top-level module scope
80
84
  // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/global-require.md
81
- 'n/global-require': 'error',
85
+ // Decision: handled by native node/global-require
86
+ 'n/global-require': 'off',
82
87
 
83
88
  // Disallow require calls to be mixed with regular variable declarations
84
89
  // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-mixed-requires.md