Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These changes were automatically generated by a transform whose code can be found at: - https://github.com/aureooms/rejuvenate/blob/a5a57b70ac6fd6fb77fdab32e6b7be7519ce9564/src/transforms/sources:initial-lint.js Please contact the author of the transform if you believe there was an error.
- Loading branch information
1 parent
5de4ffc
commit 7ffc7f1
Showing
12 changed files
with
84 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,30 @@ | ||
var domReady = function(callback) { | ||
var state = document.readyState ; | ||
if ( state === 'interactive' || state === 'complete' ) { | ||
callback() ; | ||
} | ||
else { | ||
const domReady = function (callback) { | ||
const state = document.readyState; | ||
if (state === 'interactive' || state === 'complete') { | ||
callback(); | ||
} else { | ||
document.addEventListener('DOMContentLoaded', callback); | ||
} | ||
} ; | ||
|
||
}; | ||
|
||
domReady(function(){ | ||
|
||
var projectname = document.createElement('a'); | ||
domReady(() => { | ||
const projectname = document.createElement('a'); | ||
projectname.classList.add('project-name'); | ||
projectname.text = 'aureooms/js-error'; | ||
projectname.href = './index.html' ; | ||
projectname.href = './index.html'; | ||
|
||
var header = document.getElementsByTagName('header')[0] ; | ||
header.insertBefore(projectname,header.firstChild); | ||
const header = document.querySelectorAll('header')[0]; | ||
header.insertBefore(projectname, header.firstChild); | ||
|
||
var testlink = document.querySelector('header > a[data-ice="testLink"]') ; | ||
testlink.href = 'https://coveralls.io/github/aureooms/js-error' ; | ||
testlink.target = '_BLANK' ; | ||
const testlink = document.querySelector('header > a[data-ice="testLink"]'); | ||
testlink.href = 'https://coveralls.io/github/aureooms/js-error'; | ||
testlink.target = '_BLANK'; | ||
|
||
var searchBox = document.querySelector('.search-box'); | ||
var input = document.querySelector('.search-input'); | ||
const searchBox = document.querySelector('.search-box'); | ||
const input = document.querySelector('.search-input'); | ||
|
||
// active search box when focus on searchBox. | ||
input.addEventListener('focus', function(){ | ||
// Active search box when focus on searchBox. | ||
input.addEventListener('focus', () => { | ||
searchBox.classList.add('active'); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export default Error ; | ||
export default Error; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import customError from "./customError.js" ; | ||
import customError from './customError.js'; | ||
|
||
export default customError('IndexError') ; | ||
export default customError('IndexError'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import customError from "./customError.js" ; | ||
import customError from './customError.js'; | ||
|
||
export default customError('KeyError') ; | ||
export default customError('KeyError'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import customError from "./customError.js" ; | ||
import customError from './customError.js'; | ||
|
||
export default customError('NotImplementedError') ; | ||
export default customError('NotImplementedError'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import customError from "./customError.js" ; | ||
import customError from './customError.js'; | ||
|
||
export default customError('StopIteration') ; | ||
export default customError('StopIteration'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export default SyntaxError ; | ||
export default SyntaxError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export default TypeError ; | ||
export default TypeError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import customError from "./customError.js" ; | ||
import customError from './customError.js'; | ||
|
||
export default customError('ValueError') ; | ||
export default customError('ValueError'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Error from "./Error.js" ; | ||
import extendError from "./extendError.js" ; | ||
import Error from './Error.js'; | ||
import extendError from './extendError.js'; | ||
|
||
const customError = name => extendError( Error , name ) ; | ||
const customError = (name) => extendError(Error, name); | ||
export default customError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
export default function extendError ( parent, name ) { | ||
export default function extendError(parent, name) { | ||
// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | ||
|
||
// see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | ||
const CustomError = function (...parameters) { | ||
const instance = new Error(...parameters); | ||
instance.name = name; | ||
Object.setPrototypeOf(instance, Object.getPrototypeOf(this)); | ||
if (Error.captureStackTrace) { | ||
Error.captureStackTrace(instance, CustomError); | ||
} | ||
|
||
const CustomError = function (...params) { | ||
const instance = new Error(...params); | ||
instance.name = name; | ||
Object.setPrototypeOf(instance, Object.getPrototypeOf(this)); | ||
if (Error.captureStackTrace) { | ||
Error.captureStackTrace(instance, CustomError); | ||
} | ||
return instance; | ||
} | ||
return instance; | ||
}; | ||
|
||
CustomError.prototype = Object.create(Error.prototype, { | ||
constructor: { | ||
value: Error, | ||
enumerable: false, | ||
writable: true, | ||
configurable: true | ||
} | ||
constructor: { | ||
value: Error, | ||
enumerable: false, | ||
writable: true, | ||
configurable: true, | ||
}, | ||
}); | ||
|
||
if (Object.setPrototypeOf){ | ||
Object.setPrototypeOf(CustomError, Error); | ||
if (Object.setPrototypeOf) { | ||
Object.setPrototypeOf(CustomError, Error); | ||
} else { | ||
// eslint-disable-next-line no-proto | ||
CustomError.__proto__ = Error; | ||
// eslint-disable-next-line no-proto | ||
CustomError.__proto__ = Error; | ||
} | ||
|
||
return CustomError ; | ||
|
||
return CustomError; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters