Bug 1881701 - Change how ESLint valid/require-jsdoc configurations are applied, so that the config is applied before sub-configs. r=frontend-codestyle-reviewers,mossop
This helps fix raised issues in customizable UI code which turns rules off in its own directory. Differential Revision: https://phabricator.services.mozilla.com/D249953
This commit is contained in:
committed by
mbanner@mozilla.com
parent
1ffc73325a
commit
c05b1d90e1
@@ -322,8 +322,7 @@ export default [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "rollout-valid-jsdoc",
|
name: "rollout-valid-jsdoc",
|
||||||
files: [`**/*.{${mozilla.allFileExtensions.join(",")}}`],
|
files: [
|
||||||
ignores: [
|
|
||||||
"accessible/tests/**",
|
"accessible/tests/**",
|
||||||
"browser/actors/**",
|
"browser/actors/**",
|
||||||
"browser/base/content/**",
|
"browser/base/content/**",
|
||||||
@@ -420,12 +419,11 @@ export default [
|
|||||||
"uriloader/**",
|
"uriloader/**",
|
||||||
"widget/tests/window_composition_text_querycontent.xhtml",
|
"widget/tests/window_composition_text_querycontent.xhtml",
|
||||||
],
|
],
|
||||||
...mozilla.configs["flat/valid-jsdoc"],
|
rules: mozilla.turnOff(mozilla.configs["flat/valid-jsdoc"].rules),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "rollout-require-jsdoc",
|
name: "rollout-require-jsdoc",
|
||||||
files: [`**/*.{${mozilla.allFileExtensions.join(",")}}`],
|
files: [
|
||||||
ignores: [
|
|
||||||
"accessible/tests/**",
|
"accessible/tests/**",
|
||||||
"browser/actors/**",
|
"browser/actors/**",
|
||||||
"browser/base/content/**",
|
"browser/base/content/**",
|
||||||
@@ -588,7 +586,7 @@ export default [
|
|||||||
"widget/tests/file*.js",
|
"widget/tests/file*.js",
|
||||||
"widget/tests/window_composition_text_querycontent.xhtml",
|
"widget/tests/window_composition_text_querycontent.xhtml",
|
||||||
],
|
],
|
||||||
...mozilla.configs["flat/valid-jsdoc"],
|
rules: mozilla.turnOff(mozilla.configs["flat/require-jsdoc"].rules),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "rollout-layout",
|
name: "rollout-layout",
|
||||||
|
|||||||
@@ -55,6 +55,9 @@ function wrapPathsWithAllExts(paths, excludedExts = []) {
|
|||||||
if (p.endsWith("/")) {
|
if (p.endsWith("/")) {
|
||||||
return p + `**/*.{${extensions.join(",")}}`;
|
return p + `**/*.{${extensions.join(",")}}`;
|
||||||
}
|
}
|
||||||
|
if (p.endsWith("*")) {
|
||||||
|
return p + `.{${extensions.join(",")}}`;
|
||||||
|
}
|
||||||
return p;
|
return p;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -358,6 +361,16 @@ let config = [
|
|||||||
"@microsoft/sdl/no-insecure-url": "off",
|
"@microsoft/sdl/no-insecure-url": "off",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "mozilla/valid-jsdoc",
|
||||||
|
files: wrapPathsWithAllExts(["**"]),
|
||||||
|
...mozilla.configs["flat/valid-jsdoc"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "mozilla/require-jsdoc",
|
||||||
|
files: wrapPathsWithAllExts(["**"]),
|
||||||
|
...mozilla.configs["flat/valid-jsdoc"],
|
||||||
|
},
|
||||||
|
|
||||||
...wrapPathsInConfig(subdirConfigs),
|
...wrapPathsInConfig(subdirConfigs),
|
||||||
...wrapPathsInConfig(repositoryGlobals),
|
...wrapPathsInConfig(repositoryGlobals),
|
||||||
|
|||||||
Reference in New Issue
Block a user