Skip to content

Commit

Permalink
[core] Add no-relative-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Nov 20, 2024
1 parent 6aaa61f commit 548208b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,6 @@ module.exports = /** @type {Config} */ ({

// We re-export default in many places, remove when https://github.com/airbnb/javascript/issues/2500 gets resolved
'no-restricted-exports': 'off',
// Some of these occurences are deliberate and fixing them will break things in repos that use @monorepo dependency
'import/no-relative-packages': 'off',
// Avoid accidental auto-"fixes" https://github.com/jsx-eslint/eslint-plugin-react/issues/3458
'react/no-invalid-html-attribute': 'off',

Expand Down Expand Up @@ -529,5 +527,11 @@ module.exports = /** @type {Config} */ ({
'react/react-in-jsx-scope': 'off',
},
},
{
files: ['apps/**/*'],
rules: {
'import/no-relative-packages': 'off',
}
}
],
});
3 changes: 2 additions & 1 deletion dangerFileContent.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { exec } from 'child_process';
import type * as dangerModule from 'danger';
import replaceUrl from '@mui-internal/api-docs-builder/utils/replaceUrl';
// eslint-disable-next-line import/no-relative-packages
import { loadComparison } from './scripts/sizeSnapshot';
import replaceUrl from './packages/api-docs-builder/utils/replaceUrl';

declare const danger: (typeof dangerModule)['danger'];
declare const markdown: (typeof dangerModule)['markdown'];
Expand Down
1 change: 1 addition & 0 deletions docs/scripts/updateIconSynonyms.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import fetch from 'cross-fetch';
import fse from 'fs-extra';
import * as mui from '@mui/icons-material';
import synonyms from 'docs/data/material/components/material-icons/synonyms';
// eslint-disable-next-line import/no-relative-packages
import myDestRewriter from '../../packages/mui-icons-material/renameFilters/material-design-icons';

function not(a, b) {
Expand Down
4 changes: 2 additions & 2 deletions packages/rsc-builder/buildRsc.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import path from 'path';
import * as yargs from 'yargs';
import * as fse from 'fs-extra';
import findComponents from '../api-docs-builder/utils/findComponents';
import findHooks from '../api-docs-builder/utils/findHooks';
import findComponents from '@mui-internal/api-docs-builder/utils/findComponents';
import findHooks from '@mui-internal/api-docs-builder/utils/findHooks';

type CommandOptions = { grep?: string };

Expand Down

0 comments on commit 548208b

Please sign in to comment.