@wistia/oxlint-config 1.1.0 → 1.2.0
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/package.json +1 -1
- package/rules/import.mjs +1 -1
- package/rules/node.mjs +10 -5
package/package.json
CHANGED
package/rules/import.mjs
CHANGED
|
@@ -195,7 +195,7 @@ export const importRules = {
|
|
|
195
195
|
'import-x-js/order': [
|
|
196
196
|
'error',
|
|
197
197
|
{
|
|
198
|
-
groups: [['builtin', 'external', 'internal'], 'index', ['parent', 'sibling']],
|
|
198
|
+
groups: ['type', ['builtin', 'external', 'internal'], 'index', ['parent', 'sibling']],
|
|
199
199
|
'newlines-between': 'never',
|
|
200
200
|
},
|
|
201
201
|
],
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|