Skip to content

Commit

Permalink
[code-infra] Bump @mui/monorepo (#16422)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lukas <[email protected]>
  • Loading branch information
renovate[bot] and LukasTy authored Feb 13, 2025
1 parent 1df6e9e commit f83232d
Show file tree
Hide file tree
Showing 10 changed files with 179 additions and 235 deletions.
5 changes: 0 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,6 @@ module.exports = {
),
},
],
// TODO remove rule from here once it's merged in `@mui/monorepo/.eslintrc`
'@typescript-eslint/no-unused-vars': [
'error',
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true, argsIgnorePattern: '^_' },
],
// TODO move rule into the main repo once it has upgraded
'@typescript-eslint/return-await': 'off',
'no-restricted-imports': 'off',
Expand Down
1 change: 1 addition & 0 deletions eslint/config-airbnb-typescript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@mui/monorepo/eslint/config-airbnb-typescript');
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"@mui/internal-markdown": "^2.0.0",
"@mui/internal-test-utils": "^2.0.1",
"@mui/material": "^5.16.14",
"@mui/monorepo": "github:mui/material-ui#40a4e6b3e684fff41c68f2d01d5a0e45aded980e",
"@mui/monorepo": "github:mui/material-ui#c390c1c2d1c85f42d40f16ce405a3c4b62026ec7",
"@mui/utils": "^5.16.14",
"@next/eslint-plugin-next": "15.1.6",
"@octokit/plugin-retry": "^7.1.3",
Expand All @@ -114,8 +114,8 @@
"@types/requestidlecallback": "^0.3.7",
"@types/sinon": "^17.0.3",
"@types/yargs": "^17.0.33",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.24.0",
"@typescript-eslint/parser": "^8.24.0",
"autoprefixer": "^10.4.20",
"axe-core": "4.10.2",
"babel-loader": "^9.2.1",
Expand All @@ -137,7 +137,7 @@
"date-fns-v2": "npm:[email protected]",
"eslint": "^8.57.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^10.0.1",
"eslint-import-resolver-webpack": "^0.13.10",
"eslint-plugin-filenames": "^1.3.2",
Expand Down
5 changes: 3 additions & 2 deletions packages/eslint-plugin-material-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
"main": "src/index.js",
"devDependencies": {
"@types/eslint": "^8.56.12",
"@typescript-eslint/utils": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0"
"@typescript-eslint/parser": "^8.24.0",
"@typescript-eslint/rule-tester": "^8.24.0",
"@typescript-eslint/utils": "^8.24.0"
},
"scripts": {
"test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/eslint-plugin-material-ui/**/*.test.js' --timeout 3000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"lib": ["es2015", "es2017", "esnext"],
"experimentalDecorators": true
},
"include": ["estree.ts"]
"include": ["file.ts"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ const originalDocument = global.document;
global.document = undefined;

const path = require('path');
const { TSESLint } = require('@typescript-eslint/utils');
const mocha = require('mocha');
const { RuleTester } = require('@typescript-eslint/rule-tester');
const TSESlintParser = require('@typescript-eslint/parser');
const rule = require('./no-direct-state-access');

const ruleTester = new TSESLint.RuleTester({
parser: require.resolve('@typescript-eslint/parser'),
parserOptions: {
tsconfigRootDir: path.join(__dirname, '../fixtures'),
project: './tsconfig.json',
RuleTester.afterAll = mocha.after;

const ruleTester = new RuleTester({
languageOptions: {
parser: TSESlintParser,
parserOptions: {
tsconfigRootDir: path.join(__dirname, '../fixtures'),
project: './tsconfig.json',
},
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@ import { gridAggregationLookupSelector } from './gridAggregationSelectors';
import { GridFooterCell } from '../../../components/GridFooterCell';
import { GridAggregationHeader } from '../../../components/GridAggregationHeader';

const AGGREGATION_WRAPPABLE_PROPERTIES = [
'valueGetter',
'valueFormatter',
'renderCell',
'renderHeader',
'filterOperators',
] as const;

type WrappableColumnProperty = (typeof AGGREGATION_WRAPPABLE_PROPERTIES)[number];
type WrappableColumnProperty =
| 'valueGetter'
| 'valueFormatter'
| 'renderCell'
| 'renderHeader'
| 'filterOperators';

interface GridColDefWithAggregationWrappers extends GridBaseColDef {
aggregationWrappedProperties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function getHasEval() {
}

try {
// eslint-disable-next-line no-new-func
hasEval = new Function('return true')() as boolean;
} catch (_: unknown) {
hasEval = false;
Expand Down Expand Up @@ -258,6 +259,7 @@ const buildAggregatedFilterItemsApplier = (

// We generate a new function with `new Function()` to avoid expensive patterns for JS engines
// such as a dynamic object assignment, for example `{ [dynamicKey]: value }`.
// eslint-disable-next-line no-new-func
const filterItemCore = new Function(
'appliers',
'row',
Expand Down
Loading

0 comments on commit f83232d

Please sign in to comment.