Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 0f00178

Browse files
style(*): fix no-useless-escape eslint errors
1 parent 97eca91 commit 0f00178

35 files changed

+57
-347
lines changed

docs/app/src/docs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ angular.module('DocsController', ['currentVersionData'])
6363
$scope.loading = 0;
6464

6565

66-
var INDEX_PATH = /^(\/|\/index[^\.]*.html)$/;
66+
var INDEX_PATH = /^(\/|\/index[^.]*.html)$/;
6767
if (!$location.path() || INDEX_PATH.test($location.path())) {
6868
$location.path('/api').replace();
6969
}

docs/app/src/errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
angular.module('errors', ['ngSanitize'])
44

55
.filter('errorLink', ['$sanitize', function($sanitize) {
6-
var LINKY_URL_REGEXP = /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.;,\(\)\{\}<>]/g,
6+
var LINKY_URL_REGEXP = /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>]/g,
77
MAILTO_REGEXP = /^mailto:/,
88
STACK_TRACE_REGEXP = /:\d+:\d+$/;
99

docs/app/src/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ angular.module('search', [])
7272

7373
.controller('Error404SearchCtrl', ['$scope', '$location', 'docsSearch',
7474
function($scope, $location, docsSearch) {
75-
docsSearch($location.path().split(/[\/\.:]/).pop()).then(function(results) {
75+
docsSearch($location.path().split(/[/.:]/).pop()).then(function(results) {
7676
$scope.results = {};
7777
angular.forEach(results, function(result) {
7878
var area = $scope.results[result.area] || [];

docs/config/processors/keywords.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports = function generateKeywordsProcessor(log, readFilesProcessor) {
3434
var areasToSearch;
3535

3636
// Keywords start with "ng:" or one of $, _ or a letter
37-
var KEYWORD_REGEX = /^((ng:|[\$_a-z])[\w\-_]+)/;
37+
var KEYWORD_REGEX = /^((ng:|[$_a-z])[\w\-_]+)/;
3838

3939
// Load up the keywords to ignore, if specified in the config
4040
if (this.ignoreWordsFile) {
@@ -67,7 +67,7 @@ module.exports = function generateKeywordsProcessor(log, readFilesProcessor) {
6767

6868
function extractWords(text, words, keywordMap) {
6969

70-
var tokens = text.toLowerCase().split(/[\.\s,`'"#]+/mg);
70+
var tokens = text.toLowerCase().split(/[.\s,`'"#]+/mg);
7171
_.forEach(tokens, function(token) {
7272
var match = token.match(KEYWORD_REGEX);
7373
if (match) {

docs/content/guide/forms.ngdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ In the following example we create two directives:
363363
<file name="script.js">
364364
var app = angular.module('form-example1', []);
365365

366-
var INTEGER_REGEXP = /^\-?\d+$/;
366+
var INTEGER_REGEXP = /^-?\d+$/;
367367
app.directive('integer', function() {
368368
return {
369369
require: 'ngModel',

gdocs.js

Lines changed: 0 additions & 258 deletions
This file was deleted.

init-repo.sh

Lines changed: 0 additions & 32 deletions
This file was deleted.

lib/grunt/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ module.exports = {
178178
var classPathSep = (process.platform === 'win32') ? ';' : ':';
179179
var minFile = file.replace(/\.js$/, '.min.js');
180180
var mapFile = minFile + '.map';
181-
var mapFileName = mapFile.match(/[^\/]+$/)[0];
181+
var mapFileName = mapFile.match(/[^/]+$/)[0];
182182
var errorFileName = file.replace(/\.js$/, '-errors.json');
183183
var versionNumber = grunt.config('NG_VERSION').full;
184184
var compilationLevel = (file === 'build/angular-message-format.js') ?

lib/versions/version-info.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var getPackage = function() {
3535
* @return {Object} An object containing the github owner and repository name
3636
*/
3737
var getGitRepoInfo = function() {
38-
var GITURL_REGEX = /^https:\/\/github.com\/([^\/]+)\/(.+).git$/;
38+
var GITURL_REGEX = /^https:\/\/github.com\/([^/]+)\/(.+).git$/;
3939
var match = GITURL_REGEX.exec(currentPackage.repository.url);
4040
var git = {
4141
owner: match[1],
File renamed without changes.

compare-master-to-stable.js renamed to scripts/compare-master-to-stable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ then(allInSeries(function(branch) {
144144
line = line.split(' ');
145145
var sha = line.shift();
146146
var msg = line.join(' ');
147-
return sha + ((/fix\([^\)]+\):/i.test(msg)) ? ' * ' : ' ') + msg;
147+
return sha + ((/fix\([^)]+\):/i.test(msg)) ? ' * ' : ' ') + msg;
148148
});
149149
branch.log = log.map(function(line) {
150150
return line.substr(41);

validate-commit-msg.js renamed to scripts/validate-commit-msg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var util = require('util');
1616

1717

1818
var MAX_LENGTH = 100;
19-
var PATTERN = /^(?:fixup!\s*)?(\w*)(\(([\w\$\.\*/-]*)\))?: (.*)$/;
19+
var PATTERN = /^(?:fixup!\s*)?(\w*)(\(([\w$.*/-]*)\))?: (.*)$/;
2020
var IGNORED = /^WIP:/;
2121
var TYPES = {
2222
feat: true,
File renamed without changes.

0 commit comments

Comments
 (0)