Skip to content

Commit 0ce53f1

Browse files
👕 refactor: Lint all JavaScript files.
1 parent 502c19f commit 0ce53f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+1061
-1202
lines changed

‎doc/scripts/header.js

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
1-
var domReady = function(callback) {
2-
var state = document.readyState ;
3-
if ( state === 'interactive' || state === 'complete' ) {
4-
callback() ;
5-
}
6-
else {
1+
const domReady = function (callback) {
2+
const state = document.readyState;
3+
if (state === 'interactive' || state === 'complete') {
4+
callback();
5+
} else {
76
document.addEventListener('DOMContentLoaded', callback);
87
}
9-
} ;
10-
8+
};
119

12-
domReady(function(){
13-
14-
var projectname = document.createElement('a');
10+
domReady(() => {
11+
const projectname = document.createElement('a');
1512
projectname.classList.add('project-name');
1613
projectname.text = 'aureooms/js-number';
17-
projectname.href = './index.html' ;
14+
projectname.href = './index.html';
1815

19-
var header = document.getElementsByTagName('header')[0] ;
20-
header.insertBefore(projectname,header.firstChild);
16+
const header = document.querySelectorAll('header')[0];
17+
header.insertBefore(projectname, header.firstChild);
2118

22-
var testlink = document.querySelector('header > a[data-ice="testLink"]') ;
23-
testlink.href = 'https://coveralls.io/github/aureooms/js-number' ;
24-
testlink.target = '_BLANK' ;
19+
const testlink = document.querySelector('header > a[data-ice="testLink"]');
20+
testlink.href = 'https://coveralls.io/github/aureooms/js-number';
21+
testlink.target = '_BLANK';
2522

26-
var searchBox = document.querySelector('.search-box');
27-
var input = document.querySelector('.search-input');
23+
const searchBox = document.querySelector('.search-box');
24+
const input = document.querySelector('.search-input');
2825

29-
// active search box when focus on searchBox.
30-
input.addEventListener('focus', function(){
26+
// Active search box when focus on searchBox.
27+
input.addEventListener('focus', () => {
3128
searchBox.classList.add('active');
3229
});
33-
3430
});

‎package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@
192192
"no-constant-condition": "off",
193193
"unicorn/prefer-math-trunc": "off",
194194
"unicorn/no-new-array": "off",
195+
"prefer-exponentiation-operator": "off",
196+
"no-return-assign": "off",
195197
"no-negated-condition": "off"
196198
},
197199
"overrides": [

‎src/arithmetic/add.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const add = ( a , b ) => a + b ;
1+
export const add = (a, b) => a + b;

‎src/arithmetic/constants/add1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const add1 = n => n + 1 ;
1+
export const add1 = (n) => n + 1;

‎src/arithmetic/constants/div2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const div2 = n => n / 2 ;
1+
export const div2 = (n) => n / 2;

‎src/arithmetic/constants/iadd1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const iadd1 = n => n += 1 ;
1+
export const iadd1 = (n) => (n += 1);

‎src/arithmetic/constants/idiv2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const idiv2 = n => n /= 2 ;
1+
export const idiv2 = (n) => (n /= 2);

‎src/arithmetic/constants/imul2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const imul2 = a => a *= 2 ;
1+
export const imul2 = (a) => (a *= 2);

‎src/arithmetic/constants/imul5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const imul5 = a => a *= 5 ;
1+
export const imul5 = (a) => (a *= 5);

‎src/arithmetic/constants/index.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
export * from "./add1.js" ;
2-
export * from "./div2.js" ;
3-
export * from "./iadd1.js" ;
4-
export * from "./idiv2.js" ;
5-
export * from "./imul2.js" ;
6-
export * from "./imul5.js" ;
7-
export * from "./isub1.js" ;
8-
export * from "./mul2.js" ;
9-
export * from "./mul5.js" ;
10-
export * from "./sub1.js" ;
1+
export * from './add1.js';
2+
export * from './div2.js';
3+
export * from './iadd1.js';
4+
export * from './idiv2.js';
5+
export * from './imul2.js';
6+
export * from './imul5.js';
7+
export * from './isub1.js';
8+
export * from './mul2.js';
9+
export * from './mul5.js';
10+
export * from './sub1.js';

0 commit comments

Comments
 (0)