Skip to content

Commit

Permalink
[core] Update eslint rules (mui#39178)
Browse files Browse the repository at this point in the history
  • Loading branch information
romgrk authored Oct 2, 2023
1 parent 324a42f commit 581c757
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ module.exports = {
],
},
],
'no-continue': 'off',
'no-constant-condition': 'error',
// Use the proptype inheritance chain
'no-prototype-builtins': 'off',
Expand All @@ -83,6 +84,16 @@ module.exports = {
// Destructuring harm grep potential.
'prefer-destructuring': 'off',

'@typescript-eslint/no-use-before-define': [
'error',
{
functions: false,
classes: true,
variables: true,
},
],
'no-use-before-define': 'off',

// disabled type-aware linting due to performance considerations
'@typescript-eslint/dot-notation': 'off',
'dot-notation': 'error',
Expand Down
8 changes: 1 addition & 7 deletions docs/src/modules/components/AppNavDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,7 @@ function renderNavItems(options) {
const { pages, ...params } = options;

return (
<List>
{pages.reduce(
// eslint-disable-next-line @typescript-eslint/no-use-before-define
(items, page) => reduceChildRoutes({ items, page, ...params }),
[],
)}
</List>
<List>{pages.reduce((items, page) => reduceChildRoutes({ items, page, ...params }), [])}</List>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ function checkType({
return createInterfaceType({
jsDoc,
types: filtered.map((x) => {
// eslint-disable-next-line @typescript-eslint/no-use-before-define -- TODO dependency cycle between checkSymbol and checkType
const definition = checkSymbol({
symbol: x,
location,
Expand Down

0 comments on commit 581c757

Please sign in to comment.