@rushstack/eslint-config
Version:
A TypeScript ESLint ruleset designed for large teams and projects
29 lines • 1.21 kB
JavaScript
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
// 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
}
];
}
export { withoutTypeInformation };
//# sourceMappingURL=without-type-information.js.map