@rushstack/eslint-config
Version:
A TypeScript ESLint ruleset designed for large teams and projects
31 lines • 1.3 kB
JavaScript
;
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.withoutTypeInformation = withoutTypeInformation;
// The profile's type-aware rules, turned off. Typing this as `Record<keyof typeof typeAwareRules, 'off'>` keeps
// it in sync with the typeAwareRules group in ./profile/_common: adding a type-aware rule there becomes a compile
// error until it is disabled here as well.
const disabledTypeAwareRules = {
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-for-in-array': 'off'
};
function withoutTypeInformation(options) {
const { files } = options;
return [
{
files,
languageOptions: {
parserOptions: {
// Disable type-aware parsing so that files outside the TypeScript program do not fail to resolve
// against it.
project: false,
projectService: false
}
},
rules: disabledTypeAwareRules
}
];
}
//# sourceMappingURL=without-type-information.js.map