Skip to content

Commit 3f66c02

Browse files
committed
Lint all files.
- eslint file pattern was not catching subdirs properly. - Ignore webidl js files. - Fix lint issues.
1 parent d37c360 commit 3f66c02

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

.eslintrc.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,11 @@ module.exports = {
66
es2020: true
77
},
88
extends: 'eslint-config-digitalbazaar',
9-
root: true
9+
root: true,
10+
ignorePatterns: [
11+
'dist/',
12+
'tests/webidl/WebIDLParser.js',
13+
'tests/webidl/idlharness.js',
14+
'tests/webidl/testharness.js'
15+
]
1016
};

lib/documentLoaders/node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ module.exports = ({
110110
}
111111

112112
// "alternate" link header is a redirect
113-
alternate = linkHeaders['alternate'];
113+
alternate = linkHeaders.alternate;
114114
if(alternate &&
115115
alternate.type == 'application/ld+json' &&
116116
!(contentType || '')

lib/documentLoaders/xhr.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ module.exports = ({
9090
}
9191

9292
// "alternate" link header is a redirect
93-
alternate = linkHeaders['alternate'];
93+
alternate = linkHeaders.alternate;
9494
if(alternate &&
9595
alternate.type == 'application/ld+json' &&
9696
!(contentType || '').match(/^application\/(\w*\+)?json$/)) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary npm test",
105105
"coverage-ci": "cross-env NODE_ENV=test nyc --reporter=lcovonly npm run test",
106106
"coverage-report": "nyc report",
107-
"lint": "eslint *.js lib/**.js tests/**.js"
107+
"lint": "eslint ."
108108
},
109109
"nyc": {
110110
"exclude": [

0 commit comments

Comments
 (0)