Skip to content

Commit

Permalink
chore(react-text): enable nx dependency-cecks lint rule in order to r…
Browse files Browse the repository at this point in the history
…eplace eslint-import-plugin
  • Loading branch information
Hotell committed Aug 19, 2024
1 parent 4184ea9 commit f856406
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"pluginsConfig": {
"@nx/js": {
"analyzeSourceFiles": false
"analyzeSourceFiles": true
}
},
"targetDefaults": {
Expand Down
25 changes: 23 additions & 2 deletions packages/react-components/react-text/library/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
{
"extends": ["plugin:@fluentui/eslint-plugin/react"],
"root": true
"root": true,
"overrides": [
{ "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "extends": ["plugin:@fluentui/eslint-plugin/react"] },
{
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": [
"error",
{
"ignoredDependencies": [
"@fluentui/react-jsx-runtime",
"react-dom",
"@types/react",
"@types/react-dom",
"@swc/helpers"
],
"ignoredFiles": ["{projectRoot}/src/testing/**", "{projectRoot}/config/**"]
}
]
}
}
]
}
2 changes: 1 addition & 1 deletion scripts/tasks/src/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as path from 'path';
import { eslintConstants } from '@fluentui/scripts-monorepo';
import { eslintTask } from 'just-scripts';

const files = [path.join(process.cwd(), eslintConstants.directory)];
const files = [path.join(process.cwd(), eslintConstants.directory), path.join(process.cwd(), 'package.json')];
const storiesPath = path.join(process.cwd(), 'stories');

if (hasProjectStories(storiesPath)) {
Expand Down

0 comments on commit f856406

Please sign in to comment.