Skip to content

Commit

Permalink
[code-infra] Rule already in code-infra
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Apr 21, 2024
1 parent 906ad7d commit 1d551f2
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const baseline = require('@mui/monorepo/.eslintrc');
const path = require('path');

// TODO move this helper to @mui/monorepo/.eslintrc
const buildPackageRestrictedImports = (packageName, root) => ({
files: [`packages/${root}/src/**/*{.ts,.tsx,.js}`],
excludedFiles: ['*.d.ts', '*.spec.ts', '*.spec.tsx', '**.test.tx', '**.test.tsx'],
Expand Down Expand Up @@ -50,6 +51,7 @@ module.exports = {
*/
rules: {
...baseline.rules,
// TODO move to @mui/monorepo, codebase is moving away from default exports
'import/prefer-default-export': 'off',
// TODO move rule into the main repo once it has upgraded
'@typescript-eslint/return-await': 'off',
Expand Down Expand Up @@ -114,19 +116,6 @@ module.exports = {
},
parserOptions: { tsconfigRootDir: __dirname, project: ['./tsconfig.json'] },
},
{
files: ['*.tsx'],
excludedFiles: '*.spec.tsx',
rules: {
'react/prop-types': 'off',
},
},
{
files: ['docs/data/**/*.js', 'docs/data/**/*.tsx'],
rules: {
'filenames/match-exported': ['error'],
},
},
{
files: ['**/*.mjs'],
rules: {
Expand Down

0 comments on commit 1d551f2

Please sign in to comment.