Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6cfbc26

Browse files
committed
Use eslint-env "shared-node-browser" for shared handlebars code
1 parentb65135a commit6cfbc26

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

‎lib/.eslintrc.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module.exports={
22
env:{
3-
// Handlebars should run natively in the browser
4-
node:false
3+
// Handlebars not use node or browser-specific apis
4+
'shared-node-browser':true,
5+
node:false,
6+
browser:false
57
}
68
};

‎lib/handlebars/compiler/code-gen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* global define */
1+
/* global define, require */
22
import{isArray}from'../utils';
33

44
letSourceNode;
@@ -8,7 +8,7 @@ try {
88
if(typeofdefine!=='function'||!define.amd){
99
// We don't support this in AMD environments. For these environments, we assume that
1010
// they are running on the browser and thus have no need for the source-map library.
11-
letSourceMap=require('source-map');// eslint-disable-line no-undef
11+
letSourceMap=require('source-map');
1212
SourceNode=SourceMap.SourceNode;
1313
}
1414
}catch(err){

‎lib/handlebars/no-conflict.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
/* global global, window */
12
exportdefaultfunction(Handlebars){
23
/* istanbul ignore next */
3-
letroot=typeofglobal!=='undefined' ?global :window,// eslint-disable-line no-undef
4+
letroot=typeofglobal!=='undefined' ?global :window,
45
$Handlebars=root.Handlebars;
56
/* istanbul ignore next */
67
Handlebars.noConflict=function(){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp