Skip to content

Commit 0381a02

Browse files
authored
[eslint-plugin] Add new import-related rules to the ESLint plugin (#4889)
* Add new eslint rules * Consume new eslint rules in Rushstack * Update to newer eslint * Fix lint issues * Disable fixes when running in production mode * Rush change
1 parent 01173c3 commit 0381a02

File tree

39 files changed

+1219
-32
lines changed

39 files changed

+1219
-32
lines changed

apps/heft/src/cli/HeftActionRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { HeftParameterManager } from '../pluginFramework/HeftParameterManager';
2929
import { TaskOperationRunner } from '../operations/runners/TaskOperationRunner';
3030
import { PhaseOperationRunner } from '../operations/runners/PhaseOperationRunner';
3131
import type { HeftPhase } from '../pluginFramework/HeftPhase';
32-
import type { IHeftAction, IHeftActionOptions } from '../cli/actions/IHeftAction';
32+
import type { IHeftAction, IHeftActionOptions } from './actions/IHeftAction';
3333
import type {
3434
IHeftLifecycleCleanHookOptions,
3535
IHeftLifecycleSession,

apps/heft/src/pluginFramework/HeftTask.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import type {
1313
IHeftConfigurationJsonTaskSpecifier,
1414
IHeftConfigurationJsonPluginSpecifier
1515
} from '../utilities/CoreConfigFiles';
16-
import type { IHeftTaskPlugin } from '../pluginFramework/IHeftPlugin';
17-
import type { IScopedLogger } from '../pluginFramework/logging/ScopedLogger';
16+
import type { IHeftTaskPlugin } from './IHeftPlugin';
17+
import type { IScopedLogger } from './logging/ScopedLogger';
1818

1919
const RESERVED_TASK_NAMES: Set<string> = new Set(['clean']);
2020

apps/lockfile-explorer-web/src/store/hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// See LICENSE in the project root for license information.
33

44
import { type TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux';
5-
import type { RootState, AppDispatch } from './';
5+
import type { RootState, AppDispatch } from '.';
66

77
// Use throughout your app instead of plain `useDispatch` and `useSelector`
88
export const useAppDispatch: () => AppDispatch = useDispatch;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/api-extractor-model",
5+
"comment": "",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/api-extractor-model"
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/load-themed-styles",
5+
"comment": "",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/load-themed-styles"
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/loader-load-themed-styles",
5+
"comment": "",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/loader-load-themed-styles"
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/rush",
5+
"comment": "",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/rush"
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@rushstack/eslint-plugin",
5+
"comment": "Add 4 new ESLint rules: \"@rushstack/no-backslash-imports\", used to prevent backslashes in import and require statements; \"@rushstack/no-external-local-imports\", used to prevent referencing external depedencies in import and require statements; \"@rushstack/no-transitive-dependency-imports\", used to prevent referencing transitive dependencies (ie. dependencies of dependencies) in import and require statements; and \"@rushstack/normalized-imports\", used to ensure that the most direct path to a dependency is provided in import and require statements",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@rushstack/eslint-plugin"
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@rushstack/heft-lint-plugin",
5+
"comment": "Unintrusively disable \"--fix\" mode when running in \"--production\" mode",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@rushstack/heft-lint-plugin"
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@rushstack/heft",
5+
"comment": "",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@rushstack/heft"
10+
}

0 commit comments

Comments
 (0)