@wistia/oxlint-config 0.7.3 → 0.7.5
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 +2 -1
- package/rules/barrel-files.mjs +3 -0
- package/rules/base.mjs +223 -2
- package/rules/import.mjs +100 -38
- package/rules/node.mjs +23 -13
- package/rules/promise.mjs +2 -0
- package/rules/react-a11y.mjs +6 -1
- package/rules/react.mjs +95 -63
- package/rules/typescript.mjs +45 -2
- package/rules/vitest.mjs +84 -82
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/oxlint-config",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.5",
|
|
4
4
|
"description": "Wistia's Oxlint configurations",
|
|
5
5
|
"packageManager": "yarn@4.14.1",
|
|
6
6
|
"type": "module",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"changeset": "changeset",
|
|
45
|
+
"disabled": "node scripts/list-disabled-rules.mjs",
|
|
45
46
|
"format": "oxfmt .",
|
|
46
47
|
"format:ci": "oxfmt --check .",
|
|
47
48
|
"outdated": "yarn upgrade-interactive",
|
package/rules/barrel-files.mjs
CHANGED
|
@@ -5,14 +5,17 @@ export const barrelFilesRules = {
|
|
|
5
5
|
rules: {
|
|
6
6
|
// Avoid barrel files
|
|
7
7
|
// https://github.com/thepassle/eslint-plugin-barrel-files/blob/main/docs/rules/avoid-barrel-files.md
|
|
8
|
+
// Decision: too opinionated for general use
|
|
8
9
|
'eslint-plugin-barrel-files/avoid-barrel-files': 'off',
|
|
9
10
|
|
|
10
11
|
// Avoid importing barrel files
|
|
11
12
|
// https://github.com/thepassle/eslint-plugin-barrel-files/blob/main/docs/rules/avoid-importing-barrel-files.md
|
|
13
|
+
// Decision: too opinionated for general use
|
|
12
14
|
'eslint-plugin-barrel-files/avoid-importing-barrel-files': 'off',
|
|
13
15
|
|
|
14
16
|
// Avoid namespace imports from barrel files
|
|
15
17
|
// https://github.com/thepassle/eslint-plugin-barrel-files/blob/main/docs/rules/avoid-namespace-import.md
|
|
18
|
+
// Decision: too opinionated for general use
|
|
16
19
|
'eslint-plugin-barrel-files/avoid-namespace-import': 'off',
|
|
17
20
|
|
|
18
21
|
// Avoid re-export all from barrel files
|
package/rules/base.mjs
CHANGED
|
@@ -229,6 +229,7 @@ export const baseRules = {
|
|
|
229
229
|
|
|
230
230
|
// Require braces around arrow function bodies
|
|
231
231
|
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/arrow-body-style.html
|
|
232
|
+
// Decision: stylistic choice best left to formatter
|
|
232
233
|
'eslint/arrow-body-style': 'off',
|
|
233
234
|
|
|
234
235
|
// Enforce the use of variables within the scope they are defined
|
|
@@ -399,7 +400,7 @@ export const baseRules = {
|
|
|
399
400
|
|
|
400
401
|
// Disallow magic numbers
|
|
401
402
|
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-magic-numbers.html
|
|
402
|
-
//
|
|
403
|
+
// Decision: this rule is too noisy to be a default and was commonly disabled inline
|
|
403
404
|
'eslint/no-magic-numbers': 'off',
|
|
404
405
|
|
|
405
406
|
// Disallow use of chained assignment expressions
|
|
@@ -492,7 +493,7 @@ export const baseRules = {
|
|
|
492
493
|
|
|
493
494
|
// Disallow specified modules when loaded by import
|
|
494
495
|
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-restricted-imports.html
|
|
495
|
-
//
|
|
496
|
+
// Decision: this should be set at a project-level config if necessary
|
|
496
497
|
'eslint/no-restricted-imports': 'off',
|
|
497
498
|
|
|
498
499
|
// Disallow assignment operators in return statements
|
|
@@ -655,6 +656,166 @@ export const baseRules = {
|
|
|
655
656
|
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/yoda.html
|
|
656
657
|
'eslint/yoda': 'error',
|
|
657
658
|
|
|
659
|
+
// Enforce or disallow capitalization of the first letter of a comment
|
|
660
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/capitalized-comments.html
|
|
661
|
+
// Decision: too opinionated for general use
|
|
662
|
+
'eslint/capitalized-comments': 'off',
|
|
663
|
+
|
|
664
|
+
// Enforce a maximum cyclomatic complexity allowed in a program
|
|
665
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/complexity.html
|
|
666
|
+
// Decision: too opinionated for general use
|
|
667
|
+
'eslint/complexity': 'off',
|
|
668
|
+
|
|
669
|
+
// Require following curly brace conventions
|
|
670
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/curly.html
|
|
671
|
+
// Decision: stylistic choice best left to formatter
|
|
672
|
+
'eslint/curly': 'off',
|
|
673
|
+
|
|
674
|
+
// Require function names to match the name of the variable or property to which they are assigned
|
|
675
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/func-name-matching.html
|
|
676
|
+
// Decision: too opinionated for general use
|
|
677
|
+
'eslint/func-name-matching': 'off',
|
|
678
|
+
|
|
679
|
+
// Require or disallow initialization in variable declarations
|
|
680
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/init-declarations.html
|
|
681
|
+
// Decision: too opinionated for general use
|
|
682
|
+
'eslint/init-declarations': 'off',
|
|
683
|
+
|
|
684
|
+
// Require or disallow logical assignment operator shorthand
|
|
685
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/logical-assignment-operators.html
|
|
686
|
+
// Decision: too opinionated for general use
|
|
687
|
+
'eslint/logical-assignment-operators': 'off',
|
|
688
|
+
|
|
689
|
+
// Enforce a maximum depth that blocks can be nested
|
|
690
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/max-depth.html
|
|
691
|
+
// Decision: too opinionated for general use
|
|
692
|
+
'eslint/max-depth': 'off',
|
|
693
|
+
|
|
694
|
+
// Enforce a maximum number of lines per file
|
|
695
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/max-lines.html
|
|
696
|
+
// Decision: too opinionated for general use
|
|
697
|
+
'eslint/max-lines': 'off',
|
|
698
|
+
|
|
699
|
+
// Enforce a maximum number of lines of code in a function
|
|
700
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/max-lines-per-function.html
|
|
701
|
+
// Decision: too opinionated for general use
|
|
702
|
+
'eslint/max-lines-per-function': 'off',
|
|
703
|
+
|
|
704
|
+
// Enforce a maximum depth that callbacks can be nested
|
|
705
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/max-nested-callbacks.html
|
|
706
|
+
// Decision: too opinionated for general use
|
|
707
|
+
'eslint/max-nested-callbacks': 'off',
|
|
708
|
+
|
|
709
|
+
// Enforce a maximum number of parameters in function definitions
|
|
710
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/max-params.html
|
|
711
|
+
// Decision: too opinionated for general use
|
|
712
|
+
'eslint/max-params': 'off',
|
|
713
|
+
|
|
714
|
+
// Enforce a maximum number of statements allowed in function blocks
|
|
715
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/max-statements.html
|
|
716
|
+
// Decision: too opinionated for general use
|
|
717
|
+
'eslint/max-statements': 'off',
|
|
718
|
+
|
|
719
|
+
// Require regex literals to escape division operators
|
|
720
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-div-regex.html
|
|
721
|
+
// Decision: too opinionated for general use
|
|
722
|
+
'eslint/no-div-regex': 'off',
|
|
723
|
+
|
|
724
|
+
// Disallow duplicate module imports
|
|
725
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-duplicate-imports.html
|
|
726
|
+
// Decision: handled by import plugin
|
|
727
|
+
'eslint/no-duplicate-imports': 'off',
|
|
728
|
+
|
|
729
|
+
// Disallow null comparisons without type-checking operators
|
|
730
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-eq-null.html
|
|
731
|
+
// Decision: too opinionated for general use
|
|
732
|
+
'eslint/no-eq-null': 'off',
|
|
733
|
+
|
|
734
|
+
// Disallow inline comments after code
|
|
735
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-inline-comments.html
|
|
736
|
+
// Decision: inline comments are occasionally necessary
|
|
737
|
+
'eslint/no-inline-comments': 'off',
|
|
738
|
+
|
|
739
|
+
// Disallow negated conditions
|
|
740
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-negated-condition.html
|
|
741
|
+
// Decision: too opinionated for general use
|
|
742
|
+
'eslint/no-negated-condition': 'off',
|
|
743
|
+
|
|
744
|
+
// Disallow specified names in exports
|
|
745
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-restricted-exports.html
|
|
746
|
+
// Decision: requires project-specific configuration
|
|
747
|
+
'eslint/no-restricted-exports': 'off',
|
|
748
|
+
|
|
749
|
+
// Disallow certain properties on certain objects
|
|
750
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-restricted-properties.html
|
|
751
|
+
// Decision: requires project-specific configuration
|
|
752
|
+
'eslint/no-restricted-properties': 'off',
|
|
753
|
+
|
|
754
|
+
// Disallow ternary operators
|
|
755
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-ternary.html
|
|
756
|
+
// Decision: restricts valid language feature
|
|
757
|
+
'eslint/no-ternary': 'off',
|
|
758
|
+
|
|
759
|
+
// Disallow the use of undeclared variables unless mentioned in global comments
|
|
760
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-undef.html
|
|
761
|
+
// Decision: handled by TypeScript
|
|
762
|
+
'eslint/no-undef': 'off',
|
|
763
|
+
|
|
764
|
+
// Disallow the use of undefined as an identifier
|
|
765
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-undefined.html
|
|
766
|
+
// Decision: restricts valid language feature
|
|
767
|
+
'eslint/no-undefined': 'off',
|
|
768
|
+
|
|
769
|
+
// Disallow dangling underscores in identifiers
|
|
770
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-underscore-dangle.html
|
|
771
|
+
// Decision: too opinionated for general use
|
|
772
|
+
'eslint/no-underscore-dangle': 'off',
|
|
773
|
+
|
|
774
|
+
// Disallow confusing multiline expressions
|
|
775
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unexpected-multiline.html
|
|
776
|
+
// Decision: stylistic choice best left to formatter
|
|
777
|
+
'eslint/no-unexpected-multiline': 'off',
|
|
778
|
+
|
|
779
|
+
// Disallow assignments that are never used
|
|
780
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-useless-assignment.html
|
|
781
|
+
// Decision: handled by TypeScript noUnusedLocals
|
|
782
|
+
'eslint/no-useless-assignment': 'off',
|
|
783
|
+
|
|
784
|
+
// Disallow unnecessary calls to .call() and .apply()
|
|
785
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-useless-call.html
|
|
786
|
+
// Decision: too opinionated for general use
|
|
787
|
+
'eslint/no-useless-call': 'off',
|
|
788
|
+
|
|
789
|
+
// Disallow specified warning terms in comments
|
|
790
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-warning-comments.html
|
|
791
|
+
// Decision: too opinionated for general use
|
|
792
|
+
'eslint/no-warning-comments': 'off',
|
|
793
|
+
|
|
794
|
+
// Require or disallow method and property shorthand syntax for object literals
|
|
795
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/object-shorthand.html
|
|
796
|
+
// Decision: feels overprescriptive to enforce this style choice
|
|
797
|
+
'eslint/object-shorthand': 'off',
|
|
798
|
+
|
|
799
|
+
// Enforce the use of u or v flag on regular expressions
|
|
800
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/require-unicode-regexp.html
|
|
801
|
+
// Decision: too opinionated for general use
|
|
802
|
+
'eslint/require-unicode-regexp': 'off',
|
|
803
|
+
|
|
804
|
+
// Enforce sorted import declarations within modules
|
|
805
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/sort-imports.html
|
|
806
|
+
// Decision: handled by import plugin
|
|
807
|
+
'eslint/sort-imports': 'off',
|
|
808
|
+
|
|
809
|
+
// Require object keys to be sorted
|
|
810
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/sort-keys.html
|
|
811
|
+
// Decision: too opinionated for general use
|
|
812
|
+
'eslint/sort-keys': 'off',
|
|
813
|
+
|
|
814
|
+
// Require variables within the same declaration block to be sorted
|
|
815
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/sort-vars.html
|
|
816
|
+
// Decision: too opinionated for general use
|
|
817
|
+
'eslint/sort-vars': 'off',
|
|
818
|
+
|
|
658
819
|
//oxc rules - these are bug-catchers that oxlint can detect natively.
|
|
659
820
|
|
|
660
821
|
// Disallow calling array methods on arguments (it's array-like, not an array)
|
|
@@ -708,5 +869,65 @@ export const baseRules = {
|
|
|
708
869
|
// Disallow passing functions to array methods when signatures don't match
|
|
709
870
|
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/uninvoked-array-callback.html
|
|
710
871
|
'oxc/uninvoked-array-callback': 'error',
|
|
872
|
+
|
|
873
|
+
// Disallow use of approximate mathematical constants
|
|
874
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/approx-constant.html
|
|
875
|
+
'oxc/approx-constant': 'error',
|
|
876
|
+
|
|
877
|
+
// Disallow incorrect use of bitwise operators where logical operators were intended
|
|
878
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/bad-bitwise-operator.html
|
|
879
|
+
'oxc/bad-bitwise-operator': 'error',
|
|
880
|
+
|
|
881
|
+
// Disallow branches in if/else that share identical code
|
|
882
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/branches-sharing-code.html
|
|
883
|
+
// Decision: too noisy in practice
|
|
884
|
+
'oxc/branches-sharing-code': 'off',
|
|
885
|
+
|
|
886
|
+
// Disallow misrefactored compound assignment operators
|
|
887
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/misrefactored-assign-op.html
|
|
888
|
+
'oxc/misrefactored-assign-op': 'error',
|
|
889
|
+
|
|
890
|
+
// Disallow spread in accumulator of Array.reduce (O(n^2) complexity)
|
|
891
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-accumulating-spread.html
|
|
892
|
+
'oxc/no-accumulating-spread': 'error',
|
|
893
|
+
|
|
894
|
+
// Disallow use of async/await syntax
|
|
895
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-async-await.html
|
|
896
|
+
// Decision: restricts valid language feature
|
|
897
|
+
'oxc/no-async-await': 'off',
|
|
898
|
+
|
|
899
|
+
// Disallow use of async functions as Express endpoint handlers without error handling
|
|
900
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-async-endpoint-handlers.html
|
|
901
|
+
// Decision: framework-specific, not universally applicable
|
|
902
|
+
'oxc/no-async-endpoint-handlers': 'off',
|
|
903
|
+
|
|
904
|
+
// Disallow barrel files (index files that re-export from other modules)
|
|
905
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-barrel-file.html
|
|
906
|
+
// Decision: handled by barrel-files plugin
|
|
907
|
+
'oxc/no-barrel-file': 'off',
|
|
908
|
+
|
|
909
|
+
// Disallow TypeScript const enums
|
|
910
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-const-enum.html
|
|
911
|
+
// Decision: too opinionated for general use
|
|
912
|
+
'oxc/no-const-enum': 'off',
|
|
913
|
+
|
|
914
|
+
// Disallow spreading keys from a map-like object into an object literal
|
|
915
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-map-spread.html
|
|
916
|
+
'oxc/no-map-spread': 'error',
|
|
917
|
+
|
|
918
|
+
// Disallow use of optional chaining
|
|
919
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-optional-chaining.html
|
|
920
|
+
// Decision: restricts valid language feature
|
|
921
|
+
'oxc/no-optional-chaining': 'off',
|
|
922
|
+
|
|
923
|
+
// Disallow use of rest and spread properties
|
|
924
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-rest-spread-properties.html
|
|
925
|
+
// Decision: restricts valid language feature
|
|
926
|
+
'oxc/no-rest-spread-properties': 'off',
|
|
927
|
+
|
|
928
|
+
// Disallow use of this in exported functions
|
|
929
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-this-in-exported-function.html
|
|
930
|
+
// Decision: too opinionated for general use
|
|
931
|
+
'oxc/no-this-in-exported-function': 'off',
|
|
711
932
|
},
|
|
712
933
|
};
|
package/rules/import.mjs
CHANGED
|
@@ -91,9 +91,68 @@ export const importRules = {
|
|
|
91
91
|
// https://oxc.rs/docs/guide/usage/linter/rules/import/extensions.html
|
|
92
92
|
'import/extensions': 'error',
|
|
93
93
|
|
|
94
|
+
// Enforce consistent type specifier style (inline vs top-level)
|
|
95
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/import/consistent-type-specifier-style.html
|
|
96
|
+
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
|
|
97
|
+
|
|
98
|
+
// Disallow invalid exports, e.g. multiple defaults
|
|
99
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/import/export.html
|
|
100
|
+
// Decision: too opinionated for general use
|
|
101
|
+
'import/export': 'error',
|
|
102
|
+
|
|
103
|
+
// Require exports to be placed at the end of the file
|
|
104
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/import/exports-last.html
|
|
105
|
+
// Decision: too opinionated for general use
|
|
106
|
+
'import/exports-last': 'off',
|
|
107
|
+
|
|
108
|
+
// Prefer named exports to be grouped together in a single export declaration
|
|
109
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/import/group-exports.html
|
|
110
|
+
// Decision: too opinionated for general use
|
|
111
|
+
'import/group-exports': 'off',
|
|
112
|
+
|
|
113
|
+
// Enforce a maximum number of dependencies per module
|
|
114
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/import/max-dependencies.html
|
|
115
|
+
// Decision: too opinionated for general use
|
|
116
|
+
'import/max-dependencies': 'off',
|
|
117
|
+
|
|
118
|
+
// Ensure named imports coupled with named exports
|
|
119
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/import/named.html
|
|
120
|
+
// Decision: handled by TypeScript
|
|
121
|
+
'import/named': 'off',
|
|
122
|
+
|
|
123
|
+
// Forbid named exports
|
|
124
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/import/no-named-export.html
|
|
125
|
+
// Decision: conflicts with no-default-export which is enabled
|
|
126
|
+
'import/no-named-export': 'off',
|
|
127
|
+
|
|
128
|
+
// Disallow namespace (a.k.a. "wildcard" *) imports
|
|
129
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/import/no-namespace.html
|
|
130
|
+
// Decision: too opinionated for general use
|
|
131
|
+
'import/no-namespace': 'off',
|
|
132
|
+
|
|
133
|
+
// Disallow Node.js builtin modules
|
|
134
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/import/no-nodejs-modules.html
|
|
135
|
+
// Decision: not applicable to this project
|
|
136
|
+
'import/no-nodejs-modules': 'off',
|
|
137
|
+
|
|
138
|
+
// Forbid importing modules from parent directories
|
|
139
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/import/no-relative-parent-imports.html
|
|
140
|
+
// Decision: too opinionated for general use
|
|
141
|
+
'import/no-relative-parent-imports': 'off',
|
|
142
|
+
|
|
143
|
+
// Forbid unassigned imports (side-effect imports)
|
|
144
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/import/no-unassigned-import.html
|
|
145
|
+
// Decision: too opinionated for general use
|
|
146
|
+
'import/no-unassigned-import': 'off',
|
|
147
|
+
|
|
148
|
+
// Report potentially ambiguous parse goal
|
|
149
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/import/unambiguous.html
|
|
150
|
+
// Decision: too opinionated for general use
|
|
151
|
+
'import/unambiguous': 'off',
|
|
152
|
+
|
|
94
153
|
// Require modules with a single export to use a default export
|
|
95
154
|
// https://oxc.rs/docs/guide/usage/linter/rules/import/prefer-default-export.html
|
|
96
|
-
//
|
|
155
|
+
// Decision: conflicts with no-default-export, which is enabled
|
|
97
156
|
'import/prefer-default-export': 'off',
|
|
98
157
|
|
|
99
158
|
//rules via jsPlugins (eslint-plugin-import-x)
|
|
@@ -103,6 +162,7 @@ export const importRules = {
|
|
|
103
162
|
// NOTE: disabled — requires eslint-import-resolver-typescript to resolve TS paths.
|
|
104
163
|
// oxlint's jsPlugin runner does not pass ESLint settings to plugins, so the resolver
|
|
105
164
|
// config never reaches the plugin.
|
|
165
|
+
// Decision: requires resolver configuration unavailable in oxlint jsPlugin runtime
|
|
106
166
|
'import-x-js/no-unresolved': 'off',
|
|
107
167
|
|
|
108
168
|
// Disallow invalid exports, e.g. multiple defaults
|
|
@@ -138,11 +198,13 @@ export const importRules = {
|
|
|
138
198
|
// Reports if a default export is renamed during import
|
|
139
199
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-rename-default.md
|
|
140
200
|
// NOTE: disabled — parser errors on TS modules without eslint-import-resolver-typescript.
|
|
201
|
+
// Decision: requires resolver configuration unavailable in oxlint jsPlugin runtime
|
|
141
202
|
'import-x-js/no-rename-default': 'off',
|
|
142
203
|
|
|
143
204
|
// Ensure consistent use of file extension within the import path
|
|
144
205
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/extensions.md
|
|
145
206
|
// NOTE: disabled — cannot determine file existence without eslint-import-resolver-typescript.
|
|
207
|
+
// Decision: requires resolver configuration unavailable in oxlint jsPlugin runtime
|
|
146
208
|
'import-x-js/extensions': 'off',
|
|
147
209
|
|
|
148
210
|
// Ensure absolute imports are above relative imports
|
|
@@ -173,187 +235,187 @@ export const importRules = {
|
|
|
173
235
|
|
|
174
236
|
// Ensure named imports coupled with named exports
|
|
175
237
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/named.md
|
|
176
|
-
//
|
|
238
|
+
// Decision: requires resolver configuration unavailable in oxlint jsPlugin runtime
|
|
177
239
|
'import-x-js/named': 'off',
|
|
178
240
|
|
|
179
241
|
// Ensure default import coupled with default export
|
|
180
242
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/default.md
|
|
181
|
-
//
|
|
243
|
+
// Decision: handled by native import/default
|
|
182
244
|
'import-x-js/default': 'off',
|
|
183
245
|
|
|
184
246
|
// Ensure imported namespaces contain dereferenced properties as they are dereferenced
|
|
185
247
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/namespace.md
|
|
186
|
-
//
|
|
248
|
+
// Decision: handled by native import/namespace
|
|
187
249
|
'import-x-js/namespace': 'off',
|
|
188
250
|
|
|
189
251
|
// Disallow namespace (a.k.a. "wildcard" *) imports
|
|
190
252
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-namespace.md
|
|
191
|
-
//
|
|
253
|
+
// Decision: too restrictive for general use
|
|
192
254
|
'import-x-js/no-namespace': 'off',
|
|
193
255
|
|
|
194
256
|
// Forbid mutable exports
|
|
195
257
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-mutable-exports.md
|
|
196
|
-
//
|
|
258
|
+
// Decision: handled by native import/no-mutable-exports
|
|
197
259
|
'import-x-js/no-mutable-exports': 'off',
|
|
198
260
|
|
|
199
261
|
// Restrict which files can be imported in a given folder
|
|
200
262
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-restricted-paths.md
|
|
201
|
-
//
|
|
263
|
+
// Decision: project-specific, not configured by default
|
|
202
264
|
'import-x-js/no-restricted-paths': 'off',
|
|
203
265
|
|
|
204
266
|
// Prevent importing the submodules of other modules
|
|
205
267
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-internal-modules.md
|
|
206
|
-
//
|
|
268
|
+
// Decision: project-specific, not configured by default
|
|
207
269
|
'import-x-js/no-internal-modules': 'off',
|
|
208
270
|
|
|
209
271
|
// Prefer named exports to be grouped together in a single export declaration
|
|
210
272
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/group-exports.md
|
|
211
|
-
//
|
|
273
|
+
// Decision: too restrictive for general use
|
|
212
274
|
'import-x-js/group-exports': 'off',
|
|
213
275
|
|
|
214
276
|
// Forbid importing modules from parent directories
|
|
215
277
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-relative-parent-imports.md
|
|
216
|
-
//
|
|
278
|
+
// Decision: too restrictive for general use
|
|
217
279
|
'import-x-js/no-relative-parent-imports': 'off',
|
|
218
280
|
|
|
219
281
|
// Enforce consistent type import style
|
|
220
282
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/consistent-type-specifier-style.md
|
|
221
|
-
//
|
|
283
|
+
// Decision: handled by TypeScript config
|
|
222
284
|
'import-x-js/consistent-type-specifier-style': 'off',
|
|
223
285
|
|
|
224
286
|
// Forbid a module from importing itself
|
|
225
287
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-self-import.md
|
|
226
|
-
//
|
|
288
|
+
// Decision: handled by native import/no-self-import
|
|
227
289
|
'import-x-js/no-self-import': 'off',
|
|
228
290
|
|
|
229
291
|
// Forbid cyclical dependencies between modules
|
|
230
292
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-cycle.md
|
|
231
|
-
//
|
|
293
|
+
// Decision: handled by native import/no-cycle
|
|
232
294
|
'import-x-js/no-cycle': 'off',
|
|
233
295
|
|
|
234
296
|
// Prevent importing the default as if it were named
|
|
235
297
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-default.md
|
|
236
|
-
//
|
|
298
|
+
// Decision: handled by native import/no-named-default
|
|
237
299
|
'import-x-js/no-named-default': 'off',
|
|
238
300
|
|
|
239
301
|
// Do not allow a default import name to match a named export
|
|
240
302
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default.md
|
|
241
|
-
//
|
|
303
|
+
// Decision: handled by native import/no-named-as-default
|
|
242
304
|
'import-x-js/no-named-as-default': 'off',
|
|
243
305
|
|
|
244
306
|
// Warn on accessing default export property names that are also named exports
|
|
245
307
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default-member.md
|
|
246
|
-
//
|
|
308
|
+
// Decision: handled by native import/no-named-as-default-member
|
|
247
309
|
'import-x-js/no-named-as-default-member': 'off',
|
|
248
310
|
|
|
249
311
|
// Reports if a module's default export is unnamed
|
|
250
312
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-anonymous-default-export.md
|
|
251
|
-
//
|
|
313
|
+
// Decision: handled by native import/no-anonymous-default-export
|
|
252
314
|
'import-x-js/no-anonymous-default-export': 'off',
|
|
253
315
|
|
|
254
316
|
// Reports modules without any exports, or with unused exports
|
|
255
317
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unused-modules.md
|
|
256
|
-
//
|
|
318
|
+
// Decision: requires resolver configuration unavailable in oxlint jsPlugin runtime
|
|
257
319
|
'import-x-js/no-unused-modules': 'off',
|
|
258
320
|
|
|
259
321
|
// Disallow require()
|
|
260
322
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-commonjs.md
|
|
261
|
-
//
|
|
323
|
+
// Decision: handled by native import/no-commonjs
|
|
262
324
|
'import-x-js/no-commonjs': 'off',
|
|
263
325
|
|
|
264
326
|
// Disallow AMD require/define
|
|
265
327
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-amd.md
|
|
266
|
-
//
|
|
328
|
+
// Decision: handled by native import/no-amd
|
|
267
329
|
'import-x-js/no-amd': 'off',
|
|
268
330
|
|
|
269
331
|
// Disallow duplicate imports
|
|
270
332
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-duplicates.md
|
|
271
|
-
//
|
|
333
|
+
// Decision: handled by native import/no-duplicates
|
|
272
334
|
'import-x-js/no-duplicates': 'off',
|
|
273
335
|
|
|
274
336
|
// Disallow non-import statements appearing before import statements
|
|
275
337
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/first.md
|
|
276
|
-
//
|
|
338
|
+
// Decision: handled by native import/first
|
|
277
339
|
'import-x-js/first': 'off',
|
|
278
340
|
|
|
279
341
|
// Enforce a maximum number of dependencies per module
|
|
280
342
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/max-dependencies.md
|
|
281
|
-
//
|
|
343
|
+
// Decision: too restrictive for general use
|
|
282
344
|
'import-x-js/max-dependencies': 'off',
|
|
283
345
|
|
|
284
346
|
// Forbid import of modules using absolute paths
|
|
285
347
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-absolute-path.md
|
|
286
|
-
//
|
|
348
|
+
// Decision: handled by native import/no-absolute-path
|
|
287
349
|
'import-x-js/no-absolute-path': 'off',
|
|
288
350
|
|
|
289
351
|
// Disallow Node.js builtin modules
|
|
290
352
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-nodejs-modules.md
|
|
291
|
-
//
|
|
353
|
+
// Decision: too restrictive for general use
|
|
292
354
|
'import-x-js/no-nodejs-modules': 'off',
|
|
293
355
|
|
|
294
356
|
// Forbid Webpack loader syntax in imports
|
|
295
357
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-webpack-loader-syntax.md
|
|
296
|
-
//
|
|
358
|
+
// Decision: handled by native import/no-webpack-loader-syntax
|
|
297
359
|
'import-x-js/no-webpack-loader-syntax': 'off',
|
|
298
360
|
|
|
299
361
|
// Require modules with a single export to use a default export
|
|
300
362
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/prefer-default-export.md
|
|
301
|
-
//
|
|
363
|
+
// Decision: handled by native import/prefer-default-export
|
|
302
364
|
'import-x-js/prefer-default-export': 'off',
|
|
303
365
|
|
|
304
366
|
// Prefer namespace (wildcard *) imports
|
|
305
367
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/prefer-namespace-import.md
|
|
306
|
-
//
|
|
368
|
+
// Decision: too restrictive for general use
|
|
307
369
|
'import-x-js/prefer-namespace-import': 'off',
|
|
308
370
|
|
|
309
371
|
// Forbid default exports
|
|
310
372
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-default-export.md
|
|
311
|
-
//
|
|
373
|
+
// Decision: handled by native import/no-default-export
|
|
312
374
|
'import-x-js/no-default-export': 'off',
|
|
313
375
|
|
|
314
376
|
// Forbid named exports
|
|
315
377
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-export.md
|
|
316
|
-
//
|
|
378
|
+
// Decision: conflicts with no-default-export which is enabled
|
|
317
379
|
'import-x-js/no-named-export': 'off',
|
|
318
380
|
|
|
319
381
|
// Forbid require() calls with expressions
|
|
320
382
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-dynamic-require.md
|
|
321
|
-
//
|
|
383
|
+
// Decision: handled by native import/no-dynamic-require
|
|
322
384
|
'import-x-js/no-dynamic-require': 'off',
|
|
323
385
|
|
|
324
386
|
// Report potentially ambiguous parse goal
|
|
325
387
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/unambiguous.md
|
|
326
|
-
//
|
|
388
|
+
// Decision: not useful with ESM
|
|
327
389
|
'import-x-js/unambiguous': 'off',
|
|
328
390
|
|
|
329
391
|
// Forbid unassigned imports (side-effect imports)
|
|
330
392
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unassigned-import.md
|
|
331
|
-
//
|
|
393
|
+
// Decision: too restrictive — CSS imports, polyfills, etc. are valid
|
|
332
394
|
'import-x-js/no-unassigned-import': 'off',
|
|
333
395
|
|
|
334
396
|
// Enforce a leading comment with the webpackChunkName for dynamic imports
|
|
335
397
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/dynamic-import-chunkname.md
|
|
336
|
-
//
|
|
398
|
+
// Decision: webpack-specific, not applicable
|
|
337
399
|
'import-x-js/dynamic-import-chunkname': 'off',
|
|
338
400
|
|
|
339
401
|
// Forbid empty named import blocks
|
|
340
402
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-empty-named-blocks.md
|
|
341
|
-
//
|
|
403
|
+
// Decision: handled by native import/no-empty-named-blocks
|
|
342
404
|
'import-x-js/no-empty-named-blocks': 'off',
|
|
343
405
|
|
|
344
406
|
// Require exports to be placed at the end of the file
|
|
345
407
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/exports-last.md
|
|
346
|
-
//
|
|
408
|
+
// Decision: too restrictive for general use
|
|
347
409
|
'import-x-js/exports-last': 'off',
|
|
348
410
|
|
|
349
411
|
// Report imported names marked as @deprecated
|
|
350
412
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-deprecated.md
|
|
351
|
-
//
|
|
413
|
+
// Decision: requires resolver configuration unavailable in oxlint jsPlugin runtime
|
|
352
414
|
'import-x-js/no-deprecated': 'off',
|
|
353
415
|
|
|
354
416
|
// Disallow non-import statements appearing before import statements (alias)
|
|
355
417
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/imports-first.md
|
|
356
|
-
//
|
|
418
|
+
// Decision: deprecated alias for first, handled by native import/first
|
|
357
419
|
'import-x-js/imports-first': 'off',
|
|
358
420
|
},
|
|
359
421
|
};
|