@wistia/oxlint-config 0.9.0 → 0.9.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.
- package/package.json +1 -1
- package/rules/unicorn.mjs +14 -2
package/package.json
CHANGED
package/rules/unicorn.mjs
CHANGED
|
@@ -61,7 +61,18 @@ export const unicornRules = {
|
|
|
61
61
|
|
|
62
62
|
// Enforce specific import styles per module
|
|
63
63
|
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/import-style.html
|
|
64
|
-
|
|
64
|
+
// Override built-in defaults: this rule ships preferring default imports
|
|
65
|
+
// for `chalk`, `path`, and `node:path`. We require named imports instead.
|
|
66
|
+
'unicorn/import-style': [
|
|
67
|
+
'error',
|
|
68
|
+
{
|
|
69
|
+
styles: {
|
|
70
|
+
'node:path': { named: true, default: false },
|
|
71
|
+
path: { named: true, default: false },
|
|
72
|
+
chalk: { named: true, default: false },
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
],
|
|
65
76
|
|
|
66
77
|
// Require `new` when creating an object using a built-in constructor
|
|
67
78
|
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/new-for-builtins.html
|
|
@@ -379,7 +390,8 @@ export const unicornRules = {
|
|
|
379
390
|
|
|
380
391
|
// Prefer `globalThis` over `window` / `self` / `global`
|
|
381
392
|
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/prefer-global-this.html
|
|
382
|
-
|
|
393
|
+
// Decision: we should consider enabling this in the future but it will involve a lot of refactoring
|
|
394
|
+
'unicorn/prefer-global-this': 'off',
|
|
383
395
|
|
|
384
396
|
// Prefer `import.meta.{dirname,filename}` over CJS-equivalent constructions
|
|
385
397
|
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/prefer-import-meta-properties.html
|