eslint-config-neon
Version:
The ultimate ESLint shareable config
200 lines (199 loc) • 6.77 kB
JavaScript
//#region src/oxlint/typescript.ts
const config = {
plugins: [
"import",
"jsdoc",
"node",
"typescript"
],
rules: {
"constructor-super": "off",
"default-case": 0,
"default-case-last": 0,
"default-param-last": 0,
"getter-return": "off",
"init-declarations": 0,
"no-array-constructor": 0,
"no-class-assign": "off",
"no-const-assign": "off",
"no-dupe-class-members": 0,
"no-dupe-keys": "off",
"no-empty-function": 0,
"no-func-assign": "off",
"no-implied-eval": 0,
"no-import-assign": "off",
"no-loop-func": 0,
"no-magic-numbers": 0,
"no-new-native-nonconstructor": "off",
"no-obj-calls": "off",
"no-redeclare": 0,
"no-restricted-imports": 0,
"no-setter-return": "off",
"no-shadow": 0,
"no-this-before-super": "off",
"no-throw-literal": 0,
"no-unreachable": "off",
"no-unsafe-negation": "off",
"no-unused-expressions": 0,
"no-unused-vars": 0,
"no-use-before-define": 0,
"no-useless-constructor": 0,
"no-var": "error",
"no-with": "off",
"prefer-const": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"require-await": 0,
"import/no-dynamic-require": 0,
"import-x/no-dynamic-require": 0,
"jsdoc/check-tag-names": 0,
"jsdoc/require-property-type": 0,
"node/global-require": 0,
"typescript/adjacent-overload-signatures": 2,
"typescript/array-type": [2, { default: "array" }],
"typescript/ban-ts-comment": [2, {
"ts-check": true,
"ts-expect-error": "allow-with-description",
"ts-ignore": false,
"ts-nocheck": false
}],
"typescript/ban-tslint-comment": 2,
"typescript/class-literal-property-style": [2, "fields"],
"typescript/consistent-indexed-object-style": 0,
"typescript/consistent-type-assertions": [2, {
assertionStyle: "as",
objectLiteralTypeAssertions: "allow"
}],
"typescript/consistent-type-definitions": 0,
"typescript/consistent-type-imports": [2, { prefer: "type-imports" }],
"typescript/explicit-function-return-type": 0,
"typescript/explicit-member-accessibility": 2,
"typescript/explicit-module-boundary-types": 0,
"typescript/method-signature-style": [2, "method"],
"typescript/no-confusing-non-null-assertion": 2,
"typescript/no-duplicate-enum-values": 2,
"typescript/no-dynamic-delete": 2,
"typescript/no-empty-interface": ["error", { allowSingleExtends: true }],
"typescript/no-empty-object-type": "error",
"typescript/no-explicit-any": 0,
"typescript/no-extra-non-null-assertion": 2,
"typescript/no-extraneous-class": 0,
"typescript/no-inferrable-types": [2, {
ignoreParameters: true,
ignoreProperties: true
}],
"typescript/no-invalid-void-type": [2, {
allowAsThisParameter: true,
allowInGenericTypeArguments: true
}],
"typescript/no-misused-new": 2,
"typescript/no-namespace": [2, { allowDeclarations: true }],
"typescript/no-non-null-asserted-nullish-coalescing": 2,
"typescript/no-non-null-asserted-optional-chain": 2,
"typescript/no-non-null-assertion": 0,
"typescript/no-require-imports": 2,
"typescript/no-this-alias": [2, {
allowDestructuring: true,
allowedNames: ["self"]
}],
"typescript/no-unnecessary-type-constraint": 2,
"typescript/no-unsafe-declaration-merging": "error",
"typescript/no-unsafe-function-type": "error",
"typescript/no-var-requires": 2,
"typescript/no-wrapper-object-types": "error",
"typescript/prefer-as-const": 2,
"typescript/prefer-enum-initializers": 0,
"typescript/prefer-for-of": 2,
"typescript/prefer-function-type": 2,
"typescript/prefer-literal-enum-member": 2,
"typescript/prefer-namespace-keyword": 2,
"typescript/prefer-ts-expect-error": 2,
"typescript/triple-slash-reference": [2, {
lib: "never",
path: "never",
types: "never"
}],
"typescript/unified-signatures": 2,
"typescript/default-param-last": 2,
"typescript/init-declarations": 0,
"typescript/no-array-constructor": 2,
"typescript/no-dupe-class-members": 2,
"typescript/no-empty-function": 0,
"typescript/no-loop-func": 2,
"typescript/no-magic-numbers": 0,
"typescript/no-redeclare": [2, { builtinGlobals: true }],
"typescript/no-restricted-imports": 0,
"typescript/no-shadow": 0,
"typescript/no-unused-expressions": 2,
"typescript/no-unused-vars": 0,
"typescript/no-use-before-define": [2, {
classes: true,
functions: false,
variables: true
}],
"typescript/no-useless-constructor": 2,
"typescript/await-thenable": 2,
"typescript/consistent-type-exports": [2, { fixMixedExportsWithInlineTypeSpecifier: true }],
"typescript/dot-notation": 2,
"typescript/no-base-to-string": [2, { ignoredTypeNames: ["RegExp"] }],
"typescript/no-confusing-void-expression": [2, {
ignoreArrowShorthand: true,
ignoreVoidOperator: false
}],
"typescript/no-duplicate-type-constituents": [2, {
ignoreIntersections: false,
ignoreUnions: false
}],
"typescript/no-floating-promises": [2, {
ignoreVoid: true,
ignoreIIFE: true
}],
"typescript/no-for-in-array": 2,
"typescript/no-implied-eval": 2,
"typescript/no-meaningless-void-operator": [2, { checkNever: true }],
"typescript/no-misused-promises": [2, {
checksConditionals: true,
checksVoidReturn: false
}],
"typescript/no-unnecessary-boolean-literal-compare": 0,
"typescript/no-unnecessary-qualifier": 2,
"typescript/no-unnecessary-type-arguments": 0,
"typescript/no-unnecessary-type-assertion": 0,
"typescript/no-unsafe-argument": 0,
"typescript/no-unsafe-assignment": 0,
"typescript/no-unsafe-call": 0,
"typescript/no-unsafe-member-access": 0,
"typescript/no-unsafe-return": 0,
"typescript/non-nullable-type-assertion-style": 0,
"typescript/only-throw-error": 2,
"typescript/prefer-includes": 2,
"typescript/prefer-nullish-coalescing": [2, {
ignoreConditionalTests: true,
ignoreMixedLogicalExpressions: true,
ignorePrimitives: {
bigint: false,
boolean: true,
number: false,
string: false
}
}],
"typescript/prefer-readonly": [2, { onlyInlineLambdas: true }],
"typescript/prefer-readonly-parameter-types": 0,
"typescript/prefer-reduce-type-parameter": 2,
"typescript/prefer-regexp-exec": 2,
"typescript/prefer-return-this-type": 2,
"typescript/prefer-string-starts-ends-with": 2,
"typescript/promise-function-async": 2,
"typescript/require-array-sort-compare": [2, { ignoreStringArrays: false }],
"typescript/require-await": 0,
"typescript/restrict-plus-operands": 2,
"typescript/restrict-template-expressions": 0,
"typescript/return-await": [2, "in-try-catch"],
"typescript/strict-boolean-expressions": 0,
"typescript/switch-exhaustiveness-check": 2,
"typescript/unbound-method": [2, { ignoreStatic: true }]
}
};
//#endregion
export { config as default };
//# sourceMappingURL=typescript.mjs.map