569da9d286
Adds a lint rule warning to the Next.js ESLint plugin if `passHref=true` is not assigned for `<Link>` wrapping a custom component. Fixes #23713
27 lines
1,023 B
JavaScript
27 lines
1,023 B
JavaScript
module.exports = {
|
|
rules: {
|
|
'no-css-tags': require('./rules/no-css-tags'),
|
|
'no-sync-scripts': require('./rules/no-sync-scripts'),
|
|
'no-html-link-for-pages': require('./rules/no-html-link-for-pages'),
|
|
'no-unwanted-polyfillio': require('./rules/no-unwanted-polyfillio'),
|
|
'no-title-in-document-head': require('./rules/no-title-in-document-head'),
|
|
'google-font-display': require('./rules/google-font-display'),
|
|
'google-font-preconnect': require('./rules/google-font-preconnect'),
|
|
'link-passhref': require('./rules/link-passhref'),
|
|
},
|
|
configs: {
|
|
recommended: {
|
|
plugins: ['@next/next'],
|
|
rules: {
|
|
'@next/next/no-css-tags': 1,
|
|
'@next/next/no-sync-scripts': 1,
|
|
'@next/next/no-html-link-for-pages': 1,
|
|
'@next/next/no-unwanted-polyfillio': 1,
|
|
'@next/next/no-title-in-document-head': 1,
|
|
'@next/next/google-font-display': 1,
|
|
'@next/next/google-font-preconnect': 1,
|
|
'@next/next/link-passhref': 1,
|
|
},
|
|
},
|
|
},
|
|
}
|