* feat(linter): add support for workspace rules * chore(linter): move deps to correct package * feat(linter): workspace-lint-rules as project with test target * chore(linter): tiny clean up * fix(linter): update generators.json after refactor * chore(linter): implement e2e test and PR feedback * docs(linter): update generator docs * docs(linter): update generator docs * docs(linter): update generator docs
17 lines
609 B
TypeScript
17 lines
609 B
TypeScript
import { appRootPath } from '@nrwl/tao/src/utils/app-root';
|
|
import { join } from 'path';
|
|
|
|
export const WORKSPACE_PLUGIN_DIR = join(appRootPath, 'tools/eslint-rules');
|
|
|
|
/**
|
|
* We add a namespace so that we mitigate the risk of rule name collisions as much as
|
|
* possible between what users might create in their workspaces and what we might want
|
|
* to offer directly in eslint-plugin-nx in the future.
|
|
*
|
|
* E.g. if a user writes a rule called "foo", then they will include it in their ESLint
|
|
* config files as:
|
|
*
|
|
* "@nrwl/nx/workspace/foo": "error"
|
|
*/
|
|
export const WORKSPACE_RULE_NAMESPACE = 'workspace';
|