oxlint-config-awesomeness 1.0.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.
Files changed (3) hide show
  1. package/index.d.ts +3 -0
  2. package/index.js +221 -0
  3. package/package.json +34 -0
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ declare const config: import('oxlint').OxlintConfig;
2
+
3
+ export default config;
package/index.js ADDED
@@ -0,0 +1,221 @@
1
+ import { defineConfig } from 'oxlint';
2
+
3
+ export default defineConfig({
4
+ categories: {
5
+ correctness: 'off',
6
+ },
7
+ env: {
8
+ browser: true,
9
+ builtin: true,
10
+ es2024: true,
11
+ node: true,
12
+ },
13
+ jsPlugins: [
14
+ 'eslint-plugin-no-only-tests',
15
+ 'eslint-plugin-perfectionist',
16
+ 'eslint-plugin-unused-imports',
17
+ { name: 'react-hooks-js', specifier: 'eslint-plugin-react-hooks' },
18
+ ],
19
+ overrides: [
20
+ {
21
+ files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
22
+ rules: {
23
+ 'constructor-super': 'off',
24
+ 'getter-return': 'off',
25
+ 'no-class-assign': 'off',
26
+ 'no-const-assign': 'off',
27
+ 'no-dupe-class-members': 'off',
28
+ 'no-dupe-keys': 'off',
29
+ 'no-func-assign': 'off',
30
+ 'no-import-assign': 'off',
31
+ 'no-new-native-nonconstructor': 'off',
32
+ 'no-obj-calls': 'off',
33
+ 'no-redeclare': 'off',
34
+ 'no-setter-return': 'off',
35
+ 'no-this-before-super': 'off',
36
+ 'no-undef': 'off',
37
+ 'no-unreachable': 'off',
38
+ 'no-unsafe-negation': 'off',
39
+ 'no-with': 'off',
40
+ 'prefer-rest-params': 'error',
41
+ 'prefer-spread': 'error',
42
+ },
43
+ },
44
+ ],
45
+ plugins: ['typescript', 'import', 'react', 'unicorn'],
46
+ rules: {
47
+ '@typescript-eslint/array-type': [
48
+ 'error',
49
+ {
50
+ default: 'generic',
51
+ },
52
+ ],
53
+ '@typescript-eslint/no-duplicate-enum-values': 'error',
54
+ '@typescript-eslint/no-empty-object-type': 'error',
55
+ '@typescript-eslint/no-explicit-any': 'error',
56
+ '@typescript-eslint/no-extra-non-null-assertion': 'error',
57
+ '@typescript-eslint/no-misused-new': 'error',
58
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
59
+ '@typescript-eslint/no-require-imports': 'error',
60
+ '@typescript-eslint/no-unnecessary-type-constraint': 'error',
61
+ '@typescript-eslint/no-unsafe-declaration-merging': 'error',
62
+ '@typescript-eslint/no-unsafe-function-type': 'error',
63
+ '@typescript-eslint/no-wrapper-object-types': 'error',
64
+ '@typescript-eslint/prefer-as-const': 'error',
65
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
66
+ '@typescript-eslint/triple-slash-reference': 'error',
67
+ 'constructor-super': 'error',
68
+ curly: 'error',
69
+ 'for-direction': 'error',
70
+ 'getter-return': 'error',
71
+ 'import-x/export': 'error',
72
+ 'import-x/no-namespace': 'error',
73
+ 'no-array-constructor': 'error',
74
+ 'no-async-promise-executor': 'error',
75
+ 'no-case-declarations': 'error',
76
+ 'no-class-assign': 'error',
77
+ 'no-compare-neg-zero': 'error',
78
+ 'no-cond-assign': 'error',
79
+ 'no-console': 'error',
80
+ 'no-const-assign': 'error',
81
+ 'no-constant-binary-expression': 'error',
82
+ 'no-constant-condition': 'error',
83
+ 'no-control-regex': 'error',
84
+ 'no-debugger': 'error',
85
+ 'no-delete-var': 'error',
86
+ 'no-dupe-class-members': 'error',
87
+ 'no-dupe-else-if': 'error',
88
+ 'no-dupe-keys': 'error',
89
+ 'no-duplicate-case': 'error',
90
+ 'no-empty': 'error',
91
+ 'no-empty-character-class': 'error',
92
+ 'no-empty-pattern': 'error',
93
+ 'no-empty-static-block': 'error',
94
+ 'no-ex-assign': 'error',
95
+ 'no-extra-boolean-cast': 'error',
96
+ 'no-fallthrough': 'error',
97
+ 'no-func-assign': 'error',
98
+ 'no-global-assign': 'error',
99
+ 'no-import-assign': 'error',
100
+ 'no-invalid-regexp': 'error',
101
+ 'no-irregular-whitespace': 'error',
102
+ 'no-loss-of-precision': 'error',
103
+ 'no-misleading-character-class': 'error',
104
+ 'no-new-native-nonconstructor': 'error',
105
+ 'no-nonoctal-decimal-escape': 'error',
106
+ 'no-obj-calls': 'error',
107
+ 'no-only-tests/no-only-tests': 'error',
108
+ 'no-prototype-builtins': 'error',
109
+ 'no-redeclare': 'error',
110
+ 'no-regex-spaces': 'error',
111
+ 'no-self-assign': 'error',
112
+ 'no-setter-return': 'error',
113
+ 'no-shadow-restricted-names': 'error',
114
+ 'no-sparse-arrays': 'error',
115
+ 'no-this-before-super': 'error',
116
+ 'no-undef': 'error',
117
+ 'no-unexpected-multiline': 'error',
118
+ 'no-unreachable': 'error',
119
+ 'no-unsafe-finally': 'error',
120
+ 'no-unsafe-negation': 'error',
121
+ 'no-unsafe-optional-chaining': 'error',
122
+ 'no-unused-expressions': 'error',
123
+ 'no-unused-labels': 'error',
124
+ 'no-unused-private-class-members': 'error',
125
+ 'no-useless-backreference': 'error',
126
+ 'no-useless-catch': 'error',
127
+ 'no-useless-escape': 'error',
128
+ 'no-useless-rename': 'error',
129
+ 'no-var': 'error',
130
+ 'no-warning-comments': [
131
+ 'error',
132
+ {
133
+ terms: ['@nocommit'],
134
+ },
135
+ ],
136
+ 'no-with': 'error',
137
+ 'perfectionist/sort-enums': [
138
+ 'error',
139
+ {
140
+ partitionByComment: true,
141
+ sortByValue: 'always',
142
+ },
143
+ ],
144
+ 'perfectionist/sort-heritage-clauses': 'error',
145
+ 'perfectionist/sort-interfaces': 'error',
146
+ 'perfectionist/sort-jsx-props': 'error',
147
+ 'perfectionist/sort-object-types': 'error',
148
+ 'perfectionist/sort-objects': [
149
+ 'error',
150
+ {
151
+ partitionByComment: true,
152
+ },
153
+ ],
154
+ 'prefer-const': 'error',
155
+ 'react-hooks-js/component-hook-factories': 'error',
156
+ 'react-hooks-js/config': 'error',
157
+ 'react-hooks-js/error-boundaries': 'error',
158
+ 'react-hooks-js/gating': 'error',
159
+ 'react-hooks-js/globals': 'error',
160
+ 'react-hooks-js/immutability': 'error',
161
+ 'react-hooks-js/incompatible-library': 'error',
162
+ 'react-hooks-js/preserve-manual-memoization': 'error',
163
+ 'react-hooks-js/purity': 'error',
164
+ 'react-hooks-js/refs': 'error',
165
+ 'react-hooks-js/set-state-in-effect': 'error',
166
+ 'react-hooks-js/set-state-in-render': 'error',
167
+ 'react-hooks-js/static-components': 'error',
168
+ 'react-hooks-js/unsupported-syntax': 'error',
169
+ 'react-hooks-js/use-memo': 'error',
170
+ 'react-hooks/exhaustive-deps': 'error',
171
+ 'react-hooks/rules-of-hooks': 'error',
172
+ 'react/display-name': 'error',
173
+ 'react/jsx-key': 'error',
174
+ 'react/jsx-no-comment-textnodes': 'error',
175
+ 'react/jsx-no-duplicate-props': 'error',
176
+ 'react/jsx-no-target-blank': 'error',
177
+ 'react/jsx-no-undef': 'error',
178
+ 'react/no-children-prop': 'error',
179
+ 'react/no-danger-with-children': 'error',
180
+ 'react/no-direct-mutation-state': 'error',
181
+ 'react/no-find-dom-node': 'error',
182
+ 'react/no-is-mounted': 'error',
183
+ 'react/no-render-return-value': 'error',
184
+ 'react/no-string-refs': 'error',
185
+ 'react/no-unescaped-entities': 'error',
186
+ 'react/no-unknown-property': 'error',
187
+ 'react/require-render-return': 'error',
188
+ 'require-yield': 'error',
189
+ 'unicorn/catch-error-name': 'error',
190
+ 'unicorn/consistent-empty-array-spread': 'error',
191
+ 'unicorn/consistent-function-scoping': 'error',
192
+ 'unicorn/no-abusive-eslint-disable': 'error',
193
+ 'unicorn/no-hex-escape': 'error',
194
+ 'unicorn/no-invalid-fetch-options': 'error',
195
+ 'unicorn/no-magic-array-flat-depth': 'error',
196
+ 'unicorn/no-typeof-undefined': 'error',
197
+ 'unicorn/no-unnecessary-slice-end': 'error',
198
+ 'unicorn/no-useless-promise-resolve-reject': 'error',
199
+ 'unicorn/no-useless-spread': 'error',
200
+ 'unicorn/numeric-separators-style': 'error',
201
+ 'unicorn/prefer-array-flat-map': 'error',
202
+ 'unicorn/prefer-array-index-of': 'error',
203
+ 'unicorn/prefer-array-some': 'error',
204
+ 'unicorn/prefer-at': 'error',
205
+ 'unicorn/prefer-dom-node-append': 'error',
206
+ 'unicorn/prefer-native-coercion-functions': 'error',
207
+ 'unicorn/prefer-node-protocol': 'error',
208
+ 'unicorn/prefer-number-properties': 'error',
209
+ 'unicorn/prefer-optional-catch-binding': 'error',
210
+ 'unicorn/prefer-set-size': 'error',
211
+ 'unicorn/prefer-string-raw': 'error',
212
+ 'unicorn/prefer-string-replace-all': 'error',
213
+ 'unicorn/prefer-string-slice': 'error',
214
+ 'unicorn/prefer-structured-clone': 'error',
215
+ 'unicorn/prefer-top-level-await': 'error',
216
+ 'unicorn/text-encoding-identifier-case': 'error',
217
+ 'unused-imports/no-unused-imports': 'error',
218
+ 'use-isnan': 'error',
219
+ 'valid-typeof': 'error',
220
+ },
221
+ });
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "oxlint-config-awesomeness",
3
+ "version": "1.0.0",
4
+ "description": "Oxlint config with sensible defaults.",
5
+ "keywords": [
6
+ "autofix",
7
+ "config",
8
+ "defaults",
9
+ "oxlint",
10
+ "strict"
11
+ ],
12
+ "license": "MIT",
13
+ "files": [
14
+ "index.js",
15
+ "index.d.ts"
16
+ ],
17
+ "type": "module",
18
+ "main": "index.js",
19
+ "dependencies": {
20
+ "eslint-plugin-no-only-tests": "^3.3.0",
21
+ "eslint-plugin-perfectionist": "^5.5.0",
22
+ "eslint-plugin-react-hooks": "^7.0.1",
23
+ "eslint-plugin-unused-imports": "~4.4.1"
24
+ },
25
+ "devDependencies": {
26
+ "oxlint": "^1.46.0"
27
+ },
28
+ "peerDependencies": {
29
+ "oxlint": ">=1.46.0"
30
+ },
31
+ "scripts": {
32
+ "lint": "oxlint ."
33
+ }
34
+ }