Skip to content

Commit 29b8df5

Browse files
committed
Replace jshint, jscs with eslint.
1 parent b4f9711 commit 29b8df5

File tree

93 files changed

+790
-864
lines changed

Some content is hidden

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

93 files changed

+790
-864
lines changed

.eslintrc

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": "standard",
3+
"plugins": [
4+
"chai-friendly"
5+
],
6+
"rules": {
7+
"semi": [2, "always"],
8+
"space-before-function-paren": ["error", "never"],
9+
"no-useless-escape": 0,
10+
"no-unused-expressions": 0,
11+
"chai-friendly/no-unused-expressions": 2
12+
},
13+
"env": {
14+
"es6": true,
15+
"browser": true,
16+
"jquery": true,
17+
"mocha": true
18+
}
19+
}

.jscsrc

-7
This file was deleted.

.jshintignore

-1
This file was deleted.

.jshintrc

-34
This file was deleted.

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* Please `don't include dist/* files` on your commits.
44

55
## Coding convention
6-
* JSHint: http://www.jshint.com/about/
7-
* JSHint rule: https://github.com/summernote/summernote/blob/master/.jshintrc
6+
* eslint: https://eslint.org
7+
* eslint rule: https://github.com/summernote/summernote/blob/master/.eslintrc
88

99
## Document structure
1010

Gruntfile.js

