@@ -242,8 +242,6 @@ module.exports = /** @type {Config} */ ({
242
242
243
243
// We re-export default in many places, remove when https://github.com/airbnb/javascript/issues/2500 gets resolved
244
244
'no-restricted-exports' : 'off' ,
245
- // Some of these occurences are deliberate and fixing them will break things in repos that use @monorepo dependency
246
- 'import/no-relative-packages' : 'off' ,
247
245
// Avoid accidental auto-"fixes" https://github.com/jsx-eslint/eslint-plugin-react/issues/3458
248
246
'react/no-invalid-html-attribute' : 'off' ,
249
247
@@ -304,15 +302,6 @@ module.exports = /** @type {Config} */ ({
304
302
'react/no-unused-prop-types' : 'off' ,
305
303
} ,
306
304
} ,
307
- {
308
- files : [ 'docs/src/modules/components/**/*.js' ] ,
309
- rules : {
310
- 'material-ui/no-hardcoded-labels' : [
311
- 'error' ,
312
- { allow : [ 'MUI' , 'X' , 'GitHub' , 'Stack Overflow' ] } ,
313
- ] ,
314
- } ,
315
- } ,
316
305
// Next.js plugin
317
306
{
318
307
files : [ 'docs/**/*' ] ,
@@ -325,18 +314,27 @@ module.exports = /** @type {Config} */ ({
325
314
rules : {
326
315
// We're not using the Image component at the moment
327
316
'@next/next/no-img-element' : 'off' ,
317
+ 'no-restricted-imports' : [
318
+ 'error' ,
319
+ {
320
+ paths : NO_RESTRICTED_IMPORTS_PATHS_TOP_LEVEL_PACKAGES ,
321
+ patterns : NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED ,
322
+ } ,
323
+ ] ,
328
324
} ,
329
325
} ,
330
- // Next.js entry points pages
331
326
{
332
- files : [ 'docs/pages/ **/*.?(c|m)[jt]s?(x) ' ] ,
327
+ files : [ 'docs/src/modules/components/ **/*' ] ,
333
328
rules : {
334
- 'react/prop-types' : 'off' ,
329
+ 'material-ui/no-hardcoded-labels' : [
330
+ 'error' ,
331
+ { allow : [ 'MUI' , 'X' , 'GitHub' , 'Stack Overflow' ] } ,
332
+ ] ,
335
333
} ,
336
334
} ,
337
335
// demos
338
336
{
339
- files : [ 'docs/src/pages/**/*.?(c|m)[jt]s?(x) ' , 'docs/data/**/*.?(c|m)[jt]s?(x) ' ] ,
337
+ files : [ 'docs/src/pages/**/*' , 'docs/data/**/*' ] ,
340
338
rules : {
341
339
// This most often reports data that is defined after the component definition.
342
340
// This is safe to do and helps readability of the demo code since the data is mostly irrelevant.
@@ -346,8 +344,15 @@ module.exports = /** @type {Config} */ ({
346
344
'no-console' : 'off' ,
347
345
} ,
348
346
} ,
347
+ // Next.js entry points pages
348
+ {
349
+ files : [ 'docs/pages/**/*' ] ,
350
+ rules : {
351
+ 'react/prop-types' : 'off' ,
352
+ } ,
353
+ } ,
349
354
{
350
- files : [ 'docs/data/**/*.?(c|m)[jt]s?(x) ' ] ,
355
+ files : [ 'docs/data/**/*' ] ,
351
356
excludedFiles : [
352
357
// filenames/match-exported sees filename as 'file-name.d'
353
358
// Plugin looks unmaintain, find alternative? (e.g. eslint-plugin-project-structure)
@@ -359,6 +364,14 @@ module.exports = /** @type {Config} */ ({
359
364
'filenames/match-exported' : [ 'error' ] ,
360
365
} ,
361
366
} ,
367
+ {
368
+ files : [ 'docs/data/material/getting-started/templates/**/*' ] ,
369
+ rules : {
370
+ // So we can use # to improve the page UX
371
+ // and so developer get eslint warning to remind them to fix the links
372
+ 'jsx-a11y/anchor-is-valid' : 'off' ,
373
+ } ,
374
+ } ,
362
375
{
363
376
files : [ '*.d.ts' ] ,
364
377
rules : {
@@ -442,18 +455,6 @@ module.exports = /** @type {Config} */ ({
442
455
'no-bitwise' : 'off' ,
443
456
} ,
444
457
} ,
445
- {
446
- files : [ 'docs/**/*.?(c|m)[jt]s?(x)' ] ,
447
- rules : {
448
- 'no-restricted-imports' : [
449
- 'error' ,
450
- {
451
- paths : NO_RESTRICTED_IMPORTS_PATHS_TOP_LEVEL_PACKAGES ,
452
- patterns : NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED ,
453
- } ,
454
- ] ,
455
- } ,
456
- } ,
457
458
{
458
459
files : [ 'packages/*/src/**/*.?(c|m)[jt]s?(x)' ] ,
459
460
excludedFiles : [ '*.d.ts' , '*.spec.*' ] ,
@@ -530,11 +531,9 @@ module.exports = /** @type {Config} */ ({
530
531
} ,
531
532
} ,
532
533
{
533
- files : [ 'docs/data/material/getting-started/templates /**/*' ] ,
534
+ files : [ 'apps /**/*' ] ,
534
535
rules : {
535
- // So we can use # to improve the page UX
536
- // and so developer get eslint warning to remind them to fix the links
537
- 'jsx-a11y/anchor-is-valid' : 'off' ,
536
+ 'import/no-relative-packages' : 'off' ,
538
537
} ,
539
538
} ,
540
539
] ,
0 commit comments