Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"changes": [
{
"packageName": "@rushstack/eslint-config",
"comment": "",
"type": "none"
}
]
}
3 changes: 1 addition & 2 deletions eslint/eslint-config/src/flat/mixins/friendly-locals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin';
// The third-party @typescript-eslint plugin does not present itself as an `ESLint.Plugin` (its typescript-eslint
// `RuleModule` types are intentionally not assignable to ESLint's `RuleDefinition`), so widen it through
// `object` to reference it in a flat-config `plugins` map.
const typescriptEslintPluginAsEslintPlugin: ESLint.Plugin =
typescriptEslintPlugin as unknown as ESLint.Plugin;
const typescriptEslintPluginAsEslintPlugin: ESLint.Plugin = typescriptEslintPlugin as object as ESLint.Plugin;

const config: Linter.Config[] = [
{
Expand Down
5 changes: 2 additions & 3 deletions eslint/eslint-config/src/flat/profile/_common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
// - An obsolete language feature that nobody should be using for any good reason

import type { ESLint, Linter } from 'eslint';
import { globalIgnores } from 'eslint/config';
import promiseEslintPlugin from 'eslint-plugin-promise';
import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin';
// `@typescript-eslint/parser` marks its CommonJS export with `__esModule` but exposes the parser API
Expand Down Expand Up @@ -240,14 +239,14 @@ const commonConfig: Linter.Config[] = [
// Manually authored .d.ts files are generally used to describe external APIs that are not expected
// to follow our coding conventions. Linting those files tends to produce a lot of spurious suppressions,
// so we simply ignore them.
globalIgnores(['**/*.d.ts']) as Linter.Config,
{ name: 'ignore-d-ts', ignores: ['**/*.d.ts'] },

// Build output and other generated folders are not source code and should never be linted. This is
// particularly important for tools that enumerate files from the ESLint configuration itself (rather than
// only linting a known set of source files), since ESLint's flat config does not respect ".gitignore".
// These patterns are anchored to the project root (they are evaluated relative to the cwd), so a source
// folder such as "src/lib" is not affected.
globalIgnores(['lib/**', 'lib-*/**', 'dist/**', 'temp/**', 'coverage/**']) as Linter.Config,
{ name: 'ignore-build-output', ignores: ['lib/**', 'lib-*/**', 'dist/**', 'temp/**', 'coverage/**'] },

{
files: ['**/*.ts', '**/*.tsx'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,6 @@ const localTypeAwareRules = {
module.exports = {
localTypeAwareRules,
localCommonConfig: [
// Build output and other generated folders are not source code and should never be linted. (This is also
// globally ignored by newer versions of @rushstack/eslint-config; it is repeated here so that projects
// consuming the currently-published version via this rig also ignore them. Remove once the dependency is
// bumped.) These patterns are anchored to the project root, so a source folder such as "src/lib" is not
// affected.
{
ignores: ['lib/**', 'lib-*/**', 'dist/**', 'temp/**', 'coverage/**']
},
{
files: ['**/*.ts', '**/*.tsx'],
plugins: {
Expand Down
Loading