Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #16 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 a366827 + 4139ae9 commit 7ae2d8b
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: MFozIsgJTNfpsN7jBEbCoaKtd76zLVlYvFTHViRmAqfOeu/IQgybq7T/fVK1Oufz6IKlXC8QaDldJsWyPRKOQ2MSOElZgxXcAmkWPXmmsdit7xyrwXDwefILP+Ucc7KnwzP2JCAswMTAoYU3SnLbhP45WfhvoIWVCuyMHswFwK69HmyONYEC0jOAjYdp/5vpjaU6qjtrZYpIqgVxNfovCHcrMGCC2vLIW4M+pg3vXbYpBVCr4pFkfRFQ+H+PxhbH6dq7whd5mTDSmsDa5psPUOhxgcwKZ9Xt0t303vR15C0aPCp5vebXSKuyxG1ZhY04ogB2BXcqu6F35zbLWcmprLOXXVsUvFXCeCY89FruGfAD/XsXGQGWtAauCAtYOE2qaJXsIsWBJpjsK28jxySCOPjAnVHwoUoDAm5nSip8+e+goMT/16QB6cpVMdZFltGmIsyMDY7G4Nvri91wAgR12U0sHlVPK3vU8+CIFqhRZI40VnXYkuZSUWfBMZEhtmZQhh58sD9M1JuAmEuAEOq6XiOY+jK9Q+1VMT+z3tlUkK21o+fpBFnO/O6bs5gcgJkCuxf8HezEDIjBdG45+tS9qjmmRvy+jr2DKPMT7zIHNYWUUy3tiXbb2A2yCMvuzjhiNFGCc6YBHkjVroel76t8H/ooDY+vzTc8cPXqGs4DDXY=
- secure: R6kG7o15OS3BSqMxt2VniiDa687XKzteP481OJxa/vZJRyCuRSRqUSQUN0rZw2rBRrcGvn3C6BBYahE4+8Gi6eyjSn7eUWuU8NY27wfCzIQ32BBk4zZKha4ah8rfYv5q3vgmUz5I9/B/G1xkcWixu1Qh6gK/e/JXWCjx+VYc5IkD9fTtoQ9QmhQtCycz/7AF8A3Fx7vLpYBkn9EfKSO0TRlPa3co8ZC3u33R7dnWtH6aXDlS5K0OePaUn0jw4/m5Eo9ogbNTZRsWDE9QVTwC2lkBASuzO28ukipn03/hopEpNeE4CX7h7nuJ36YcNBQPcNex9KKJ9CaHcda8QhMP8gnyUt3bdaADjzuXiSq1yAzd2IfFsqAqNwadHG2lBX8CZRdQ4AtGR71dPaaPJVdCDbjX94iyBjYpBAJ6jfMAC31XXUaHYrfjyvL9WjWHYVCTtofvWgILfgZPZJ1KHSpKRS00sK5TOChnxGd6CzCX2cbcMSigNu+Y3igrKnCFIlDPc4cGcYspIUhLPqT7HmMU/6CpD3DNYjkXN3wctBf+UkA6Nf2kX23xWPLUjvWrYkuABf9h2V3fjEQQcWrM1DzsKnUknLvkIcy4gIYT6pfVjPAGm5QEdRZJ/PrFZUuIhwqoHaviIxfYuOnWinusA1DXPUirbBAHef5zlyo/VzfNcSM=
17 changes: 16 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,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 @@ -69,6 +73,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 DecoupledEditor = require( '../../build/ckeditor' );

DecoupledEditor.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 DecoupledEditor from '../../build/ckeditor';

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

0 comments on commit 7ae2d8b

Please sign in to comment.