-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added eslint,lint-staged and Husky (#519)
* updated privacy link (#413) Co-authored-by: Cess <[email protected]> * FIX: adds missing entries in .gitignore (#423) adds .vscode in .gitignore adds _SpecRunner.html in .gitignore Co-authored-by: Emily Ashley <[email protected]> Co-authored-by: Govind Goel <[email protected]> Co-authored-by: Cess <[email protected]> * added eslint, Husky and lint-staged Co-authored-by: Kaira Hiwatari <[email protected]> Co-authored-by: Cess <[email protected]> Co-authored-by: Shreya Sharma <[email protected]> Co-authored-by: Emily Ashley <[email protected]> Co-authored-by: Govind Goel <[email protected]>
- Loading branch information
1 parent
a228d06
commit 0daf8cb
Showing
41 changed files
with
18,455 additions
and
16,671 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
dist/*.js |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module.exports = { | ||
'env': { | ||
'browser': true, | ||
'es6': true, | ||
}, | ||
'extends': [ | ||
'google', | ||
], | ||
'globals': { | ||
'Atomics': 'readonly', | ||
'SharedArrayBuffer': 'readonly', | ||
}, | ||
'parserOptions': { | ||
'ecmaVersion': 11, | ||
'sourceType': 'module', | ||
}, | ||
'rules': { | ||
'max-len': 0, | ||
'no-var': 0, | ||
'new-cap': 0, | ||
'no-invalid-this': 0, // PublicLab.TagsModule | ||
'require-jsdoc': 0, // PublicLab.TitleModule.Related.js | ||
'guard-for-in': 0, // PublicLAb.Editor.js | ||
'no-unused-vars': 0, | ||
'quotes': 0, | ||
'comma-dangle': 0 | ||
}, | ||
}; |
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,83 +1,81 @@ | ||
module.exports = function(grunt) { | ||
grunt.loadNpmTasks('grunt-browserify'); | ||
|
||
grunt.loadNpmTasks('grunt-browserify'); | ||
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | ||
|
||
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
watch: { | ||
options: { | ||
livereload: true | ||
}, | ||
source: { | ||
files: [ | ||
'src/*.js', | ||
'src/*/*.js', | ||
'Gruntfile.js' | ||
], | ||
tasks: ['build:js'] | ||
} | ||
}, | ||
|
||
watch: { | ||
options : { | ||
livereload: true | ||
}, | ||
source: { | ||
files: [ | ||
'src/*.js', | ||
'src/*/*.js', | ||
'Gruntfile.js' | ||
], | ||
tasks: [ 'build:js' ] | ||
} | ||
}, | ||
|
||
browserify: { | ||
dist: { | ||
src: [ | ||
'src/PublicLab.Editor.js' | ||
], | ||
dest: 'dist/PublicLab.Editor.js' | ||
}, | ||
debug: { | ||
options : { | ||
browserifyOptions: { | ||
debug: true | ||
} | ||
}, | ||
src: [ | ||
'src/PublicLab.Editor.js' | ||
], | ||
dest: 'dist/PublicLab.Editor.js' | ||
} | ||
browserify: { | ||
dist: { | ||
src: [ | ||
'src/PublicLab.Editor.js' | ||
], | ||
dest: 'dist/PublicLab.Editor.js' | ||
}, | ||
debug: { | ||
options: { | ||
browserifyOptions: { | ||
debug: true | ||
} | ||
}, | ||
src: [ | ||
'src/PublicLab.Editor.js' | ||
], | ||
dest: 'dist/PublicLab.Editor.js' | ||
} | ||
}, | ||
|
||
jasmine: { | ||
publiclabeditor: { | ||
src: 'dist/*.js', | ||
options: { | ||
specs: 'spec/javascripts/*spec.js', | ||
vendor: [ | ||
'node_modules/jquery/dist/jquery.min.js', | ||
'node_modules/bootstrap/dist/js/bootstrap.min.js', | ||
'node_modules/blueimp-file-upload/js/vendor/jquery.ui.widget.js', | ||
'node_modules/blueimp-file-upload/js/jquery.iframe-transport.js', | ||
'node_modules/blueimp-file-upload/js/jquery.fileupload.js', | ||
'node_modules/typeahead.js/dist/typeahead.jquery.js', | ||
'node_modules/typeahead.js/dist/bloodhound.js', | ||
'node_modules/bootstrap-tokenfield/dist/bootstrap-tokenfield.js', | ||
'node_modules/jasmine-jquery/lib/jasmine-jquery.js', | ||
'node_modules/jasmine-ajax/lib/mock-ajax.js', | ||
'https://maps.googleapis.com/maps/api/js?libraries=places&language=en&key=AIzaSyDWgc7p4WWFsO3y0MTe50vF4l4NUPcPuwE', | ||
'node_modules/leaflet-blurred-location/dist/Leaflet.BlurredLocation.js', | ||
'node_modules/leaflet/dist/leaflet.js' | ||
] | ||
} | ||
} | ||
jasmine: { | ||
publiclabeditor: { | ||
src: 'dist/*.js', | ||
options: { | ||
specs: 'spec/javascripts/*spec.js', | ||
vendor: [ | ||
'node_modules/jquery/dist/jquery.min.js', | ||
'node_modules/bootstrap/dist/js/bootstrap.min.js', | ||
'node_modules/blueimp-file-upload/js/vendor/jquery.ui.widget.js', | ||
'node_modules/blueimp-file-upload/js/jquery.iframe-transport.js', | ||
'node_modules/blueimp-file-upload/js/jquery.fileupload.js', | ||
'node_modules/typeahead.js/dist/typeahead.jquery.js', | ||
'node_modules/typeahead.js/dist/bloodhound.js', | ||
'node_modules/bootstrap-tokenfield/dist/bootstrap-tokenfield.js', | ||
'node_modules/jasmine-jquery/lib/jasmine-jquery.js', | ||
'node_modules/jasmine-ajax/lib/mock-ajax.js', | ||
'https://maps.googleapis.com/maps/api/js?libraries=places&language=en&key=AIzaSyDWgc7p4WWFsO3y0MTe50vF4l4NUPcPuwE', | ||
'node_modules/leaflet-blurred-location/dist/Leaflet.BlurredLocation.js', | ||
'node_modules/leaflet/dist/leaflet.js' | ||
] | ||
} | ||
} | ||
} | ||
|
||
}); | ||
|
||
/* Default (development): Watch files and build on change. */ | ||
grunt.registerTask('default', ['watch' , 'jasmine']); | ||
}); | ||
|
||
grunt.registerTask('build', [ | ||
'browserify:dist' | ||
]); | ||
/* Default (development): Watch files and build on change. */ | ||
grunt.registerTask('default', ['watch', 'jasmine']); | ||
|
||
grunt.registerTask('debug', [ | ||
'browserify:debug' | ||
]); | ||
grunt.registerTask('build', [ | ||
'browserify:dist' | ||
]); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-jasmine'); | ||
grunt.registerTask('debug', [ | ||
'browserify:debug' | ||
]); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-jasmine'); | ||
}; |
Oops, something went wrong.