-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(eslint-plugin): propagate enforce-use-client workspace rule to public config #35504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dmytrokirpa
wants to merge
6
commits into
microsoft:master
Choose a base branch
from
dmytrokirpa:feat/eslint-plugin/enforce-use-client
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+172
−54
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
55b0c5b
feat(eslint-plugin): propagate enforce-use-client workspace rule to p…
dmytrokirpa c7b0583
change
dmytrokirpa d5b4f48
fix linter issues
dmytrokirpa 194f8a1
fixup
dmytrokirpa cc8f316
Merge branch 'master' into feat/eslint-plugin/enforce-use-client
dmytrokirpa 23f0622
Merge branch 'master' into feat/eslint-plugin/enforce-use-client
dmytrokirpa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
change/@fluentui-babel-preset-global-context-4fbd1abd-31bd-4759-a5b4-024907f3b96b.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "none", | ||
| "comment": "chore: update enforce-use-client eslint rule name", | ||
| "packageName": "@fluentui/babel-preset-global-context", | ||
| "email": "[email protected]", | ||
| "dependentChangeType": "none" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-eslint-plugin-react-components-71cfa5e8-fb33-4750-9bae-2f68f2541d72.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "minor", | ||
| "comment": "feat: add enforce-use-client workspace rule", | ||
| "packageName": "@fluentui/eslint-plugin-react-components", | ||
| "email": "[email protected]", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-storybook-addon-59c70a33-b3b1-42a6-a029-f08aaa37d422.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "none", | ||
| "comment": "chore: update enforce-use-client eslint rule name", | ||
| "packageName": "@fluentui/react-storybook-addon", | ||
| "email": "[email protected]", | ||
| "dependentChangeType": "none" | ||
| } |
7 changes: 7 additions & 0 deletions
7
...luentui-react-storybook-addon-export-to-sandbox-9354376b-d8b1-4509-8699-b3c03a7f941e.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "none", | ||
| "comment": "chore: update enforce-use-client eslint rule name", | ||
| "packageName": "@fluentui/react-storybook-addon-export-to-sandbox", | ||
| "email": "[email protected]", | ||
| "dependentChangeType": "none" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 27 additions & 20 deletions
47
packages/react-components/eslint-plugin-react-components/src/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,44 @@ | ||
| import type { ESLint } from 'eslint'; | ||
|
|
||
| import { name, version } from '../package.json'; | ||
| import { RULE_NAME as enforceUseClientName, rule as enforceUseClient } from './rules/enforce-use-client'; | ||
| import { RULE_NAME as preferFluentUIV9Name, rule as preferFluentUIV9 } from './rules/prefer-fluentui-v9'; | ||
|
|
||
| const allRules = { | ||
| export const meta = { | ||
| name, | ||
| version, | ||
| }; | ||
| export const rules = { | ||
| [enforceUseClientName]: enforceUseClient, | ||
| [preferFluentUIV9Name]: preferFluentUIV9, | ||
| }; | ||
|
|
||
| const configs = { | ||
| const recommendedRules = { | ||
| // Add rules to the recommended config here in the future | ||
| }; | ||
|
|
||
| export const configs = { | ||
| recommended: { | ||
| plugins: [name], | ||
| rules: { | ||
| // add all recommended rules here | ||
| }, | ||
| rules: recommendedRules, | ||
| }, | ||
| 'flat/recommended': { | ||
| // Define plugins as an object to satisfy ESLint v9 flat config format | ||
| // the actual plugin will be assigned later to avoid circular dependencies | ||
| plugins: { [name]: {} as ESLint.Plugin }, | ||
| rules: recommendedRules, | ||
| }, | ||
| }; | ||
|
|
||
| // Plugin definition | ||
| export const plugin = { | ||
| meta: { | ||
| name, | ||
| version, | ||
| }, | ||
| const plugin = { | ||
| meta, | ||
| configs, | ||
| rules: allRules, | ||
| rules, | ||
| }; | ||
|
|
||
| // Flat config for eslint v9 | ||
| Object.assign(configs, { | ||
| flat: { | ||
| recommended: { | ||
| plugins: { [name]: plugin }, | ||
| rules: configs.recommended.rules, | ||
| }, | ||
| }, | ||
| }); | ||
| configs['flat/recommended'].plugins = { | ||
| [name]: plugin as unknown as ESLint.Plugin, | ||
| }; | ||
|
|
||
| module.exports = plugin; |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.