Library
React Components / v9 (@fluentui/react-components)
Describe the feature that you would like added
ATM any custom eslint rule goes to public @fluentui/eslint-plugin.
This has various issues:
- exposing publicly eslint rules that might be only for internal stuff
- adding technical depth to already very complex configuration within the existing plugin
- authoring rules in vanilla js / no type guarantees within tests
All of these can be mitigated with monorepo internal set of lint rules.
Implementation of internal rules:
new project bootstrapped -> tools/eslint-rules, under the hood this uses nx workspace lint rule resolution.
Registration of internal rules:
As a contrived example let say we implement custom lint rule named uppercase-const
This is how on ca use it in particular project:
{
"rules": {
"@nx/workspace-uppercase-const": "error"
}
}
Additional Context
In order to make this work we need @nx/eslint-plugin registered within our monorepo eslint root config which will load these custom rules under the hood.
To make that work we need overhaul of eslint configs within our projects to extend from monorepo root eslint config
{
- "extends": ["plugin:@fluentui/eslint-plugin/react"],
+ "extends": ["../../../.eslintrc", "plugin:@fluentui/eslint-plugin/react"],
- "root": true,
"rules": {
"@nx/workspace-uppercase-const": "warn"
}
}
Tasks:
Have you discussed this feature with our team
v-build
Additional context
No response
Validations
Priority
None
Library
React Components / v9 (@fluentui/react-components)
Describe the feature that you would like added
ATM any custom eslint rule goes to public @fluentui/eslint-plugin.
This has various issues:
All of these can be mitigated with monorepo internal set of lint rules.
Implementation of internal rules:
new project bootstrapped ->
tools/eslint-rules, under the hood this uses nx workspace lint rule resolution.Registration of internal rules:
As a contrived example let say we implement custom lint rule named
uppercase-constThis is how on ca use it in particular project:
{ "rules": { "@nx/workspace-uppercase-const": "error" } }Additional Context
In order to make this work we need
@nx/eslint-pluginregistered within our monorepo eslint root config which will load these custom rules under the hood.To make that work we need overhaul of eslint configs within our projects to extend from monorepo root eslint config
{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], + "extends": ["../../../.eslintrc", "plugin:@fluentui/eslint-plugin/react"], - "root": true, "rules": { "@nx/workspace-uppercase-const": "warn" } }Tasks:
Have you discussed this feature with our team
v-build
Additional context
No response
Validations
Priority
None