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