@imranbarbhuiya/oxc-config 0.0.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/LICENSE +21 -0
- package/README.md +190 -0
- package/dist/api-error.d.ts +6 -0
- package/dist/api-error.js +12 -0
- package/dist/api-error.js.map +1 -0
- package/dist/central-icons.d.ts +6 -0
- package/dist/central-icons.js +12 -0
- package/dist/central-icons.js.map +1 -0
- package/dist/common.d.ts +6 -0
- package/dist/common.js +296 -0
- package/dist/common.js.map +1 -0
- package/dist/edge.d.ts +6 -0
- package/dist/edge.js +18 -0
- package/dist/edge.js.map +1 -0
- package/dist/i18n.d.ts +6 -0
- package/dist/i18n.js +15 -0
- package/dist/i18n.js.map +1 -0
- package/dist/jsdoc.d.ts +6 -0
- package/dist/jsdoc.js +43 -0
- package/dist/jsdoc.js.map +1 -0
- package/dist/jsx.d.ts +6 -0
- package/dist/jsx.js +78 -0
- package/dist/jsx.js.map +1 -0
- package/dist/mdx.d.ts +6 -0
- package/dist/mdx.js +25 -0
- package/dist/mdx.js.map +1 -0
- package/dist/module.d.ts +6 -0
- package/dist/module.js +12 -0
- package/dist/module.js.map +1 -0
- package/dist/native-tailwind.d.ts +6 -0
- package/dist/native-tailwind.js +12 -0
- package/dist/native-tailwind.js.map +1 -0
- package/dist/native.d.ts +6 -0
- package/dist/native.js +51 -0
- package/dist/native.js.map +1 -0
- package/dist/nest.d.ts +6 -0
- package/dist/nest.js +13 -0
- package/dist/nest.js.map +1 -0
- package/dist/next.d.ts +6 -0
- package/dist/next.js +33 -0
- package/dist/next.js.map +1 -0
- package/dist/node.d.ts +6 -0
- package/dist/node.js +80 -0
- package/dist/node.js.map +1 -0
- package/dist/plugins/api-error.d.ts +6 -0
- package/dist/plugins/api-error.js +169 -0
- package/dist/plugins/api-error.js.map +1 -0
- package/dist/plugins/central-icons.d.ts +6 -0
- package/dist/plugins/central-icons.js +61 -0
- package/dist/plugins/central-icons.js.map +1 -0
- package/dist/plugins/i18n.d.ts +6 -0
- package/dist/plugins/i18n.js +58 -0
- package/dist/plugins/i18n.js.map +1 -0
- package/dist/plugins/native-tailwind.d.ts +6 -0
- package/dist/plugins/native-tailwind.js +110 -0
- package/dist/plugins/native-tailwind.js.map +1 -0
- package/dist/react.d.ts +6 -0
- package/dist/react.js +65 -0
- package/dist/react.js.map +1 -0
- package/dist/tailwind.d.ts +6 -0
- package/dist/tailwind.js +18 -0
- package/dist/tailwind.js.map +1 -0
- package/dist/tsdoc.d.ts +6 -0
- package/dist/tsdoc.js +21 -0
- package/dist/tsdoc.js.map +1 -0
- package/dist/typescript.d.ts +6 -0
- package/dist/typescript.js +200 -0
- package/dist/typescript.js.map +1 -0
- package/package.json +180 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import process from "node:process";
|
|
2
|
+
import eslintPluginSonarjs from "eslint-plugin-sonarjs";
|
|
3
|
+
import tseslint from "typescript-eslint";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript.ts
|
|
6
|
+
const rules = {
|
|
7
|
+
"@typescript-eslint/adjacent-overload-signatures": 2,
|
|
8
|
+
"@typescript-eslint/array-type": [2, { default: "array" }],
|
|
9
|
+
"@typescript-eslint/await-thenable": 2,
|
|
10
|
+
"@typescript-eslint/ban-ts-comment": [2, {
|
|
11
|
+
"ts-check": true,
|
|
12
|
+
"ts-expect-error": "allow-with-description",
|
|
13
|
+
"ts-ignore": false,
|
|
14
|
+
"ts-nocheck": false
|
|
15
|
+
}],
|
|
16
|
+
"@typescript-eslint/ban-tslint-comment": 2,
|
|
17
|
+
"@typescript-eslint/class-literal-property-style": [2, "fields"],
|
|
18
|
+
"@typescript-eslint/consistent-type-assertions": [2, {
|
|
19
|
+
assertionStyle: "as",
|
|
20
|
+
objectLiteralTypeAssertions: "allow"
|
|
21
|
+
}],
|
|
22
|
+
"@typescript-eslint/consistent-type-definitions": 2,
|
|
23
|
+
"@typescript-eslint/consistent-type-exports": [2, { fixMixedExportsWithInlineTypeSpecifier: true }],
|
|
24
|
+
"@typescript-eslint/default-param-last": 2,
|
|
25
|
+
"@typescript-eslint/dot-notation": [2, {
|
|
26
|
+
allowKeywords: true,
|
|
27
|
+
allowPattern: "(^[A-Z])|(^[a-z]+(_[a-z]+)+$)",
|
|
28
|
+
allowPrivateClassPropertyAccess: true
|
|
29
|
+
}],
|
|
30
|
+
"@typescript-eslint/method-signature-style": [2, "property"],
|
|
31
|
+
"@typescript-eslint/no-array-constructor": 2,
|
|
32
|
+
"@typescript-eslint/no-array-delete": 0,
|
|
33
|
+
"@typescript-eslint/no-base-to-string": [1, { ignoredTypeNames: ["RegExp"] }],
|
|
34
|
+
"@typescript-eslint/no-confusing-non-null-assertion": 2,
|
|
35
|
+
"@typescript-eslint/no-dupe-class-members": 2,
|
|
36
|
+
"@typescript-eslint/no-duplicate-enum-values": 2,
|
|
37
|
+
"@typescript-eslint/no-duplicate-type-constituents": 2,
|
|
38
|
+
"@typescript-eslint/no-dynamic-delete": 1,
|
|
39
|
+
"@typescript-eslint/no-empty-object-type": [2, {
|
|
40
|
+
allowInterfaces: "with-single-extends",
|
|
41
|
+
allowObjectTypes: "always"
|
|
42
|
+
}],
|
|
43
|
+
"@typescript-eslint/no-explicit-any": 0,
|
|
44
|
+
"@typescript-eslint/no-extra-non-null-assertion": 2,
|
|
45
|
+
"@typescript-eslint/no-floating-promises": [2, {
|
|
46
|
+
ignoreIIFE: true,
|
|
47
|
+
ignoreVoid: true
|
|
48
|
+
}],
|
|
49
|
+
"@typescript-eslint/no-for-in-array": 2,
|
|
50
|
+
"@typescript-eslint/no-implied-eval": 2,
|
|
51
|
+
"@typescript-eslint/no-inferrable-types": [2, {
|
|
52
|
+
ignoreParameters: true,
|
|
53
|
+
ignoreProperties: true
|
|
54
|
+
}],
|
|
55
|
+
"@typescript-eslint/no-invalid-this": 2,
|
|
56
|
+
"@typescript-eslint/no-invalid-void-type": [2, {
|
|
57
|
+
allowAsThisParameter: true,
|
|
58
|
+
allowInGenericTypeArguments: true
|
|
59
|
+
}],
|
|
60
|
+
"@typescript-eslint/no-meaningless-void-operator": [2, { checkNever: true }],
|
|
61
|
+
"@typescript-eslint/no-misused-new": 2,
|
|
62
|
+
"@typescript-eslint/no-misused-promises": [2, {
|
|
63
|
+
checksConditionals: true,
|
|
64
|
+
checksVoidReturn: false
|
|
65
|
+
}],
|
|
66
|
+
"@typescript-eslint/no-namespace": 0,
|
|
67
|
+
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": 2,
|
|
68
|
+
"@typescript-eslint/no-non-null-asserted-optional-chain": 2,
|
|
69
|
+
"@typescript-eslint/no-redeclare": [2, { builtinGlobals: true }],
|
|
70
|
+
"@typescript-eslint/no-redundant-type-constituents": 0,
|
|
71
|
+
"@typescript-eslint/no-require-imports": 2,
|
|
72
|
+
"@typescript-eslint/no-this-alias": [2, {
|
|
73
|
+
allowDestructuring: true,
|
|
74
|
+
allowedNames: ["self"]
|
|
75
|
+
}],
|
|
76
|
+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": 2,
|
|
77
|
+
"@typescript-eslint/no-unnecessary-condition": 1,
|
|
78
|
+
"@typescript-eslint/no-unnecessary-qualifier": 2,
|
|
79
|
+
"@typescript-eslint/no-unnecessary-type-assertion": 2,
|
|
80
|
+
"@typescript-eslint/no-unnecessary-type-constraint": 2,
|
|
81
|
+
"@typescript-eslint/no-unsafe-argument": 0,
|
|
82
|
+
"@typescript-eslint/no-unsafe-assignment": 0,
|
|
83
|
+
"@typescript-eslint/no-unsafe-call": 0,
|
|
84
|
+
"@typescript-eslint/no-unsafe-enum-comparison": 0,
|
|
85
|
+
"@typescript-eslint/no-unsafe-function-type": 0,
|
|
86
|
+
"@typescript-eslint/no-unsafe-member-access": 0,
|
|
87
|
+
"@typescript-eslint/no-unsafe-return": 0,
|
|
88
|
+
"@typescript-eslint/no-unsafe-unary-minus": 0,
|
|
89
|
+
"@typescript-eslint/no-unused-expressions": 2,
|
|
90
|
+
"@typescript-eslint/no-unused-vars": 0,
|
|
91
|
+
"@typescript-eslint/no-use-before-define": [2, {
|
|
92
|
+
classes: true,
|
|
93
|
+
functions: false,
|
|
94
|
+
variables: true
|
|
95
|
+
}],
|
|
96
|
+
"@typescript-eslint/no-useless-constructor": 2,
|
|
97
|
+
"@typescript-eslint/only-throw-error": 2,
|
|
98
|
+
"@typescript-eslint/prefer-as-const": 2,
|
|
99
|
+
"@typescript-eslint/prefer-for-of": 2,
|
|
100
|
+
"@typescript-eslint/prefer-function-type": 2,
|
|
101
|
+
"@typescript-eslint/prefer-includes": 2,
|
|
102
|
+
"@typescript-eslint/prefer-literal-enum-member": 2,
|
|
103
|
+
"@typescript-eslint/prefer-namespace-keyword": 2,
|
|
104
|
+
"@typescript-eslint/prefer-optional-chain": 2,
|
|
105
|
+
"@typescript-eslint/prefer-readonly": [2, { onlyInlineLambdas: true }],
|
|
106
|
+
"@typescript-eslint/prefer-reduce-type-parameter": 2,
|
|
107
|
+
"@typescript-eslint/prefer-regexp-exec": 2,
|
|
108
|
+
"@typescript-eslint/prefer-return-this-type": 2,
|
|
109
|
+
"@typescript-eslint/prefer-string-starts-ends-with": 2,
|
|
110
|
+
"@typescript-eslint/require-array-sort-compare": [2, { ignoreStringArrays: false }],
|
|
111
|
+
"@typescript-eslint/require-await": 0,
|
|
112
|
+
"@typescript-eslint/restrict-plus-operands": 2,
|
|
113
|
+
"@typescript-eslint/restrict-template-expressions": 0,
|
|
114
|
+
"@typescript-eslint/return-await": [2, "in-try-catch"],
|
|
115
|
+
"@typescript-eslint/triple-slash-reference": [2, {
|
|
116
|
+
lib: "never",
|
|
117
|
+
path: "never",
|
|
118
|
+
types: "never"
|
|
119
|
+
}],
|
|
120
|
+
"@typescript-eslint/unbound-method": 0,
|
|
121
|
+
"@typescript-eslint/unified-signatures": 2,
|
|
122
|
+
"consistent-return": 0,
|
|
123
|
+
"default-case": 0,
|
|
124
|
+
"default-case-last": 0,
|
|
125
|
+
"default-param-last": 0,
|
|
126
|
+
"dot-notation": 0,
|
|
127
|
+
"import-x/no-dynamic-require": 0,
|
|
128
|
+
"no-shadow": 0,
|
|
129
|
+
"no-use-before-define": 0,
|
|
130
|
+
"no-useless-constructor": 0,
|
|
131
|
+
"sonarjs/no-all-duplicated-branches": 2,
|
|
132
|
+
"sonarjs/no-collapsible-if": 2,
|
|
133
|
+
"sonarjs/no-collection-size-mischeck": 2,
|
|
134
|
+
"sonarjs/no-duplicated-branches": 2,
|
|
135
|
+
"sonarjs/no-element-overwrite": 2,
|
|
136
|
+
"sonarjs/no-empty-collection": 2,
|
|
137
|
+
"sonarjs/no-extra-arguments": 2,
|
|
138
|
+
"sonarjs/no-gratuitous-expressions": 2,
|
|
139
|
+
"sonarjs/no-identical-conditions": 2,
|
|
140
|
+
"sonarjs/no-identical-expressions": 2,
|
|
141
|
+
"sonarjs/no-identical-functions": 2,
|
|
142
|
+
"sonarjs/no-ignored-return": 2,
|
|
143
|
+
"sonarjs/no-inverted-boolean-check": 2,
|
|
144
|
+
"sonarjs/no-nested-switch": 2,
|
|
145
|
+
"sonarjs/no-redundant-boolean": 2,
|
|
146
|
+
"sonarjs/no-redundant-jump": 2,
|
|
147
|
+
"sonarjs/no-same-line-conditional": 2,
|
|
148
|
+
"sonarjs/no-unused-collection": 2,
|
|
149
|
+
"sonarjs/no-use-of-empty-return-value": 2,
|
|
150
|
+
"sonarjs/non-existent-operator": 2,
|
|
151
|
+
"sonarjs/prefer-immediate-return": 2,
|
|
152
|
+
"sonarjs/prefer-object-literal": 2,
|
|
153
|
+
"sonarjs/prefer-single-boolean-return": 2,
|
|
154
|
+
"sonarjs/prefer-while": 2
|
|
155
|
+
};
|
|
156
|
+
const settings = {
|
|
157
|
+
"import-x/parsers": { "@typescript-eslint/parser": [
|
|
158
|
+
".ts",
|
|
159
|
+
".tsx",
|
|
160
|
+
".cts",
|
|
161
|
+
".mts"
|
|
162
|
+
] },
|
|
163
|
+
"import-x/external-module-folders": ["node_modules", "node_modules/@types"],
|
|
164
|
+
"import-x/extensions": [
|
|
165
|
+
".ts",
|
|
166
|
+
".tsx",
|
|
167
|
+
".cts",
|
|
168
|
+
".mts",
|
|
169
|
+
".js",
|
|
170
|
+
".jsx"
|
|
171
|
+
],
|
|
172
|
+
"import-x/resolver": {
|
|
173
|
+
typescript: {
|
|
174
|
+
alwaysTryTypes: true,
|
|
175
|
+
project: ["./tsconfig.json", "./tsconfig.eslint.json"]
|
|
176
|
+
},
|
|
177
|
+
node: { extensions: [
|
|
178
|
+
".ts",
|
|
179
|
+
".tsx",
|
|
180
|
+
".cts",
|
|
181
|
+
".mts",
|
|
182
|
+
".js",
|
|
183
|
+
".jsx"
|
|
184
|
+
] }
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
const config = tseslint.config(...tseslint.configs.recommendedTypeChecked, {
|
|
188
|
+
name: "mahir/typescript",
|
|
189
|
+
plugins: { sonarjs: eslintPluginSonarjs },
|
|
190
|
+
rules,
|
|
191
|
+
settings,
|
|
192
|
+
languageOptions: { parserOptions: {
|
|
193
|
+
projectService: true,
|
|
194
|
+
tsconfigRootDir: process.cwd()
|
|
195
|
+
} }
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
//#endregion
|
|
199
|
+
export { config as default };
|
|
200
|
+
//# sourceMappingURL=typescript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript.js","names":[],"sources":["../src/typescript.ts"],"sourcesContent":["import process from 'node:process';\n\nimport eslintPluginSonarjs from 'eslint-plugin-sonarjs';\nimport tseslint from 'typescript-eslint';\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nconst rules: TSESLint.FlatConfig.Rules = {\n\t'@typescript-eslint/adjacent-overload-signatures': 2,\n\t'@typescript-eslint/array-type': [\n\t\t2,\n\t\t{\n\t\t\tdefault: 'array',\n\t\t},\n\t],\n\t'@typescript-eslint/await-thenable': 2,\n\t'@typescript-eslint/ban-ts-comment': [\n\t\t2,\n\t\t{\n\t\t\t'ts-check': true,\n\t\t\t'ts-expect-error': 'allow-with-description',\n\t\t\t'ts-ignore': false,\n\t\t\t'ts-nocheck': false,\n\t\t},\n\t],\n\t'@typescript-eslint/ban-tslint-comment': 2,\n\t'@typescript-eslint/class-literal-property-style': [2, 'fields'],\n\t'@typescript-eslint/consistent-type-assertions': [\n\t\t2,\n\t\t{\n\t\t\tassertionStyle: 'as',\n\t\t\tobjectLiteralTypeAssertions: 'allow',\n\t\t},\n\t],\n\t'@typescript-eslint/consistent-type-definitions': 2,\n\t'@typescript-eslint/consistent-type-exports': [\n\t\t2,\n\t\t{\n\t\t\tfixMixedExportsWithInlineTypeSpecifier: true,\n\t\t},\n\t],\n\t'@typescript-eslint/default-param-last': 2,\n\t'@typescript-eslint/dot-notation': [\n\t\t2,\n\t\t{\n\t\t\tallowKeywords: true,\n\t\t\tallowPattern: '(^[A-Z])|(^[a-z]+(_[a-z]+)+$)',\n\t\t\tallowPrivateClassPropertyAccess: true,\n\t\t},\n\t],\n\t'@typescript-eslint/method-signature-style': [2, 'property'],\n\t'@typescript-eslint/no-array-constructor': 2,\n\t'@typescript-eslint/no-array-delete': 0,\n\t'@typescript-eslint/no-base-to-string': [\n\t\t1,\n\t\t{\n\t\t\tignoredTypeNames: ['RegExp'],\n\t\t},\n\t],\n\t'@typescript-eslint/no-confusing-non-null-assertion': 2,\n\t'@typescript-eslint/no-dupe-class-members': 2,\n\t'@typescript-eslint/no-duplicate-enum-values': 2,\n\t'@typescript-eslint/no-duplicate-type-constituents': 2,\n\t'@typescript-eslint/no-dynamic-delete': 1,\n\t'@typescript-eslint/no-empty-object-type': [\n\t\t2,\n\t\t{\n\t\t\tallowInterfaces: 'with-single-extends',\n\t\t\tallowObjectTypes: 'always',\n\t\t},\n\t],\n\t'@typescript-eslint/no-explicit-any': 0,\n\t'@typescript-eslint/no-extra-non-null-assertion': 2,\n\t'@typescript-eslint/no-floating-promises': [\n\t\t2,\n\t\t{\n\t\t\tignoreIIFE: true,\n\t\t\tignoreVoid: true,\n\t\t},\n\t],\n\t'@typescript-eslint/no-for-in-array': 2,\n\t'@typescript-eslint/no-implied-eval': 2,\n\t'@typescript-eslint/no-inferrable-types': [\n\t\t2,\n\t\t{\n\t\t\tignoreParameters: true,\n\t\t\tignoreProperties: true,\n\t\t},\n\t],\n\t'@typescript-eslint/no-invalid-this': 2,\n\t'@typescript-eslint/no-invalid-void-type': [\n\t\t2,\n\t\t{\n\t\t\tallowAsThisParameter: true,\n\t\t\tallowInGenericTypeArguments: true,\n\t\t},\n\t],\n\t'@typescript-eslint/no-meaningless-void-operator': [\n\t\t2,\n\t\t{\n\t\t\tcheckNever: true,\n\t\t},\n\t],\n\t'@typescript-eslint/no-misused-new': 2,\n\t'@typescript-eslint/no-misused-promises': [\n\t\t2,\n\t\t{\n\t\t\tchecksConditionals: true,\n\t\t\tchecksVoidReturn: false,\n\t\t},\n\t],\n\t'@typescript-eslint/no-namespace': 0,\n\t'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 2,\n\t'@typescript-eslint/no-non-null-asserted-optional-chain': 2,\n\t'@typescript-eslint/no-redeclare': [\n\t\t2,\n\t\t{\n\t\t\tbuiltinGlobals: true,\n\t\t},\n\t],\n\t'@typescript-eslint/no-redundant-type-constituents': 0,\n\t'@typescript-eslint/no-require-imports': 2,\n\t'@typescript-eslint/no-this-alias': [\n\t\t2,\n\t\t{\n\t\t\tallowDestructuring: true,\n\t\t\tallowedNames: ['self'],\n\t\t},\n\t],\n\t'@typescript-eslint/no-unnecessary-boolean-literal-compare': 2,\n\t'@typescript-eslint/no-unnecessary-condition': 1,\n\t'@typescript-eslint/no-unnecessary-qualifier': 2,\n\t'@typescript-eslint/no-unnecessary-type-assertion': 2,\n\t'@typescript-eslint/no-unnecessary-type-constraint': 2,\n\t'@typescript-eslint/no-unsafe-argument': 0,\n\t'@typescript-eslint/no-unsafe-assignment': 0,\n\t'@typescript-eslint/no-unsafe-call': 0,\n\t'@typescript-eslint/no-unsafe-enum-comparison': 0,\n\t'@typescript-eslint/no-unsafe-function-type': 0,\n\t'@typescript-eslint/no-unsafe-member-access': 0,\n\t'@typescript-eslint/no-unsafe-return': 0,\n\t'@typescript-eslint/no-unsafe-unary-minus': 0,\n\t'@typescript-eslint/no-unused-expressions': 2,\n\t'@typescript-eslint/no-unused-vars': 0,\n\t'@typescript-eslint/no-use-before-define': [\n\t\t2,\n\t\t{\n\t\t\tclasses: true,\n\t\t\tfunctions: false,\n\t\t\tvariables: true,\n\t\t},\n\t],\n\t'@typescript-eslint/no-useless-constructor': 2,\n\t'@typescript-eslint/only-throw-error': 2,\n\t'@typescript-eslint/prefer-as-const': 2,\n\t'@typescript-eslint/prefer-for-of': 2,\n\t'@typescript-eslint/prefer-function-type': 2,\n\t'@typescript-eslint/prefer-includes': 2,\n\t'@typescript-eslint/prefer-literal-enum-member': 2,\n\t'@typescript-eslint/prefer-namespace-keyword': 2,\n\t'@typescript-eslint/prefer-optional-chain': 2,\n\t'@typescript-eslint/prefer-readonly': [\n\t\t2,\n\t\t{\n\t\t\tonlyInlineLambdas: true,\n\t\t},\n\t],\n\t'@typescript-eslint/prefer-reduce-type-parameter': 2,\n\t'@typescript-eslint/prefer-regexp-exec': 2,\n\t'@typescript-eslint/prefer-return-this-type': 2,\n\t'@typescript-eslint/prefer-string-starts-ends-with': 2,\n\t'@typescript-eslint/require-array-sort-compare': [\n\t\t2,\n\t\t{\n\t\t\tignoreStringArrays: false,\n\t\t},\n\t],\n\t'@typescript-eslint/require-await': 0,\n\t'@typescript-eslint/restrict-plus-operands': 2,\n\t'@typescript-eslint/restrict-template-expressions': 0,\n\t'@typescript-eslint/return-await': [2, 'in-try-catch'],\n\t'@typescript-eslint/triple-slash-reference': [\n\t\t2,\n\t\t{\n\t\t\tlib: 'never',\n\t\t\tpath: 'never',\n\t\t\ttypes: 'never',\n\t\t},\n\t],\n\t'@typescript-eslint/unbound-method': 0,\n\t'@typescript-eslint/unified-signatures': 2,\n\t'consistent-return': 0,\n\t'default-case': 0,\n\t'default-case-last': 0,\n\t'default-param-last': 0,\n\t'dot-notation': 0,\n\t'import-x/no-dynamic-require': 0,\n\t'no-shadow': 0,\n\t'no-use-before-define': 0,\n\t'no-useless-constructor': 0,\n\t'sonarjs/no-all-duplicated-branches': 2,\n\t'sonarjs/no-collapsible-if': 2,\n\t'sonarjs/no-collection-size-mischeck': 2,\n\t'sonarjs/no-duplicated-branches': 2,\n\t'sonarjs/no-element-overwrite': 2,\n\t'sonarjs/no-empty-collection': 2,\n\t'sonarjs/no-extra-arguments': 2,\n\t'sonarjs/no-gratuitous-expressions': 2,\n\t'sonarjs/no-identical-conditions': 2,\n\t'sonarjs/no-identical-expressions': 2,\n\t'sonarjs/no-identical-functions': 2,\n\t'sonarjs/no-ignored-return': 2,\n\t'sonarjs/no-inverted-boolean-check': 2,\n\t'sonarjs/no-nested-switch': 2,\n\t'sonarjs/no-redundant-boolean': 2,\n\t'sonarjs/no-redundant-jump': 2,\n\t'sonarjs/no-same-line-conditional': 2,\n\t'sonarjs/no-unused-collection': 2,\n\t'sonarjs/no-use-of-empty-return-value': 2,\n\t'sonarjs/non-existent-operator': 2,\n\t'sonarjs/prefer-immediate-return': 2,\n\t'sonarjs/prefer-object-literal': 2,\n\t'sonarjs/prefer-single-boolean-return': 2,\n\t'sonarjs/prefer-while': 2,\n};\nconst settings: TSESLint.FlatConfig.Settings = {\n\t'import-x/parsers': {\n\t\t'@typescript-eslint/parser': ['.ts', '.tsx', '.cts', '.mts'],\n\t},\n\t'import-x/external-module-folders': ['node_modules', 'node_modules/@types'],\n\t'import-x/extensions': ['.ts', '.tsx', '.cts', '.mts', '.js', '.jsx'],\n\t'import-x/resolver': {\n\t\ttypescript: {\n\t\t\talwaysTryTypes: true,\n\t\t\tproject: ['./tsconfig.json', './tsconfig.eslint.json'],\n\t\t},\n\t\tnode: {\n\t\t\textensions: ['.ts', '.tsx', '.cts', '.mts', '.js', '.jsx'],\n\t\t},\n\t},\n};\n\nconst config: TSESLint.FlatConfig.ConfigArray = tseslint.config(...tseslint.configs.recommendedTypeChecked, {\n\tname: 'mahir/typescript',\n\tplugins: {\n\t\tsonarjs: eslintPluginSonarjs,\n\t},\n\trules,\n\tsettings,\n\tlanguageOptions: {\n\t\tparserOptions: {\n\t\t\tprojectService: true,\n\t\t\ttsconfigRootDir: process.cwd(),\n\t\t},\n\t},\n});\n\nexport default config;\n"],"mappings":"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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@imranbarbhuiya/oxc-config",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Shared Oxlint and Oxfmt configs for JavaScript and TypeScript projects",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"oxc-config": "./dist/cli/index.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"lint": "oxlint --fix .",
|
|
11
|
+
"lint:check": "oxlint .",
|
|
12
|
+
"format": "oxfmt",
|
|
13
|
+
"format:check": "oxfmt --check",
|
|
14
|
+
"build": "tsdown",
|
|
15
|
+
"test": "bun run build && bun test",
|
|
16
|
+
"prepack": "bun run build"
|
|
17
|
+
},
|
|
18
|
+
"exports": {
|
|
19
|
+
"./api-error": {
|
|
20
|
+
"types": "./dist/api-error.d.ts",
|
|
21
|
+
"import": "./dist/api-error.js"
|
|
22
|
+
},
|
|
23
|
+
"./central-icons": {
|
|
24
|
+
"types": "./dist/central-icons.d.ts",
|
|
25
|
+
"import": "./dist/central-icons.js"
|
|
26
|
+
},
|
|
27
|
+
"./common": {
|
|
28
|
+
"types": "./dist/common.d.ts",
|
|
29
|
+
"import": "./dist/common.js"
|
|
30
|
+
},
|
|
31
|
+
"./edge": {
|
|
32
|
+
"types": "./dist/edge.d.ts",
|
|
33
|
+
"import": "./dist/edge.js"
|
|
34
|
+
},
|
|
35
|
+
"./i18n": {
|
|
36
|
+
"types": "./dist/i18n.d.ts",
|
|
37
|
+
"import": "./dist/i18n.js"
|
|
38
|
+
},
|
|
39
|
+
"./jsdoc": {
|
|
40
|
+
"types": "./dist/jsdoc.d.ts",
|
|
41
|
+
"import": "./dist/jsdoc.js"
|
|
42
|
+
},
|
|
43
|
+
"./jsx": {
|
|
44
|
+
"types": "./dist/jsx.d.ts",
|
|
45
|
+
"import": "./dist/jsx.js"
|
|
46
|
+
},
|
|
47
|
+
"./module": {
|
|
48
|
+
"types": "./dist/module.d.ts",
|
|
49
|
+
"import": "./dist/module.js"
|
|
50
|
+
},
|
|
51
|
+
"./native": {
|
|
52
|
+
"types": "./dist/native.d.ts",
|
|
53
|
+
"import": "./dist/native.js"
|
|
54
|
+
},
|
|
55
|
+
"./native-tailwind": {
|
|
56
|
+
"types": "./dist/native-tailwind.d.ts",
|
|
57
|
+
"import": "./dist/native-tailwind.js"
|
|
58
|
+
},
|
|
59
|
+
"./nest": {
|
|
60
|
+
"types": "./dist/nest.d.ts",
|
|
61
|
+
"import": "./dist/nest.js"
|
|
62
|
+
},
|
|
63
|
+
"./next": {
|
|
64
|
+
"types": "./dist/next.d.ts",
|
|
65
|
+
"import": "./dist/next.js"
|
|
66
|
+
},
|
|
67
|
+
"./node": {
|
|
68
|
+
"types": "./dist/node.d.ts",
|
|
69
|
+
"import": "./dist/node.js"
|
|
70
|
+
},
|
|
71
|
+
"./react": {
|
|
72
|
+
"types": "./dist/react.d.ts",
|
|
73
|
+
"import": "./dist/react.js"
|
|
74
|
+
},
|
|
75
|
+
"./tsdoc": {
|
|
76
|
+
"types": "./dist/tsdoc.d.ts",
|
|
77
|
+
"import": "./dist/tsdoc.js"
|
|
78
|
+
},
|
|
79
|
+
"./typescript": {
|
|
80
|
+
"types": "./dist/typescript.d.ts",
|
|
81
|
+
"import": "./dist/typescript.js"
|
|
82
|
+
},
|
|
83
|
+
"./tailwind": {
|
|
84
|
+
"types": "./dist/tailwind.d.ts",
|
|
85
|
+
"import": "./dist/tailwind.js"
|
|
86
|
+
},
|
|
87
|
+
"./oxfmt": {
|
|
88
|
+
"types": "./dist/oxfmt.d.ts",
|
|
89
|
+
"import": "./dist/oxfmt.js"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"keywords": [
|
|
93
|
+
"oxc",
|
|
94
|
+
"oxlint",
|
|
95
|
+
"oxfmt",
|
|
96
|
+
"config",
|
|
97
|
+
"typescript",
|
|
98
|
+
"lint",
|
|
99
|
+
"format",
|
|
100
|
+
"linter",
|
|
101
|
+
"formatter"
|
|
102
|
+
],
|
|
103
|
+
"repository": {
|
|
104
|
+
"type": "git",
|
|
105
|
+
"url": "https://github.com/imranbarbhuiya/oxc-config.git"
|
|
106
|
+
},
|
|
107
|
+
"bugs": {
|
|
108
|
+
"url": "https://github.com/imranbarbhuiya/oxc-config/issues"
|
|
109
|
+
},
|
|
110
|
+
"homepage": "https://github.com/imranbarbhuiya/oxc-config#readme",
|
|
111
|
+
"author": "Parbez <imranbarbhuiya.fsd@gmail.com>",
|
|
112
|
+
"license": "MIT",
|
|
113
|
+
"engines": {
|
|
114
|
+
"node": ">=22.18.0"
|
|
115
|
+
},
|
|
116
|
+
"publishConfig": {
|
|
117
|
+
"access": "public"
|
|
118
|
+
},
|
|
119
|
+
"files": [
|
|
120
|
+
"dist/**"
|
|
121
|
+
],
|
|
122
|
+
"dependencies": {
|
|
123
|
+
"@clack/prompts": "^1.7.0",
|
|
124
|
+
"@darraghor/eslint-plugin-nestjs-typed": "^7.2.5",
|
|
125
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
126
|
+
"@eslint/js": "^10.0.1",
|
|
127
|
+
"@next/eslint-plugin-next": "^16.2.10",
|
|
128
|
+
"@typescript-eslint/eslint-plugin": "^8.63.0",
|
|
129
|
+
"@typescript-eslint/parser": "^8.63.0",
|
|
130
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
131
|
+
"eslint-mdx": "^3.8.1",
|
|
132
|
+
"eslint-plugin-better-tailwindcss": "^4.6.1",
|
|
133
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
134
|
+
"eslint-plugin-jsdoc": "^63.0.12",
|
|
135
|
+
"eslint-plugin-mdx": "^3.8.1",
|
|
136
|
+
"eslint-plugin-n": "^18.2.1",
|
|
137
|
+
"eslint-plugin-promise": "^7.3.0",
|
|
138
|
+
"eslint-plugin-react": "^7.37.5",
|
|
139
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
140
|
+
"eslint-plugin-sonarjs": "^4.1.0",
|
|
141
|
+
"eslint-plugin-tsdoc": "^0.5.2",
|
|
142
|
+
"eslint-plugin-typescript-sort-keys": "^3.3.0",
|
|
143
|
+
"eslint-plugin-unicorn": "^71.1.0",
|
|
144
|
+
"globals": "^17.7.0",
|
|
145
|
+
"nypm": "^0.6.8",
|
|
146
|
+
"oxlint-plugin-eslint": "^1.80.0",
|
|
147
|
+
"typescript-eslint": "^8.63.0"
|
|
148
|
+
},
|
|
149
|
+
"devDependencies": {
|
|
150
|
+
"@prettier/plugin-oxc": "^0.2.0",
|
|
151
|
+
"@types/bun": "^1.3.14",
|
|
152
|
+
"@types/node": "^25.9.5",
|
|
153
|
+
"@typescript-eslint/utils": "^8.63.0",
|
|
154
|
+
"eslint": "^10.6.0",
|
|
155
|
+
"eslint-v9": "npm:eslint@^9.39.5",
|
|
156
|
+
"oxfmt": "^0.65.0",
|
|
157
|
+
"oxlint": "^1.80.0",
|
|
158
|
+
"oxlint-tsgolint": "^7.0.2001",
|
|
159
|
+
"prettier": "^3.9.5",
|
|
160
|
+
"tsdown": "^0.22.4",
|
|
161
|
+
"typescript": "6.0.3"
|
|
162
|
+
},
|
|
163
|
+
"peerDependencies": {
|
|
164
|
+
"oxfmt": "^0.65.0",
|
|
165
|
+
"oxlint": "^1.80.0",
|
|
166
|
+
"oxlint-tsgolint": "^7.0.2001"
|
|
167
|
+
},
|
|
168
|
+
"peerDependenciesMeta": {
|
|
169
|
+
"oxfmt": {
|
|
170
|
+
"optional": true
|
|
171
|
+
},
|
|
172
|
+
"oxlint-tsgolint": {
|
|
173
|
+
"optional": true
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"overrides": {
|
|
177
|
+
"zod": "^4",
|
|
178
|
+
"zod-validation-error": "^4"
|
|
179
|
+
}
|
|
180
|
+
}
|