This rule guards against unnecessary extensions in configuration files.
For example, in .eslintrc.js
files, it is not necessary to include the "liferay/portal" or "liferay/react" configurations in the "extends" property, because these apply by default in liferay-portal.
Likewise, in .babelrc.js
files, it is not necessary to include "@babel/preset-env" or "@babel/preset-react" in the "presets" property, because they also apply by default.
Examples of incorrect code for this rule:
// .eslintrc.js
module.exports = {
extends: ['liferay/metal', 'liferay/portal', 'liferay/react'],
};
// .babelrc.js
module.exports = {
presets: ['@babel/preset-env', '@babel/preset-react', 'fancy-preset'],
};
Examples of correct code for this rule:
// .eslintrc.js
module.exports = {
extends: ['liferay/metal'],
};
// .babelrc.js
module.exports = {
presets: ['fancy-preset'],
};