+19-30
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = function (grunt) {
1+
module.exports = function(grunt) {
22
'use strict';
33

44
var customLaunchers = {
@@ -18,8 +18,8 @@ module.exports = function (grunt) {
1818
'SL_SAFARI': {
1919
base: 'SauceLabs',
2020
browserName: 'safari',
21-
  version: 'latest',
22-
  platform: 'OS X 10.12'
21+
version: 'latest',
22+
platform: 'OS X 10.12'
2323
},
2424
*/
2525
'SL_IE9': {
@@ -50,7 +50,7 @@ module.exports = function (grunt) {
5050
base: 'SauceLabs',
5151
browserName: 'firefox',
5252
version: 'latest',
53-
  platform: 'windows 8'
53+
platform: 'windows 8'
5454
}
5555
};
5656

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

7777
// for javascript convention.
78-
jshint: {
79-
all: {
80-
src: [
81-
'src/**/*.js',
82-
'plugin/**/*.js',
83-
'lang/**/*.js',
84-
'Gruntfile.js',
85-
'test/**/*.js',
86-
'!coverage/**/*.js',
87-
'build/*.js'
88-
],
89-
options: {
90-
jshintrc: true
91-
}
92-
}
93-
},
94-
95-
jscs: {
96-
src: ['*.js', 'src/**/*.js', 'test/**/*.js', 'plugin/**/*.js'],
97-
gruntfile: 'Gruntfile.js',
98-
build: 'build'
78+
eslint: {
79+
target: [
80+
'src/**/*.js',
81+
'plugin/**/*.js',
82+
'lang/**/*.js',
83+
'Gruntfile.js',
84+
'test/**/*.js',
85+
'!coverage/**/*.js',
86+
'build/*.js'
87+
]
9988
},
10089

10190
// uglify: minify javascript
@@ -105,8 +94,8 @@ module.exports = function (grunt) {
10594
},
10695
all: {
10796
files: [
108-
{ 'dist/summernote.min.js': ['dist/summernote.js'] },
109-
{ 'dist/summernote-bs4.min.js': ['dist/summernote-bs4.js'] },
97+
{ 'dist/summernote.min.js': ['dist/summernote.js'] },
98+
{ 'dist/summernote-bs4.min.js': ['dist/summernote-bs4.js'] },
11099
{
111100
expand: true,
112101
cwd: 'dist/lang',
@@ -151,7 +140,7 @@ module.exports = function (grunt) {
151140
compress: {
152141
main: {
153142
options: {
154-
archive: function () {
143+
archive: function() {
155144
return 'dist/summernote-{{version}}-dist.zip'.replace(
156145
'{{version}}',
157146
grunt.config('pkg.version')
@@ -220,7 +209,7 @@ module.exports = function (grunt) {
220209
all: {
221210
// Chrome, ChromeCanary, Firefox, Opera, Safari, PhantomJS, IE
222211
singleRun: true,
223-
browsers: ['PhantomJS'],
212+
browsers: ['PhantomJS']
224213
},
225214
dist: {
226215
singleRun: true,
@@ -291,7 +280,7 @@ module.exports = function (grunt) {
291280
grunt.registerTask('server', ['connect', 'watch']);
292281

293282
// lint
294-
grunt.registerTask('lint', ['jshint', 'jscs']);
283+
grunt.registerTask('lint', ['eslint']);
295284

296285
// test: unit test on test folder
297286
grunt.registerTask('test', ['lint', 'karma:watch']);

lang/summernote-ar-AR.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'ar-AR': {
44
font: {

lang/summernote-bg-BG.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'bg-BG': {
44
font: {

lang/summernote-ca-ES.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'ca-ES': {
44
font: {
@@ -105,7 +105,7 @@
105105
documentStyle: 'Estil del document',
106106
extraKeys: 'Tecles adicionals'
107107
},
108-
help : {
108+
help: {
109109
'insertParagraph': 'Inserir paràgraf',
110110
'undo': 'Desfer l\'última acció',
111111
'redo': 'Refer l\'última acció',

lang/summernote-cs-CZ.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'cs-CZ': {
44
font: {

lang/summernote-da-DK.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'da-DK': {
44
font: {

lang/summernote-de-DE.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'de-DE': {
44
font: {

lang/summernote-el-GR.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'el-GR': {
44
font: {

lang/summernote-es-ES.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'es-ES': {
44
font: {
@@ -105,7 +105,7 @@
105105
documentStyle: 'Estilo de documento',
106106
extraKeys: 'Teclas adicionales'
107107
},
108-
help : {
108+
help: {
109109
'insertParagraph': 'Insertar párrafo',
110110
'undo': 'Deshacer última acción',
111111
'redo': 'Rehacer última acción',

lang/summernote-es-EU.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'es-EU': {
44
font: {
@@ -41,10 +41,10 @@
4141
openInNewWindow: 'Leiho berri batean ireki'
4242
},
4343
table: {
44-
table: 'Taula' //Tabla
44+
table: 'Taula' // Tabla
4545
},
4646
hr: {
47-
insert: 'Marra horizontala txertatu' //Insertar línea horizontal
47+
insert: 'Marra horizontala txertatu' // Insertar línea horizontal
4848
},
4949
style: {
5050
style: 'Estiloa',

lang/summernote-fa-IR.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'fa-IR': {
44
font: {
@@ -102,4 +102,3 @@
102102
}
103103
});
104104
})(jQuery);
105-

lang/summernote-fi-FI.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'fi-FI': {
44
font: {

lang/summernote-fr-FR.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'fr-FR': {
44
font: {

lang/summernote-gl-ES.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'gl-ES': {
44
font: {
@@ -105,7 +105,7 @@
105105
documentStyle: 'Estilo de documento',
106106
extraKeys: 'Teclas adicionais'
107107
},
108-
help : {
108+
help: {
109109
'insertParagraph': 'Inserir parágrafo',
110110
'undo': 'Desfacer última acción',
111111
'redo': 'Refacer última acción',

lang/summernote-he-IL.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'he-IL': {
44
font: {

lang/summernote-hr-HR.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'hr-HR': {
44
font: {

lang/summernote-hu-HU.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'hu-HU': {
44
font: {

lang/summernote-id-ID.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'id-ID': {
44
font: {

lang/summernote-it-IT.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'it-IT': {
44
font: {

lang/summernote-ja-JP.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'ja-JP': {
44
font: {

lang/summernote-ko-KR.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'ko-KR': {
44
font: {

lang/summernote-lt-LT.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'lt-LT': {
44
font: {

lang/summernote-lt-LV.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'lv-LV': {
44
font: {

lang/summernote-mn-MN.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Starsoft Mongolia LLC Temuujin Ariunbold
22

3-
(function ($) {
3+
(function($) {
44
$.extend($.summernote.lang, {
55
'mn-MN': {
66
font: {

lang/summernote-nb-NO.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'nb-NO': {
44
font: {

lang/summernote-nl-NL.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'nl-NL': {
44
font: {

lang/summernote-pl-PL.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'pl-PL': {
44
font: {

lang/summernote-pt-BR.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'pt-BR': {
44
font: {

lang/summernote-pt-PT.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'pt-PT': {
44
font: {

lang/summernote-ro-RO.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function ($) {
1+
(function($) {
22
$.extend($.summernote.lang, {
33
'ro-RO': {
44
font: {

0 commit comments

Comments
 (0)