Skip to content

Commit

Permalink
Merge pull request #57 from ckeditor/t/ckeditor5/1236
Browse files Browse the repository at this point in the history
Internal: Introduced ESLint and Travis. See ckeditor/ckeditor5#1236.
  • Loading branch information
oleq authored Jan 4, 2019
2 parents 5181566 + 20c4260 commit 2baacfa
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/

/* eslint-env node */

'use strict';

module.exports = {
extends: 'ckeditor5'
};
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
sudo: required
dist: trusty
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
language: node_js
node_js:
- '8'
cache:
- node_modules
branches:
except:
- stable
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm config set package-lock false
- npm i -g npm@^5.7.1
install:
- npm install @ckeditor/ckeditor5-dev-tests
- ckeditor5-dev-tests-install-dependencies
script:
- ckeditor5-dev-tests-travis
env:
global:
- secure: iZjTlmSDEgnr+pJ7qfaLdU6b9yBNzcCi11RIiTmc1LyF+10tyPXQogAV/h3onhdDueZvzIw2eQ3jyVXuQVEgNJB0ruId+xAK2dliuWSC0L5dx/ln3dlubOsQiS/mKUFtJLXhgczs5gLjUjyzOqnYSmgleLn0vQ3Rxie0qb23NeNam8Dxwen9Lpns1u83OdYbaftJfgEDloNxaCCnidoNisXzMO5fNccFokjBwBh/O0f/V+zfIR5ATnQ06UdHxfBdoB2dyVTqMt8ctUTHqMTH3IGY+fubithRgU5tLBm3iP4wfx2YkH/ng6LwJBVZDtq/6ny7N+NEUDPPsNE6kZ+InOmHi3fiEdTi/JQhZEtfA9U6bCJfzE/BBhP46HlDoYJwYbsrJsSBU2mTRJI3o48NCfosUuglvp7mXnpDLgDXezY62UyGLbCUk+F/jiA7qz7NvH7kdjSK9FloyNNL6ODVBL85UrQIMvHLLoVciN9OWYyNjwfMOvJFScv+7GX3JIL9H3ArYOfDnd1uUhZARNo+WIeRlrSKydyJa+CQebwNTnTbT7vTtX5i6cJzttkjkxe4kTYWhhQLiQCwwtX6ABSiNhJn+9gBHYac1yFWL06Ireop8NvWXNqni8f1HZrdqg+xEwRdqju0lSThizVW+Ioulb7H1cYJhbKXlT1w1xLlxIU=
- secure: Ww8ia+iA1REyGQRatUB42jjegFgBozSdvxLMLVKveCarc1p7/hUmurhdZtaNoePwDayAa4fVNaSdTE899mrezpvP0pNK8pwB4+/RplycRMshNh/aDMxyl/Puy3EAEGSUx3x9BxuF8UFWHok5dNzgtxoFWUoMUxJ+0xH/rcQXRGKzYUnFWGBzsyEn5A0k/HV0RLINM4veYWwcl/0JxOIx8cqa+ZRu0VWfnDf84z6Yy/pncXjcm1LZ0PYQ7f89bULUyxRnpSbg09Mx2hV7eZlZQPfEsJB48Ti5veHKA0Xos6180+0MV9Iiu6hkax0mP1H+1tv9Le8nGMViFEQHpo1/Dkkjyg/EvEmkSs4CRVcEBSgAEU4O6T+OJ+djgllGy+bTIDiwAmvijQ1B7SWiN8Qg39KQ8wcJSfK1uFkwE9QT9DhOEDVVLsoEulkshdUw32ANNRglvenuS3mxKNPWXNpIsvliqDvXA4HJ8lH2aJnPH2th+8s4P9nxyqF5nW8U0ee78z4ilRy0vDtJaVm/nhiyghRL9tdCifcsOpeJDrluOURFyWQlp7ltB9Q0/psCMQusyg0mYpnyf9Aai7AAWB1yx4ra97SLRBNEF66DpBx/Gnw4TYKQLyh6VZWHt9Im9MCVoaAqUY3FTLl06sq8d2/DRYoxHEPN1K3Wqol0viktg3g=
17 changes: 16 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
"@ckeditor/ckeditor5-table": "^11.0.1",
"@ckeditor/ckeditor5-theme-lark": "^12.0.0",
"@ckeditor/ckeditor5-upload": "^10.0.4",
"eslint": "^5.5.0",
"eslint-config-ckeditor5": "^1.0.7",
"husky": "^0.14.3",
"lint-staged": "^7.0.0",
"postcss-loader": "^3.0.0",
"raw-loader": "^1.0.0",
"style-loader": "^0.23.0",
Expand All @@ -66,6 +70,17 @@
},
"scripts": {
"build": "webpack --mode production",
"lint": "eslint --quiet '**/*.js'",
"precommit": "lint-staged",
"preversion": "npm run build; if [ -n \"$(git status src/ckeditor.js build/ --porcelain)\" ]; then git add -u src/ckeditor.js build/ && git commit -m 'Internal: Build.'; fi"
}
},
"lint-staged": {
"**/*.js": [
"eslint --quiet"
]
},
"eslintIgnore": [
"build/**",
"packages/**"
]
}
3 changes: 3 additions & 0 deletions tests/manual/ckeditor-cjs-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* For licensing, see LICENSE.md.
*/

/* eslint-env commonjs */
/* globals window, document, console */

const ClassicEditor = require( '../../build/ckeditor' );

ClassicEditor.create( document.querySelector( '#editor' ) )
Expand Down
2 changes: 2 additions & 0 deletions tests/manual/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* For licensing, see LICENSE.md.
*/

/* globals window, document, console */

import ClassicEditor from '../../build/ckeditor';

ClassicEditor.create( document.querySelector( '#editor' ) )
Expand Down

0 comments on commit 2baacfa

Please sign in to comment.