build(docs-infra): update `eslint` and `eslint-plugin-jasmine` to latest versions (#41429)

This commit updates the `eslint` and `eslint-plugin-jasmine` packages to
latest versions to take advantage of latest fixes and improvements.

PR Close #41429
This commit is contained in:
George Kalpakas 2021-04-05 19:05:54 +03:00 committed by Andrew Scott
parent 575f537473
commit d42019d412
6 changed files with 373 additions and 418 deletions

View File

@ -130,8 +130,8 @@
"dgeni-packages": "^0.28.4",
"entities": "^1.1.1",
"esbuild": "^0.9.0",
"eslint": "^3.19.0",
"eslint-plugin-jasmine": "^2.2.0",
"eslint": "^7.23.0",
"eslint-plugin-jasmine": "^4.1.2",
"find-free-port": "^2.0.0",
"firebase-tools": "^8.14.1",
"fs-extra": "^2.1.2",

View File

@ -12,10 +12,10 @@ module.exports = {
'jasmine'
],
'rules': {
'indent': ['error', 2],
'linebreak-style': ['error', 'unix'],
'no-prototype-builtins': ['off'],
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'jasmine/new-line-before-expect': 0
'jasmine/new-line-before-expect': ['off'],
}
};

View File

@ -120,7 +120,7 @@ function isString(value) {
function tokenize(text, ignoreWords, dictionary) {
// Split on whitespace and things that are likely to be HTML tags (this is not exhaustive but reduces the unwanted tokens that are indexed).
const rawTokens = text.split(/[\s\/]+|<\/?[a-z]+(?:\s+\w+(?:="[^"]+")?)*>/img);
const rawTokens = text.split(/[\s/]+|<\/?[a-z]+(?:\s+\w+(?:="[^"]+")?)*>/img);
const tokens = [];
for(let token of rawTokens) {
token = token.trim();

View File

@ -15,7 +15,7 @@ function createPackage(changedFile) {
}
const tutorialMatch = /^aio\/content\/tutorial\/([^.]+)\.md/.exec(changedFile);
const tutorialExampleMatch = /^aio\/content\/examples\/(toh-[^\/]+)\//.exec(changedFile);
const tutorialExampleMatch = /^aio\/content\/examples\/(toh-[^/]+)\//.exec(changedFile);
if (tutorialMatch || tutorialExampleMatch) {
const tutorialName = tutorialMatch && tutorialMatch[1] || tutorialExampleMatch[1];
console.log('Building tutorial docs');
@ -23,7 +23,7 @@ function createPackage(changedFile) {
}
const gettingStartedMatch = /^aio\/content\/start\/([^.]+)\.md/.exec(changedFile);
const gettingStartedExampleMatch = /^aio\/content\/examples\/getting-started\/([^\/]+)\//.exec(changedFile);
const gettingStartedExampleMatch = /^aio\/content\/examples\/getting-started\/([^/]+)\//.exec(changedFile);
if (gettingStartedMatch || gettingStartedExampleMatch) {
const gettingStartedName = gettingStartedMatch && gettingStartedMatch[1] || 'index';
console.log('Building getting started docs');
@ -31,15 +31,15 @@ function createPackage(changedFile) {
}
const guideMatch = /^aio\/content\/guide\/([^.]+)\.md/.exec(changedFile);
const exampleMatch = /^aio\/content\/examples\/(?:cb-)?([^\/]+)\//.exec(changedFile);
const exampleMatch = /^aio\/content\/examples\/(?:cb-)?([^/]+)\//.exec(changedFile);
if (guideMatch || exampleMatch) {
const guideName = guideMatch && guideMatch[1] || exampleMatch[1];
console.log(`Building guide doc: ${guideName}.md`);
return require('./guide-package').createPackage(guideName);
}
const apiExamplesMatch = /^packages\/examples\/([^\/]+)\//.exec(changedFile);
const apiMatch = /^packages\/([^\/]+)\//.exec(changedFile);
const apiExamplesMatch = /^packages\/examples\/([^/]+)\//.exec(changedFile);
const apiMatch = /^packages\/([^/]+)\//.exec(changedFile);
if (apiExamplesMatch || apiMatch) {
const packageName = apiExamplesMatch && apiExamplesMatch[1] || apiMatch[1];
console.log('Building API docs for', packageName);

View File

@ -56,7 +56,7 @@ module.exports = function renderMarkdown() {
tokenizeInlineTag.locator = inlineTagLocator;
function tokenizeInlineTag(eat, value, silent) {
const match = /^\{@[^\s\}]+[^\}]*\}/.exec(value);
const match = /^\{@[^\s}]+[^}]*\}/.exec(value);
if (match) {
if (silent) {

File diff suppressed because it is too large Load Diff