Skip to content

Commit

Permalink
Replace jshint, jscs with eslint.
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerwins committed Oct 4, 2017
1 parent b4f9711 commit 29b8df5
Show file tree
Hide file tree
Showing 93 changed files with 790 additions and 864 deletions.
19 changes: 19 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "standard",
"plugins": [
"chai-friendly"
],
"rules": {
"semi": [2, "always"],
"space-before-function-paren": ["error", "never"],
"no-useless-escape": 0,
"no-unused-expressions": 0,
"chai-friendly/no-unused-expressions": 2
},
"env": {
"es6": true,
"browser": true,
"jquery": true,
"mocha": true
}
}
7 changes: 0 additions & 7 deletions .jscsrc

This file was deleted.

1 change: 0 additions & 1 deletion .jshintignore

This file was deleted.

34 changes: 0 additions & 34 deletions .jshintrc

This file was deleted.

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Please `don't include dist/* files` on your commits.

## Coding convention
* JSHint: http://www.jshint.com/about/
* JSHint rule: https://github.com/summernote/summernote/blob/master/.jshintrc
* eslint: https://eslint.org
* eslint rule: https://github.com/summernote/summernote/blob/master/.eslintrc

## Document structure

Expand Down
49 changes: 19 additions & 30 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = function (grunt) {
module.exports = function(grunt) {
'use strict';

var customLaunchers = {
Expand All @@ -18,8 +18,8 @@ module.exports = function (grunt) {
'SL_SAFARI': {
base: 'SauceLabs',
browserName: 'safari',
  version: 'latest',
  platform: 'OS X 10.12'
version: 'latest',
platform: 'OS X 10.12'
},
*/
'SL_IE9': {
Expand Down Expand Up @@ -50,7 +50,7 @@ module.exports = function (grunt) {
base: 'SauceLabs',
browserName: 'firefox',
version: 'latest',
  platform: 'windows 8'
platform: 'windows 8'
}
};

Expand All @@ -75,27 +75,16 @@ module.exports = function (grunt) {
},

// for javascript convention.
jshint: {
all: {
src: [
'src/**/*.js',
'plugin/**/*.js',
'lang/**/*.js',
'Gruntfile.js',
'test/**/*.js',
'!coverage/**/*.js',
'build/*.js'
],
options: {
jshintrc: true
}
}
},

jscs: {
src: ['*.js', 'src/**/*.js', 'test/**/*.js', 'plugin/**/*.js'],
gruntfile: 'Gruntfile.js',
build: 'build'
eslint: {
target: [
'src/**/*.js',
'plugin/**/*.js',
'lang/**/*.js',
'Gruntfile.js',
'test/**/*.js',
'!coverage/**/*.js',
'build/*.js'
]
},

// uglify: minify javascript
Expand All @@ -105,8 +94,8 @@ module.exports = function (grunt) {
},
all: {
files: [
{ 'dist/summernote.min.js': ['dist/summernote.js'] },
{ 'dist/summernote-bs4.min.js': ['dist/summernote-bs4.js'] },
{ 'dist/summernote.min.js': ['dist/summernote.js'] },
{ 'dist/summernote-bs4.min.js': ['dist/summernote-bs4.js'] },
{
expand: true,
cwd: 'dist/lang',
Expand Down Expand Up @@ -151,7 +140,7 @@ module.exports = function (grunt) {
compress: {
main: {
options: {
archive: function () {
archive: function() {
return 'dist/summernote-{{version}}-dist.zip'.replace(
'{{version}}',
grunt.config('pkg.version')
Expand Down Expand Up @@ -220,7 +209,7 @@ module.exports = function (grunt) {
all: {
// Chrome, ChromeCanary, Firefox, Opera, Safari, PhantomJS, IE
singleRun: true,
browsers: ['PhantomJS'],
browsers: ['PhantomJS']
},
dist: {
singleRun: true,
Expand Down Expand Up @@ -291,7 +280,7 @@ module.exports = function (grunt) {
grunt.registerTask('server', ['connect', 'watch']);

// lint
grunt.registerTask('lint', ['jshint', 'jscs']);
grunt.registerTask('lint', ['eslint']);

// test: unit test on test folder
grunt.registerTask('test', ['lint', 'karma:watch']);
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-ar-AR.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'ar-AR': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-bg-BG.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'bg-BG': {
font: {
Expand Down
4 changes: 2 additions & 2 deletions lang/summernote-ca-ES.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'ca-ES': {
font: {
Expand Down Expand Up @@ -105,7 +105,7 @@
documentStyle: 'Estil del document',
extraKeys: 'Tecles adicionals'
},
help : {
help: {
'insertParagraph': 'Inserir paràgraf',
'undo': 'Desfer l\'última acció',
'redo': 'Refer l\'última acció',
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-cs-CZ.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'cs-CZ': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-da-DK.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'da-DK': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-de-DE.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'de-DE': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-el-GR.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'el-GR': {
font: {
Expand Down
4 changes: 2 additions & 2 deletions lang/summernote-es-ES.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'es-ES': {
font: {
Expand Down Expand Up @@ -105,7 +105,7 @@
documentStyle: 'Estilo de documento',
extraKeys: 'Teclas adicionales'
},
help : {
help: {
'insertParagraph': 'Insertar párrafo',
'undo': 'Deshacer última acción',
'redo': 'Rehacer última acción',
Expand Down
6 changes: 3 additions & 3 deletions lang/summernote-es-EU.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'es-EU': {
font: {
Expand Down Expand Up @@ -41,10 +41,10 @@
openInNewWindow: 'Leiho berri batean ireki'
},
table: {
table: 'Taula' //Tabla
table: 'Taula' // Tabla
},
hr: {
insert: 'Marra horizontala txertatu' //Insertar línea horizontal
insert: 'Marra horizontala txertatu' // Insertar línea horizontal
},
style: {
style: 'Estiloa',
Expand Down
3 changes: 1 addition & 2 deletions lang/summernote-fa-IR.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'fa-IR': {
font: {
Expand Down Expand Up @@ -102,4 +102,3 @@
}
});
})(jQuery);

2 changes: 1 addition & 1 deletion lang/summernote-fi-FI.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'fi-FI': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-fr-FR.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'fr-FR': {
font: {
Expand Down
4 changes: 2 additions & 2 deletions lang/summernote-gl-ES.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'gl-ES': {
font: {
Expand Down Expand Up @@ -105,7 +105,7 @@
documentStyle: 'Estilo de documento',
extraKeys: 'Teclas adicionais'
},
help : {
help: {
'insertParagraph': 'Inserir parágrafo',
'undo': 'Desfacer última acción',
'redo': 'Refacer última acción',
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-he-IL.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'he-IL': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-hr-HR.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'hr-HR': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-hu-HU.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'hu-HU': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-id-ID.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'id-ID': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-it-IT.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'it-IT': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-ja-JP.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'ja-JP': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-ko-KR.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'ko-KR': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-lt-LT.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'lt-LT': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-lt-LV.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'lv-LV': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-mn-MN.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Starsoft Mongolia LLC Temuujin Ariunbold

(function ($) {
(function($) {
$.extend($.summernote.lang, {
'mn-MN': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-nb-NO.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'nb-NO': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-nl-NL.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'nl-NL': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-pl-PL.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'pl-PL': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-pt-BR.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'pt-BR': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-pt-PT.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'pt-PT': {
font: {
Expand Down
2 changes: 1 addition & 1 deletion lang/summernote-ro-RO.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function ($) {
(function($) {
$.extend($.summernote.lang, {
'ro-RO': {
font: {
Expand Down
Loading

0 comments on commit 29b8df5

Please sign in to comment.